/* Cinematic landing — Display layer for COYG.
   Tokens from DESIGN.md (High-Octane cinematic). Sharp corners only. */

:root {
  --pitch-black: #0a0a0a;
  --surface: #210e0c;
  --surface-bright: #4b3330;
  --on-surface: #ffdad5;
  --on-surface-variant: #eabcb5;
  --outline: #b08781;
  --outline-variant: #5f3e3a;
  --primary: #ffb4a9;
  --flash-from: #ef0107;
  --flash-to: #990005;
  --flash-red: #ef0107;
  --on-primary: #690001;
  --tertiary: #afc6ff;
  --glass-fill: rgba(10, 10, 10, 0.62);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-glow: rgba(239, 1, 7, 0.2);
  --flash-gradient: linear-gradient(135deg, #ef0107 0%, #990005 100%);
  --font-display: "Archivo Narrow", "Arial Narrow", Impact, sans-serif;
  --font-body: "Geist", Inter, system-ui, sans-serif;
  --gutter: 24px;
  --margin: 40px;
}

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

html,
body {
  min-height: 100%;
}

body.landing {
  background: var(--pitch-black);
  color: #fff;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
}

/* --- Atmosphere --- */
.landing-grain,
.landing-grain::after {
  pointer-events: none;
}

.landing-grain {
  position: fixed;
  inset: 0;
  z-index: 40;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- Header --- */
.site-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 18px var(--margin);
  background: #000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wordmark {
  justify-self: start;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  letter-spacing: 0.06em;
  color: var(--flash-red);
  text-decoration: none;
  text-transform: uppercase;
  text-shadow: 0 0 24px rgba(239, 1, 7, 0.45);
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a,
.login-link {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.login-link:hover,
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--flash-red);
}

.login-link {
  justify-self: end;
  flex-shrink: 0;
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 72vh;
  padding: 64px var(--margin) 88px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(10, 10, 10, 0.55) 70%, var(--pitch-black) 100%),
    radial-gradient(900px 420px at 88% 20%, rgba(239, 1, 7, 0.42), transparent 60%),
    radial-gradient(700px 380px at 10% 80%, rgba(153, 0, 5, 0.28), transparent 55%),
    url("/static/images/arsenal03.webp") center 30% / cover no-repeat;
}

.hero-leaks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(118deg, transparent 42%, rgba(239, 1, 7, 0.28) 52%, transparent 62%),
    linear-gradient(152deg, transparent 55%, rgba(255, 40, 40, 0.18) 72%, transparent 86%);
  mix-blend-mode: screen;
}

.hero-slash {
  position: absolute;
  right: 8%;
  top: 18%;
  width: 42vw;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(239, 1, 7, 0.7), transparent);
  transform: rotate(-32deg);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 920px;
}

.champion-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 10px 16px;
  background: var(--flash-gradient);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  box-shadow: 0 0 28px rgba(239, 1, 7, 0.45);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(64px, 10vw, 120px);
  line-height: 0.86;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.hero-title .outline {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1.5px #fff;
  paint-order: stroke fill;
}

.hero-title .flash {
  display: block;
  color: var(--flash-red);
  text-shadow: 0 0 40px rgba(239, 1, 7, 0.55);
}

.hero-quote {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 28px 0 32px;
  max-width: 520px;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
}

.hero-quote::before {
  content: "";
  flex-shrink: 0;
  width: 2px;
  align-self: stretch;
  background: var(--flash-red);
  box-shadow: 0 0 10px var(--flash-red);
}

.btn-flash {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--flash-gradient);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 0;
  cursor: pointer;
  transition: box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-flash:hover {
  filter: brightness(1.12);
  box-shadow: 0 0 20px rgba(239, 1, 7, 0.7);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1px solid var(--flash-red);
  color: var(--flash-red);
  background: transparent;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.btn-ghost:hover {
  background: rgba(239, 1, 7, 0.12);
  box-shadow: 0 0 20px rgba(239, 1, 7, 0.45);
}

/* --- Arena grid --- */
.arena {
  position: relative;
  z-index: 2;
  margin-top: -48px;
  padding: 0 var(--margin) 72px;
}

.arena-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-areas:
    "matchday matchday fridge"
    "wengz spiral matrix"
    "speed speed speed";
  gap: var(--gutter);
  max-width: 1280px;
  margin: 0 auto;
}

.glass {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 28px;
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  box-shadow:
    inset 0 0 18px 0 var(--glass-glow),
    0 0 40px rgba(239, 1, 7, 0.06);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  text-decoration: none;
  color: #fff;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.glass:hover {
  border-color: rgba(239, 1, 7, 0.45);
  box-shadow:
    inset 0 0 22px 0 rgba(239, 1, 7, 0.28),
    0 0 28px rgba(239, 1, 7, 0.18);
  transform: translateY(-2px);
}

.glass h2,
.glass h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.card-matchday { grid-area: matchday; min-height: 280px; }
.card-fridge { grid-area: fridge; }
.card-wengz { grid-area: wengz; }
.card-spiral { grid-area: spiral; }
.card-matrix { grid-area: matrix; }
.card-speed { grid-area: speed; min-height: 180px; flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; }

.card-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

.card-matchday h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1;
  margin: 8px 0 12px;
}

.card-fridge h3,
.card-wengz h3,
.card-spiral h3,
.card-matrix h3 {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  line-height: 1.05;
  margin-bottom: 10px;
}

.card-fridge h3 { color: #d7e4ff; }

.card-speed h3 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 0.95;
  margin-bottom: 8px;
}

.glass p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  line-height: 1.5;
  max-width: 46ch;
}

.wengz-quote {
  color: var(--flash-red) !important;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 1.05rem !important;
}

.meta-red {
  color: var(--flash-red);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.live-pill {
  position: absolute;
  top: 22px;
  right: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}

.live-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--flash-red);
  box-shadow: 0 0 10px var(--flash-red);
  animation: livePulse 1.4s ease-in-out infinite;
}

.card-foot {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.card-foot .arrow {
  color: var(--flash-red);
  font-size: 1.2rem;
}

.card-icon {
  position: absolute;
  right: 20px;
  bottom: 18px;
  width: 36px;
  height: 36px;
  opacity: 0.7;
  color: #fff;
}

.spiral-mark {
  position: absolute;
  right: -18px;
  bottom: -28px;
  width: 160px;
  height: 160px;
  opacity: 0.28;
  pointer-events: none;
}

/* Matchday live data */
.md-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  flex: 1;
}

.md-fixture {
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary);
}

.md-summary {
  font-size: 14px;
  color: var(--on-surface-variant);
}

.avg-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
}

.avg-row .avg-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(239, 1, 7, 0.25));
}

.avg-row .avg-score {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
}

.avg-row .avg-sep { opacity: 0.6; }

.ticker {
  overflow: hidden;
  border-top: 1px solid var(--outline-variant);
  border-bottom: 1px solid var(--outline-variant);
  margin-top: 6px;
}

.ticker-track {
  display: inline-block;
  white-space: nowrap;
  padding: 8px 0;
  padding-left: 100%;
  animation: ticker-scroll 18s linear infinite;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--flash-red);
}

.md-recent {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  gap: 8px;
}

.md-recent .fa-reddit { color: var(--flash-red); }

.speed-copy { flex: 1; }

/* --- Footer --- */
.site-footer {
  background: #000;
  padding: 28px var(--margin);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer .wordmark {
  font-size: 1.15rem;
  text-shadow: none;
}

.footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
}

.footer-links a:hover { color: var(--flash-red); }

.footer-legal {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  max-width: 420px;
  text-align: right;
}

.footer-legal a { color: rgba(255, 255, 255, 0.7); text-decoration: none; }
.footer-legal a:hover { color: var(--flash-red); }

.community-row {
  width: 100%;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 8px;
}

.community-row a {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.45);
}

.community-row a:hover { color: var(--flash-red); }

#championsFireworks {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

#championsFireworks.champions-fireworks--fade { opacity: 0; transition: opacity 0.6s ease-out; }

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

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

@media (max-width: 1024px) {
  .arena-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "matchday matchday"
      "fridge fridge"
      "wengz spiral"
      "matrix matrix"
      "speed speed";
  }

  .card-speed { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 768px) {
  :root { --margin: 20px; }

  .site-header {
    grid-template-columns: 1fr auto;
    padding: 14px var(--margin);
  }
  .site-nav {
    grid-column: 1 / -1;
    width: 100%;
    gap: 16px;
    overflow-x: auto;
    padding-top: 4px;
  }
  .hero { min-height: 70vh; padding: 40px var(--margin) 72px; }
  .hero-title { font-size: 72px; line-height: 64px; }
  .arena { margin-top: -32px; }
  .arena-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "matchday"
      "fridge"
      "wengz"
      "spiral"
      "matrix"
      "speed";
  }
  .card-matchday { min-height: 260px; }
  .site-footer { flex-direction: column; align-items: flex-start; }
  .footer-legal { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
