:root { --container: 1440px; --gutter: clamp(20px, 4vw, 72px); }
/* ─── RESET & BASE ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #080a0d;
  --bg2:        #0f1116;
  --bg3:        #161920;
  --gold:       #b8922a;
  --gold2:      #d4aa3f;
  --white:      #ede9df;
  --muted:      #6e737f;
  --radius:     5px;
  --transition: 0.33s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}
::selection { background: var(--gold); color: var(--bg); }
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

/* ─── NAV ─────────────────────────────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 0 var(--gutter); height: 66px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(8,10,13,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(184,146,42,0.2);
}
.nav-brand { display: flex; align-items: center; gap: 13px; }
.nav-logo-img {
  width: 44px; height: 44px;
  object-fit: contain; flex-shrink: 0;
  filter: drop-shadow(0 0 4px rgba(184,146,42,0.2));
}
.nav-brand-text { line-height: 1.1; }
.nav-brand-name { font-family: 'Bebas Neue', sans-serif; font-size: 1.15rem; letter-spacing: 3px; color: var(--white); }
.nav-brand-sub  { font-size: 0.65rem; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); font-weight: 600; }

.nav-links { display: flex; gap: 34px; list-style: none; }
.nav-links a {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; color: var(--muted);
  transition: color var(--transition); position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1.5px; background: var(--gold);
  transition: width var(--transition);
}
.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--gold); }
.nav-links a.active::after { width: 100%; }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: none; border: none; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--white); transition: var(--transition); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    position: fixed; top: 66px; left: 0; right: 0;
    background: var(--bg2); flex-direction: column; align-items: center;
    gap: 0; padding: 0; max-height: 0; overflow: hidden;
    transition: max-height 0.4s ease;
    border-bottom: 1px solid rgba(184,146,42,0.2);
  }
  .nav-links.open { max-height: 300px; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 16px var(--gutter); border-bottom: 1px solid rgba(255,255,255,0.04); }
}

/* ─── PAGE HERO BANNER ─────────────────────────────── */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 0;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  background: var(--bg);
  border-bottom: 1px solid rgba(184,146,42,0.18);
}

/* Layered atmospheric background */
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 100% at 80% 50%, rgba(184,146,42,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 40% 80% at 10% 80%, rgba(184,146,42,0.05) 0%, transparent 50%),
    linear-gradient(170deg, var(--bg) 0%, rgba(8,10,13,0.7) 60%, var(--bg) 100%);
  z-index: 0;
}

/* SVG pitch-line grid overlay */
.page-hero-lines {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0.07;
  background-image:
    linear-gradient(rgba(184,146,42,0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184,146,42,0.6) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(135deg, transparent 0%, black 40%, black 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(135deg, transparent 0%, black 40%, black 60%, transparent 100%);
}

/* Large ghost text */
.page-hero-ghost {
  position: absolute;
  right: -1vw; bottom: -1vh;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(9rem, 20vw, 18rem);
  letter-spacing: -2px; line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(184,146,42,0.07);
  user-select: none; pointer-events: none;
  z-index: 1; white-space: nowrap;
}

/* Vertical gold accent bar */
.page-hero-bar {
  position: absolute;
  top: 0; left: 5vw;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, transparent 0%, var(--gold) 30%, var(--gold) 70%, transparent 100%);
  opacity: 0.4;
  z-index: 2;
}

.page-hero-content {
  position: relative; z-index: 3;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 130px var(--gutter) 52px calc(var(--gutter) + 28px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 28px;
}

.page-hero-text {}

.page-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.68rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 14px;
}
.page-hero-tag::before {
  content: '';
  width: 24px; height: 1.5px;
  background: var(--gold);
  display: block;
}

.page-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3.4rem, 8vw, 6.5rem);
  letter-spacing: 2px; line-height: 0.9;
  color: var(--white);
  margin-bottom: 18px;
}
.page-title .accent { color: var(--gold); }
.page-title .outline {
  -webkit-text-stroke: 2px rgba(237,233,223,0.2);
  color: transparent; display: block;
  letter-spacing: 4px;
}

.divider { width: 44px; height: 3px; background: var(--gold); border-radius: 2px; }
.section-tag { font-size: 0.72rem; letter-spacing: 4px; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: 12px; display: block; }

/* ─── SEASON SWITCHER ──────────────────────────────── */
.season-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg2);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 8px 14px;
}
.season-switcher label {
  font-size: 0.72rem; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); font-weight: 700; white-space: nowrap;
}
.season-select {
  background: transparent;
  border: none;
  color: var(--gold);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  padding: 0 4px;
}
.season-select option { background: var(--bg2); color: var(--white); }

/* ─── FILTER BAR ───────────────────────────────────── */
.controls-bar {
  max-width: var(--container);
  margin: 0 auto;
  padding: 32px var(--gutter);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.filter-group { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn {
  padding: 7px 18px; border-radius: 20px; font-size: 0.78rem;
  font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  border: 1.5px solid rgba(255,255,255,0.1); background: transparent;
  color: var(--muted); cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.filter-btn:hover  { border-color: var(--gold); color: var(--gold); }
.filter-btn.active { background: var(--gold); border-color: var(--gold); color: var(--bg); }

.controls-divider { width: 1px; height: 28px; background: rgba(255,255,255,0.08); margin: 0 4px; }

/* ─── RESULTS SUMMARY BAR ─────────────────────────── */
.summary-bar {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter) 28px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.summary-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.summary-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 2px;
  line-height: 1;
}
.summary-num.gold  { color: var(--gold); }
.summary-num.green { color: #5ec98a; }
.summary-num.red   { color: #e08080; }
.summary-num.grey  { color: var(--muted); }
.summary-label { font-size: 0.7rem; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }

/* ─── FIXTURES LIST ────────────────────────────────── */
.fixtures-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter) 80px;
}

/* Team group headings */
.team-group { margin-bottom: 48px; }
.team-group-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(184,146,42,0.2);
}
.team-group-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 3px;
  color: var(--gold);
}
.team-record {
  font-size: 0.78rem;
  letter-spacing: 1px;
  color: var(--muted);
  font-weight: 500;
}

/* Flat list view */
.fixtures-grid { display: grid; gap: 10px; }

.fixture-card {
  background: var(--bg2);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 9px;
  padding: 18px 24px;
  display: grid;
  grid-template-columns: 110px 1fr auto;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.fixture-card::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--gold); transform: scaleY(0); transition: transform 0.25s ease;
}
.fixture-card:hover { border-color: rgba(184,146,42,0.22); background: var(--bg3); transform: translateX(3px); }
.fixture-card:hover::after { transform: scaleY(1); }
.fixture-card.past { opacity: 0.75; }

.fixture-date { display: flex; flex-direction: column; gap: 1px; }
.fixture-day   { font-family: 'Bebas Neue', sans-serif; font-size: 1.75rem; color: var(--gold); letter-spacing: 2px; line-height: 1; }
.fixture-month { font-size: 0.7rem; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }

.fixture-meta  { display: flex; flex-direction: column; gap: 4px; }
.fixture-vs    { font-size: 0.65rem; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.fixture-opponent { font-family: 'DM Serif Display', serif; font-size: 1.1rem; color: var(--white); }
.fixture-venue    { font-size: 0.8rem; color: var(--muted); }
.fixture-venue::before { content: '📍'; font-size: 0.7rem; margin-right: 4px; }
.fixture-division { font-size: 0.72rem; color: var(--muted); font-style: italic; margin-top: 1px; }

.fixture-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.badge {
  display: inline-flex; align-items: center; padding: 5px 11px;
  border-radius: 20px; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase; white-space: nowrap;
}
.badge-upcoming { background: rgba(184,146,42,0.1);  color: var(--gold); border: 1px solid rgba(184,146,42,0.28); }
.badge-result   { background: rgba(237,233,223,0.07); color: var(--white); border: 1px solid rgba(237,233,223,0.14); }
.badge-win      { background: rgba(58,140,92,0.12);   color: #5ec98a;     border: 1px solid rgba(58,140,92,0.3); }
.badge-loss     { background: rgba(200,80,80,0.1);    color: #e08080;     border: 1px solid rgba(200,80,80,0.25); }

/* ─── PAGE HERO — mobile ───────────────────────────── */
@media (max-width: 640px) {
  .page-hero { min-height: 220px; }
  .page-hero-content {
    padding: 100px var(--gutter) 32px var(--gutter);
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  .page-title { font-size: clamp(2.6rem, 12vw, 4rem); }
  .season-switcher { align-self: flex-start; }
}

/* ─── FILTER BAR — mobile ──────────────────────────── */
@media (max-width: 580px) {
  .controls-bar { gap: 8px; padding: 20px var(--gutter); }
  .controls-divider { display: none; }
  .filter-group { gap: 6px; }
  .filter-btn { padding: 6px 14px; font-size: 0.72rem; letter-spacing: 1px; }
}

/* ─── SUMMARY BAR — mobile ─────────────────────────── */
@media (max-width: 480px) {
  .summary-bar { gap: 16px; padding: 16px var(--gutter); }
  .summary-num { font-size: 1.4rem; }
  .summary-label { font-size: 0.62rem; }
}

/* ─── FIXTURE CARDS — mobile ───────────────────────── */
@media (max-width: 580px) {

  .fixture-card {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 0;
    padding: 0;
    overflow: hidden;
  }

  /* Date block — left column, full height */
  .fixture-date {
    grid-row: 1 / 3;
    background: rgba(184,146,42,0.06);
    border-right: 1px solid rgba(184,146,42,0.12);
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    gap: 2px;
  }
  .fixture-day   { font-size: 2rem; }
  .fixture-month { font-size: 0.62rem; text-align: center; }

  /* Meta — top right */
  .fixture-meta {
    padding: 14px 14px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }

  /* Badges — bottom right */
  .fixture-badges {
    padding: 8px 14px 14px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }

  /* Team group header */
  .team-group-header { flex-wrap: wrap; gap: 8px; }
  .team-group-name   { font-size: 1.2rem; }
}

/* ─── STATE DISPLAYS ───────────────────────────────── */
.state-box {
  padding: 64px 20px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.spinner {
  width: 34px; height: 34px;
  border: 3px solid rgba(184,146,42,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── FOOTER ───────────────────────────────────────── */
footer { background: var(--bg2); border-top: 1px solid rgba(255,255,255,0.06); padding: 36px var(--gutter) 24px; }
.footer-bottom {
  max-width: var(--container); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px;
}
.footer-bottom p { font-size: 0.8rem; color: var(--muted); }
.footer-bottom a { color: var(--gold); }

/* ─── GRAIN ────────────────────────────────────────── */
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat; background-size: 128px 128px;
}
