/* tv.thebeach.one — The Beach brand tokens, copied from thebeach-site
   src/app/globals.css (near-black + lime, cream lights, Acorn display +
   Titillium Web). Dark-only by design, like the mother site. */

@font-face {
  font-family: "Acorn";
  src: url("/static/brand/acorn-8.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --color-black: #14160f;
  --color-lime: #d8ff77;
  --color-lime-bright: #e6ff9c;
  --color-cream: #f8f7ec;
  --color-mint: #d1fce1;
  --color-orange: #fd5600;
  --color-warm-gray: #c0bfb4;
  --color-panel: #1c1f15;
  --color-panel-2: #24281b;
  --color-line: #33392a;
  --font-display: "Acorn", "Titillium Web", system-ui, sans-serif;
  --font-body: "Titillium Web", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; background: var(--color-black); }

body {
  background: var(--color-black);
  color: var(--color-cream);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.92;
}

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-lime); outline-offset: 3px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-lime);
}

/* ------- chrome ------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem;
  background: rgba(20, 22, 15, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav-brand { display: flex; align-items: center; gap: 0.75rem; }
.nav-brand img { height: 26px; width: auto; display: block; }
.nav-brand .tv-tag {
  font-family: var(--font-display);
  color: var(--color-black);
  background: var(--color-lime);
  padding: 0.1rem 0.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.12em; color: rgba(255, 255, 255, 0.7);
}
.nav-links a:hover { color: var(--color-lime); }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }
main { flex: 1; }

.footer {
  margin-top: 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 2.5rem 1.25rem 2rem;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.85rem;
}
.footer a { color: rgba(255, 255, 255, 0.5); }
.footer a:hover { color: var(--color-lime); }
.footer .cols { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; max-width: 72rem; margin: 0 auto; }

/* ------- hero ------- */

.hero { padding: 3.5rem 0 2rem; }
.hero h1 { font-size: clamp(2.75rem, 9vw, 6rem); color: var(--color-cream); }
.hero h1 .accent { color: var(--color-lime); }
.hero p.lead { margin-top: 1rem; max-width: 40rem; color: var(--color-warm-gray); }

/* ------- sections & cards ------- */

.section { margin-top: 3rem; }
.section > h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 1.25rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.section-head h2 { margin-bottom: 0; }

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.card {
  background: var(--color-panel);
  border: 1px solid var(--color-line);
  border-radius: 1rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
a.card:hover { border-color: var(--color-lime); transform: translateY(-2px); }
.match-card:hover { border-color: var(--color-lime); }
.card-main { display: flex; flex-direction: column; gap: 0.6rem; }
.card .teams { font-family: var(--font-display); font-size: 1.35rem; text-transform: uppercase; line-height: 1.05; }
.card .meta { color: var(--color-warm-gray); font-size: 0.85rem; }
.card .score { color: var(--color-lime); font-weight: 700; font-variant-numeric: tabular-nums; }
.accent { color: var(--color-lime); }
.live-text { color: var(--color-orange); }

.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em;
  padding: 0.25rem 0.6rem; border-radius: 999px; width: fit-content;
}
.chip-live { background: var(--color-orange); color: var(--color-cream); }
.chip-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--color-cream); animation: pulse 1.4s infinite; }
.chip-scheduled { background: var(--color-panel-2); color: var(--color-warm-gray); border: 1px solid var(--color-line); }
.chip-finished { background: var(--color-panel-2); color: var(--color-lime); border: 1px solid var(--color-line); }
.chip-stream { background: var(--color-lime); color: var(--color-black); }
.watch-link { text-decoration: none; }
a.chip-stream:hover { background: var(--color-lime-bright); color: var(--color-black); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* Match cards: the metadata, teams, score and actions each own a stable
   region. This remains readable when player names wrap on narrow phones. */
.rows, .match-list { display: flex; flex-direction: column; gap: 0.7rem; }
.match-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  min-width: 0; overflow: hidden; background: var(--color-panel);
  border: 1px solid var(--color-line); border-radius: 0.85rem;
}
.match-row:hover { border-color: rgba(216, 255, 119, 0.5); background: var(--color-panel-2); }
.match-row-main {
  display: block; min-width: 0; padding: 0.8rem 1rem;
}
.match-row-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem 0.7rem;
  color: var(--color-warm-gray); font-size: 0.74rem; font-weight: 600;
  font-variant-numeric: tabular-nums; line-height: 1.25;
}
.match-row-meta .court { color: rgba(248, 247, 236, 0.55); }
.match-row-body {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem; align-items: center; min-width: 0; margin-top: 0.45rem;
}
.match-teams, .bracket-teams { display: grid; gap: 0.05rem; min-width: 0; }
.match-team {
  min-width: 0; overflow-wrap: anywhere; color: var(--color-cream);
  font-size: 0.98rem; font-weight: 700; line-height: 1.25;
}
.versus {
  color: var(--color-warm-gray); font-size: 0.65rem; font-weight: 600;
  line-height: 1.2; letter-spacing: 0.08em; text-transform: uppercase;
}
.match-context { color: var(--color-warm-gray); font-size: 0.72rem; font-weight: 400; }
.match-score, .bracket-score {
  color: var(--color-lime); font-size: 0.9rem; font-weight: 700;
  font-variant-numeric: tabular-nums; line-height: 1.3; text-align: right;
}
.match-actions {
  display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap;
  gap: 0.5rem; padding: 0.8rem 1rem 0.8rem 0;
}

/* tournament cards */
.tournament-tabs {
  display: flex; gap: 0.6rem; overflow-x: auto; margin-bottom: 1.25rem;
  padding-bottom: 0.2rem;
}
.tournament-tabs a {
  flex: 0 0 auto; padding: 0.5rem 0.9rem; border: 1px solid var(--color-line);
  border-radius: 999px; color: var(--color-warm-gray); font-size: 0.78rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
}
.tournament-tabs a:hover, .tournament-tabs a.active {
  border-color: var(--color-lime); background: var(--color-lime); color: var(--color-black);
}
.tournament-card h3 { font-size: 1.15rem; color: var(--color-cream); }
.tournament-card .dates { color: var(--color-lime); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.category-card h3 { font-size: 1.55rem; color: var(--color-cream); }
.category-tabs {
  display: flex; gap: 0.6rem; overflow-x: auto; margin-top: 0.75rem; padding: 0.2rem 0 1rem;
  border-bottom: 1px solid var(--color-line);
}
.category-tabs a {
  flex: 0 0 auto; padding: 0.45rem 0.85rem; border: 1px solid var(--color-line);
  border-radius: 999px; color: var(--color-warm-gray); font-size: 0.78rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
}
.category-tabs a:hover, .category-tabs a.active {
  border-color: var(--color-lime); background: var(--color-lime); color: var(--color-black);
}
.group-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem 1.25rem; }
.group-block { min-width: 0; }
.group-block .section-head { align-items: baseline; margin-bottom: 0.75rem; }
.group-block .section-head .eyebrow { flex: 0 0 auto; white-space: nowrap; }
.group-block h3 { font-size: 1.2rem; }
.back-link { display: inline-block; margin-bottom: 0.75rem; }

/* playoff bracket: columns follow the source levels (round of 16 → final).
   Horizontal scrolling keeps the tree readable on phones without collapsing
   match relationships into an ambiguous vertical list. */
.bracket-block { margin-top: 1.5rem; }
.bracket-block h3 { font-size: 1.1rem; }
.bracket {
  display: flex; gap: 1rem; overflow-x: auto; padding: 0.25rem 0 1rem;
  scroll-snap-type: x proximity;
}
.bracket-round { min-width: 16rem; display: flex; flex-direction: column; scroll-snap-align: start; }
.bracket-matches { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 0.8rem; margin-top: 0.65rem; }
.bracket-match {
  display: grid; gap: 0; position: relative; overflow: hidden;
  background: var(--color-panel); border: 1px solid var(--color-line); border-radius: 0.75rem;
  font-size: 0.82rem; line-height: 1.25;
}
.bracket-match:hover { border-color: var(--color-lime); }
.bracket-match-main { display: grid; gap: 0.45rem; padding: 0.8rem; }
.bracket-match .match-actions {
  justify-content: flex-start; padding: 0.65rem 0.8rem;
  border-top: 1px solid var(--color-line);
}

@media (min-width: 900px) {
  .group-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .group-match-list .match-row { grid-template-columns: 1fr; }
  .group-match-list .match-actions {
    justify-content: flex-start; padding: 0.65rem 1rem;
    border-top: 1px solid var(--color-line);
  }
}

/* ------- match page ------- */

.match-hero { padding: 3rem 0 1.5rem; border-bottom: 1px solid var(--color-line); }
.match-hero h1 { font-size: clamp(2rem, 6vw, 4rem); }
.match-hero .vs { color: var(--color-lime); }
.match-meta { margin-top: 0.9rem; color: var(--color-warm-gray); display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }

.player-shell { margin-top: 2rem; }
.player-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: var(--color-panel); border: 1px solid var(--color-line);
  border-radius: 1rem; overflow: hidden;
}
.player-frame iframe, .player-frame img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.player-note { margin-top: 0.75rem; color: var(--color-warm-gray); font-size: 0.9rem; }
.match-back { margin-top: 2rem; }

.scoreboard { margin-top: 2rem; background: var(--color-panel); border: 1px solid var(--color-line); border-radius: 1rem; padding: 1.5rem; }
.scoreboard table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.scoreboard th { text-align: left; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--color-warm-gray); padding-bottom: 0.6rem; }
.scoreboard td { padding: 0.45rem 0; border-top: 1px solid var(--color-line); }
.scoreboard td.pts { text-align: center; width: 3.2rem; color: var(--color-lime); font-weight: 700; }
.scoreboard .team { font-weight: 700; }

.empty { color: var(--color-warm-gray); padding: 2rem 0; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; }

@media (max-width: 640px) {
  .nav { flex-wrap: wrap; gap: 0.85rem; padding-bottom: 0.75rem; background: var(--color-black); }
  .nav-links { order: 2; width: 100%; gap: 1rem; overflow-x: auto; padding-bottom: 0.25rem; }
  .nav-links a { flex: 0 0 auto; }
  .tournament-hero { padding-top: 3.75rem; }
  .tournament-hero h1 { font-size: clamp(2.5rem, 16vw, 4rem); }
  .category-tabs { margin-top: 1rem; }
  #gruppspel { margin-top: 3.5rem; }
  #gruppspel > h2 { margin-bottom: 1.5rem; }
  .match-row { grid-template-columns: 1fr; }
  .match-row-main { padding: 0.78rem 0.9rem; }
  .match-row-meta { gap: 0.25rem 0.6rem; font-size: 0.7rem; }
  .match-row-body { gap: 0.65rem; margin-top: 0.4rem; }
  .match-team { font-size: 0.9rem; line-height: 1.28; }
  .match-score { max-width: none; white-space: nowrap; font-size: 0.78rem; }
  .match-actions {
    justify-content: flex-start; gap: 0.45rem; padding: 0.62rem 0.9rem;
    border-top: 1px solid var(--color-line);
  }
  .match-actions .chip { font-size: 0.6rem; }
  .match-actions .watch-link { font-size: 0.6rem; }
  .group-grid { gap: 2.75rem; }
  .group-block .section-head { align-items: baseline; gap: 0.75rem; }
  .group-block h3 { font-size: 1.1rem; }
  .group-block .section-head .eyebrow { font-size: 0.62rem; }
  .bracket-round { min-width: 15rem; }
  .bracket-match-main { padding: 0.72rem; }
}

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