/* SpeedRun site chrome, shared by the landing page and the guides (PLAN.md Part 15, D81).
   Palette and type come from the app itself (SpeedRun/Views/V3/Theme.swift): the OLED ground,
   the warm ink, the per-distance cyan/pink/purple, and the speed ramp cyan -> lime -> amber -> red.
   The app has no light theme, so neither does the site; every colour is painted explicitly so it
   holds on any host ground. Tokens, body, nav, shared type, the three dividers, the closing call
   and the footer live here ONCE. Page-specific layout stays inline on the page that owns it. */

:root {
  --ground: #0B0B0D;
  --band: #121110;
  --card: #161511;
  --hairline: #2A2721;
  --ink: #F6F1E6;
  --ink-2: #C9C0AE;
  --meta: #8B8272;
  --muted: #6E6656;
  --d100: #26B8DE;
  --d200: #F0508F;
  --d400: #9A63F5;
  --amber: #F5A623;
  --cyan: #26C0DE;
  --lime: #A3E635;
  --hot: #FF4D3D;
  --ramp: linear-gradient(90deg, var(--cyan) 0%, var(--lime) 40%, var(--amber) 70%, var(--hot) 100%);
  --measure: 34rem;
  --display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 3rem); }

/* ---- nav ---- */
.nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.85rem 0;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(12px);
}
.mark {
  font-weight: 900; font-size: 1.05rem; letter-spacing: -0.02em;
  transform: skewX(-9deg); transform-origin: left center;
  display: inline-block; color: var(--ink); text-decoration: none;
}
.mark span { background: var(--ramp); -webkit-background-clip: text; background-clip: text; color: transparent; }

.pill {
  display: inline-flex; align-items: center;
  font-weight: 700; font-size: 0.85rem; letter-spacing: -0.01em;
  color: #080A0B; background: var(--ink);
  padding: 0.5rem 0.9rem; border-radius: 999px; text-decoration: none;
  transition: background 0.15s ease;
}
.pill:hover { background: #fff; }
.pill:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* Apple's official badge, white variant, unaltered. Apple asks for a minimum height and for clear
   space around it of at least a quarter of that height on every side. */
.badge { display: inline-block; line-height: 0; border-radius: 8px; }
.badge img { display: block; height: 54px; width: auto; }
.badge:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }

/* ---- shared type ---- */
.label {
  font-family: var(--mono); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--meta); margin: 0 0 0.85rem;
}
h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -0.03em; line-height: 1.04; }
h1 { font-weight: 900; font-size: clamp(2.05rem, 5.4vw, 3.7rem); margin: 0 0 1.1rem; }
h2 { font-weight: 800; font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin: 0 0 1rem; }
.grad { background: var(--ramp); -webkit-background-clip: text; background-clip: text; color: transparent; }

.deck {
  font-size: clamp(1.25rem, 2.6vw, 1.75rem); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.2; color: var(--ink);
  max-width: var(--measure); margin: 0 0 1.4rem;
}
.body, .lede { color: var(--ink-2); max-width: var(--measure); margin: 0; }
.lede { font-size: clamp(1rem, 1.75vw, 1.16rem); line-height: 1.5; }
.lede + .lede { margin-top: 0.75rem; }
.hero__ledes { margin-top: 1.7rem; }
.note {
  font-family: var(--mono); font-size: 0.84rem; color: var(--meta); line-height: 1.65;
  max-width: var(--measure); margin: 1.5rem 0 0;
  padding-left: 1rem; border-left: 2px solid var(--hairline);
}
.fine {
  font-family: var(--mono); font-size: 0.75rem; color: var(--muted);
  letter-spacing: 0.04em; margin: 0.7rem 0 0;
}

/* ---- dividers, three weights ---- */
.rule { height: 2px; border: 0; margin: 0; background: var(--ramp); position: relative; z-index: 5; }
.tick { height: 1px; width: 88px; background: var(--hairline); }


/* ---- close ---- */
.close { text-align: center; padding: clamp(3.5rem, 7vw, 6.5rem) 0 clamp(3rem, 5vw, 5.5rem); }
.close h2 { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 900; margin: 0 0 2rem; }
.close .badge, .close .fine { margin-inline: auto; }

footer { border-top: 1px solid var(--hairline); padding: 2rem 0 3rem; }
.foot {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; align-items: center; justify-content: space-between;
  font-size: 0.85rem; color: var(--muted);
}
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.foot nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }

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

/* ---- guide cards: the landing page's guides section and the guide index share them ---- */
.gcards { display: grid; gap: 1rem; grid-template-columns: 1fr; margin: 2rem 0 0; }
@media (min-width: 46rem) { .gcards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 70rem) { .gcards { grid-template-columns: 1fr 1fr 1fr; } }
.gcard {
  display: flex; flex-direction: column; gap: 0.5rem;
  background: var(--card); border: 1px solid var(--hairline); border-radius: 14px;
  padding: 1.25rem 1.4rem 1.2rem; color: var(--ink-2); text-decoration: none;
  transition: border-color 0.15s ease;
}
.gcard:hover { border-color: var(--meta); }
.gcard:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.gcard h3 { font-size: 1.08rem; font-weight: 800; color: var(--ink); }
.gcard p { margin: 0; font-size: 0.92rem; line-height: 1.5; flex: 1; }
.gcard__more { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); font-weight: 700; margin-top: 0.4rem; }
