/* Coach Bob Sports — the static site.
 *
 * The tokens are §7.2's, so the site and the app read as one thing. Written by
 * hand rather than built: four pages of prose need no toolchain, and D-01 put
 * the product in Flutter precisely so this could stay simple.
 */

:root {
  /* §7.2 base palette, light. */
  --surface: #f4f6f7;
  --surface-raised: #ffffff;
  --ink: #14181d;
  --ink-muted: #5a6672;
  --rule: #d8dee3;

  /* §7.2 per-sport accents. The site belongs to no one sport, so it uses
     the dugout navy as its single tone and never as the sole signal. */
  --accent: #23456b;

  --measure: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #14181d;
    --surface-raised: #1c2229;
    --ink: #edf1f3;
    --ink-muted: #98a5b0;
    --rule: #2a323a;
    --accent: #8fb0d8;
  }
}

/* §7.3 — the same two superfamilies as the app, self-hosted. No font CDN,
   which keeps the §19.1 cost at zero and lets the CSP stay closed. The
   fallbacks are real: `build.sh` copies the faces in from app/assets/fonts,
   so opening these files straight off disk still reads correctly. */
@font-face {
  font-family: 'Archivo Expanded';
  src: url('fonts/ArchivoExpanded-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/IBMPlexSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/IBMPlexSans-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0 1.5rem 5rem;
  background: var(--surface);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* §7.3 body: 16 / 1.5. */
  font-size: 1rem;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
}

/* Skip link — §14 is voluntary here, but a keyboard user meets the nav on
   every page and there is no reason to make them walk it. */
.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  position: static;
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface-raised);
  border: 2px solid var(--accent);
  border-radius: 8px;
}

header.site {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.5rem;
}

header.site a.wordmark {
  font-family: 'Archivo Expanded', system-ui, sans-serif;
  font-weight: 700;
  /* §7.3 display-md: 25 / 1.25. */
  font-size: 1.5625rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

nav.site {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

nav.site a {
  /* §7.3 body-sm. */
  font-size: 0.875rem;
  color: var(--ink-muted);
}

nav.site a[aria-current='page'] {
  color: var(--ink);
  font-weight: 600;
}

h1 {
  font-family: 'Archivo Expanded', system-ui, sans-serif;
  font-weight: 700;
  /* §7.3 display-lg: 31 / 1.2. */
  font-size: 1.9375rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
}

h2 {
  font-family: 'Archivo Expanded', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 2.5rem 0 0.75rem;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
}

p,
li {
  max-width: var(--measure);
}

p {
  margin: 0 0 1rem;
}

ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.4rem;
}

.lede {
  /* §7.3 body-lg: 18 / 1.5. */
  font-size: 1.125rem;
  color: var(--ink-muted);
  margin-bottom: 2rem;
}

.updated {
  font-size: 0.875rem;
  color: var(--ink-muted);
  margin-bottom: 2rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.card {
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

dl {
  margin: 0 0 1rem;
}

dt {
  font-weight: 600;
  margin-top: 1rem;
}

dd {
  margin: 0.25rem 0 0;
  color: var(--ink-muted);
  max-width: var(--measure);
}

footer.site {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--ink-muted);
}

footer.site p {
  margin-bottom: 0.5rem;
}

/* §14's reduced-motion rule is honoured by having nothing to reduce; this
   guards anything a browser animates for us. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
