/* =========================================================
   SAKIGAKE eSports — Global Styles
   Modern Neon / Cyberpunk-lite
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Noto+Sans+JP:wght@400;500;700;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* Palette */
  --bg-0: #05070d;
  --bg-1: #0a0e1a;
  --bg-2: #0f1524;
  --bg-3: #141c31;
  --line: rgba(0, 212, 255, 0.18);
  --line-strong: rgba(0, 212, 255, 0.45);
  --fg: #e6ecff;
  --fg-dim: #8a95b8;
  --fg-mute: #4a5578;

  --neon-blue: #00d4ff;
  --neon-cyan: #7fffff;
  --neon-pink: #ff2e88;
  --neon-purple: #b061ff;
  --warn: #ffb547;
  --live: #ff2e5c;

  /* Type */
  --f-en: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --f-jp: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Motion */
  --e-out: cubic-bezier(.2, .8, .2, 1);
  --e-in: cubic-bezier(.7, 0, .84, 0);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg-0);
  color: var(--fg);
  font-family: var(--f-jp);
  font-weight: 400;
  font-feature-settings: "palt";
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  position: relative;
}

/* Global cyberpunk grid backdrop */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 90%);
  z-index: 0;
}

/* Vignette + scanlines */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at top, transparent 40%, rgba(0, 0, 0, 0.6) 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.008) 0px, rgba(255,255,255,0.008) 1px, transparent 1px, transparent 3px);
  z-index: 1;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* =========================================================
   Layout
   ========================================================= */

.wrap {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}

section { position: relative; z-index: 2; }

/* =========================================================
   Ticker (Live status bar)
   ========================================================= */

.ticker-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 7, 13, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  height: 36px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  overflow: hidden;
}

.ticker-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  height: 100%;
  border-right: 1px solid var(--line);
  flex-shrink: 0;
  text-transform: uppercase;
  font-weight: 700;
}

.ticker-status.live { color: var(--live); }
.ticker-status.offline { color: var(--fg-mute); }

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.ticker-status.live .status-dot {
  animation: pulse-live 1.4s ease-in-out infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 12px currentColor; }
  50% { opacity: 0.5; transform: scale(0.8); box-shadow: 0 0 4px currentColor; }
}

.ticker-track {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-content {
  display: flex;
  gap: 48px;
  padding-left: 32px;
  white-space: nowrap;
  animation: ticker-scroll 60s linear infinite;
}

.ticker-content > span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg-dim);
}

.ticker-content .tag {
  color: var(--neon-blue);
  font-weight: 700;
}

.ticker-content .tag.pink { color: var(--neon-pink); }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.ticker-clock {
  padding: 0 16px;
  border-left: 1px solid var(--line);
  color: var(--fg-dim);
  height: 100%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* =========================================================
   Header / Nav
   ========================================================= */

.site-header {
  position: sticky;
  top: 36px;
  z-index: 90;
  background: rgba(5, 7, 13, 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 32px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-brand .logo-svg {
  height: 48px;
  width: auto;
}

.nav-menu {
  display: flex;
  gap: 4px;
  align-items: center;
  list-style: none;
  font-family: var(--f-en);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-menu a {
  padding: 10px 16px;
  color: var(--fg-dim);
  position: relative;
  transition: color 0.25s var(--e-out);
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--fg);
}

.nav-menu a::before {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 1px;
  background: var(--neon-blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--e-out);
  box-shadow: 0 0 8px var(--neon-blue);
}

.nav-menu a:hover::before,
.nav-menu a.active::before { transform: scaleX(1); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border: 1px solid var(--neon-blue);
  color: var(--neon-blue);
  font-family: var(--f-en);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--e-out);
}

.nav-cta:hover {
  background: var(--neon-blue);
  color: var(--bg-0);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.5);
}

.nav-cta::before {
  content: '›';
  font-size: 16px;
  line-height: 0;
  transition: transform 0.3s var(--e-out);
}

.nav-cta:hover::before { transform: translateX(4px); }

/* =========================================================
   Buttons / CTAs
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  font-family: var(--f-en);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1px solid;
  position: relative;
  transition: all 0.3s var(--e-out);
  cursor: pointer;
  overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

.btn-primary {
  background: var(--neon-blue);
  color: var(--bg-0);
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 rgba(0, 212, 255, 0.5);
}

.btn-primary:hover {
  box-shadow: 0 0 32px rgba(0, 212, 255, 0.7), inset 0 0 20px rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  border-color: var(--neon-blue);
  color: var(--neon-blue);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.btn-pink {
  background: var(--neon-pink);
  color: #fff;
  border-color: var(--neon-pink);
}
.btn-pink:hover {
  box-shadow: 0 0 32px rgba(255, 46, 136, 0.7);
  transform: translateY(-2px);
}

.btn .arrow {
  transition: transform 0.3s var(--e-out);
}
.btn:hover .arrow { transform: translateX(4px); }

/* =========================================================
   Section headings
   ========================================================= */

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 56px;
}

.section-head .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--neon-blue);
}

.section-head .eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--neon-blue);
  box-shadow: 0 0 6px var(--neon-blue);
}

.section-head .num {
  font-family: var(--f-mono);
  color: var(--fg-mute);
  margin-left: auto;
  font-size: 11px;
  letter-spacing: 0.2em;
}

.section-title {
  font-family: var(--f-en);
  font-weight: 700;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.section-title .jp {
  display: block;
  font-family: var(--f-jp);
  font-size: 0.42em;
  font-weight: 500;
  color: var(--fg-dim);
  margin-top: 12px;
  letter-spacing: 0.02em;
}

.section-lead {
  max-width: 640px;
  color: var(--fg-dim);
  font-size: 15px;
  line-height: 1.9;
}

section.pad {
  padding: 120px 0;
  border-top: 1px solid var(--line);
}

/* Corner brackets utility */
.brackets {
  position: relative;
}
.brackets::before,
.brackets::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--neon-blue);
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
}
.brackets::before {
  top: -1px; left: -1px;
  border-right: none; border-bottom: none;
}
.brackets::after {
  bottom: -1px; right: -1px;
  border-left: none; border-top: none;
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 80px 0 40px;
  position: relative;
  z-index: 2;
  background: linear-gradient(to bottom, transparent, rgba(0, 212, 255, 0.03));
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}

.footer-brand p {
  color: var(--fg-dim);
  font-size: 13px;
  margin-top: 20px;
  max-width: 320px;
  line-height: 1.8;
}

.footer-col h5 {
  font-family: var(--f-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--neon-blue);
  margin-bottom: 20px;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  color: var(--fg-dim);
  font-size: 13px;
  transition: color 0.2s var(--e-out);
}
.footer-col a:hover { color: var(--fg); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.1em;
}

.footer-bottom .coords { display: flex; gap: 20px; }

/* =========================================================
   Utilities
   ========================================================= */

.mono { font-family: var(--f-mono); }
.en { font-family: var(--f-en); }
.dim { color: var(--fg-dim); }
.mute { color: var(--fg-mute); }
.blue { color: var(--neon-blue); }
.pink { color: var(--neon-pink); }

.reveal {
  transition: opacity 0.9s var(--e-out), transform 0.9s var(--e-out);
  opacity: 1;
  transform: none;
}
/* Only hide when JS is active AND the pending marker is on the element.
   main.js adds .pending to elements below the initial fold, then removes it
   (via .in) once they enter the viewport. Above-the-fold elements never get
   .pending, so they render immediately with no chance of a stuck-hidden bug. */
html.js .reveal.pending {
  opacity: 0 !important;
  transform: translateY(24px) !important;
}
html.js .reveal.in {
  opacity: 1 !important;
  transform: translateY(0) !important;
}
.reveal.d1 { transition-delay: 0.1s; }
.reveal.d2 { transition-delay: 0.2s; }
.reveal.d3 { transition-delay: 0.3s; }
.reveal.d4 { transition-delay: 0.4s; }

/* Responsive */
@media (max-width: 900px) {
  .wrap { padding: 0 20px; }
  .nav-menu { display: none; }
  section.pad { padding: 80px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
