/* ==========================================================================
   Traveley — marketing site
   --------------------------------------------------------------------------
   Every colour here is the value the app actually renders, lifted from
   lib/theme.dart and confirmed against the store screenshots. The site and the
   app are the same product and a visitor arrives at the Play listing seconds
   after leaving this page, so a "close enough" green would read as a different
   brand.
   ========================================================================== */

/* --------------------------------------------------------------- typography */
/* Fraunces is the app's display face (theme.dart `_serif`) and is the one
   thing that makes a heading look like Traveley. Body text falls to the
   platform UI stack instead of shipping Inter: three weights of Inter is
   ~975 KB of TTF against a system stack that costs nothing and renders
   near-identically at body sizes. */
@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/Fraunces-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------------ tokens */
:root {
  color-scheme: light dark;

  /* Structural colours — theme.dart, light scheme. */
  --surface: #f8faf7;
  --surface-lowest: #ffffff;
  --surface-low: #f1f6ef;
  --surface-mid: #eaf1e8;
  --surface-high: #e2ebe0;
  --surface-highest: #d9e4d7;
  --on-surface: #17231a;
  --on-surface-variant: #4e5b51;

  --primary: #006c44;
  --on-primary: #ffffff;
  --primary-bright: #44e69d;
  --wordmark: #308866;
  --seed: #8fb09a;

  /* TraveleyAccents, light variants, in palette order. */
  --a-orange: #e8710a;
  --a-coral: #e0533d;
  --a-pink: #c2185b;
  --a-amber: #c59200;
  --a-green: #4c9a2a;
  --a-turquoise: #00897b;

  --border: color-mix(in srgb, var(--on-surface) 10%, transparent);
  --border-strong: color-mix(in srgb, var(--on-surface) 18%, transparent);
  --shadow-card: 0 1px 2px rgb(23 35 26 / 4%), 0 8px 24px rgb(23 35 26 / 6%);
  --shadow-device: 0 24px 60px rgb(23 35 26 / 18%), 0 4px 12px rgb(23 35 26 / 8%);

  /* Radii match the app: cards 20, buttons 16, fields 18. */
  --r-card: 20px;
  --r-btn: 16px;
  --r-pill: 999px;

  --measure: 68ch;
  --page: 1160px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4rem, 9vw, 7.5rem);

  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, 'Noto Sans', sans-serif;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
}

/* theme.dart's dark scheme, same roles. Applied on the OS preference and
   overridable by the header toggle, which stamps data-theme on <html>. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --surface: #101512;
    --surface-lowest: #0a0d0b;
    --surface-low: #161c18;
    --surface-mid: #1b221d;
    --surface-high: #242c26;
    --surface-highest: #2e372f;
    --on-surface: #e9efe9;
    --on-surface-variant: #c2ccc3;

    --primary: #44e69d;
    --on-primary: #00351f;
    --primary-bright: #44e69d;
    --wordmark: #8fd6b0;

    --a-orange: #ffb067;
    --a-coral: #ff9478;
    --a-pink: #f48fb1;
    --a-amber: #ffd54f;
    --a-green: #aed581;
    --a-turquoise: #4dd0c4;

    --border: color-mix(in srgb, var(--on-surface) 14%, transparent);
    --border-strong: color-mix(in srgb, var(--on-surface) 24%, transparent);
    --shadow-card: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 34%);
    --shadow-device: 0 24px 60px rgb(0 0 0 / 55%), 0 4px 12px rgb(0 0 0 / 40%);
  }
}

:root[data-theme='dark'] {
  --surface: #101512;
  --surface-lowest: #0a0d0b;
  --surface-low: #161c18;
  --surface-mid: #1b221d;
  --surface-high: #242c26;
  --surface-highest: #2e372f;
  --on-surface: #e9efe9;
  --on-surface-variant: #c2ccc3;

  --primary: #44e69d;
  --on-primary: #00351f;
  --primary-bright: #44e69d;
  --wordmark: #8fd6b0;

  --a-orange: #ffb067;
  --a-coral: #ff9478;
  --a-pink: #f48fb1;
  --a-amber: #ffd54f;
  --a-green: #aed581;
  --a-turquoise: #4dd0c4;

  --border: color-mix(in srgb, var(--on-surface) 14%, transparent);
  --border-strong: color-mix(in srgb, var(--on-surface) 24%, transparent);
  --shadow-card: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 34%);
  --shadow-device: 0 24px 60px rgb(0 0 0 / 55%), 0 4px 12px rgb(0 0 0 / 40%);
}

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

img {
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

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

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

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------- utilities */
.wrap {
  width: min(100% - var(--gutter) * 2, var(--page));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--primary);
  color: var(--on-primary);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--r-btn) 0;
  font-weight: 600;
}

.skip:focus {
  left: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.875rem;
}

.lede {
  color: var(--on-surface-variant);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  max-width: 60ch;
}

section {
  padding-block: var(--section-y);
}

.section-head {
  max-width: var(--measure);
  margin-bottom: clamp(2.5rem, 5vw, 3.75rem);
}

.section-head h2 {
  font-size: clamp(1.875rem, 1.3rem + 2.4vw, 3rem);
  margin-bottom: 1rem;
}

/* ------------------------------------------------------------------ buttons */
/* INVARIANT: every container that styles its links generically writes
   `<container> a:not(.btn)`, never `<container> a`.

   `.prose a` and `.btn--primary` have the same specificity weight on classes,
   but the descendant selector adds a type and wins — so a plain `.prose a`
   repaints a button's text in the link colour. Where that colour is
   `var(--primary)` and the button's background is also `var(--primary)`, the
   label disappears completely: a solid green rectangle with nothing on it.
   That shipped twice, once in the nav and once in the article CTA.
   Grep for `a:not(.btn)` before adding a new container rule. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 56px;
  padding: 0.875rem 1.75rem;
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    background-color 0.18s ease, border-color 0.18s ease;
}

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

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--primary) 30%, transparent);
}

.btn--primary:hover {
  box-shadow: 0 8px 22px color-mix(in srgb, var(--primary) 38%, transparent);
}

.btn--ghost {
  background: transparent;
  color: var(--on-surface);
  border-color: var(--border-strong);
}

.btn--ghost:hover {
  background: var(--surface-mid);
  border-color: var(--primary);
}

.btn--sm {
  min-height: 44px;
  padding: 0.5rem 1.125rem;
  font-size: 0.9375rem;
}

/* An inline <svg> with a viewBox but no width/height is a replaced element
   with no intrinsic size: inside a flex row it resolves to the full content
   box and swallows the button. Every icon in the page therefore needs an
   explicit size, not just `flex: none`. */
.btn svg {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
}

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

.site-header[data-stuck='true'] {
  border-bottom-color: var(--border);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--wordmark);
  letter-spacing: -0.01em;
  margin-inline-end: auto;
}

.brand svg,
.brand img {
  width: 34px;
  height: 34px;
}

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

/* `:not(.btn)` matters: `.nav a` outranks `.btn--primary`, so without it the
   download button inside the mobile panel inherited the link colour and its
   text went to a 1.03 contrast ratio against its own background. */
.nav a:not(.btn) {
  padding: 0.5rem 0.875rem;
  border-radius: var(--r-pill);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--on-surface-variant);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav a:not(.btn):hover {
  color: var(--on-surface);
  background: var(--surface-mid);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Icon-only controls: theme toggle and the language menu trigger. */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.625rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--on-surface-variant);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease,
    background-color 0.15s ease;
}

.icon-btn:hover {
  color: var(--on-surface);
  border-color: var(--border-strong);
  background: var(--surface-mid);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* Language menu — a plain details/summary would not let the trigger sit in a
   flex row cleanly, so it is a button plus an absolutely positioned list that
   JS toggles. It degrades to a visible list when JS is off (see below). */
.lang {
  position: relative;
}

.lang__menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 0.5rem);
  min-width: 12rem;
  padding: 0.375rem;
  background: var(--surface-lowest);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  display: none;
}

.lang__menu[data-open='true'] {
  display: block;
}

.lang__menu a:not(.btn) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  text-decoration: none;
  font-size: 0.9375rem;
  color: var(--on-surface);
}

.lang__menu a:not(.btn):hover {
  background: var(--surface-mid);
}

.lang__menu a[aria-current='true'] {
  color: var(--primary);
  font-weight: 600;
}

.lang__menu small {
  color: var(--on-surface-variant);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Without JS the menu can never be opened, so show it inline instead of
   hiding six locales behind a dead button. */
.no-js .lang__menu {
  position: static;
  display: flex;
  flex-wrap: wrap;
  box-shadow: none;
  border: 0;
  padding: 0;
  min-width: 0;
  background: transparent;
}

.no-js .lang__toggle,
.no-js .lang__menu small {
  display: none;
}

/* ------------------------------------------------------------ mobile nav */
/* The toggle only exists below the breakpoint; above it the links sit in the
   header as usual and the button would be noise. */
.nav-toggle {
  display: none;
}

.nav-toggle__close {
  display: none;
}

.nav-toggle[aria-expanded='true'] .nav-toggle__open {
  display: none;
}

.nav-toggle[aria-expanded='true'] .nav-toggle__close {
  display: block;
}

/* The in-panel download button. Shown only where the header's own CTA is
   hidden, so the two never appear at once. */
.nav__cta {
  display: none;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  /* A panel under the header rather than a full-screen overlay: the header is
     sticky, so the page behind stays where the reader left it. */
  .nav {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.125rem;
    padding: 0.75rem var(--gutter) 1.25rem;
    background: var(--surface-lowest);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-card);
  }

  .nav[data-open='true'] {
    display: flex;
  }

  .nav a:not(.btn) {
    padding: 0.8125rem 0.875rem;
    font-size: 1rem;
    border-radius: 12px;
  }
}

@media (max-width: 560px) {
  .header-cta {
    display: none;
  }

  .nav__cta {
    display: inline-flex;
    margin-top: 0.625rem;
  }
}

/* Without scripting the button cannot open anything, so the links are shown
   inline instead of being hidden behind a control that does nothing — the
   same fallback the language menu uses. */
.no-js .nav-toggle {
  display: none;
}

@media (max-width: 900px) {
  .no-js .nav {
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .no-js .nav__cta {
    display: none;
  }
}

/* --------------------------------------------------------------------- hero */
.hero {
  position: relative;
  padding-block: clamp(3rem, 7vw, 6rem) clamp(3.5rem, 8vw, 6.5rem);
  overflow: hidden;
}

/* The radial halo is the app's home screen, not decoration for its own sake:
   HomeScreen puts a radial glow behind the mark rather than a full-width wash,
   for the same reason the surfaces are near-neutral. */
.hero::before {
  content: '';
  position: absolute;
  inset-inline-start: 50%;
  top: -22rem;
  width: min(120rem, 190vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(
    circle at center,
    color-mix(in srgb, var(--seed) 34%, transparent) 0%,
    color-mix(in srgb, var(--seed) 12%, transparent) 34%,
    transparent 62%
  );
  pointer-events: none;
  z-index: -1;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 1.6rem + 4vw, 4.25rem);
  margin-bottom: 1.25rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--primary);
}

.hero .lede {
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-bottom: 1.75rem;
}

/* Trust row — three claims the product genuinely makes. */
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.9375rem;
  color: var(--on-surface-variant);
}

.trust li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.trust svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
  flex: none;
}

/* ------------------------------------------------------------------ devices */
.device {
  position: relative;
  margin-inline: auto;
  width: min(100%, 21rem);
  filter: drop-shadow(0 24px 48px rgb(23 35 26 / 22%));
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .device {
    filter: drop-shadow(0 24px 48px rgb(0 0 0 / 60%));
  }
}

:root[data-theme='dark'] .device {
  filter: drop-shadow(0 24px 48px rgb(0 0 0 / 60%));
}

.device img {
  width: 100%;
}

.hero .device {
  animation: float 9s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-14px);
  }
}

/* Floating proof chips beside the hero device. Hidden on narrow screens where
   they would sit on top of the screenshot they are meant to annotate. */
.pin {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.9375rem;
  background: var(--surface-lowest);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-card);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

.pin span[aria-hidden] {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  flex: none;
}

/* Anchored to the device edge rather than to a fixed offset, so the chip
   always hangs the same 3rem over it whatever the translation's length —
   a fixed inset put the longer locales a third of the way across the screen. */
.pin--one {
  top: 12%;
  inset-inline-end: calc(100% - 3rem);
  animation: float 11s ease-in-out infinite 0.4s;
}

.pin--two {
  bottom: 18%;
  inset-inline-start: calc(100% - 3rem);
  animation: float 10s ease-in-out infinite 1.1s;
}

/* Below this the chips have nowhere to hang without crossing into the copy. */
@media (max-width: 1200px) {
  .pin {
    display: none;
  }
}

@media (max-width: 860px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }

  .hero .lede {
    margin-inline: auto;
  }

  .hero-actions,
  .trust {
    justify-content: center;
  }

  .hero .device {
    order: -1;
    width: min(100%, 17rem);
  }
}

/* ------------------------------------------------------------------- steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 3.75rem;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 1.125rem;
  background: var(--accent-soft, var(--surface-high));
  color: var(--accent, var(--primary));
  border: 1px solid color-mix(in srgb, var(--accent, var(--primary)) 35%, transparent);
}

.step h3 {
  font-size: 1.375rem;
  margin-bottom: 0.625rem;
}

.step p {
  color: var(--on-surface-variant);
}

/* ---------------------------------------------------------------- features */
.band {
  background: var(--surface-low);
  border-block: 1px solid var(--border);
}

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

/* Pinned to three once there is room, because there are nine cards: auto-fit
   resolves to four at this page width and leaves the ninth alone on its own
   row. */
@media (min-width: 62rem) {
  .features {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card {
  padding: clamp(1.5rem, 2.5vw, 2rem);
  background: var(--surface-lowest);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent, var(--primary)) 40%, transparent);
  box-shadow: 0 2px 4px rgb(23 35 26 / 5%), 0 14px 34px rgb(23 35 26 / 9%);
}

.card__icon {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 14px;
  margin-bottom: 1.125rem;
  background: var(--accent-soft);
  color: var(--accent);
}

.card__icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--on-surface-variant);
  font-size: 0.9688rem;
}

/* --------------------------------------------------------------- showcase */
.showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(2rem, 4vw, 3rem);
}

.shot {
  text-align: center;
}

.shot .device {
  width: min(100%, 16rem);
  margin-bottom: 1.5rem;
}

.shot h3 {
  font-size: 1.1875rem;
  margin-bottom: 0.4375rem;
}

.shot p {
  color: var(--on-surface-variant);
  font-size: 0.9375rem;
  max-width: 32ch;
  margin-inline: auto;
}

/* ------------------------------------------------------------- rules split */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

@media (max-width: 860px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
}

.rules {
  display: grid;
  gap: 1.125rem;
}

.rule {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.rule__mark {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  margin-top: 0.125rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.rule__mark svg {
  width: 16px;
  height: 16px;
}

.rule strong {
  display: block;
  font-weight: 600;
}

.rule span {
  color: var(--on-surface-variant);
  font-size: 0.9688rem;
}

/* A miniature of the itinerary timeline, built from the app's own day and
   category accent hues. Illustrative, and marked aria-hidden because the
   prose beside it already says everything it shows. */
.timeline {
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--surface-lowest);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}

.timeline__day {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.timeline__badge {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 0.9375rem;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}

.timeline__day h3 {
  font-size: 1.0625rem;
}

.timeline__row {
  display: grid;
  grid-template-columns: 3.25rem 1.75rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding-block: 0.75rem;
  border-top: 1px solid var(--border);
}

.timeline__time {
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: var(--on-surface-variant);
  padding-top: 0.3125rem;
}

.timeline__dot {
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-top: 0.0625rem;
}

.timeline__dot svg {
  width: 15px;
  height: 15px;
}

.timeline__row strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
}

.timeline__row span {
  font-size: 0.8438rem;
  color: var(--on-surface-variant);
}

/* --------------------------------------------------------------- languages */
.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.langs a:not(.btn) {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  background: var(--surface-lowest);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: border-color 0.15s ease, color 0.15s ease,
    background-color 0.15s ease;
}

.langs a:not(.btn):hover {
  border-color: var(--primary);
  color: var(--primary);
}

.langs a[aria-current='true'] {
  border-color: var(--primary);
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, var(--surface-lowest));
}

/* ---------------------------------------------------------------- honesty */
.notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

/* Two up rather than four: these carry the longest prose on the page and a
   quarter-width column turns them into ribbons. */
@media (min-width: 48rem) {
  .notes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.note {
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  background: var(--surface-lowest);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--accent, var(--primary));
  border-radius: var(--r-card);
}

.note h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.note p {
  color: var(--on-surface-variant);
  font-size: 0.9375rem;
}

.note p + p {
  margin-top: 0.625rem;
}

/* -------------------------------------------------------------------- faq */
.faq {
  max-width: 52rem;
}

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

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.375rem 0;
  cursor: pointer;
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  list-style: none;
  transition: color 0.15s ease;
}

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

.faq summary:hover {
  color: var(--primary);
}

.faq summary::after {
  content: '';
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-0.15rem, -0.15rem);
  transition: transform 0.2s ease;
  opacity: 0.55;
}

.faq details[open] summary::after {
  transform: rotate(-135deg);
}

.faq details p {
  color: var(--on-surface-variant);
  padding-bottom: 1.375rem;
  max-width: var(--measure);
}

.faq details p + p {
  margin-top: 0.75rem;
  padding-bottom: 1.375rem;
}

/* -------------------------------------------------------------------- cta */
.cta {
  text-align: center;
}

.cta__inner {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 3rem);
  background: var(--surface-mid);
  border: 1px solid var(--border);
  border-radius: clamp(24px, 4vw, 32px);
}

.cta__inner::before {
  content: '';
  position: absolute;
  inset-inline-start: 50%;
  top: -60%;
  width: 46rem;
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(
    circle at center,
    color-mix(in srgb, var(--seed) 30%, transparent),
    transparent 62%
  );
  pointer-events: none;
}

.cta__inner > * {
  position: relative;
}

.cta h2 {
  font-size: clamp(1.875rem, 1.3rem + 2.4vw, 2.75rem);
  margin-bottom: 0.875rem;
}

.cta .lede {
  margin-inline: auto;
  margin-bottom: 2rem;
}

.cta .hero-actions {
  justify-content: center;
  margin-bottom: 0;
}

.cta svg.leaf {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.5rem;
}

/* ---------------------------------------------------------------- article */
/* Long-form legal pages. Same tokens as the landing page, but the type scale
   steps down: a privacy policy is read, not scanned, and landing-page heading
   sizes turn twenty sections into a wall of display serif. */
.article-head {
  position: relative;
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.article-head::before {
  content: '';
  position: absolute;
  inset-inline-start: 50%;
  top: -30rem;
  width: min(80rem, 150vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(
    circle at center,
    color-mix(in srgb, var(--seed) 26%, transparent) 0%,
    transparent 60%
  );
  pointer-events: none;
  z-index: -1;
}

.article-head h1 {
  font-size: clamp(2.25rem, 1.6rem + 2.8vw, 3.5rem);
  margin-bottom: 1rem;
}

.article-head h1 em {
  font-style: normal;
  color: var(--primary);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--on-surface-variant);
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-meta span + span::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

/* Contents list, built from the body's own <h2 id> values at render time so it
   can never fall out of step with the document. */
.toc {
  position: sticky;
  top: 6rem;
  padding: 1.25rem;
  background: var(--surface-low);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  font-size: 0.875rem;
}

.toc h2 {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin-bottom: 0.875rem;
}

.toc li + li {
  margin-top: 0.125rem;
}

.toc a:not(.btn) {
  display: block;
  padding: 0.375rem 0.625rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--on-surface-variant);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.toc a:not(.btn):hover {
  color: var(--primary);
  background: var(--surface-high);
}

@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc {
    position: static;
  }
}

.prose {
  max-width: 72ch;
  color: var(--on-surface-variant);
}

.prose > :first-child {
  margin-top: 0;
}

.prose p,
.prose ul {
  margin-block: 0 1.125rem;
}

.prose h2 {
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  color: var(--on-surface);
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 6rem;
}

.prose h3 {
  font-size: 1.125rem;
  color: var(--on-surface);
  margin-top: 2rem;
  margin-bottom: 0.625rem;
  scroll-margin-top: 6rem;
}

.prose strong {
  color: var(--on-surface);
  font-weight: 600;
}

.prose a:not(.btn) {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.prose a:not(.btn):hover {
  text-decoration-thickness: 2px;
}

.prose ul {
  display: grid;
  gap: 0.625rem;
  padding-inline-start: 0;
}

.prose li {
  position: relative;
  padding-inline-start: 1.5rem;
}

/* A leaf-green dot rather than a bullet glyph, so the lists read as part of
   the same drawing as the rest of the site. */
.prose li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0.25rem;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.55;
}

/* Numbered steps — the account-deletion walkthrough. Numbered discs rather
   than the default markers, so a sequence you are meant to follow in order
   does not look like the unordered lists above it. */
.prose ol {
  display: grid;
  gap: 0.875rem;
  margin-block: 0 1.125rem;
  padding-inline-start: 0;
  list-style: none;
  counter-reset: prose-step;
}

.prose ol li {
  position: relative;
  padding-inline-start: 2.75rem;
  min-height: 1.875rem;
  padding-top: 0.1875rem;
}

.prose ol li::before {
  counter-increment: prose-step;
  content: counter(prose-step);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 1.875rem;
  height: 1.875rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
  color: var(--primary);
  font-family: var(--serif);
  font-size: 0.9375rem;
  opacity: 1;
}

.prose code {
  padding: 0.15em 0.45em;
  background: var(--surface-high);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
  color: var(--on-surface);
}

/* Closing callout: the one thing a reader who skimmed should still leave with. */
.prose-note {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface-low);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--a-amber);
  border-radius: var(--r-card);
  font-size: 0.9375rem;
}

/* ------------------------------------------------------------------- blog */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: clamp(1.5rem, 3vw, 2.25rem);
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-lowest);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
  box-shadow: 0 2px 4px rgb(23 35 26 / 5%), 0 14px 34px rgb(23 35 26 / 9%);
}

/* The whole card is the link, but the title carries the accessible name —
   a stretched pseudo-element would otherwise swallow the text selection. */
.post-card__media {
  aspect-ratio: 3 / 2;
  background: var(--surface-high);
}

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

.post-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: clamp(1.25rem, 2.5vw, 1.625rem);
}

.post-card h3 {
  font-size: 1.1875rem;
  margin-bottom: 0.5rem;
}

.post-card h3 a {
  text-decoration: none;
}

.post-card h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.post-card {
  position: relative;
}

.post-card h3 a:hover {
  color: var(--primary);
}

.post-card p {
  color: var(--on-surface-variant);
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}

.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.875rem;
  margin-top: auto;
  font-size: 0.8125rem;
  color: var(--on-surface-variant);
}

.post-card__meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-card__meta span + span::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

/* --------------------------------------------------------- article hero */
.post-hero {
  margin-block: clamp(1.5rem, 3vw, 2.5rem) 0;
}

.post-hero img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: clamp(16px, 2.5vw, 24px);
  border: 1px solid var(--border);
}

.post-credit {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--on-surface-variant);
}

.post-credit a:not(.btn) {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-credit a:not(.btn):hover {
  color: var(--primary);
}

/* A pulled-out line inside the prose. Distinct from .prose-note, which is a
   closing caveat rather than an emphasis. */
.prose-callout {
  margin-block: 1.75rem;
  padding-inline-start: 1.25rem;
  border-inline-start: 3px solid var(--primary);
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  font-weight: 600;
  line-height: 1.4;
  color: var(--on-surface);
  text-wrap: balance;
}

/* In-article call to action for the app. */
.post-cta {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--surface-mid);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}

.post-cta__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--on-surface);
  margin-bottom: 0.625rem;
}

.post-cta p {
  color: var(--on-surface-variant);
  margin-bottom: 1.25rem;
}

/* ----------------------------------------------------------------- footer */
.site-footer {
  padding-block: clamp(3rem, 6vw, 4.5rem) 2.5rem;
  background: var(--surface-low);
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: clamp(2rem, 4vw, 3rem);
  margin-bottom: 2.5rem;
}

/* Five columns once there is room: brand, then the four link lists. Left to
   auto-fit they reflow into an uneven second row as soon as Legal was added. */
@media (min-width: 60rem) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr));
  }
}

.footer-grid p {
  color: var(--on-surface-variant);
  max-width: 34ch;
  margin-top: 0.875rem;
}

.site-footer h2 {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin-bottom: 0.875rem;
}

.site-footer li + li {
  margin-top: 0.5rem;
}

.site-footer a:not(.btn) {
  color: var(--on-surface);
  text-decoration: none;
}

.site-footer a:not(.btn):hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  color: var(--on-surface-variant);
  font-size: 0.875rem;
}

/* ------------------------------------------------------------------ reveal */
/* Progressive enhancement: the class is only added by JS, so with scripting
   off nothing is ever left invisible. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------------------------- print */
@media print {
  .site-header,
  .cta,
  .hero-actions {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
