/* Turnierbericht Sunday Padel – shared design tokens & layout primitives.
   Owned by the lead. Feature agents: read, don't edit. Section styles go into css/<section>.css.

   Design: PadelCompass (same as /blog): near-black page with a fine dot grid, Cyan as primary,
   Yellow as a sparing secondary, white Fraunces headlines, Inter body, JetBrains Mono labels.
   Fonts come from the website's /css/local-fonts.css (Inter 400–900, Fraunces 400–900 + italic 500/700,
   JetBrains Mono 400/500/700), so this file declares no @font-face of its own.

   Everything is scoped under #bericht (the <main> that wraps all sections) so it does not leak into
   the website header/footer; :where() keeps the selector weight of the bare class. */

:root {
  /* ---- Surfaces ---- */
  --bg: #0a0a0a;
  --bg-rgb: 10 10 10;               /* for overlays: rgb(var(--bg-rgb) / .8) */
  --bg2: #121212;                   /* opaque raised surface (tooltips, placeholders) */
  --dots: #1e293b;                  /* dot grid, as on padelcompass.de/blog */
  --panel: rgba(255, 255, 255, .03);
  --panel2: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .1);
  --line2: rgba(255, 255, 255, .18);

  /* ---- Text (Tailwind gray scale like the website) ---- */
  --ink: #ffffff;
  --ink-rgb: 255 255 255;
  --text: #d1d5db;                  /* gray-300: body copy */
  --muted: #9ca3af;                 /* gray-400 */
  --dim: #6b7280;                   /* gray-500 */

  /* ---- Brand ---- */
  --primary: #00ffff;
  --primary-rgb: 0 255 255;
  --primary-hover: #66ffff;
  --on-primary: #000000;            /* text on Cyan */
  --secondary: #ffff00;
  --secondary-rgb: 255 255 0;
  --on-secondary: #000000;          /* text on Yellow */
  --danger: #f87171;                /* form errors only (Tailwind red-400) */
  --danger-rgb: 248 113 113;

  /* ---- Medals (semantic, deliberately muted) ---- */
  --gold: #e2c46c;
  --gold-rgb: 226 196 108;
  --silver: #c4cad4;
  --silver-rgb: 196 202 212;
  --bronze: #c8936a;
  --bronze-rgb: 200 147 106;
  --gold-ink: #1c1400;
  --bronze-ink: #1c0f05;

  /* ---- Group colours: Cyan, Yellow, White, Slate. All four are light, so text on a filled
     group colour is always black (--on-group); as text/lines they all read on --bg. ---- */
  --gA: var(--primary);
  --gB: var(--secondary);
  --gC: #ffffff;
  --gD: #94a3b8;
  --on-group: #000000;

  /* Deprecated aliases (old Turnierplaner names) – still read by chrome.css / footer.css. */
  --lime: var(--primary);
  --lime-ink: var(--on-primary);
  --cyan: var(--primary);

  --font: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: Fraunces, Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  --r: .75rem;
  --r-lg: 1rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --measure: 42rem;      /* reading column */
  --wide: 76rem;         /* wide figures */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
  --glow-primary: 0 0 40px rgb(var(--primary-rgb) / .2);
}

/* Page surface: flat near-black with the website's 16px dot grid (no colour auroras). */
#bericht {
  display: block;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dots) 1px, transparent 1px);
  background-size: 16px 16px;
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
#bericht, #bericht *, #bericht *::before, #bericht *::after { box-sizing: border-box; }
:where(#bericht) :is(img, video, svg) { display: block; max-width: 100%; }
/* Inter's contextual alternates turn "20x10" into "20×10" – the sponsor's name must stay literal. */
#bericht, #bericht *, #bericht *::before, #bericht *::after { font-feature-settings: "calt" 0 !important; }
:where(#bericht) a { color: var(--primary); text-underline-offset: .2em; }
:where(#bericht) button { font: inherit; color: inherit; }
:where(#bericht) :focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
:where(#bericht) ::selection { background: rgb(var(--primary-rgb) / .3); color: var(--ink); }

/* ---- Layout primitives ---- */
:where(#bericht) .block { position: relative; padding: clamp(4rem, 10vw, 8rem) var(--gutter); }
:where(#bericht) .measure { max-width: var(--measure); margin-inline: auto; }
:where(#bericht) .wide { max-width: var(--wide); margin-inline: auto; }
:where(#bericht) .full { width: 100%; }

:where(#bericht) .eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font: 700 .75rem/1 var(--font-mono); letter-spacing: .2em; text-transform: uppercase;
  color: var(--primary);
}
:where(#bericht) .eyebrow::before { content: ''; width: 1.6rem; height: 1px; background: currentColor; }
:where(#bericht) .section-title {
  font: 900 clamp(2.2rem, 6vw, 4.5rem)/1 var(--font-display);
  letter-spacing: -.02em; margin: .9rem 0 1.2rem; color: var(--ink);
}
:where(#bericht) .section-title em { font-style: italic; font-weight: 700; color: var(--primary); }
:where(#bericht) .lead { font-size: clamp(1.15rem, 2vw, 1.35rem); color: var(--text); line-height: 1.6; }
:where(#bericht) .prose p { margin: 0 0 1.25em; color: var(--text); }
:where(#bericht) .prose strong { color: var(--ink); }
:where(#bericht) .muted { color: var(--muted); }
:where(#bericht) .mono { font-family: var(--font-mono); }

:where(#bericht) .card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
:where(#bericht) .chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .7rem; border-radius: 999px;
  border: 1px solid var(--line2); background: var(--panel);
  font: 600 .78rem/1 var(--font); color: var(--muted);
}
:where(#bericht) .g-A { --c: var(--gA); }
:where(#bericht) .g-B { --c: var(--gB); }
:where(#bericht) .g-C { --c: var(--gC); }
:where(#bericht) .g-D { --c: var(--gD); }

/* Sponsor placeholder wordmarks until the official logo files arrive.
   Replace by <img> later – keep the data-sponsor attribute. */
:where(#bericht) .sponsor-mark {
  display: inline-flex; align-items: center; justify-content: center;
  font: 900 1.4rem/1 var(--font); letter-spacing: -.02em; color: var(--ink);
}
:where(#bericht) .sponsor-mark[data-sponsor="nextserves"] { font-weight: 800; }

/* ---- Reveal-on-scroll: add .reveal, js/core.js toggles .is-in ---- */
:where(.js #bericht) .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
:where(.js #bericht) .reveal.is-in { opacity: 1; transform: none; }
:where(#bericht) .reveal[data-delay="1"] { transition-delay: .08s; }
:where(#bericht) .reveal[data-delay="2"] { transition-delay: .16s; }
:where(#bericht) .reveal[data-delay="3"] { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  #bericht *, #bericht *::before, #bericht *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  :where(#bericht) .reveal { opacity: 1; transform: none; }
}

:where(#bericht) .visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Anchor jumps land below the fixed top bar. */
:where(#bericht) :is(section[id], header[id], footer[id]) { scroll-margin-top: calc(var(--chrome-h, 0px) + 1rem); }

/* Official sponsor logos (from the sponsors' own websites) for display spots; running text keeps the wordmark.
   The name stays in the DOM for screen readers and search, only painted transparent. */
:where(#bericht) .sponsor-mark.is-logo {
  display: inline-block; height: 1em; aspect-ratio: var(--logo-ar); vertical-align: middle;
  background: var(--logo) center / contain no-repeat;
  color: transparent; overflow: hidden; white-space: nowrap; letter-spacing: 0; text-shadow: none;
}
:where(#bericht) .sponsor-mark.is-logo[data-sponsor="20x10"] { --logo: url(../media/brand/sponsor-20x10.png); --logo-ar: 1200 / 407; }
:where(#bericht) .sponsor-mark.is-logo[data-sponsor="nextserves"] { --logo: url(../media/brand/sponsor-nextserves.png); --logo-ar: 852 / 244; height: 1.9em; }
