/* ═══════════════════════════════════════════════════════════════════════════
   WORLD CUP 2026 — DESIGN SYSTEM
   Adapted from Melodify music-streaming reference
   Fonts: Barlow Condensed (headlines) + Rubik (body)
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,700&family=Rubik:wght@300;400;500;600;700&display=swap');

/* ── DESIGN TOKENS ────────────────────────────────────────────────────── */
:root {
  /* Backgrounds — from reference #121212 system */
  --bg:          #0e0e0e;
  --bg-elevated: #181818;
  --bg-card:     #222222;
  --bg-hover:    #2c2c2c;
  --bg-glass:    rgba(34, 34, 34, 0.8);

  /* Brand — World Cup gold + deep navy */
  --gold:        #d4a017;
  --gold-bright: #f5c518;
  --gold-dim:    rgba(212, 160, 23, 0.12);
  --gold-glow:   rgba(212, 160, 23, 0.35);
  --navy:        #0a1628;
  --navy-light:  #162240;

  /* Functional */
  --live:        #00dc82;
  --live-dim:    rgba(0, 220, 130, 0.12);
  --danger:      #ef4444;
  --danger-dim:  rgba(239, 68, 68, 0.12);
  --info:        #38bdf8;
  --info-dim:    rgba(56, 189, 248, 0.10);

  /* Text */
  --text:        #ffffff;
  --text-muted:  #b3b3b3;
  --text-subtle: #666666;

  /* Border */
  --border:      #2a2a2a;
  --border-hover:#404040;

  /* Gradients */
  --grad-gold:   linear-gradient(135deg, #d4a017 0%, #f5c518 100%);
  --grad-hero:   linear-gradient(180deg, rgba(14,14,14,0) 0%, #0e0e0e 100%);
  --grad-stage:  linear-gradient(135deg, rgba(212,160,23,0.08) 0%, transparent 60%);
  --grad-card:   linear-gradient(135deg, rgba(212,160,23,0.05), rgba(10,22,40,0.3));

  /* Fonts */
  --font-head:   'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body:   'Rubik', 'Helvetica Neue', sans-serif;

  /* Radius — from reference */
  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  16px;
  --r-xl:  24px;
  --r-pill:500px;

  /* Shadows */
  --sh-card:  0 8px 24px rgba(0,0,0,0.5);
  --sh-glow:  0 8px 24px rgba(212,160,23,0.3);
  --sh-glass: 0 4px 30px rgba(0,0,0,0.3);

  /* Transitions — from reference */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 0.15s;
  --dur-norm: 0.3s;
  --dur-slow: 0.5s;

  /* Layout */
  --max-w: 1200px;
  --nav-h: 64px;
}

/* ── RESET & BASE ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body { overflow-x: hidden; }

a { color: inherit; text-decoration: none; }
button { border: none; background: none; cursor: pointer; color: inherit; font-family: var(--font-body); }
img { max-width: 100%; height: auto; display: block; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hover); border-radius: 3px; }

/* ── TYPOGRAPHY ─────────────────────────────────────────────────────────── */

/* Headlines — Barlow Condensed, uppercase, compressed, powerful */
.wc-h1 {
  font-family: var(--font-head);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.wc-h2 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.wc-h3 {
  font-family: var(--font-head);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
  line-height: 1.05;
  text-transform: uppercase;
}
.wc-h4 {
  font-family: var(--font-head);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Body text */
.wc-body   { font-size: 1rem;    font-weight: 400; color: var(--text-muted); line-height: 1.6; }
.wc-body-sm{ font-size: 0.875rem;font-weight: 400; color: var(--text-muted); line-height: 1.5; }
.wc-caption{ font-size: 0.75rem; font-weight: 500; color: var(--text-subtle);line-height: 1.4; letter-spacing: 0.03em; }
.wc-label  { font-size: 0.6875rem;font-weight: 700;color: var(--text-subtle);line-height: 1; letter-spacing: 0.12em; text-transform: uppercase; }
.wc-score  { font-family: var(--font-head); font-weight: 900; font-variant-numeric: tabular-nums; }

/* ── LAYOUT ─────────────────────────────────────────────────────────────── */
.wc-container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.wc-section  { padding: 80px 0; }
.wc-section--sm { padding: 48px 0; }

/* ── NAVBAR — fixed, glass, reference-style ─────────────────────────────── */
.wc-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h);
  background: rgba(14,14,14,0.9);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 32px;
}
.wc-nav__logo {
  font-family: var(--font-head); font-weight: 900; font-size: 1.5rem;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--gold);
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.wc-nav__logo-mark {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--grad-gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #000; font-weight: 900;
}
.wc-nav__links {
  display: flex; gap: 4px; flex: 1; padding: 0 32px;
}
.wc-nav__link {
  padding: 8px 14px; border-radius: var(--r-pill);
  font-size: 0.8125rem; font-weight: 500; color: var(--text-subtle);
  transition: all var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.wc-nav__link:hover { color: var(--text); background: var(--bg-hover); }
.wc-nav__link.is-active { color: var(--gold); background: var(--gold-dim); font-weight: 600; }

/* ── BUTTONS — pill shape from reference ────────────────────────────────── */
.wc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 32px; border-radius: var(--r-pill);
  font-family: var(--font-body); font-size: 0.875rem; font-weight: 600;
  transition: all 0.2s var(--ease);
  white-space: nowrap; cursor: pointer;
}
.wc-btn--primary {
  background: var(--grad-gold); color: #000;
  box-shadow: none;
}
.wc-btn--primary:hover {
  transform: scale(1.04);
  box-shadow: var(--sh-glow);
}
.wc-btn--secondary {
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--text-subtle);
}
.wc-btn--secondary:hover {
  border-color: var(--text); color: var(--text);
  transform: scale(1.04);
}
.wc-btn--ghost {
  background: transparent; color: var(--text-muted);
  padding: 8px 16px;
}
.wc-btn--ghost:hover { color: var(--gold); }
.wc-btn--sm { padding: 8px 20px; font-size: 0.8125rem; }
.wc-btn--lg { padding: 18px 44px; font-size: 1rem; }

/* ── GLASS CARD — reference pattern ─────────────────────────────────────── */
.wc-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-glass);
}

/* ── CARD — from reference .music-card ──────────────────────────────────── */
.wc-card {
  background: var(--bg-card);
  border-radius: var(--r-md);
  padding: 20px;
  transition: background-color var(--dur-norm) var(--ease), transform 0.2s var(--ease);
}
.wc-card:hover {
  background: var(--bg-hover);
}
.wc-card--lg {
  border-radius: var(--r-lg);
  padding: 32px;
}
.wc-card--glow {
  background: var(--grad-card);
  border: 1px solid rgba(212,160,23,0.12);
}

/* ── PANEL — structured content block ───────────────────────────────────── */
.wc-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.wc-panel__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.wc-panel__title {
  font-family: var(--font-head); font-size: 0.9375rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  display: flex; align-items: center; gap: 10px;
}
.wc-panel__body { padding: 24px; }
.wc-panel__body--flush { padding: 0; }

/* ── TOURNAMENT HEADER — universal top component ────────────────────────── */
.wc-tourney-hdr {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
}
.wc-tourney-hdr__badge {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--grad-gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.wc-tourney-hdr__text {
  font-family: var(--font-head); font-weight: 700; font-size: 0.8125rem;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold);
}

/* ── STAGE LABEL — Group A, Round of 16, etc ────────────────────────────── */
.wc-stage {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 14px; border-radius: var(--r-pill);
  background: var(--gold-dim); border: 1px solid rgba(212,160,23,0.2);
  font-size: 0.6875rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--gold);
}

/* ── LIVE BADGE ─────────────────────────────────────────────────────────── */
.wc-live {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: var(--r-pill);
  background: var(--live-dim); border: 1px solid rgba(0,220,130,0.3);
  font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.08em;
  color: var(--live); text-transform: uppercase;
}
.wc-live__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--live);
  animation: wc-blink 1.2s infinite;
}
@keyframes wc-blink { 0%,100%{opacity:1} 50%{opacity:.12} }
@keyframes wc-pulse { 0%,100%{box-shadow:0 0 0 0 rgba(0,220,130,.4)} 50%{box-shadow:0 0 0 8px transparent} }

/* ── SCORE CORE — the centerpiece ───────────────────────────────────────── */
.wc-score-core {
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.wc-score-core__num {
  font-family: var(--font-head);
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
}
.wc-score-core__sep {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 200;
  color: var(--text-subtle);
  margin: 0 4px;
}

/* ── MATCH HERO — the dominant visual ───────────────────────────────────── */
.wc-match-hero {
  position: relative;
  min-height: 440px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.wc-match-hero__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(0.25);
}
.wc-match-hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,14,14,0.3) 0%, var(--bg) 95%);
}
.wc-match-hero__content {
  position: relative; z-index: 1;
  padding-top: calc(var(--nav-h) + 24px);
}

/* ── TEAM IDENTITY ──────────────────────────────────────────────────────── */
.wc-team {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center;
}
.wc-team__crest {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--bg-card);
  box-shadow: var(--sh-card);
  overflow: hidden;
  transition: transform var(--dur-norm) var(--ease);
}
.wc-team__crest:hover { transform: scale(1.06); }
.wc-team__crest img { width: 100%; height: 100%; object-fit: cover; }
.wc-team__name {
  font-family: var(--font-head); font-size: 1.5rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.02em;
}
.wc-team__meta {
  font-size: 0.75rem; color: var(--text-subtle);
}

/* ── ENTITY CORRIDOR — horizontal scroll strip ──────────────────────────── */
.wc-corridor {
  display: flex; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 0 16px;
  -webkit-overflow-scrolling: touch;
}
.wc-corridor::-webkit-scrollbar { display: none; }
.wc-corridor__item {
  flex-shrink: 0; scroll-snap-align: start;
}

/* ── STATS PULSE — dual-direction bars ──────────────────────────────────── */
.wc-stat-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.wc-stat-row:last-child { margin-bottom: 0; }
.wc-stat-val {
  font-size: 0.875rem; font-weight: 800; min-width: 40px;
  font-variant-numeric: tabular-nums;
}
.wc-stat-val--home { text-align: right; color: var(--gold); }
.wc-stat-val--away { text-align: left; color: var(--info); }
.wc-stat-bar {
  flex: 1; position: relative; height: 6px;
  background: var(--border); border-radius: 3px;
  overflow: hidden;
}
.wc-stat-bar__home {
  position: absolute; right: 50%; top: 0; height: 100%;
  background: linear-gradient(270deg, var(--gold), rgba(212,160,23,0.3));
  border-radius: 3px 0 0 3px;
  transition: width 0.8s var(--ease);
}
.wc-stat-bar__away {
  position: absolute; left: 50%; top: 0; height: 100%;
  background: linear-gradient(90deg, var(--info), rgba(56,189,248,0.3));
  border-radius: 0 3px 3px 0;
  transition: width 0.8s var(--ease);
}
.wc-stat-bar__mid {
  position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px;
  background: var(--bg); z-index: 1;
}
.wc-stat-label {
  text-align: center; font-size: 0.6875rem; color: var(--text-muted);
  min-width: 100px; font-weight: 500;
}

/* ── TODAY BOARD — match list strip ─────────────────────────────────────── */
.wc-match-row {
  display: flex; align-items: center;
  padding: 14px 20px; gap: 12px;
  border-bottom: 1px solid var(--border);
  transition: background var(--dur-fast) var(--ease);
  cursor: pointer; position: relative;
}
.wc-match-row:last-child { border-bottom: 0; }
.wc-match-row:hover { background: var(--bg-hover); }
.wc-match-row__time {
  font-size: 0.75rem; font-weight: 700; color: var(--text-subtle);
  min-width: 48px; font-variant-numeric: tabular-nums;
}
.wc-match-row__teams { flex: 1; }
.wc-match-row__team {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.875rem; font-weight: 500;
  padding: 2px 0;
}
.wc-match-row__team img { width: 18px; height: 18px; border-radius: 2px; }
.wc-match-row__score {
  font-family: var(--font-head); font-weight: 800; font-size: 0.9375rem;
  min-width: 36px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.wc-match-row__stage {
  font-size: 0.6875rem; color: var(--text-subtle); min-width: 64px; text-align: right;
}
.wc-match-row--live .wc-match-row__time { color: var(--live); }
.wc-match-row--live .wc-match-row__score { color: var(--live); }
.wc-match-row--live::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--live);
}

/* ── CONTEXT RAIL — sidebar sticky component ────────────────────────────── */
.wc-rail {
  position: sticky; top: calc(var(--nav-h) + 16px);
  display: flex; flex-direction: column; gap: 16px;
}

/* ── STORY STACK — editorial content ────────────────────────────────────── */
.wc-story {
  display: flex; gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  transition: background var(--dur-fast) var(--ease);
}
.wc-story:last-child { border-bottom: 0; }
.wc-story__img {
  width: 140px; height: 88px; border-radius: var(--r-md);
  object-fit: cover; flex-shrink: 0;
}
.wc-story__body { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.wc-story__title {
  font-family: var(--font-head); font-size: 1rem; font-weight: 700;
  line-height: 1.2; text-transform: uppercase;
}
.wc-story__meta { font-size: 0.6875rem; color: var(--text-subtle); }

/* ── DECORATIVE GLOW — from reference blur circles ──────────────────────── */
.wc-glow {
  position: absolute; pointer-events: none;
  border-radius: 50%;
  filter: blur(100px);
}
.wc-glow--gold {
  background: var(--gold);
  opacity: 0.12;
}
.wc-glow--navy {
  background: #1a3a6e;
  opacity: 0.15;
}

/* ── RELATED GRID ───────────────────────────────────────────────────────── */
.wc-grid      { display: grid; gap: 16px; }
.wc-grid--2   { grid-template-columns: repeat(2, 1fr); }
.wc-grid--3   { grid-template-columns: repeat(3, 1fr); }
.wc-grid--4   { grid-template-columns: repeat(4, 1fr); }
.wc-grid--6   { grid-template-columns: repeat(6, 1fr); }

/* ── SEARCH CORRIDOR — from user spec ───────────────────────────────────── */
.wc-search {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 10px 20px;
  font-size: 0.875rem; color: var(--text-muted);
  width: 100%; outline: none;
  font-family: var(--font-body);
  transition: border-color var(--dur-fast) var(--ease);
}
.wc-search:focus {
  border-color: var(--gold); color: var(--text);
}

/* ── PROGRESS / FORM BAR ────────────────────────────────────────────────── */
.wc-form-row { display: flex; gap: 3px; }
.wc-form-dot {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.5625rem; font-weight: 800;
}
.wc-form-dot--w { background: rgba(0,220,130,0.15); color: var(--live); }
.wc-form-dot--d { background: rgba(255,255,255,0.08); color: var(--text-muted); }
.wc-form-dot--l { background: var(--danger-dim); color: var(--danger); }

/* ── BRACKET / KNOCKOUT ─────────────────────────────────────────────────── */
.wc-bracket-match {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 16px;
  min-width: 200px;
}
.wc-bracket-match--winner {
  border-color: rgba(212,160,23,0.3);
  background: var(--grad-card);
}

/* ── FOOTER ─────────────────────────────────────────────────────────────── */
.wc-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}
.wc-footer__grid {
  display: grid; grid-template-columns: 2fr repeat(4, 1fr);
  gap: 32px;
}
.wc-footer__brand {
  font-family: var(--font-head); font-weight: 900; font-size: 1.25rem;
  text-transform: uppercase; color: var(--gold); margin-bottom: 12px;
}
.wc-footer__col-title {
  font-size: 0.6875rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--text-subtle); margin-bottom: 16px;
}
.wc-footer__link {
  display: block; padding: 4px 0;
  font-size: 0.875rem; color: var(--text-muted);
  transition: color var(--dur-fast) var(--ease);
}
.wc-footer__link:hover { color: var(--gold); }
.wc-footer__copy {
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border);
  font-size: 0.75rem; color: var(--text-subtle); text-align: center;
}

/* ── ANIMATION KEYFRAMES ────────────────────────────────────────────────── */
@keyframes wc-fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes wc-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes wc-scale-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
.wc-anim-up   { animation: wc-fade-up 0.6s var(--ease) both; }
.wc-anim-in   { animation: wc-fade-in 0.5s var(--ease) both; }
.wc-anim-scale{ animation: wc-scale-in 0.5s var(--ease) both; }
.wc-anim-d1   { animation-delay: 0.1s; }
.wc-anim-d2   { animation-delay: 0.2s; }
.wc-anim-d3   { animation-delay: 0.3s; }
.wc-anim-d4   { animation-delay: 0.4s; }

/* ── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .wc-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .wc-grid--6 { grid-template-columns: repeat(3, 1fr); }
  .wc-footer__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .wc-container { padding: 0 16px; }
  .wc-section { padding: 56px 0; }
  .wc-grid--3, .wc-grid--4 { grid-template-columns: 1fr; }
  .wc-grid--6 { grid-template-columns: repeat(2, 1fr); }
  .wc-nav__links { display: none; }
  .wc-footer__grid { grid-template-columns: 1fr 1fr; }
}
