/*
  Binder: site styles
  ------------------------------------------------------------
  1. Fonts         the site's own copies of Space Grotesk and Inter
  2. Theme         scheme and material, local aliases, stopgaps
  3. Base          reset and element defaults
  4. Layout        container, sections
  5. Components    one block per component, in page order
  6. Utilities
  7. Motion        reduced-motion overrides

  The look is the SLAB design system. Every color, radius, space,
  type size and motion value comes from the token variables in
  /assets/slab.css, which every page loads before this file. That
  file is an exact copy of design/tokens/generated/css/slab.css,
  made by tools/sync_tokens.py: never edit it here. Where the
  tokens have no answer, section 2 names the stopgap, and the
  README lists each one.

  Scheme and material: slab.css is dark glass by default and
  switches on data-scheme="light" and data-material="flat" on
  <html>. A small script at the top of each page sets them from
  the device's settings before anything is drawn. Without
  JavaScript the site stays dark glass.
*/

/* ============================================================
   1. Fonts
   ============================================================ */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/inter-400.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/inter-500.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/inter-600.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-500.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-700.woff2") format("woff2");
}

/* ============================================================
   2. Theme
   ============================================================ */

:root {
  color-scheme: dark;

  /* The surface a section is drawn on, and the one a card on it uses
     (one step lighter, as the app's Surface is). Tinted sections move both up. */
  --surface-here: var(--color-surface-canvas);
  --surface-up: var(--color-surface-default);

  /* Stopgaps: the tokens have no value for these yet (see README, "Visual identity"). */
  --container: 72rem;                        /* widest the page's content gets */
  --measure: 38rem;                          /* widest a paragraph gets */
  --card-corner: var(--space-8);             /* drawn cards: radius tokens are sized for real cards and panels */
  --card-corner-sm: var(--space-4);          /* tiny drawn cards (list markers) */
  --card-ratio: 5 / 7;                       /* a trading card's shape */
  --ease: ease-out;                          /* the motion tokens are springs, which CSS cannot run */
  --duration-swipe: 9s;                      /* the swipe loop, in step with the QR code's animation */
  --press: transform calc(var(--motion-duration-fast) * 1ms) var(--ease);
}

:root[data-scheme="light"] {
  color-scheme: light;
}

/* Glass: a tinted fill, light along the edges, and a blur of what is behind.
   Chrome glass follows the scheme; art glass sits on card art and stays dark.
   In the flat material the fills are solid and nothing is blurred. */
.feed-actions {
  background-color: var(--material-chrome-fill);
  box-shadow: var(--effect-chrome-panel-shadows);
  -webkit-backdrop-filter: blur(var(--material-blur));
  backdrop-filter: blur(var(--material-blur));
}

.pocket__tag,
.feed-card__meta,
.step__slot::before {
  background-color: var(--material-art-fill);
  box-shadow: var(--effect-glass-panel-shadows);
  color: var(--color-text-on-gradient);
  -webkit-backdrop-filter: blur(var(--material-blur));
  backdrop-filter: blur(var(--material-blur));
}

[data-material="flat"] .feed-actions,
[data-material="flat"] .pocket__tag,
[data-material="flat"] .feed-card__meta,
[data-material="flat"] .step__slot::before {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* ============================================================
   3. Base
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background-color: var(--color-surface-canvas);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background-color: var(--color-surface-canvas);
  color: var(--color-text-primary);
  font-family: var(--type-body-family);
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line-height);
  letter-spacing: var(--type-body-letter-spacing);
}

h1,
h2,
h3 {
  margin: 0 0 var(--space-16);
  text-wrap: balance;
}

h1 {
  font-family: var(--type-display-family);
  font-size: var(--type-display-size);
  font-weight: var(--type-display-weight);
  line-height: var(--type-display-line-height);
  letter-spacing: var(--type-display-letter-spacing);
}

h2 {
  font-family: var(--type-title-lg-family);
  font-size: var(--type-title-lg-size);
  font-weight: var(--type-title-lg-weight);
  line-height: var(--type-title-lg-line-height);
  letter-spacing: var(--type-title-lg-letter-spacing);
}

h3 {
  margin-bottom: var(--space-8);
  font-family: var(--type-headline-family);
  font-size: var(--type-headline-size);
  font-weight: var(--type-headline-weight);
  line-height: var(--type-headline-line-height);
  letter-spacing: var(--type-headline-letter-spacing);
}

p,
ul,
ol,
dl,
figure {
  margin: 0 0 var(--space-16);
}

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

img {
  height: auto;
}

/* The tokens have no link color: links are primary text, underlined. */
a {
  color: var(--color-text-primary);
  text-decoration-thickness: var(--border-width-default);
  text-underline-offset: var(--space-4);
}

a:hover {
  color: var(--color-text-primary);
  text-decoration-thickness: var(--border-width-focus);
}

:focus-visible {
  outline: var(--border-width-focus) solid var(--color-border-focus);
  outline-offset: var(--space-2);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

[id] {
  scroll-margin-top: var(--space-32);
}

/* ============================================================
   4. Layout
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-padding-screen);
}

@media (min-width: 48rem) {
  .container {
    padding-inline: var(--space-32);
  }
}

.section {
  padding-block: var(--space-64);
  background-color: var(--surface-here);
}

.section--tint {
  --surface-here: var(--color-surface-default);
  --surface-up: var(--color-surface-raised);
}

.section-head {
  max-width: var(--measure);
  margin-bottom: var(--space-gap-section);
}

.section-head > p:not(.eyebrow),
.hero__lede,
.cta p,
.page__body > p:not(.eyebrow) {
  color: var(--color-text-secondary);
  /* Stopgap: the ramp has no lead paragraph. Body text at the headline's size. */
  font-size: var(--type-headline-size);
  line-height: var(--type-headline-line-height);
}

/* A small label above a heading, drawn as the app draws a chip. */
.eyebrow {
  display: inline-block;
  margin-bottom: var(--space-gap-section-inner);
  padding: var(--space-4) var(--space-12);
  border: var(--border-width-default) solid var(--color-border-subtle);
  border-radius: var(--radius-pill);
  background-color: var(--color-fill-quaternary);
  color: var(--color-text-secondary);
  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  line-height: var(--type-label-line-height);
  letter-spacing: var(--type-label-letter-spacing);
}

.split {
  display: grid;
  gap: var(--space-48);
  align-items: center;
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
  .split--flip > :first-child {
    order: 2;
  }
}

/* ============================================================
   5. Components
   ============================================================ */

/* ---- Skip link ---- */

.skip-link {
  position: absolute;
  top: var(--space-8);
  left: var(--space-8);
  z-index: 100;
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-pill);
  background-color: var(--color-inv-surface-default);
  color: var(--color-inv-text-primary);
  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  line-height: var(--type-label-line-height);
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
  color: var(--color-inv-text-primary);
}

/* ---- Wordmark ---- */

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-gap-inline);
  color: var(--color-text-primary);
  /* Stopgap: the ramp has no style for the name. Space Grotesk Bold at the title size. */
  font-family: var(--type-title-lg-family);
  font-size: var(--type-title-size);
  font-weight: var(--type-title-lg-weight);
  line-height: var(--type-title-line-height);
  letter-spacing: var(--type-title-lg-letter-spacing);
  text-decoration: none;
}

.wordmark:hover {
  color: var(--color-text-primary);
}

.wordmark__glyph {
  width: var(--size-icon-lg);
  height: var(--size-icon-lg);
  flex: none;
}

/* Things drawn on the accent are drawn in the on-accent color. */
.glyph-cover { fill: var(--color-action-primary); }
.glyph-card { fill: var(--color-icon-on-accent); }
.glyph-holo { fill: var(--color-action-secondary); }
.glyph-want { fill: none; stroke: var(--color-icon-on-accent); stroke-width: 1; stroke-dasharray: 1.4 1; }

/* ---- Site header ---- */

.site-header {
  border-bottom: var(--border-width-default) solid var(--color-border-subtle);
  background-color: var(--color-surface-canvas);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-24);
  min-height: calc(var(--size-control-lg) + var(--space-16));
}

.site-nav {
  display: none;
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--size-touch-target);
  padding-inline: var(--space-12);
  border-radius: var(--radius-pill);
  color: var(--color-text-primary);
  font-family: var(--type-label-family);
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  line-height: var(--type-label-line-height);
  text-decoration: none;
}

.site-nav a:hover {
  background-color: var(--color-fill-quaternary);
  text-decoration: none;
}

.site-header .btn {
  margin-left: auto;
}

@media (min-width: 48rem) {
  .site-nav { display: block; }
  .site-header .btn { margin-left: 0; }
}

/* ---- Buttons (as the app's Button: primary, and quiet) ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-gap-inline);
  min-height: var(--size-control-md);
  padding: var(--space-8) var(--space-24);
  border: 0;
  border-radius: var(--radius-pill);
  font-family: var(--type-button-family);
  font-size: var(--type-button-size);
  font-weight: var(--type-button-weight);
  line-height: var(--type-button-line-height);
  letter-spacing: var(--type-button-letter-spacing);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: var(--press);
}

.btn--primary,
.btn--primary:hover {
  background-color: var(--color-action-primary);
  color: var(--color-text-on-accent);
}

.btn--quiet,
.btn--quiet:hover {
  padding-inline: var(--space-16);
  background-color: transparent;
  color: var(--color-text-primary);
}

/* Hover and press: the tokens' overlay fills over the button's own color. */
.btn:hover,
.store-btn:hover {
  background-image: linear-gradient(var(--color-fill-quaternary), var(--color-fill-quaternary));
  text-decoration: none;
}

.btn:active,
.store-btn:active {
  background-image: linear-gradient(var(--color-fill-tertiary), var(--color-fill-tertiary));
  transform: scale(var(--motion-press-scale));
}

/* ---- Launch switch: show copy for one app status only ----
   <html data-app-status="soon"> or "live". See README. */

[data-app-status="soon"] [data-show="live"],
[data-app-status="live"] [data-show="soon"] {
  display: none !important;
}

/* ---- Install block (store buttons + QR code) ---- */

.install {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-24) var(--space-32);
  align-items: center;
  margin-top: var(--space-32);
}

.install__status {
  margin: 0 0 var(--space-12);
  font-weight: var(--type-headline-weight);
}

/* The two store buttons sit side by side: three controls wide each where there is room,
   and half the row each on a phone. */
.store-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, calc(var(--size-control-lg) * 3)));
  gap: var(--space-gap-button-group);
}

/* A store button is a secondary button that names its store and is a plain link to it,
   the same whether or not the app is out (README, "The launch switch"). */
.store-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--size-control-lg);
  padding: var(--space-8) var(--space-16);
  border: var(--border-width-default) solid transparent;
  border-radius: var(--radius-card-small);
  background-color: var(--color-action-secondary);
  color: var(--color-text-on-secondary);
  font-family: var(--type-button-family);
  font-size: var(--type-button-size);
  font-weight: var(--type-button-weight);
  line-height: var(--type-button-line-height);
  letter-spacing: var(--type-button-letter-spacing);
  text-align: center;
  text-decoration: none;
  transition: var(--press);
}

.store-btn:hover {
  color: var(--color-text-on-secondary);
}

/* The QR code is shown at every width: on a phone it is there for someone else to scan.
   It is as wide as the two store buttons together, so the three line up. */
.install-qr {
  display: flex;
  align-items: center;
  gap: var(--space-16);
  max-width: calc(var(--size-control-lg) * 6 + var(--space-gap-button-group));
  margin: 0;
  padding: var(--space-12);
  border: var(--border-width-default) solid var(--color-border-subtle);
  border-radius: var(--radius-card-small);
  background-color: var(--surface-up);
}

.install-qr img {
  width: 8rem; /* 128px: room for the animation in the middle of the code */
  flex: none;
  border-radius: var(--radius-card-small);
  /* Stopgap: a QR code is always dark on white, in every scheme, so this is the white primitive. */
  background-color: var(--color-white);
}

.install-qr figcaption {
  color: var(--color-text-secondary);
  font-family: var(--type-body-sm-family);
  font-size: var(--type-body-sm-size);
  line-height: var(--type-body-sm-line-height);
}

/* ---- Hero ---- */

.hero {
  padding-block: var(--space-48) var(--space-64);
}

.hero__grid {
  display: grid;
  gap: var(--space-48);
  align-items: center;
}

.hero__lede {
  max-width: 34rem;
}

@media (min-width: 60rem) {
  .hero {
    padding-block: var(--space-64);
  }
  .hero__grid {
    grid-template-columns: 1.05fr 1fr;
  }
}

/* ---- Hero art: binder page with a phone in front ---- */

.hero-art {
  margin: 0;
}

.hero-art__stage {
  position: relative;
  width: min(100%, 30rem);
  aspect-ratio: 1 / 0.92;
  margin-inline: auto;
}

.hero-art__stage > .binder-sheet {
  position: absolute;
  top: 6%;
  left: 0;
  width: 70%;
  transform: rotate(-6deg);
}

.hero-art__stage > .phone {
  position: absolute;
  top: 0;
  right: 2%;
  width: 47%;
}

.art-note {
  margin: var(--space-16) auto 0;
  color: var(--color-text-secondary);
  font-family: var(--type-caption-family);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line-height);
  text-align: center;
}

/* ---- Binder sheet: the nine-pocket page ----
   The drawings scale with their own width: their insides are measured in cqi
   (container units resolve against an ancestor, never the element itself). */

.binder-sheet {
  container-type: inline-size;
}

.binder-sheet__page {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3.5cqi;
  padding: 6cqi 5cqi 6cqi 13cqi;
  border: var(--border-width-default) solid var(--color-border-subtle);
  border-radius: 4cqi;
  background:
    radial-gradient(circle at 6.5cqi 18%, var(--surface-here) 0 2.2cqi, transparent 2.4cqi),
    radial-gradient(circle at 6.5cqi 50%, var(--surface-here) 0 2.2cqi, transparent 2.4cqi),
    radial-gradient(circle at 6.5cqi 82%, var(--surface-here) 0 2.2cqi, transparent 2.4cqi),
    var(--color-surface-raised);
  box-shadow: var(--effect-elevation-raised);
}

.pocket {
  position: relative;
  aspect-ratio: var(--card-ratio);
  border-radius: var(--card-corner);
  background-color: var(--color-fill-quaternary);
}

.pocket--empty {
  border: var(--border-width-default) dashed var(--color-border-strong);
  background-color: transparent;
}

.pocket--empty::after {
  content: "+";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--color-icon-secondary);
  font-family: var(--type-display-family);
  font-size: 9cqi;
  font-weight: var(--type-display-weight);
}

/* A label on a card in the wishlist drawing: art glass, white words. */
.pocket__tag {
  position: absolute;
  left: 50%;
  bottom: 2.5cqi; /* inside the card: .holo clips anything that hangs outside it */
  z-index: 1;
  transform: translateX(-50%);
  padding: 0.6cqi 2.5cqi;
  border-radius: var(--radius-pill);
  font-family: var(--type-label-family);
  font-size: max(var(--type-caption-size), 3.6cqi);
  font-weight: var(--type-headline-weight);
  line-height: var(--type-caption-line-height);
  white-space: nowrap;
}

/* ---- Holo card art: abstract placeholder cards, no real artwork ----
   Drawn on the five rarity gradients. They carry no words of their own. */

.holo {
  position: relative;
  overflow: hidden;
  border-radius: var(--card-corner);
  background: var(--gradient-rarity-common);
  box-shadow: inset 0 0 0 0.3em var(--color-glass-rim-bottom);
}

.holo--b { background: var(--gradient-rarity-uncommon); }
.holo--c { background: var(--gradient-rarity-rare); }
.holo--d { background: var(--gradient-rarity-ultra); }
.holo--e { background: var(--gradient-rarity-chase); }

.holo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(115deg, transparent 0 8%, var(--color-glass-rim-bottom) 10% 12%, transparent 14% 22%);
  mix-blend-mode: soft-light;
}

.holo::after {
  content: "";
  position: absolute;
  width: 46%;
  aspect-ratio: 1;
  top: 22%;
  left: 27%;
  border-radius: 50%;
  background-color: var(--color-glass-rim-top);
  box-shadow: 0 0 0 0.3em var(--color-glass-rim-bottom);
}

.holo--b::after { border-radius: 22%; transform: rotate(45deg); width: 38%; left: 31%; }
.holo--c::after { border-radius: 50% 50% 8% 8%; width: 54%; left: 23%; top: 28%; }
.holo--d::after { width: 30%; top: 16%; left: 35%; box-shadow: 0 2.2em 0 -0.2em var(--color-glass-rim-bottom); }
.holo--e::after { border-radius: 0.3em; width: 60%; height: 28%; aspect-ratio: auto; top: 36%; left: 20%; }

/* ---- Phone mock-up of the swipe feed ---- */

.phone {
  container-type: inline-size;
}

.phone__frame {
  aspect-ratio: 9 / 17;
  padding: 3cqi;
  border: var(--border-width-default) solid var(--color-border-subtle);
  border-radius: 15cqi;
  background-color: var(--color-surface-raised);
  box-shadow: var(--effect-elevation-raised);
}

.phone__screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 9cqi 6cqi 5cqi;
  border-radius: 12cqi;
  background-color: var(--color-surface-canvas);
  overflow: hidden;
}

.phone__bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 5cqi;
  font-family: var(--type-title-lg-family);
  font-size: 6.5cqi;
  font-weight: var(--type-title-lg-weight);
}

.phone__bar span:last-child {
  color: var(--color-text-secondary);
  font-family: var(--type-label-family);
  font-size: 4.6cqi;
  font-weight: var(--type-headline-weight);
}

.feed {
  position: relative;
  flex: 1;
}

.feed-card {
  position: absolute;
  inset: 3cqi 0 auto;
  padding: 2.5cqi;
  border: var(--border-width-default) solid var(--color-border-subtle);
  border-radius: 7cqi;
  background-color: var(--color-surface-default);
  box-shadow: var(--effect-elevation-raised);
  transform-origin: 50% 100%;
}

.feed-card .holo {
  aspect-ratio: var(--card-ratio);
  border-radius: 5cqi;
}

/* Why this card was picked, on art glass over the bottom of the card.
   Cards in the feed never show a price. */
.feed-card__meta {
  position: absolute;
  left: 5cqi;
  right: 5cqi;
  bottom: 5cqi;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5cqi;
  padding: 1.8cqi 3cqi;
  border-radius: 4cqi;
  font-size: 4.1cqi;
  line-height: 1.2;
  white-space: nowrap;
}

.feed-card__why {
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: var(--type-headline-weight);
}

.feed-card__stamp {
  position: absolute;
  top: 9cqi;
  z-index: 1;
  padding: 1cqi 3.5cqi;
  border-radius: var(--radius-pill);
  font-family: var(--type-button-family);
  font-size: 6cqi;
  font-weight: var(--type-button-weight);
  opacity: 0;
}

.feed-card__stamp--like {
  left: 7cqi;
  background-color: var(--color-action-primary);
  color: var(--color-text-on-accent);
  transform: rotate(-12deg);
}

.feed-card__stamp--pass {
  right: 7cqi;
  background-color: var(--color-action-secondary);
  color: var(--color-text-on-secondary);
  transform: rotate(12deg);
}

/* Static stack, used without JavaScript and with reduced motion */
.feed-card:nth-child(1) { z-index: 3; }
.feed-card:nth-child(2) { z-index: 2; transform: translateY(5cqi) scale(0.94); }
.feed-card:nth-child(3) { z-index: 1; transform: translateY(10cqi) scale(0.88); }

/* Pass, wishlist and like, as the app's round buttons, on a glass bar over the feed. */
.feed-actions {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5cqi;
  margin-inline: auto;
  /* Lifted over the bottom of the card stack, so the glass has something to blur. */
  top: -16cqi;
  padding: 2.5cqi 4cqi;
  border-radius: var(--radius-pill);
}

.feed-actions span {
  display: grid;
  place-items: center;
  width: 14cqi;
  aspect-ratio: 1;
  border-radius: 50%;
  background-color: var(--color-action-secondary);
  color: var(--color-icon-on-secondary);
}

.feed-actions span:nth-child(2) {
  width: 11cqi;
  border: var(--border-width-default) solid var(--color-border-strong);
  background-color: transparent;
  color: var(--color-icon-primary);
}

.feed-actions span:last-child {
  background-color: var(--color-action-primary);
  color: var(--color-icon-on-accent);
}

.feed-actions svg {
  width: 48%;
  height: 48%;
}

/* The swipe loop runs only when site.js has added .has-motion to <html>,
   which it does not do for visitors who prefer reduced motion. */
.has-motion .feed-card {
  animation: feed-like var(--duration-swipe) var(--ease) infinite;
}
.has-motion .feed-card:nth-child(2) {
  animation-name: feed-pass;
  animation-delay: calc(var(--duration-swipe) * -2 / 3);
}
.has-motion .feed-card:nth-child(3) {
  animation-delay: calc(var(--duration-swipe) * -1 / 3);
}
.has-motion .feed-card__stamp {
  animation: stamp var(--duration-swipe) linear infinite;
  animation-delay: inherit;
}
@keyframes feed-like {
  0%, 18% { transform: none; opacity: 1; z-index: 3; }
  28% { transform: translateX(125%) rotate(16deg); opacity: 0; z-index: 3; }
  30% { transform: translateY(10cqi) scale(0.88); opacity: 0; z-index: 1; }
  38%, 55% { transform: translateY(10cqi) scale(0.88); opacity: 1; z-index: 1; }
  62%, 88% { transform: translateY(5cqi) scale(0.94); opacity: 1; z-index: 2; }
  99.9% { transform: none; opacity: 1; z-index: 2; }
  100% { transform: none; opacity: 1; z-index: 3; }
}

@keyframes feed-pass {
  0%, 18% { transform: none; opacity: 1; z-index: 3; }
  28% { transform: translateX(-125%) rotate(-16deg); opacity: 0; z-index: 3; }
  30% { transform: translateY(10cqi) scale(0.88); opacity: 0; z-index: 1; }
  38%, 55% { transform: translateY(10cqi) scale(0.88); opacity: 1; z-index: 1; }
  62%, 88% { transform: translateY(5cqi) scale(0.94); opacity: 1; z-index: 2; }
  99.9% { transform: none; opacity: 1; z-index: 2; }
  100% { transform: none; opacity: 1; z-index: 3; }
}

@keyframes stamp {
  0%, 12% { opacity: 0; }
  18%, 26% { opacity: 1; }
  28%, 100% { opacity: 0; }
}

/* ---- Steps (how it works) ---- */

.steps {
  display: grid;
  gap: var(--space-gap-card-group);
  padding: 0;
  list-style: none;
  counter-reset: step;
}

@media (min-width: 40rem) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 64rem) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}

/* A large Surface, as in the app. */
.step {
  counter-increment: step;
  padding: var(--space-padding-card);
  border: var(--border-width-default) solid var(--color-border-subtle);
  border-radius: var(--radius-card-large);
  background-color: var(--surface-up);
}

.step__slot {
  display: grid;
  place-items: center;
  width: var(--size-control-lg);
  aspect-ratio: var(--card-ratio);
  margin-bottom: var(--space-16);
}

/* The step's number on art glass over the card. */
.step__slot::before {
  content: counter(step);
  position: relative;
  z-index: 1;
  inset: auto;
  display: grid;
  place-items: center;
  min-width: var(--space-32);
  padding: var(--space-2) var(--space-8);
  border-radius: var(--radius-pill);
  font-family: var(--type-button-family);
  font-size: var(--type-button-size);
  font-weight: var(--type-button-weight);
  line-height: var(--type-button-line-height);
  background-image: none;
  mix-blend-mode: normal;
}

.step__slot.holo::after {
  display: none;
}

.step p {
  margin: 0;
  color: var(--color-text-secondary);
}

/* ---- Audience list (who it's for) ---- */

.audience {
  display: grid;
  gap: var(--space-gap-card-group);
  padding: 0;
  list-style: none;
}

/* A small Surface, as in the app, with an empty pocket in front. */
.audience li {
  display: flex;
  gap: var(--space-16);
  align-items: flex-start;
  padding: var(--space-16);
  border: var(--border-width-default) solid var(--color-border-subtle);
  border-radius: var(--radius-card-small);
  background-color: var(--surface-up);
}

.audience li::before {
  content: "";
  flex: none;
  width: var(--size-icon-sm);
  aspect-ratio: var(--card-ratio);
  margin-top: var(--space-2);
  border: var(--border-width-default) dashed var(--color-border-strong);
  border-radius: var(--card-corner-sm);
}

/* ---- Feature list (wishlist section) ---- */

.features {
  display: grid;
  gap: var(--space-24);
  padding: 0;
  list-style: none;
}

.features p {
  margin: 0;
  color: var(--color-text-secondary);
}

.feature-art {
  margin: 0;
}

.feature-art .binder-sheet {
  width: min(100%, 26rem);
  margin-inline: auto;
}

/* ---- Gift link mock-up ---- */

.gift-mock {
  container-type: inline-size;
  width: min(100%, 28rem);
  margin-inline: auto;
  border: var(--border-width-default) solid var(--color-border-subtle);
  border-radius: var(--radius-card-large);
  background-color: var(--color-surface-raised);
  box-shadow: var(--effect-elevation-raised);
  overflow: hidden;
}

.gift-mock__bar {
  display: flex;
  align-items: center;
  gap: 1.5cqi;
  padding: 3.5cqi 6cqi;
  border-bottom: var(--border-width-default) solid var(--color-border-subtle);
  background-color: var(--color-surface-default);
}

.gift-mock__bar i {
  width: 2.4cqi;
  aspect-ratio: 1;
  border-radius: 50%;
  background-color: var(--color-fill-secondary);
}

.gift-mock__bar b {
  flex: 1;
  height: 5cqi;
  margin-left: 2cqi;
  border-radius: var(--radius-pill);
  background-color: var(--color-fill-quaternary);
}

.gift-mock__body {
  padding: 6cqi;
}

.gift-mock__title {
  margin-bottom: 4cqi;
  font-family: var(--type-title-lg-family);
  font-size: max(var(--type-body-size), 5.5cqi);
  font-weight: var(--type-title-lg-weight);
  line-height: 1.2;
}

.gift-mock__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4cqi;
}

.gift-mock__cards .holo {
  aspect-ratio: var(--card-ratio);
}

.gift-mock__buy {
  display: block;
  margin-top: 2.5cqi;
  padding: 1.5cqi 0;
  border-radius: var(--radius-pill);
  background-color: var(--color-action-primary);
  color: var(--color-text-on-accent);
  font-family: var(--type-button-family);
  font-size: max(var(--type-caption-size), 3.4cqi);
  font-weight: var(--type-button-weight);
  line-height: 1.2;
  text-align: center;
}

/* ---- Honesty band (how Binder is paid): an inverse surface ---- */

.honesty {
  display: grid;
  gap: var(--space-24);
  padding: var(--space-padding-card);
  border-radius: var(--radius-card-large);
  background-color: var(--color-inv-surface-default);
  color: var(--color-inv-text-primary);
}

.honesty h2 {
  margin-bottom: var(--space-12);
}

.honesty p {
  max-width: var(--measure);
  margin: 0 0 var(--space-12);
}

.honesty p:last-child {
  margin-bottom: 0;
}

@media (min-width: 56rem) {
  .honesty {
    grid-template-columns: 1fr 1.4fr;
    padding: var(--space-48);
  }
}

/* ---- FAQ ---- */

.faq {
  max-width: 48rem;
}

.faq details {
  border-bottom: var(--border-width-default) solid var(--color-border-subtle);
}

.faq details:first-of-type {
  border-top: var(--border-width-default) solid var(--color-border-subtle);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-16);
  padding: var(--space-16) 0;
  font-family: var(--type-headline-family);
  font-size: var(--type-headline-size);
  font-weight: var(--type-headline-weight);
  line-height: var(--type-headline-line-height);
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: var(--space-32);
  height: var(--space-32);
  border-radius: var(--radius-pill);
  background-color: var(--color-fill-quaternary);
  color: var(--color-icon-primary);
  font-family: var(--type-body-family);
  font-weight: var(--type-body-weight);
}

.faq summary:hover::after {
  background-color: var(--color-fill-tertiary);
}

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

.faq details p {
  max-width: var(--measure);
  margin: 0;
  padding-bottom: var(--space-24);
  color: var(--color-text-secondary);
}

/* ---- Closing call to action ---- */

.cta {
  text-align: center;
}

.cta p {
  max-width: var(--measure);
  margin-inline: auto;
}

.cta .install {
  justify-content: center;
}

.cta .store-buttons {
  justify-content: center;
}

.cta__pockets {
  display: flex;
  justify-content: center;
  gap: var(--space-12);
  margin-bottom: var(--space-24);
}

.cta__pockets span {
  width: var(--space-40);
  aspect-ratio: var(--card-ratio);
}

.cta__pockets .pocket--empty::after {
  font-size: var(--type-headline-size);
}

/* ---- Simple pages (get, privacy, terms, 404) ---- */

.page {
  padding-block: var(--space-64);
}

.page__body {
  max-width: var(--measure);
}

.page__body .install {
  margin-block: var(--space-24) var(--space-32);
}

/* ---- Site footer ---- */

.site-footer {
  padding-block: var(--space-48);
  border-top: var(--border-width-default) solid var(--color-border-subtle);
  background-color: var(--color-surface-default);
  font-size: var(--type-body-sm-size);
  line-height: var(--type-body-sm-line-height);
}

.site-footer__grid {
  display: grid;
  gap: var(--space-24);
}

.site-footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8) var(--space-24);
  margin: 0 0 var(--space-16);
  padding: 0;
  list-style: none;
}

.site-footer__nav a {
  display: inline-block;
  padding-block: var(--space-12);
  color: var(--color-text-primary);
  font-weight: var(--type-label-weight);
}

.site-footer__notes p {
  max-width: 44rem;
  margin-bottom: var(--space-8);
  color: var(--color-text-secondary);
}

.site-footer__tagline {
  margin: var(--space-8) 0 0;
  color: var(--color-text-secondary);
}

@media (min-width: 48rem) {
  .site-footer__grid {
    grid-template-columns: 1fr 2fr;
  }
}

/* ============================================================
   6. Utilities
   ============================================================ */

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

[hidden] {
  display: none !important;
}

/* ============================================================
   7. Motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .btn:active,
  .store-btn:active {
    transform: none;
  }
}
