/* =========================================================================
   Stryde — marketing site stylesheet.

   Tokens are lifted from the app's `src/theme/colors.ts` and
   `src/theme/tokens.ts` so the site and the product read as the same thing.
   Where the two used to disagree, the app wins: cards are 22px (`radii.card`),
   not the 14px this file used to ship, which is the app's *row* radius.

   The app is hard-locked light (`app.json` -> `userInterfaceStyle: "light"`),
   so there is deliberately NO `prefers-color-scheme: dark` block. A dark site
   handing a visitor a permanently light app is a worse experience than a light
   site, and the screenshots are light regardless.
   ========================================================================= */

:root {
  /* ---- surfaces: a ladder, so depth rarely needs a shadow ---- */
  --ground: #f8f8f6; /* bg-primary */
  --card: #ffffff; /* bg-card */
  --s2: #f2f2ef;
  --s3: #ecece8;

  /* ---- ink. `--muted` is for non-text only: it fails AA at body size. ---- */
  --ink: #1a1a1a;
  --secondary: #6e6e73;
  --muted: #8e8e93;
  --on-dark: #fbf9f4; /* cream, not pure white — matches onDark.foreground */

  /* ---- hairlines are alpha, never an opaque grey: they sit correctly on
         any surface in the ladder above. ---- */
  --line-faint: rgba(26, 26, 26, 0.06);
  --line: rgba(26, 26, 26, 0.1);
  --line-strong: rgba(26, 26, 26, 0.16);
  --border: #e5e5ea; /* legacy token, still used by .prose */
  --hairline: 1px;

  /* ---- disciplines. Three-step ramp per sport, straight from the app's
         `disciplineRamp`. Theme-invariant — these are the brand. ---- */
  --running: #ff6b35;
  --running-soft: #ffe8dd;
  --running-deep: #b5471c;
  --strength: #3b82f6;
  --strength-soft: #dce8ff;
  --strength-deep: #1e40af;
  --hyrox: #06b6d4;
  --hyrox-soft: #cef1f8;
  --hyrox-deep: #0e7490;
  --swimming: #1e3a8a;
  --swimming-soft: #dbe2f4;
  --swimming-deep: #0f1f4d;

  /* ---- semantic ---- */
  --carb: #10b981; /* macro.carbs */
  --protein: #3b82f6;
  --fat: #f97316;

  --radius-card: 22px;
  --radius-tile: 18px;
  --radius-row: 14px;
  --radius-slab: 10px;

  --shadow-card: 0 0 0 1px var(--line-faint), 0 1px 1px rgba(26, 26, 26, 0.02),
    0 3px 6px -2px rgba(26, 26, 26, 0.03),
    0 12px 20px -8px rgba(26, 26, 26, 0.05),
    0 28px 40px -16px rgba(26, 26, 26, 0.06);
  --shadow-tile: 0 0 0 1px var(--line-faint), 0 1px 2px rgba(26, 26, 26, 0.03),
    0 8px 14px -8px rgba(26, 26, 26, 0.06);

  --font: -apple-system, 'SF Pro Text', 'SF Pro Display', BlinkMacSystemFont,
    'Inter var', Inter, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --page: 68rem; /* 1088px — wide enough for seven legible day columns */
  --gutter: 1.5rem;
  --measure: 34rem; /* legal prose */
  --band: clamp(3rem, 6vw, 5rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* True hairlines where the display can draw them. */
@media (min-resolution: 192dpi), (-webkit-min-device-pixel-ratio: 2) {
  :root {
    --hairline: 0.5px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.011em;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

:where(a, button, summary):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

/* =========================================================================
   Type ramp.

   Tracking is not a linear function of size: it steps once and holds.
   -0.012em up to 24px, then -0.022em from 32px and above. Line-height
   collapses toward 1.0 as size grows. Weights stop at 600 — display type set
   at 700 is the clearest "template" tell there is.
   ========================================================================= */

h1,
h2,
h3,
h4 {
  margin: 0;
  text-wrap: balance;
  font-weight: 600;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.d1 {
  font-size: clamp(2.25rem, 1.5rem + 2.6vw, 3.25rem);
  letter-spacing: -0.022em;
  line-height: 1.02;
}

.d2 {
  font-size: clamp(1.65rem, 1.2rem + 1.6vw, 2.25rem);
  letter-spacing: -0.022em;
  line-height: 1.1;
}

.t1 {
  font-size: 1.5rem;
  letter-spacing: -0.012em;
  line-height: 1.3;
}

.t2 {
  font-size: 1.25rem;
  letter-spacing: -0.012em;
  line-height: 1.33;
}

.t3 {
  font-size: 1rem;
  letter-spacing: -0.012em;
  line-height: 1.35;
}

.lead {
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--secondary);
  max-width: 42ch;
}

.body {
  font-size: 0.9375rem;
  letter-spacing: -0.013em;
  line-height: 1.55;
  color: var(--secondary);
}

.micro {
  font-size: 0.8125rem;
  letter-spacing: 0;
  line-height: 1.45;
  color: var(--muted);
}

/* The eyebrow. Wide positive tracking against tight negative tracking on the
   headline below it is the app's most recognisable typographic signature. */
.eyebrow {
  font-size: 0.6875rem;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--secondary);
}

/* =========================================================================
   Chrome
   ========================================================================= */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--on-dark);
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(
    180deg,
    rgba(248, 248, 246, 0.88),
    rgba(248, 248, 246, 0.82)
  );
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: var(--hairline) solid var(--line-faint);
}

.site-header > div {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0.75rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  font-size: 1rem;
  text-decoration: none;
}

.wordmark img {
  border-radius: 6px;
}

.site-header nav {
  display: flex;
  gap: 1.15rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.875rem;
}

.site-header nav a {
  color: var(--secondary);
  text-decoration: none;
  letter-spacing: -0.013em;
}

.site-header nav a:hover,
.site-header nav a[aria-current='page'] {
  color: var(--ink);
}

.site-footer {
  border-top: var(--hairline) solid var(--line);
  background: var(--s2);
  margin-top: var(--band);
}

.site-footer > div {
  max-width: var(--page);
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 2rem;
  display: grid;
  gap: 2rem;
  /* Explicit tracks, not `1.5fr repeat(auto-fit, …)`. Mixing an `fr` track
     with an auto-repeat collapses the repeat to a single iteration — the whole
     footer rendered as one column. The three link columns are an editorial
     choice in `src/layout.mjs` anyway, so state them. */
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
}

@media (max-width: 46rem) {
  .site-footer > div {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 28rem) {
  .site-footer > div {
    grid-template-columns: minmax(0, 1fr);
  }
}

.site-footer h2 {
  font-size: 0.6875rem;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer a {
  color: var(--secondary);
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.9;
  letter-spacing: -0.013em;
}

.site-footer a:hover {
  color: var(--ink);
}

.footer-legal {
  grid-column: 1 / -1;
  padding-top: 1.25rem;
  border-top: var(--hairline) solid var(--line-faint);
  color: var(--muted);
  font-size: 0.8125rem;
}

/* =========================================================================
   Layout primitives
   ========================================================================= */

.wrap {
  max-width: var(--page);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.band {
  padding-block: var(--band);
}

.band + .band {
  border-top: var(--hairline) solid var(--line-faint);
}

.band-tint {
  background: var(--s2);
}

/* The base is shared so a modifier works on its own — `.split-rev` used to
   set only the columns, which meant it silently stacked wherever it was used
   without `.split` alongside it. */
.split,
.split-rev,
.split-hero {
  display: grid;
  gap: clamp(1.75rem, 4vw, 2.75rem);
  align-items: center;
  /* Asymmetric on purpose. A 50/50 split is the tell of a template. */
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
}

.split-rev {
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
}

/* The hero leans harder than the others: seven day columns need width before
   the copy does. */
.split-hero {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

.grid {
  display: grid;
  gap: 0.875rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.rule {
  height: var(--hairline);
  border: 0;
  background: var(--line-faint);
  margin: 0;
}

.rule-dashed {
  height: 1px;
  border: 0;
  background: repeating-linear-gradient(
    to right,
    var(--line) 0 3px,
    transparent 3px 7px
  );
  margin: 0;
}

.stack > * + * {
  margin-top: 0.75rem;
}

/* Hairline grid, faded by a radial mask so it never reaches an edge. */
.grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
      to right,
      var(--line-faint) 0 1px,
      transparent 1px 68px
    ),
    repeating-linear-gradient(
      to bottom,
      var(--line-faint) 0 1px,
      transparent 1px 68px
    );
  opacity: 0.55;
  -webkit-mask-image: radial-gradient(
    ellipse 62% 52% at 42% 18%,
    #000 8%,
    transparent 70%
  );
  mask-image: radial-gradient(
    ellipse 62% 52% at 42% 18%,
    #000 8%,
    transparent 70%
  );
}

/* =========================================================================
   Cards, buttons, chips
   ========================================================================= */

.card {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}

.card h3 {
  margin-bottom: 0.35rem;
}

.card p {
  color: var(--secondary);
  font-size: 0.9375rem;
  letter-spacing: -0.013em;
  line-height: 1.55;
}

.slab {
  background: var(--card);
  border-radius: var(--radius-slab);
  box-shadow: 0 0 0 var(--hairline) var(--line),
    0 2px 4px rgba(26, 26, 26, 0.03), 0 14px 28px -10px rgba(26, 26, 26, 0.1);
  overflow: hidden;
}

.btn,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.15rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.011em;
  text-decoration: none;
  transition: background 0.18s var(--ease), transform 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}

/* The primary action in the app is near-black, not blue. Keep it that way. */
.btn {
  background: var(--ink);
  color: var(--on-dark);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 1px 2px rgba(26, 26, 26, 0.2), 0 6px 16px -6px rgba(26, 26, 26, 0.28);
}

.btn:hover {
  background: #2d2c31;
}

.btn:active {
  transform: translateY(1px) scale(0.994);
}

.btn-ghost {
  color: var(--ink);
  box-shadow: inset 0 0 0 var(--hairline) var(--line-strong);
}

.btn-ghost:hover {
  background: var(--s2);
}

.actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--s2);
  color: var(--secondary);
}

.availability {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: var(--card);
  box-shadow: inset 0 0 0 var(--hairline) var(--line);
  color: var(--secondary);
  font-size: 0.875rem;
}

/* An annotation: a claim about *why*, tied to a real engine behaviour. */
.ann {
  position: relative;
  padding-left: 0.9rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--secondary);
}

.ann::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.28;
}

/* =========================================================================
   Discipline theming.

   Set `--accent` / `--accent-soft` / `--accent-deep` on any element and the
   helpers below pick them up. Adding a sport means adding one block here and
   one entry in content/disciplines.ts — nothing else.
   ========================================================================= */

.running {
  --accent: var(--running);
  --accent-soft: var(--running-soft);
  --accent-deep: var(--running-deep);
}
.strength {
  --accent: var(--strength);
  --accent-soft: var(--strength-soft);
  --accent-deep: var(--strength-deep);
}
.hyrox {
  --accent: var(--hyrox);
  --accent-soft: var(--hyrox-soft);
  --accent-deep: var(--hyrox-deep);
}
.swimming {
  --accent: var(--swimming);
  --accent-soft: var(--swimming-soft);
  --accent-deep: var(--swimming-deep);
}

.discipline-card {
  border-radius: var(--radius-tile);
  padding: 1rem;
  background: var(--accent-soft, var(--s2));
  box-shadow: 0 0 0 var(--hairline) var(--line-faint);
}

.discipline-card h3,
.discipline-card p {
  color: var(--accent-deep, var(--ink));
}

.discipline-card p {
  opacity: 0.82;
}

.legend {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  font-weight: 500;
  color: var(--secondary);
}

.legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.legend .soon {
  color: var(--muted);
}

.legend .soon i {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--muted);
}

/* =========================================================================
   The week grid — the site's signature asset.

   Nobody else in the category renders a multi-sport week. Each day carries its
   sport, the session, and the carbohydrate target for that day, because the
   fuelling engine is the one place load genuinely sums across every sport.
   ========================================================================= */

/* Seven columns is the whole point, so the budget per column is small: at a
   1440 viewport each day title gets ~64px. Every word used in
   `content/sample-week.ts` has to fit inside that on Roboto and Segoe too, not
   just SF — hence short words there rather than tuning these numbers to the
   pixel. `hyphens`/`overflow-wrap` below are a safety net, not the plan. */
.week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.3rem;
}

.day {
  background: var(--card);
  border-radius: var(--radius-row);
  padding: 0.5rem 0.35rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-tile);
  min-width: 0;
  overflow-wrap: break-word;
}

.day-name {
  font-size: 0.625rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.day-bar {
  height: 3px;
  width: 22px;
  border-radius: 2px;
  background: var(--accent);
  margin-bottom: 0.4rem;
}

.day-sport {
  display: none; /* grid layout: the colour bar and the legend say it */
  font-size: 0.5625rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent-deep);
  margin-bottom: 0.2rem;
  white-space: nowrap;
}

.day-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.22;
  margin-bottom: 0.15rem;
  hyphens: auto;
  -webkit-hyphens: auto;
  /* `pretty` weighs the last line and encourages an early break in a narrow
     column; the tiles want plain greedy wrapping. */
  text-wrap: wrap;
}

.day-detail {
  font-size: 0.6563rem;
  color: var(--muted);
  line-height: 1.32;
}

.day-fuel {
  margin-top: auto;
  padding-top: 0.4rem;
  border-top: 1px dashed rgba(26, 26, 26, 0.12);
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
  white-space: nowrap;
}

.day-fuel b {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--carb);
}

.day-fuel span {
  font-size: 0.5313rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}

/* The week's anchor session. Every other placement is measured against it. */
.day-key {
  background: linear-gradient(160deg, var(--accent-soft), #fffffd);
  box-shadow: 0 0 0 var(--hairline) color-mix(in srgb, var(--accent) 30%, transparent),
    0 10px 18px -8px color-mix(in srgb, var(--accent) 22%, transparent);
}

.day-key .day-name,
.day-key .day-title {
  color: var(--accent-deep);
}

.day-key .day-detail {
  color: var(--accent-deep);
  opacity: 0.85;
}

.day-key .day-fuel {
  border-top-color: color-mix(in srgb, var(--accent) 22%, transparent);
}

/* Below the 7-column grid stops being readable, the week becomes a list. */
@media (max-width: 60rem) {
  .week {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .day {
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
  }

  .day-name {
    width: 2.5rem;
    margin: 0;
    flex: none;
  }

  .day-bar {
    width: 3px;
    height: 26px;
    margin: 0;
    flex: none;
  }

  .day-sport {
    display: block;
    margin-bottom: 0.1rem;
  }

  .day-body {
    flex: 1;
    min-width: 0;
  }

  .day-title,
  .day-detail {
    margin: 0;
  }

  .day-fuel {
    margin: 0;
    padding: 0;
    border: 0;
    flex: none;
  }
}

/* =========================================================================
   Fuel
   ========================================================================= */

.macro-bar {
  display: flex;
  height: 7px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.macro-legend {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.hero-number {
  font-size: 2.75rem;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--carb);
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  font-size: 0.875rem;
}

.kv + .kv {
  border-top: var(--hairline) solid var(--line-faint);
}

.kv span:last-child {
  color: var(--secondary);
  text-align: right;
}

/* =========================================================================
   Stats, FAQ, changelog, shot slots
   ========================================================================= */

.stat-wall {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  border-radius: var(--radius-tile);
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 0 0 var(--hairline) var(--line);
}

.stat {
  padding: 1rem 0.75rem;
  border-right: var(--hairline) solid var(--line-faint);
  text-align: center;
}

.stat:last-child {
  border-right: 0;
}

.stat b {
  display: block;
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.6875rem;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--secondary);
}

.faq {
  border-radius: var(--radius-tile);
  background: var(--card);
  box-shadow: 0 0 0 var(--hairline) var(--line);
  overflow: hidden;
}

.faq details {
  border-bottom: var(--hairline) solid var(--line-faint);
}

.faq details:last-child {
  border-bottom: 0;
}

.faq summary {
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  font-weight: 500;
  letter-spacing: -0.013em;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  float: right;
  color: var(--muted);
  font-weight: 400;
}

.faq details[open] summary::after {
  content: '\2212';
}

.faq details > div {
  padding: 0 1.1rem 1rem;
  color: var(--secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.release {
  padding: 1rem 0;
  border-bottom: var(--hairline) solid var(--line-faint);
  display: grid;
  gap: 0.5rem 1.5rem;
  grid-template-columns: 7rem 1fr;
}

.release:last-child {
  border-bottom: 0;
}

.release ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--secondary);
  font-size: 0.9375rem;
}

.release li + li {
  margin-top: 0.35rem;
}

@media (max-width: 40rem) {
  .release {
    grid-template-columns: 1fr;
  }
}

/* A screenshot slot. Renders as a clean panel until a real capture lands;
   the aspect ratio is fixed so dropping one in never moves the layout. */
.shot {
  border-radius: var(--radius-tile);
  overflow: hidden;
  background: linear-gradient(150deg, var(--s3), var(--card));
  box-shadow: 0 0 0 var(--hairline) var(--line-faint);
  display: grid;
  place-items: center;
  aspect-ratio: var(--ratio, 16 / 10);
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot-pending {
  font-size: 0.6875rem;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  padding: 1rem;
  text-align: center;
}

/* =========================================================================
   Feature index
   ========================================================================= */

.feature-link {
  display: block;
  text-decoration: none;
  background: var(--card);
  border-radius: var(--radius-tile);
  padding: 1.1rem;
  box-shadow: var(--shadow-tile);
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}

.feature-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 var(--hairline) var(--line),
    0 8px 14px -4px rgba(26, 26, 26, 0.05),
    0 24px 36px -12px rgba(26, 26, 26, 0.07);
}

.feature-link p {
  margin-top: 0.3rem;
  color: var(--secondary);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* =========================================================================
   Feature page prose
   ========================================================================= */

.feature-section + .feature-section {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: var(--hairline) solid var(--line-faint);
}

.feature-section h2 {
  margin-bottom: 0.5rem;
}

.feature-section > p {
  color: var(--secondary);
  max-width: 46ch;
}

/* `p { margin: 0 }` is the right default for the composed layouts, but a run
   of prose paragraphs needs to breathe. */
.feature-section > p + p,
.prose-stack > p + p {
  margin-top: 0.85rem;
}

.detail-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.detail-list li {
  background: var(--card);
  border-radius: var(--radius-tile);
  padding: 0.9rem 1rem;
  box-shadow: 0 0 0 var(--hairline) var(--line-faint);
}

.detail-list b {
  display: block;
  font-size: 0.9375rem;
  letter-spacing: -0.014em;
  margin-bottom: 0.2rem;
}

.detail-list span {
  color: var(--secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* A citation. The engine grades evidence rather than asserting it, so the
   site does too. */
.sources {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: var(--hairline) solid var(--line-faint);
}

.sources li {
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.55;
}

/* =========================================================================
   The dark band. Inherited from the app's own `glass.dark` and celebration
   overlays — this is the one place the page changes register.
   ========================================================================= */

.band-dark {
  background: #141414;
  color: var(--on-dark);
  position: relative;
  overflow: hidden;
}

.band-dark h2,
.band-dark h3 {
  color: var(--on-dark);
}

.band-dark p {
  color: rgba(251, 249, 244, 0.68);
}

.band-dark .eyebrow {
  color: rgba(251, 249, 244, 0.5);
}

.band-dark .micro {
  color: rgba(251, 249, 244, 0.42);
}

.band-dark .rule {
  background: rgba(255, 255, 255, 0.1);
}

.band-dark .panel {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-tile);
  padding: 1rem;
}

.band-dark .panel li {
  color: rgba(251, 249, 244, 0.72);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.band-dark .stat b {
  color: var(--on-dark);
}

.band-dark .stat span {
  color: rgba(251, 249, 244, 0.5);
}

/* =========================================================================
   Legal pages. These selectors are load-bearing: privacy.html and terms.html
   are the URLs registered with App Store Connect and the Play Console.
   ========================================================================= */

.prose {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 0;
}

.prose h1 {
  font-size: clamp(1.9rem, 5vw, 2.4rem);
  letter-spacing: -0.022em;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.prose h2 {
  font-size: 1.15rem;
  letter-spacing: -0.012em;
  margin: 2.25rem 0 0.6rem;
}

.prose p,
.prose li {
  color: var(--secondary);
}

.prose p + p {
  margin-top: 1rem;
}

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

.prose ul {
  padding-left: 1.15rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

/* Source/licence pairs on the food-data page. A description list rather than a
   table: it collapses to one column on a phone without a horizontal scroller. */
.prose .terms {
  margin: 1rem 0 0;
}

.prose .terms dt {
  font-weight: 600;
  letter-spacing: -0.013em;
  margin-top: 1rem;
}

.prose .terms dd {
  margin: 0.25rem 0 0;
  color: var(--secondary);
}

.prose .contact {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: var(--hairline) solid var(--line);
}

/* =========================================================================
   Responsive + motion
   ========================================================================= */

@media (max-width: 60rem) {
  .split,
  .split-rev,
  .split-hero {
    grid-template-columns: 1fr;
  }
}

/* The header wraps to three rows on a phone, and a sticky three-row header
   eats most of a small viewport. Below this width it becomes two compact rows
   and scrolls away with the page — the hero carries its own CTA. */
@media (max-width: 46rem) {
  .site-header {
    position: static;
  }

  .site-header > div {
    padding: 0.6rem var(--gutter);
    gap: 0.55rem;
  }

  .site-header nav {
    width: 100%;
    justify-content: space-between;
    gap: 0.6rem;
    font-size: 0.8125rem;
    flex-wrap: nowrap;
  }

  .site-header nav .btn {
    padding: 0.45rem 0.8rem;
    font-size: 0.8125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
