/* ── DESIGN TOKENS ── */
:root {
  --bg: #F5F0E8;
  --bg2: #EDE8DC;
  --ink: #1A1410;
  --ink2: #4A3F35;
  --muted: #8C7B6E;
  --gold: #C17F2A;
  --gold-light: #E8A84C;
  --grass: #2A6B3A;
  --grass-light: #3D8F50;
  --red: #C0392B;
  --white: #FDFAF4;
  --border: rgba(26,20,16,0.12);
  --shadow: 0 2px 20px rgba(26,20,16,0.08);
}

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

/* ── BODY ── */
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Instrument Sans', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* ── TOP NAV ── */
.topnav {
  background: var(--ink);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 1px;
}
.nav-logo span { color: var(--gold-light); }
.nav-home {
  font-size: 12px;
  color: rgba(253,250,244,0.5);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 6px 12px;
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-home:hover { color: var(--white); border-color: var(--gold); }
.nav-active { color: var(--white) !important; border-color: var(--gold) !important; }
.nav-menu-btn { display: none; background: none; border: 1px solid rgba(255,255,255,0.2); border-radius: 6px; padding: 6px 10px; cursor: pointer; color: var(--white); font-size: 18px; line-height: 1; }
.nav-links-wrap { display: flex; gap: 8px; align-items: center; }
.nav-close-btn { display: none; background: none; border: none; color: rgba(253,250,244,0.6); font-size: 24px; cursor: pointer; padding: 8px; position: absolute; top: 12px; right: 16px; }
@media (max-width: 768px) {
  .nav-menu-btn { display: flex; align-items: center; }
  .nav-links-wrap { display: none; position: fixed; inset: 0; background: var(--ink); z-index: 1000; flex-direction: column; align-items: flex-start; justify-content: center; padding: 40px 32px; gap: 16px; }
  .nav-links-wrap.open { display: flex; }
  .nav-links-wrap.open .nav-close-btn { display: flex; }
  .nav-links-wrap .nav-home { font-size: 15px; padding: 10px 16px; }
  .nav-links-wrap.open .nav-home { width: 100%; max-width: 320px; }
}

/* ── HERO ── */
.hero {
  background: var(--ink);
  padding: 48px 24px 40px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(255,255,255,0.03) 39px, rgba(255,255,255,0.03) 40px),
              repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(255,255,255,0.03) 39px, rgba(255,255,255,0.03) 40px);
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.breadcrumb { font-size: 12px; color: rgba(253,250,244,0.35); margin-bottom: 16px; }
.breadcrumb a { color: rgba(253,250,244,0.5); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold-light); }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 4px;
  margin-bottom: 20px;
}
.hero h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 5vw, 56px);
  line-height: 1.0;
  color: var(--white);
  margin-bottom: 14px;
}
.hero h1 em { font-style: normal; color: var(--gold-light); }
.hero-sub {
  font-size: 15px;
  color: rgba(253,250,244,0.55);
  max-width: 620px;
  line-height: 1.7;
}

/* ── MAIN ── */
.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}

/* ── CONTROLS BAR ── */
.controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding: 16px 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.tz-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.select-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
}
.select-wrap::after {
  content: '▾';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  pointer-events: none;
  font-size: 12px;
}
select {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 32px 9px 12px;
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}
select:focus { border-color: var(--gold); }
.now-badge {
  font-family: 'Instrument Mono', monospace;
  font-size: 12px;
  color: var(--grass);
  background: rgba(42,107,58,0.1);
  border: 1px solid rgba(42,107,58,0.2);
  border-radius: 8px;
  padding: 7px 13px;
  white-space: nowrap;
}

/* ── SECTION LABEL ── */
.section-label {
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── MATCHES GRID & CARDS ── */
.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  margin-bottom: 36px;
}
.match-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  cursor: default;
  position: relative;
}
.match-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(26,20,16,0.12);
  border-color: rgba(193,127,42,0.3);
}
.card-accent { height: 3px; background: var(--bg2); }
.match-card.live .card-accent { background: var(--red); }
.match-card.today .card-accent { background: var(--grass); }
.match-card.past .card-accent { background: var(--bg2); opacity: 0.5; }
.match-card.final { opacity: 0.88; }
.match-card.final .card-accent { background: var(--muted); opacity: 0.4; }
.match-card.live { border-color: rgba(192,57,43,0.35); box-shadow: 0 0 0 2px rgba(192,57,43,0.1); }
.card-body { padding: 16px 18px 0; }
.card-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.group-tag {
  font-family: 'Instrument Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.match-h3 {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink2);
  margin-bottom: 14px;
  line-height: 1.3;
}
.teams-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}
.team-side { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.t-flag { font-size: 28px; line-height: 1; }
.t-name { font-size: 11px; font-weight: 600; text-align: center; color: var(--ink); letter-spacing: 0.2px; line-height: 1.3; }
.vs-block { display: flex; flex-direction: column; align-items: center; gap: 2px; flex-shrink: 0; }
.vs-text { font-family: 'Syne', sans-serif; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 3px; }
.match-num { font-family: 'Instrument Mono', monospace; font-size: 9px; color: var(--muted); opacity: 0.6; }

/* ── SCORE DISPLAY ── */
.score-display { display: flex; align-items: center; gap: 5px; font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1; }
.score-sep { font-size: 14px; color: var(--muted); font-weight: 600; }
.score-display.score-live { color: var(--red); animation: scorePulse 1.5s ease-in-out infinite; }
@keyframes scorePulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
.score-clock { font-family: 'Instrument Mono', monospace; font-size: 11px; color: var(--red); margin-top: 2px; text-align: center; }

/* ── TIME STRIP ── */
.time-strip {
  border-top: 1px solid var(--border);
  padding: 12px 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: var(--bg2);
}
.ts-block .ts-label { font-size: 9px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin-bottom: 3px; font-weight: 600; }
.ts-block .ts-val { font-family: 'Instrument Mono', monospace; font-size: 13px; color: var(--ink); }
.ts-block.highlight .ts-val { font-size: 16px; font-weight: 700; color: var(--gold); }
.ts-block.full-row { grid-column: 1 / -1; }
.ts-block .ts-val.venue-val { font-family: 'Instrument Sans', sans-serif; font-size: 11px; color: var(--ink2); }

/* ── COPY MATCH BTN ── */
.copy-match-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  background: transparent;
  border: none;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.18s;
}
.copy-match-btn:hover { background: var(--bg); color: var(--ink); }
.copy-match-btn.copied { color: var(--grass); }

/* ── STATUS TAGS ── */
.status-tag { font-size: 9px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; vertical-align: middle; }
.live-tag { background: var(--red); color: white; animation: blink 1.4s ease-in-out infinite; }
.today-tag { background: var(--grass); color: white; }
.past-tag { color: var(--muted); background: var(--bg2); }
.final-tag { color: var(--muted); background: var(--bg2); border: 1px solid var(--border); }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.4} }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.6} }

/* ── ARTICLES TEASER ── */
.articles-teaser { max-width: 1100px; margin: 0 auto; padding: 48px 24px 40px; }
.at-header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.at-title { font-family: 'Syne', sans-serif; font-weight: 800; font-size: clamp(18px, 3vw, 26px); color: var(--ink); }
.at-browse { font-size: 13px; font-weight: 700; color: var(--grass); text-decoration: none; white-space: nowrap; letter-spacing: 0.3px; }
.at-browse:hover { color: var(--grass-light); }
.at-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.at-card { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 0; overflow: hidden; text-decoration: none; display: flex; flex-direction: column; gap: 0; transition: all 0.18s; }
.at-card:hover { border-color: rgba(193,127,42,0.35); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(26,20,16,0.1); }
.at-cat { font-size: 9px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.at-card-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 15px; color: var(--ink); line-height: 1.3; flex: 1; margin-bottom: 16px; }
.at-card-meta { display: flex; align-items: center; justify-content: space-between; font-size: 10px; color: var(--muted); font-family: 'Instrument Mono', monospace; margin-top: auto; }
.at-card-link { font-size: 11px; font-weight: 700; color: var(--grass); letter-spacing: 0.5px; }
.at-img { width: 100%; height: 140px; object-fit: cover; display: block; }
.at-body, .at-card-body { padding: 20px 24px 24px; display: flex; flex-direction: column; flex: 1; }

/* ── FOOTER ── */
footer { text-align: center; padding: 28px 24px; background: var(--ink); color: rgba(253,250,244,0.4); font-size: 12px; line-height: 1.8; letter-spacing: 0.3px; }
footer a { color: var(--gold-light); text-decoration: none; }
footer strong { color: rgba(253,250,244,0.7); }

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--ink);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 100px;
  z-index: 9999;
  transition: transform 0.3s ease;
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ── EMOJI ── */
img.emoji { height: 1em; width: 1em; margin: 0 .05em 0 .1em; vertical-align: -0.1em; display: inline-block; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .at-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .matches-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
  .controls { flex-direction: column; align-items: stretch; }
}
