/* ==========================================================================
   Stepling, stepling.app
   A landing page for a calm iPhone step counter.

   Design notes, so a future edit doesn't undo a decision by accident:

   - The palette is the app's palette, copied from the app's
     `tailwind.config.js`. Teal is the accent and it is used sparingly; duck
     yellow is celebration and mascot only, never data. Keep it that way and
     the site and the app read as one product.
   - "Pond" sections (`.band--pond`) are dark teal in both themes. That teal is
     the ground the mascot is drawn on. The duckling is near-white, so it
     disappears on anything lighter. See the app icon.
   - Light and dark are both first-class, because the app makes that claim.
   - Two typefaces: Fraunces for display (soft serif, a little wonky, the
     warmth the mascot promises) and Instrument Sans for everything else.
   ========================================================================== */

/* --------------------------------------------------------------- 1. Reset */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, picture { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }

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

/* -------------------------------------------------------------- 2. Tokens */

:root {
  /* Brand, mirroring the app's tailwind.config.js */
  --teal: #0D9488;
  --teal-light: #2DD4BF;
  --teal-soft: #99F6E4;
  --teal-deep: #115E59;
  --pond: #0F766E;
  --duck: #F59E0B;
  --duck-light: #FBBF24;
  --duck-soft: #FEF3C7;
  --rust: #B45309;

  /* Warm neutrals */
  --cream: #FAFAF9;
  --snow: #FFFFFF;
  --fog: #F5F5F4;
  --cloud: #E7E5E4;
  --mist: #A8A29E;
  --stone: #78716C;
  --charcoal: #292524;
  --slate: #1C1917;
  --ink: #0C0A09;

  /* Semantic roles, light */
  --bg: var(--cream);
  --surface: var(--snow);
  --elevated: var(--fog);
  --hairline: var(--cloud);
  --text: var(--slate);
  --text-muted: var(--stone);
  --text-faint: var(--mist);
  --accent: var(--teal);
  --accent-ink: #FFFFFF;
  --shadow-card: 0 1px 2px rgb(28 25 23 / 0.04), 0 12px 32px -12px rgb(28 25 23 / 0.12);
  --shadow-lift: 0 2px 4px rgb(28 25 23 / 0.05), 0 32px 64px -24px rgb(28 25 23 / 0.28);
  --grain-opacity: 0.035;

  /* Type */
  --font-display: "Fraunces", Georgia, "Iowan Old Style", "Times New Roman", serif;
  --font-body: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Layout */
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --measure: 1140px;
  --radius-card: 20px;
  --radius-tile: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--ink);
    --surface: var(--slate);
    --elevated: var(--charcoal);
    --hairline: var(--charcoal);
    --text: var(--cream);
    --text-muted: var(--mist);
    --text-faint: var(--stone);
    --accent: var(--teal-light);
    --accent-ink: #06201D;
    --shadow-card: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 32px -12px rgb(0 0 0 / 0.6);
    --shadow-lift: 0 2px 4px rgb(0 0 0 / 0.5), 0 32px 64px -20px rgb(0 0 0 / 0.75);
    --grain-opacity: 0.05;
  }
}

/* A whisper of paper grain over everything. Without it the large flat fields
   of cream and teal read as flat vector, which is a colder thing than this
   app is. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------- 3. Typography */

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 96;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.75rem, 7.2vw, 4.75rem);
  font-weight: 600;
}

h2 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  font-weight: 500;
}

h3 {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-variation-settings: "SOFT" 40, "WONK" 0, "opsz" 24;
}

h1 em, h2 em {
  font-style: italic;
  padding-inline-end: 0.05em;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144;
  color: var(--accent);
}

p { text-wrap: pretty; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.lede {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 34ch;
}

.section-lede {
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 56ch;
}

/* ------------------------------------------------------------- 4. Layout */

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(4.5rem, 10vw, 8rem); }
.section--tight { padding-block: clamp(3rem, 6vw, 4.5rem); }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  max-width: 60ch;
}

/* The app's dashed goal line, borrowed as a rule. */
.goal-rule {
  height: 0;
  border: 0;
  border-top: 2px dashed var(--accent);
  opacity: 0.45;
  width: 100%;
}

.band--pond {
  background: var(--pond);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}

.band--pond h1,
.band--pond h2,
.band--pond h3 { color: var(--cream); }

.band--pond h1 em,
.band--pond h2 em { color: var(--duck-light); }

.band--pond .section-lede,
.band--pond .eyebrow { color: rgb(250 250 249 / 0.72); }

/* Soft light from the top-left, so the teal field has a direction. */
.band--pond::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 15% -10%, rgb(45 212 191 / 0.22), transparent 65%),
    radial-gradient(50rem 40rem at 100% 110%, rgb(6 32 29 / 0.4), transparent 60%);
}

.band--pond > * { position: relative; z-index: 1; }

/* ------------------------------------------------------------ 5. Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.22s ease,
    background-color 0.22s ease, border-color 0.22s ease;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 20px -8px rgb(13 148 136 / 0.6);
}

.btn--primary:hover { box-shadow: 0 14px 28px -10px rgb(13 148 136 / 0.65); }

.btn--ghost {
  border-color: var(--hairline);
  background: transparent;
  color: var(--text);
}

.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.band--pond .btn--ghost {
  border-color: rgb(250 250 249 / 0.35);
  color: var(--cream);
}

.band--pond .btn--ghost:hover {
  border-color: var(--cream);
  color: var(--cream);
  background: rgb(250 250 249 / 0.08);
}

/* The App Store badge, drawn rather than imported, so it inherits the type
   and the radii of everything around it. */
.btn--store {
  background: var(--slate);
  color: var(--cream);
  padding: 0.75rem 1.5rem 0.8rem 1.25rem;
  box-shadow: var(--shadow-card);
}

@media (prefers-color-scheme: dark) {
  .btn--store { background: var(--cream); color: var(--ink); }
}

.btn--store .store-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}

.btn--store .store-copy small {
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
  font-weight: 500;
}

.btn--store .store-copy span {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.btn--store svg { flex: none; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

/* -------------------------------------------------------------- 6. Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.site-header[data-scrolled="true"] { border-bottom-color: var(--hairline); }

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 4.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 24;
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  margin-right: auto;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.18);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.site-nav a:hover { color: var(--text); }

@media (max-width: 900px) {
  .site-nav { display: none; }
}

@media (max-width: 480px) {
  .site-header .btn--primary { padding: 0.7rem 1.1rem; font-size: 0.9375rem; }
}

/* --------------------------------------------------------------- 7. Hero */

.hero {
  position: relative;
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: clamp(4rem, 9vw, 7rem);
  overflow: hidden;
}

/* A pond of light behind the phone. */
.hero::before {
  content: "";
  position: absolute;
  top: -18rem;
  right: -14rem;
  width: 58rem;
  height: 58rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(13 148 136 / 0.16), rgb(13 148 136 / 0.04) 45%, transparent 70%);
  pointer-events: none;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  position: relative;
}

.hero-copy { display: flex; flex-direction: column; gap: 1.5rem; align-items: flex-start; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem 0.4rem 0.5rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  box-shadow: var(--shadow-card);
}

.pill .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
  margin-left: 0.25rem;
}

.promises {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  padding: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.promises li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.promises svg { color: var(--accent); flex: none; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-copy { align-items: flex-start; }
  .lede { max-width: 46ch; }
}

/* -------------------------------------------------- 8. The device mockups */

/* The frame is CSS and the screen is an <img>. The screenshots are 880 x 1912
   WebP, a two-thirds downscale of a 1320 x 2868 iPhone 16 Pro Max capture, and
   they carry their own Dynamic Island and status bar, so the frame draws
   neither. object-fit: cover trims about 1.3% off each side, which is bezel. */
.device {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 393 / 852;
  border-radius: 13.5%/6.2%;
  padding: 2.6%;
  background: linear-gradient(150deg, #3f3b39, #16130f 40%, #2a2624);
  box-shadow: var(--shadow-lift), 0 0 0 1px rgb(0 0 0 / 0.25);
  flex: none;
}

.device img {
  width: 100%;
  height: 100%;
  border-radius: 11.4%/5.3%;
  object-fit: cover;
  background: var(--cream);
}

.device--hero {
  max-width: min(320px, 84vw);
  margin-inline: auto;
  transform: rotate(1.4deg);
}

.hero-stage { position: relative; display: flex; justify-content: center; }

/* Two widget cards that float off the phone. The widgets are the product,
   so they get to leave the frame. */
.float-card {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-tile);
  box-shadow: var(--shadow-lift);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: max-content;
  animation: bob 7s ease-in-out infinite;
}

.float-card > svg { flex: none; }

.float-card small {
  display: block;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
  white-space: nowrap;
}

.float-card strong {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.float-card--ring { top: 15%; right: calc(50% + 140px); }
.float-card--streak { bottom: 14%; left: calc(50% + 140px); animation-delay: -3.5s; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* Below this the phone fills the column, and a card floating beside it would
   have to sit on top of the screenshot to fit. The screenshot says the same
   thing on its own. */
@media (max-width: 700px) {
  .float-card { display: none; }
}

/* ------------------------------------------------------------ 9. Promises */

.promise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

.promise {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.promise .icon-badge {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.promise p { color: var(--text-muted); font-size: 0.9688rem; }

/* ---------------------------------------------------------- 10. Shot rail */

.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
}

.shot {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
  text-align: center;
}

.shot .device { max-width: 100%; }

.shot figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 30ch;
}

.shot figcaption strong {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 40, "WONK" 0, "opsz" 24;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.shot figcaption span { font-size: 0.9375rem; color: var(--text-muted); }

@media (max-width: 900px) {
  .shots {
    grid-auto-columns: 62vw;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 1.5rem;
    /* Bleed the rail to the screen edge so it reads as scrollable. */
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scrollbar-width: thin;
  }
  .shot { scroll-snap-align: center; }
}

/* ----------------------------------------------------------- 11. Widgets */

.widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.widget-card {
  background: rgb(6 32 29 / 0.35);
  border: 1px solid rgb(250 250 249 / 0.14);
  border-radius: var(--radius-card);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1), border-color 0.3s ease;
}

.widget-card:hover { transform: translateY(-4px); border-color: rgb(250 250 249 / 0.3); }

.widget-card h3 { font-size: 1.1rem; }
.widget-card p { font-size: 0.9375rem; color: rgb(250 250 249 / 0.72); }

/* The little lock-screen stage each widget preview sits on. Lock Screen
   widgets render monochrome on iOS, so the previews are drawn that way:
   a teal ring here would be a promise iOS does not keep. */
.widget-stage {
  border-radius: var(--radius-tile);
  background: linear-gradient(160deg, #2b2724, #14110f);
  display: grid;
  place-items: center;
  padding: 1.25rem 1rem;
  min-height: 118px;
  color: var(--cream);
}

.widget-stage--home {
  background: linear-gradient(160deg, #f7f6f4, #e7e5e4);
  color: var(--slate);
}

/* --------------------------------------------------------- 12. Feature grid */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.feature {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: clamp(1.4rem, 2.5vw, 1.9rem);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.3, 1), box-shadow 0.3s ease;
}

.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }

.feature .icon-badge {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.feature p { font-size: 0.9375rem; color: var(--text-muted); }

.feature--wide { grid-column: 1 / -1; }

/* ----------------------------------------------------------- 13. Mascot */

.mascot-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}

.mascot-portrait {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #17836f, #0b5a54);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgb(250 250 249 / 0.12), 0 30px 60px -30px rgb(0 0 0 / 0.6);
  max-width: 380px;
  width: 100%;
  margin-inline: auto;
}

.mascot-portrait img { width: 78%; height: auto; }

/* Ripples on the pond. */
.mascot-portrait::before,
.mascot-portrait::after {
  content: "";
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  border: 1px solid rgb(153 246 228 / 0.25);
  animation: ripple 6s ease-out infinite;
}

.mascot-portrait::after { animation-delay: -3s; }

@keyframes ripple {
  0% { transform: scale(0.92); opacity: 0; }
  35% { opacity: 0.8; }
  100% { transform: scale(1.12); opacity: 0; }
}

@media (max-width: 820px) {
  .mascot-layout { grid-template-columns: 1fr; }
  .mascot-portrait { max-width: 260px; }
}

/* Small print: the screenshot caption, and the requirements line under the
   closing call to action. */
.fine {
  font-size: 0.875rem;
  color: var(--text-faint);
  margin-top: 1.5rem;
}

/* --------------------------------------------------------------- 15. FAQ */

.faq { display: flex; flex-direction: column; }

.faq details {
  border-top: 1px solid var(--hairline);
  padding: 0.35rem 0;
}

.faq details:last-of-type { border-bottom: 1px solid var(--hairline); }

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.15rem 2.5rem 1.15rem 0;
  position: relative;
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }

.faq summary::after {
  content: "";
  position: absolute;
  right: 0.4rem;
  top: 50%;
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2px solid var(--text-faint);
  border-bottom: 2px solid var(--text-faint);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.25s ease;
}

.faq details[open] summary::after { transform: translateY(-25%) rotate(225deg); }

.faq details p {
  padding: 0 2.5rem 1.35rem 0;
  color: var(--text-muted);
  max-width: 68ch;
  animation: unfold 0.35s ease both;
}

@keyframes unfold {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------ 16. Footer */

.closer {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.closer .cta-row { justify-content: center; }

.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: 3rem 4rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  align-items: center;
  justify-content: space-between;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-nav a { text-decoration: none; transition: color 0.2s ease; }
.footer-nav a:hover { color: var(--accent); }

.footer-brand { display: flex; align-items: center; gap: 0.7rem; }
.footer-brand img { width: 30px; height: 30px; border-radius: 8px; }

/* ------------------------------------------------------ 17. Legal pages */

.legal {
  max-width: 720px;
  margin-inline: auto;
  padding-block: clamp(3rem, 7vw, 5rem);
}

.legal h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); margin-bottom: 1rem; }

.legal .updated {
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
}

.legal .intro {
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-block: 1.75rem 2.5rem;
}

.legal section {
  border-top: 1px solid var(--hairline);
  padding-block: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.legal section h2 {
  font-size: 1.4rem;
  font-variation-settings: "SOFT" 40, "WONK" 0, "opsz" 24;
  font-weight: 600;
}

.legal section p { color: var(--text-muted); }
.legal section a { color: var(--accent); text-underline-offset: 3px; }

.legal ul { color: var(--text-muted); padding-left: 1.15rem; display: flex; flex-direction: column; gap: 0.5rem; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 2.5rem;
}

.back-link:hover { color: var(--accent); }

/* --------------------------------------------------------- 18. Reveals */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.3, 1),
    transform 0.7s cubic-bezier(0.2, 0.8, 0.3, 1);
  transition-delay: var(--reveal-delay, 0s);
}

.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* --------------------------------------------------------- 19. Utilities */

.stack { display: flex; flex-direction: column; }
.gap-sm { gap: 0.75rem; }
.gap-md { gap: 1.25rem; }
.gap-lg { gap: 2rem; }
.center { text-align: center; align-items: center; }
.mx-auto { margin-inline: auto; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 12px 0;
  z-index: 200;
  font-weight: 600;
}

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