/* SV Garbenteich Leichtathletik — shared site styles.
   World: the finisher's certificate. White paper, club watercolour bleeding in from a page edge,
   rounded heavy Nunito for display, Nunito Sans for reading, race colour as a field (10 green / 21 yellow / 30 red).
   Page files own only their page-specific CSS; everything shared lives here. See DESIGN.md. */

:root {
  --paper: #ffffff; --paper-2: #f3f8fb; --paper-3: #e8f2f8; --ink: #2d393e; --muted: #56676e; --line: #d9e4ea; --logo-blue: #215dbb;
  --wc-1: #79e8ff; --wc-2: #4ec9ff; --wc-3: #2f9bff; --wc-4: #bfe9ff; --wc-op: .9;
  --g: #1a7d35; --g-on: #ffffff; --g-line: #1a7d35;
  --y: #f5b800; --y-on: #2d393e; --y-line: #b88900;
  --r: #d32f2f; --r-on: #ffffff; --r-line: #c62828;
  --race: var(--logo-blue); --race-on: #ffffff; --race-line: var(--logo-blue);
  --display: "Nunito", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --text: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  --head-h: 64px;
  --container: 1240px;
  --shadow-lift: 0 1px 2px rgb(20 40 60 / .18), 0 18px 44px -12px rgb(20 60 110 / .35);
  --shadow-panel: 0 10px 30px -10px rgb(20 50 80 / .3);
  --shadow-soft: 0 1px 0 var(--line), 0 6px 24px rgb(20 60 100 / .10);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #0c1820; --paper-2: #12232e; --paper-3: #183040; --ink: #e3edf2; --muted: #9fb4be; --line: #223747; --logo-blue: #5aa2ff;
  --wc-1: #0f5d86; --wc-2: #146fa8; --wc-3: #1b4f9c; --wc-4: #0e3f5c; --wc-op: .75;
  --g: #3fbf62; --g-on: #08150c; --g-line: #4fd474;
  --y: #ffcc33; --y-on: #1d1a0c; --y-line: #ffcc33;
  --r: #ff5c5c; --r-on: #1c0a0a; --r-line: #ff6b6b;
  --race-on: #08121a; --shadow-lift: 0 1px 2px rgb(0 0 0 / .4), 0 18px 44px -12px rgb(0 0 0 / .55); --shadow-panel: 0 10px 30px -10px rgb(0 0 0 / .5); color-scheme: dark; } }
:root[data-theme="dark"] {
  --paper: #0c1820; --paper-2: #12232e; --paper-3: #183040; --ink: #e3edf2; --muted: #9fb4be; --line: #223747; --logo-blue: #5aa2ff;
  --wc-1: #0f5d86; --wc-2: #146fa8; --wc-3: #1b4f9c; --wc-4: #0e3f5c; --wc-op: .75;
  --g: #3fbf62; --g-on: #08150c; --g-line: #4fd474;
  --y: #ffcc33; --y-on: #1d1a0c; --y-line: #ffcc33;
  --r: #ff5c5c; --r-on: #1c0a0a; --r-line: #ff6b6b;
  --race-on: #08121a; --shadow-lift: 0 1px 2px rgb(0 0 0 / .4), 0 18px 44px -12px rgb(0 0 0 / .55); --shadow-panel: 0 10px 30px -10px rgb(0 0 0 / .5); color-scheme: dark; }
[data-race="10"] { --race: var(--g); --race-on: var(--g-on); --race-line: var(--g-line); }
[data-race="21"] { --race: var(--y); --race-on: var(--y-on); --race-line: var(--y-line); }
[data-race="30"] { --race: var(--r); --race-on: var(--r-on); --race-line: var(--r-line); }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-color: var(--wc-3) var(--paper-2); -webkit-text-size-adjust: 100%; }
html, body { background: var(--paper); color: var(--ink); }
body { font: 400 17px/1.65 var(--text); margin: 0; }
::selection { background: var(--wc-1); color: #0c1820; }
a { color: var(--logo-blue); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
:focus-visible { outline: 3px solid var(--logo-blue); outline-offset: 3px; border-radius: 4px; }
img, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
.wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.container { max-width: var(--container); margin-inline: auto; }
.icon { width: 1em; height: 1em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; }

/* ---------- type scale ---------- */
.t-display { font: 900 clamp(44px, 6.6vw, 96px)/.92 var(--display); letter-spacing: -.025em; margin: 0; }
.t-headline { font: 900 clamp(36px, 5vw, 68px)/.95 var(--display); letter-spacing: -.025em; margin: 0; }
.t-title { font: 900 clamp(28px, 3vw, 40px)/1.05 var(--display); letter-spacing: -.015em; margin: 0; }
.t-title-sm { font: 900 20px/1.2 var(--display); margin: 0; }
.t-lead { font: 600 21px/1.5 var(--text); margin: 0; }
.t-label { font: 700 13px/1.3 var(--text); color: var(--muted); margin: 0; }
.prose { max-width: 62ch; }
.prose p { margin: 0 0 14px; }
@media (max-width: 600px) { .t-display { font-size: clamp(40px, 12.4vw, 64px); } .t-lead { font-size: 19px; } }

/* ---------- header ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
.skip-link { position: fixed; z-index: 1300; left: max(16px, env(safe-area-inset-left, 0px)); top: calc(env(safe-area-inset-top, 0px) + 10px); padding: 12px 18px; border-radius: 999px; background: var(--ink); color: var(--paper); font: 800 15px/1 var(--display); text-decoration: none; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
#main:focus { outline: none; }
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 1200; height: var(--head-h); display: flex; align-items: center; gap: 24px; background: var(--paper); border-bottom: 1px solid var(--line); }
.brand { display: block; color: var(--ink); line-height: 0; flex: none; }
.brand .logo { height: 38px; width: auto; }
.logo .lb { fill: var(--logo-blue); }
.site-nav { display: flex; gap: 2px; margin-left: auto; font: 800 15px/1 var(--display); }
.site-nav a { padding: 10px 12px; text-decoration: none; color: var(--muted); border-radius: 999px; white-space: nowrap; }
.site-nav a:hover { color: var(--ink); background: var(--paper-2); }
.site-nav a[aria-current] { color: var(--ink); background: var(--paper-2); }
.menu-btn { display: none; margin-left: auto; border: 0; background: var(--paper-2); color: var(--ink); width: 44px; height: 44px; border-radius: 999px; cursor: pointer; place-items: center; }
.menu-btn .icon { width: 22px; height: 22px; }
.subnav { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--head-h)); z-index: 1100; background: var(--paper); border-bottom: 1px solid var(--line); }
.subnav ul { list-style: none; margin: 0 auto; padding: 8px 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; max-width: var(--container); }
.subnav a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font: 800 14px/1 var(--display); text-decoration: none; color: var(--muted); white-space: nowrap; }
.subnav a:hover { color: var(--ink); background: var(--paper-2); }
.subnav a[aria-current] { color: var(--ink); background: var(--paper-2); }
.subnav ul.more-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.subnav ul.more-l { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); }
.subnav ul.more-l.more-r { -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); }
.subnav a i { width: 10px; height: 10px; border-radius: 50%; background: var(--sw, var(--logo-blue)); }
@media (max-width: 960px) {
  :root { --head-h: 56px; }
  .brand .logo { height: 32px; }
  .menu-btn { display: grid; }
  .site-nav { display: none; position: fixed; inset: calc(env(safe-area-inset-top, 0px) + var(--head-h)) 0 auto 0; flex-direction: column; gap: 4px; padding: 12px max(16px, env(safe-area-inset-right, 0px)) 20px max(16px, env(safe-area-inset-left, 0px)); background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-panel); font-size: 19px; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px 16px; }
}

/* ---------- watercolour splash (authored SVG, fixed size so it never rescales when content height changes) ---------- */
.has-splash { position: relative; overflow: hidden; isolation: isolate; }
.splash { position: absolute; z-index: -1; left: 0; top: -40px; width: 760px; height: 980px; max-width: none; opacity: var(--wc-op); pointer-events: none; }
.splash.right { left: auto; right: 0; transform: scaleX(-1); width: 620px; opacity: calc(var(--wc-op) * .7); }
.splash-img { position: absolute; z-index: -1; pointer-events: none; max-width: none; }
/* raster splash from the club's bib artwork (img/splash-left|right|bottom.png, 886x2000 / 2000x886) */
img.splash { height: auto; display: block; }
/* width is fixed and object-fit crops from the top, so the scale never changes with the section height;
   the mask fades the cut edge out in short sections instead of leaving a hard line */
img.splash-left, img.splash-right { height: calc(100% + 120px); max-height: 1061px; object-fit: cover; object-position: top;
  -webkit-mask-image: linear-gradient(#000 55%, transparent 98%); mask-image: linear-gradient(#000 55%, transparent 98%); }
img.splash-left { left: 0; top: -120px; width: 470px; transform: none; }
img.splash-right { left: auto; right: 0; top: -80px; width: 400px; transform: none; opacity: calc(var(--wc-op) * .8); }
img.splash-bottom { left: 0; right: 0; top: auto; bottom: 0; width: 100%; min-width: 1100px; height: auto; transform: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) img.splash { opacity: .5; } }
:root[data-theme="dark"] img.splash { opacity: .5; }
@media (max-width: 960px) { .splash { width: 560px; height: 760px; top: -30px; } img.splash-left { width: 300px; top: -80px; max-height: 678px; } img.splash-right { width: 260px; max-height: 587px; } }

/* ---------- sections & bands ---------- */
.band { padding-block: 72px; }
.band-tint { background: var(--paper-2); }
.band-ink { background: var(--ink); color: var(--paper); }
.band-ink a { color: var(--wc-1); }
.page-hero { padding-block: 48px 56px; }
.page-hero .t-display { margin-bottom: 18px; }
.page-hero .t-lead { max-width: 56ch; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 32px; margin-bottom: 32px; }
.section-head p { margin: 0; max-width: 52ch; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); }
@media (max-width: 900px) { .grid-2, .grid-3, .split { grid-template-columns: minmax(0, 1fr); } .band { padding-block: 56px; } }

/* ---------- buttons, chips, links ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 10px; font: 800 17px/1 var(--display); text-decoration: none; padding: 16px 24px; border-radius: 999px; border: 2px solid var(--ink); color: var(--ink); background: var(--paper); cursor: pointer; transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgb(20 50 80 / .14); }
.btn .icon { width: 18px; height: 18px; }
.btn-race { background: var(--race); border-color: var(--race); color: var(--race-on); }
.btn-ink { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-sm { padding: 11px 16px; font-size: 15px; }
.chip { display: inline-flex; align-items: center; gap: 7px; font: 700 14px/1 var(--text); padding: 8px 12px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.chip .icon { width: 16px; height: 16px; }
.more { display: inline-flex; align-items: center; min-height: 24px; gap: 8px; font: 800 16px/1 var(--display); text-decoration: none; }
.more .icon { width: 18px; height: 18px; transition: transform .2s; }
.more:hover .icon { transform: translateX(3px); }

/* ---------- paper card ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; }
.card-link { display: block; text-decoration: none; color: inherit; transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s; }
.card-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-panel); }

/* ---------- bib (the club's fact object) ---------- */
.bib { position: relative; background: #fff; color: #2d393e; border-radius: 14px; padding: 0 0 22px; transform: rotate(1.6deg); box-shadow: var(--shadow-lift); }
.bib::before, .bib::after, .bib .pin-b::before, .bib .pin-b::after { content: ""; position: absolute; width: 13px; height: 13px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 1px 2px rgb(0 0 0 / .35); z-index: 2; }
.bib::before { left: 14px; top: 14px; } .bib::after { right: 14px; top: 14px; }
.bib .pin-b::before { left: 14px; bottom: 14px; } .bib .pin-b::after { right: 14px; bottom: 14px; }
.bib-band { background: var(--race); color: var(--race-on); border-radius: 14px 14px 0 0; padding: 16px 40px 14px; display: flex; justify-content: space-between; gap: 12px; align-items: center; font: 800 15px/1.2 var(--display); }
.bib-num { font: 900 clamp(84px, 10vw, 150px)/.9 var(--display); letter-spacing: -.04em; text-align: center; padding: 22px 20px 4px; font-variant-numeric: tabular-nums; color: #2d393e; }
.bib-num small { font-size: .3em; letter-spacing: 0; margin-left: .08em; }
.bib-name { text-align: center; font: 800 18px/1.2 var(--display); margin: 0 0 18px; }
.bib-facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 26px; border-top: 2px dashed #d5dde2; padding-top: 14px; }
.bib-facts div { text-align: center; }
.bib-facts dt { font: 700 12px/1.2 var(--text); color: #5d6d73; }
.bib-facts dd { margin: 4px 0 0; font: 900 26px/1 var(--display); font-variant-numeric: tabular-nums; }
.bib-facts dd small { font-size: 14px; font-weight: 800; margin-left: 2px; }
.bib-sponsor { display: flex; justify-content: center; align-items: center; height: 34px; margin: 18px 30px 0; }
.bib-sponsor img { height: 100%; width: auto; max-width: 100%; }

/* facts taken from an older Ausschreibung (site.js removes it once the new one is in) */
.stand-note { margin: 12px 0 0; font: 600 14px/1.45 var(--text); color: var(--muted); max-width: 52ch; }

/* ---------- media placeholder (club photos / drone video go here) ---------- */
.media-slot { position: relative; border-radius: 14px; overflow: hidden; background: linear-gradient(135deg, var(--paper-3), var(--paper-2)); border: 2px dashed var(--muted); aspect-ratio: 16 / 9; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 20px; }
.media-slot strong { display: block; font: 900 20px/1.2 var(--display); color: var(--ink); margin-bottom: 4px; }
.media-slot span { font: 600 14px/1.4 var(--text); max-width: 36ch; display: block; }
.media-slot .icon { width: 36px; height: 36px; margin: 0 auto 10px; color: var(--logo-blue); }

/* ---------- clipping (newspaper placeholder) ---------- */
.clip { background: #fbf8f1; color: #2d393e; border: 1px solid #e3dccb; border-radius: 3px; box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 10px 24px -14px rgb(60 50 20 / .35); transform: rotate(-.6deg); padding: 16px 18px; }
.clip:nth-child(odd) { transform: rotate(.5deg); }
.clip .src { display: block; margin-top: 8px; font: 700 12px/1.3 var(--text); color: #6b6553; border-top: 1px dashed #d8cfb8; padding-top: 6px; }

/* ---------- timeline: no boxes; the year stands on a rail like the km marks on the course page (strecke.css .rail) ---------- */
.timeline { --tl-col: 84px; --tl-gap: 22px; list-style: none; margin: 0; padding: 0; }
.tl { position: relative; display: grid; grid-template-columns: var(--tl-col) minmax(0, 1fr); gap: 0 var(--tl-gap); align-items: start; padding-bottom: 34px; }
/* the rail runs beside the text and breaks at each year, so every year reads as a mark on the line */
.tl::after { content: ""; position: absolute; left: calc(var(--tl-col) + var(--tl-gap) / 2 - 1.5px); top: 44px; bottom: 0; width: 3px; border-radius: 2px; background: var(--line); }
.timeline > .tl:last-child { padding-bottom: 4px; }
.tl-year { font: 900 34px/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ink); text-align: right; padding-top: 2px; }
.tl h3 { font: 900 clamp(20px, 1.7vw, 23px)/1.2 var(--display); margin: 2px 0 6px; }
.tl p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--muted); max-width: 62ch; }
@media (max-width: 600px) { .timeline { --tl-col: 52px; --tl-gap: 16px; } .tl-year { font-size: 24px; } .tl::after { top: 34px; } }

/* ---------- sponsors ---------- */
.sponsor-row { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; }
.sponsor-row a { display: block; height: 36px; }
.sponsor-row img { height: 100%; width: auto; }
.logo-plate { background: #fff; border-radius: 10px; padding: 6px 10px; }

/* ---------- footer ---------- */
.site-foot { padding-block: 56px 48px; border-top: 1px solid var(--line); background: var(--paper); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2fr)); gap: 32px; }
.foot-grid .logo { height: 46px; width: auto; color: var(--ink); margin-bottom: 14px; }
.foot-grid h2 { font: 900 16px/1.2 var(--display); margin: 0 0 10px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot-grid ul a { color: var(--muted); text-decoration: none; font-weight: 600; }
.foot-grid ul a:hover { color: var(--ink); text-decoration: underline; }
.foot-grid address { font-style: normal; color: var(--muted); font-size: 15px; }
.fine { margin: 28px 0 0; font: 600 13px/1.6 var(--text); color: var(--muted); }
@media (max-width: 900px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-grid > :first-child { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) { .btn, .card-link, .more .icon { transition: none; } }

/* phones: keep the deep-blue splash edge out from under the text */
@media (max-width: 600px) { img.splash-left, img.splash-right { width: 190px; opacity: .55; } }
