/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
button { font: inherit; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--paper-50);
  color: var(--ink-950);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  overflow-x: hidden;
}

a {
  color: var(--ink-950);
  text-decoration: none;
}
a:hover { color: var(--accent-700); }

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

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink-950);
  color: var(--paper-50);
  padding: 12px 20px;
  z-index: 100;
  border-radius: var(--radius-sm);
}
.skip-link:focus-visible {
  left: 12px;
  top: 12px;
}

/* Layout helpers */
.wrap {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(64px, 10vw, 140px);
  /* Anchored sections (#how, #about, #sla) land clear of the sticky header. */
  scroll-margin-top: 72px;
}
.section--dark {
  background: var(--ink-950);
  color: var(--paper-50);
}
.section--alt {
  background: var(--paper-100);
}

.eyebrow {
  font: 600 var(--fs-eyebrow) var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-700);
  margin: 0;
}
.section--dark .eyebrow { color: var(--ink-400); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
}
.btn--accent {
  background: var(--accent-700);
  color: var(--paper-50);
}
.btn--accent:hover { background: var(--accent-700); color: var(--paper-50); opacity: 0.92; }
.btn--outline {
  border-color: var(--line-300);
  color: var(--ink-950);
}
.btn--outline:hover { color: var(--accent-700); border-color: var(--accent-700); }
.btn--dark {
  background: var(--ink-950);
  color: var(--paper-50);
}
.btn--dark:hover { color: var(--paper-50); opacity: 0.85; }

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--paper-50) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-300);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-block: 16px;
}
.site-header__logo { height: 30px; width: auto; }

.nav-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-300);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-950);
  font-weight: 600;
  font-size: 14px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 36px;
  font-size: 14.5px;
  font-weight: 500;
}
.site-nav[hidden] { display: none; }
.site-nav__link { color: var(--ink-700); }
.site-nav__link--accent { color: var(--accent-700); }

@media (min-width: 900px) {
  /* Larger mark on desktop; mobile keeps 30px. Native asset is 411x144,
     so anything under 144px tall stays crisp. */
  .site-header__logo { height: 44px; }
  /* The `hidden` attribute drives the mobile disclosure only; the menu is
     always visible at desktop widths regardless of its toggled state. */
  .site-nav[hidden] { display: flex; }
}

@media (max-width: 899px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    order: 3;
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .site-nav__link {
    display: block;
    width: 100%;
    min-height: 44px;
    padding-block: 12px;
  }
}

/* Footer */
.site-footer {
  background: var(--ink-950);
  color: var(--ink-350);
  padding-bottom: 48px;
}
.site-footer__top {
  border-top: 1px solid var(--ink-850);
  padding-top: 56px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}
.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.site-footer__logo { height: 48px; width: auto; align-self: flex-start; }
.site-footer__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-350);
}
.site-footer__text a { color: var(--ink-250); }

.site-footer__nav {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  font-size: 14px;
}
.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}
.site-footer__col a,
.site-footer__link-btn {
  color: var(--ink-250);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.site-footer__link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.site-footer__heading {
  font: 600 11px var(--font-mono);
  letter-spacing: 0.13em;
  color: var(--ink-400);
}

.site-footer__bottom {
  border-top: 1px solid var(--ink-850);
  margin-top: 48px;
  padding-top: 24px;
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}

@media (max-width: 599px) {
  .site-footer__top { flex-direction: column; }
  .site-footer__bottom { flex-direction: column; gap: 8px; }
}

/* CTA band */
.cta-band__inner { text-align: center; }
.cta-band__eyebrow { margin-bottom: 28px; }
.cta-band__heading {
  font: 700 var(--fs-h2-cta) / 1.1 var(--font-sans);
  letter-spacing: -0.03em;
  margin: 0;
}
.cta-band__price {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--positive-600);
}
.cta-band__btn { margin-top: 48px; }
.cta-band__fallback {
  margin: 24px 0 0;
  font-size: 15px;
  color: var(--ink-700);
}
.cta-band__fallback a { color: var(--ink-950); }
.section--dark .cta-band__fallback { color: var(--ink-400); }
.section--dark .cta-band__fallback a { color: var(--ink-250); }

/* Cookie consent banner */
.consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: var(--paper-100);
  border-top: 1px solid var(--line-300);
  padding: 20px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.consent[hidden] { display: none; }
.consent__text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-700);
  max-width: var(--measure);
}
.consent__text a { color: var(--ink-950); text-decoration: underline; }
.consent__actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

/* ---- Section reveals ------------------------------------------------- */
/* motion.js adds .reveal-pending to a [data-reveal] section that is below the
   fold at load, then swaps it for .reveal-in when it arrives. A hairline draws
   left to right above the content and lands on an accent dot, then the
   content follows a beat later. Children of a [data-reveal-stagger] container
   arrive one after another. Without the script nothing here applies: no
   class, no hiding. */
[data-reveal] > .wrap { position: relative; }
[data-reveal] > .wrap::before,
[data-reveal] > .wrap::after {
  content: "";
  position: absolute;
  top: -32px;
  pointer-events: none;
}
[data-reveal] > .wrap::before {
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background: var(--line-300);
  transform-origin: left;
}
[data-reveal] > .wrap::after {
  right: var(--gutter);
  width: 7px;
  height: 7px;
  margin: -3px -3px 0 0;
  border-radius: 50%;
  background: var(--accent-600);
}
.section--dark[data-reveal] > .wrap::before { background: var(--ink-800); }

.reveal-pending > .wrap::before { transform: scaleX(0); }
.reveal-pending > .wrap::after { transform: scale(0); }
.reveal-pending > .wrap > :not([data-reveal-stagger]),
.reveal-pending [data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(var(--reveal-shift));
}

.reveal-in > .wrap::before { transition: transform var(--dur-2) var(--ease-out); }
.reveal-in > .wrap::after { transition: transform var(--dur-1) var(--ease-out) var(--dur-2); }
.reveal-in > .wrap > :not([data-reveal-stagger]),
.reveal-in [data-reveal-stagger] > * {
  transition: opacity var(--dur-2) var(--ease-out) var(--dur-1),
              transform var(--dur-2) var(--ease-out) var(--dur-1);
}
.reveal-in [data-reveal-stagger] > :nth-child(2) { transition-delay: calc(var(--dur-1) + 60ms); }
.reveal-in [data-reveal-stagger] > :nth-child(3) { transition-delay: calc(var(--dur-1) + 120ms); }
.reveal-in [data-reveal-stagger] > :nth-child(4) { transition-delay: calc(var(--dur-1) + 180ms); }
.reveal-in [data-reveal-stagger] > :nth-child(5) { transition-delay: calc(var(--dur-1) + 240ms); }
.reveal-in [data-reveal-stagger] > :nth-child(n + 6) { transition-delay: calc(var(--dur-1) + 300ms); }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  /* motion.js bails out under reduced motion; this is the belt to that brace. */
  .reveal-pending > .wrap::before, .reveal-pending > .wrap::after,
  .reveal-pending > .wrap > *, .reveal-pending [data-reveal-stagger] > * {
    opacity: 1; transform: none;
  }
}

/* ---- Long-form pages: /privacy/, /404.html, /articles/* --------------- */

/* Everything on a prose page shares one column at the reading measure, so a
   heading can never run wider than the paragraphs under it. `ch` resolves
   against this element's own font-size, which is the body size - the same
   basis .prose uses, so the two measures agree. */
.prose-page__col { max-width: var(--measure); }
.prose-page__title {
  /* Smaller than --fs-h1-sub: 64px display type inside a 68ch column reads
     as a banner, not a headline. */
  font: 700 clamp(32px, 3.6vw, 48px)/1.1 var(--font-sans);
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  color: var(--ink-950);
  text-wrap: balance;
}
.prose-page__meta {
  margin: 0 0 40px;
  font: 500 13px var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--ink-500);
  text-transform: uppercase;
}
/* Author left, publish date hard right on the same baseline. Wraps to two rows
   rather than crushing the date when the column gets narrow. */
.prose-page__byline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 40px;
}
.prose-page__byline-who {
  display: flex;
  align-items: center;
  gap: 14px;
}
.prose-page__byline-date {
  margin: 0;
  font: 500 13px var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--ink-500);
}
.prose-page__byline-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--paper-100);
  border: 1px solid var(--line-300);
  object-fit: cover;
}
.prose-page__byline-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-500);
}
.prose-page__byline-text strong { color: var(--ink-950); }
.prose-page__hero { margin: 0 0 40px; }
.prose-page__hero img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-300);
  background: var(--paper-100);
}
.prose { max-width: var(--measure); }
.prose h2 {
  font: 600 clamp(22px, 2.2vw, 28px)/1.3 var(--font-sans);
  letter-spacing: -0.02em;
  margin: 48px 0 12px;
  color: var(--ink-950);
}
.prose h3 {
  font: 600 clamp(17px, 1.6vw, 20px)/1.35 var(--font-sans);
  margin: 32px 0 8px;
  color: var(--ink-950);
}
.prose p,
.prose li {
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--ink-700);
}
.prose p { margin: 0 0 16px; }

/* Lists carry their own markers so the browser defaults don't apply: a dot in
   the decorative accent for unordered, a zero-padded mono numeral for ordered
   sequences. Both hang in the gutter, keeping the text edge flush with the
   paragraphs above. */
.prose ul, .prose ol {
  margin: 0 0 16px;
  padding-left: 0;
  list-style: none;
}
.prose ol { counter-reset: prose-step; }
.prose li {
  position: relative;
  margin-bottom: 8px;
  padding-left: 26px;
}
.prose ul > li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-600);
}
.prose ol > li {
  padding-left: 42px;
  margin-bottom: 12px;
}
.prose ol > li::before {
  counter-increment: prose-step;
  content: counter(prose-step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.18em;
  font: 600 13px var(--font-mono);
  letter-spacing: 0.04em;
  /* Accent text on a light surface must be the AA-safe token. */
  color: var(--accent-700);
}

/* Quotations. `q` for a phrase inside a sentence (the browser supplies the
   marks); `blockquote` for anything pulled out of the flow. */
.prose q {
  font-style: italic;
  color: var(--ink-950);
}
.prose blockquote {
  margin: 32px 0;
  padding-left: 24px;
  border-left: 3px solid var(--accent-600);
}
.prose blockquote p {
  font-style: italic;
  line-height: 1.6;
  color: var(--ink-950);
}
.prose blockquote p:last-of-type { margin-bottom: 0; }
.prose blockquote cite {
  display: block;
  /* The quote's own paragraph already contributes its bottom margin. */
  margin-top: 2px;
  font: 500 12px var(--font-mono);
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.prose a { color: var(--ink-950); text-decoration: underline; }
.prose a:hover { color: var(--accent-700); }
.prose code {
  font: 500 0.9em var(--font-mono);
  background: var(--paper-100);
  border: 1px solid var(--line-300);
  border-radius: var(--radius-sm);
  padding: 1px 5px;
}
.prose strong { color: var(--ink-950); }
.prose-page__consent {
  margin: 48px 0 0;
  padding-top: 32px;
  border-top: 1px solid var(--line-300);
}

/* ---- /articles/ index ------------------------------------------------- */

.article-list__intro {
  margin: 0 0 48px;
  font-size: var(--fs-lede);
  line-height: 1.6;
  color: var(--ink-700);
}
.article-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
/* A rule between entries, not around them: one article should read as the
   start of a list, not as a lone card floating in the column. */
.article-list__item + .article-list__item {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--line-300);
}
.article-list__date {
  margin: 0 0 10px;
  font: 500 13px var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--ink-500);
}
.article-list__title {
  margin: 0 0 12px;
  font: 600 clamp(22px, 2.2vw, 28px)/1.3 var(--font-sans);
  letter-spacing: -0.02em;
}
.article-list__title a {
  color: var(--ink-950);
  text-decoration: none;
}
.article-list__title a:hover { color: var(--accent-700); }
.article-list__excerpt {
  margin: 0 0 12px;
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--ink-700);
}
.article-list__byline {
  margin: 0;
  font-size: 15px;
  color: var(--ink-500);
}
