/* ============================================================
   WherePup — landing
   Tokens mirrored from the app: WherePup-3/src/constants/2026-06-18-theme.ts
   Materials are the app's own raster assets, resized to WebP.
   ============================================================ */

:root {
  /* paper + neutrals ------------------------------------------------ */
  --white: #ffffff;
  --cream: #fffdf8;
  --paper: #f5f3ee;
  --oatmeal: #ece8df;
  --biscuit: #e6dcc8;
  --border: #e0d5c0;
  --canvas: #f1eadc;          /* ArtisanCanvas base under the linen */
  --board-screen: #f4ede2;
  --board-paper: #f7efe3;
  --card-border: #cdbda6;
  --paper-edge: rgba(134, 116, 87, 0.22);
  --hairline: rgba(224, 213, 192, 0.85);
  --dashed-muted: rgba(154, 138, 118, 0.55);
  --mrz-ink: rgba(154, 138, 118, 0.85);

  /* ink + text ------------------------------------------------------ */
  --ink: #5e4b3c;
  --text: #6b5746;
  --muted: #9a8a76;        /* app token — hairlines, dashes, decorative only */
  --muted-ink: #756654;    /* darkened for text, to clear 4.5:1 on paper */
  --body-ink: #665443;
  --secondary-ink: #786653;

  /* accents --------------------------------------------------------- */
  --coral: #cf8a6a;
  --coral-dark: #c0714f;
  --sage: #9aae87;
  --sage-soft: #d3e0c6;
  --sage-ink: #5e6b4a;
  --dusty-blue: #bcd6e2;
  --blue-ink: #1f6f8b;
  --butter: #e6cf94;
  --butter-ink: #7a6420;
  --gold: #c9a24a;
  --gold-trim: rgba(201, 162, 74, 0.85);
  --teal: #2f7d8c;
  --teal-ink: #2a6e7c;     /* darkened for small text on cream */
  --peach: #f0ddcf;
  --peach-ink: #8a5a30;
  --action: #a85c40;
  --action-strong: #9a4f34;
  --category-ink: #9d5135;
  --rule-coral: rgba(157, 81, 53, 0.3);

  /* materials ------------------------------------------------------- */
  --mat-linen: url("assets/materials/linen.webp");
  --mat-cork: url("assets/materials/cork.webp");
  --mat-cardstock: url("assets/materials/cardstock.webp");
  --mat-rail: url("assets/materials/wood-rail.webp");

  /* the app's shadows are deliberately light — keep them light here */
  --shadow-soft: 0 2px 5px rgba(60, 45, 30, 0.08);
  --shadow-card: 0 3px 8px rgba(60, 45, 30, 0.09);
  --shadow-lift: 0 8px 22px rgba(60, 45, 30, 0.13);

  --font-display: 'Lora', Georgia, 'Times New Roman', serif;
  --font-ui: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* app spacing scale ------------------------------------------------ */
  --sp-xs: 6px;
  --sp-sm: 10px;
  --sp-md: 14px;
  --sp-lg: 22px;
  --sp-xl: 30px;
  --sp-xxl: 42px;

  /* app radii — small on purpose. Paper has edges. ------------------- */
  --r-xs: 3px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-pill: 999px;

  --measure: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
}

/* ============================================================
   base
   ============================================================ */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.62;
  color: var(--text);
  background-color: var(--canvas);
  background-image: var(--mat-linen);
  background-size: 340px;
  background-repeat: repeat;
  -webkit-font-smoothing: antialiased;
  /* `clip` rather than `hidden`: hidden turns body into a scroll container,
     which makes scroll-driven timelines and sticky positioning misbehave. */
  overflow-x: clip;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.14;
  letter-spacing: -0.01em;
  font-weight: 600;
}

p { margin: 0; }
ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
li { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

a { color: var(--action-strong); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

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

.skip-link {
  position: absolute; left: var(--gutter); top: 8px; z-index: 100;
  transform: translateY(-160%);
  padding: 10px 18px; border-radius: var(--r-sm);
  background: var(--ink); color: var(--cream);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus-visible { transform: translateY(0); color: var(--cream); }

/* ============================================================
   type primitives
   ============================================================ */

.eyebrow {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--category-ink);
}
.eyebrow--teal { color: var(--teal-ink); }
.eyebrow--sage { color: var(--sage-ink); }
.eyebrow--muted { color: var(--muted-ink); }

.display {
  font-size: clamp(1.95rem, 3.6vw, 2.7rem);
  font-weight: 600;
}
.display--hero {
  font-size: clamp(2.4rem, 5.4vw, 3.7rem);
  line-height: 1.06;
  letter-spacing: -0.022em;
}

.lede {
  font-size: clamp(1.06rem, 1.35vw, 1.19rem);
  color: var(--body-ink);
  max-width: 46ch;
}

.body-copy { color: var(--body-ink); max-width: 52ch; }
.body-copy + .body-copy { margin-top: 1.05em; }

/* ============================================================
   layout
   ============================================================ */

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

section { position: relative; }

.section {
  padding-block: clamp(46px, 5.4vw, 78px);
}

/* Asymmetric two-part spread: text and a made object.
   Stacks on small screens, offsets on large ones. */
.spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(34px, 5vw, 64px);
  align-items: center;
}
@media (min-width: 900px) {
  .spread { grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); }
  .spread--flip { grid-template-columns: minmax(0, 1.14fr) minmax(0, 0.86fr); }
  .spread--flip .spread__text { order: 2; }
}

.spread__text > * + * { margin-top: var(--sp-md); }
.spread__text .display { margin-top: var(--sp-sm); }

/* ============================================================
   buttons + form
   ============================================================ */

.btn {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 1rem;
  color: var(--cream);
  background: var(--action);
  border: 1px solid var(--action-strong);
  border-radius: var(--r-sm);
  padding: 13px 24px;
  min-height: 48px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: background .15s ease, transform .15s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--action-strong); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .62; cursor: default; }

.btn-quiet {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 8px 16px;
  font-weight: 700; font-size: .93rem;
  color: var(--action-strong);
  border: 1px solid var(--rule-coral);
  border-radius: var(--r-sm);
  background: rgba(255, 253, 248, 0.7);
  text-decoration: none;
}
.btn-quiet:hover { background: var(--cream); color: var(--action-strong); }

.signup { max-width: 470px; }
.signup__row { display: flex; gap: var(--sp-sm); }

.email-input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-ui);
  font-size: 1rem;
  color: var(--ink);
  background: var(--cream);
  border: 1.5px solid var(--card-border);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  min-height: 48px;
  box-shadow: inset 0 1px 2px rgba(60,45,30,.05);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.email-input::placeholder { color: var(--muted-ink); }
.email-input:focus-visible { outline: none; border-color: var(--action); box-shadow: 0 0 0 3px rgba(168,92,64,.18); }
.email-input.is-invalid { border-color: #b8503a; }

.form-note { margin-top: var(--sp-sm); font-size: .87rem; color: var(--muted-ink); }
.form-note.is-success { color: var(--sage-ink); font-weight: 700; }
.form-note.is-error { color: #a3402c; font-weight: 700; }

/* ============================================================
   material primitives — paper, pins, tape, stamps
   ============================================================ */

.paper {
  position: relative;
  background-color: var(--board-paper);
  background-image: var(--mat-cardstock);
  background-size: 220px;
  border: 1px solid var(--paper-edge);
  border-radius: var(--r-xs);
  box-shadow: var(--shadow-card);
}

.pin, .washi {
  position: absolute;
  pointer-events: none;
  z-index: 3;
}
.pin {
  width: 19px; height: 19px;
  top: -7px; left: 50%;
  margin-left: -9px;
  background: url("assets/materials/pin.webp") center/contain no-repeat;
  filter: drop-shadow(0 2px 2px rgba(60,45,30,.32));
}
.washi {
  width: 78px; height: 18px;
  top: -8px; left: 50%;
  margin-left: -39px;
  opacity: .85;
  background: url("assets/materials/washi.webp") center/100% 100% no-repeat;
  transform: rotate(-2.5deg);
}

/* memory card — the app's paper card: category eyebrow, title, meta */
.memory-card {
  padding: 13px 15px 14px;
}
.memory-card__cat {
  font-weight: 800; font-size: .63rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--category-ink);
}
.memory-card__title {
  margin-top: 5px;
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.12rem; line-height: 1.22; color: var(--ink);
}
.memory-card__note {
  margin-top: 5px; font-size: .87rem; line-height: 1.45; color: var(--secondary-ink);
}
.memory-card__date {
  margin-top: 9px;
  font-weight: 800; font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted-ink);
}

/* polaroid */
.polaroid {
  position: relative;
  padding: 9px 9px 0;
  background: var(--cream);
  border: 1px solid var(--paper-edge);
  border-radius: var(--r-xs);
  box-shadow: var(--shadow-card);
}
.polaroid__photo {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 2px;
  background: var(--sage-soft);
}
.polaroid__caption {
  padding: 10px 4px 13px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: .95rem;
  text-align: center;
  color: var(--ink);
}

/* corkboard — cork surface inside four aged-wood rails */
.corkboard {
  position: relative;
  padding: clamp(22px, 3.4vw, 34px);
  background-color: #b67d48;
  background-image: linear-gradient(rgba(116, 76, 40, 0.16), rgba(116, 76, 40, 0.16)), var(--mat-cork);
  background-size: auto, 300px;
  box-shadow: var(--shadow-lift), inset 0 0 44px rgba(90, 58, 30, 0.24);
}
.corkboard__rail {
  position: absolute;
  background-image: var(--mat-rail);
  background-size: 100% 100%;
  pointer-events: none;
  z-index: 6;
}
.corkboard__rail--t { top: 0; left: 0; right: 0; height: 13px; }
.corkboard__rail--b { bottom: 0; left: 0; right: 0; height: 13px; transform: scaleY(-1); }
.corkboard__rail--l { top: 0; bottom: 0; left: 0; width: 13px; }
.corkboard__rail--r { top: 0; bottom: 0; right: 0; width: 13px; transform: scaleX(-1); }

/* passport stamp */
.stamp {
  position: relative;
  display: grid;
  place-content: center;
  justify-items: center;
  width: 116px; height: 116px;
  border-radius: 50%;
  border: 2px solid var(--teal);
  color: var(--teal);
  text-align: center;
}
.stamp::before {
  content: "";
  position: absolute; inset: 5px;
  border: 1.5px dashed var(--teal);
  border-radius: 50%;
  opacity: .7;
}
.stamp__place { font-family: var(--font-display); font-weight: 700; font-size: .78rem; letter-spacing: .06em; }
.stamp__rule { width: 46px; height: 1px; margin: 4px 0; background: currentColor; opacity: .55; }
.stamp__date { font-weight: 800; font-size: .64rem; letter-spacing: .12em; }

/* ============================================================
   masthead
   ============================================================ */

.masthead {
  position: relative;
  z-index: 40;
  border-bottom: 1px solid var(--hairline);
  background: rgba(247, 241, 230, 0.82);
  backdrop-filter: blur(7px);
}
.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  padding-block: 13px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px;
  color: var(--ink); text-decoration: none;
}
.brand__mark { width: 46px; height: 46px; }
.brand__name {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.5rem; letter-spacing: -0.02em;
}

/* ============================================================
   1 — opening spread
   ============================================================ */

.hero { padding-block: clamp(36px, 5vw, 68px) clamp(40px, 5vw, 72px); }

.hero__grid {
  display: grid;
  gap: clamp(38px, 5vw, 60px);
  align-items: center;
}
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr); gap: clamp(38px, 4vw, 62px); }
}

.hero__kicker { display: block; margin-bottom: var(--sp-md); }
.hero__lede { margin-top: var(--sp-lg); }
.hero__signup { margin-top: var(--sp-xl); }
.hero__platforms {
  margin-top: var(--sp-lg);
  padding-top: var(--sp-md);
  border-top: 1px solid var(--hairline);
  font-size: .87rem;
  color: var(--muted-ink);
  max-width: 470px;
}

/* the pinned board that opens the page */
.hero__board { position: relative; }
@media (min-width: 900px) {
  .hero__board { transform: rotate(-1.1deg); }
}

/* Cards pinned to a board. Rotations come from the app's cardRotations set,
   so nothing sits perfectly square — same as the real thing. */
.board-composition {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2.2vw, 24px) clamp(12px, 1.8vw, 18px);
  align-items: start;
}
.board-composition__item { position: relative; }

/* hero: two paper cards beside one tall polaroid */
.board-composition__item--a { grid-area: 1 / 1; transform: rotate(-1.6deg); }
.board-composition__item--b { grid-area: 1 / 2 / span 2 / auto; transform: rotate(1.2deg); }
.board-composition__item--c { grid-area: 2 / 1; transform: rotate(1.8deg); }

/* board section: four cards, offset so the rows don't line up */
.board-composition--quad .board-composition__item--a { grid-area: 1 / 1; transform: rotate(-1.6deg); }
.board-composition--quad .board-composition__item--b { grid-area: 1 / 2; margin-top: 20px; transform: rotate(1.2deg); }
.board-composition--quad .board-composition__item--c { grid-area: 2 / 1; transform: rotate(2.2deg); }
.board-composition--quad .board-composition__item--d { grid-area: 2 / 2; margin-top: -8px; transform: rotate(-1deg); }

/* ============================================================
   7 — the note
   ============================================================ */

.note-section { padding-block: clamp(42px, 5vw, 72px); }

/* A photograph and a written note, laid down next to each other. */
.note-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(26px, 4vw, 44px);
  justify-items: center;
  max-width: 940px;
  margin-inline: auto;
}
@media (min-width: 820px) {
  .note-layout {
    grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
    align-items: center;
    justify-items: stretch;
    gap: clamp(34px, 4.5vw, 58px);
  }
  .note-photo { transform: rotate(-1.8deg); }
  .note { transform: rotate(0.4deg); }
}

.note-photo {
  width: 100%;
  max-width: 300px;
}
.note-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 2px;
}

.note {
  position: relative;
  width: 100%;
  padding: clamp(26px, 3.6vw, 42px) clamp(22px, 3.2vw, 40px) clamp(24px, 3vw, 36px);
}
.note__body {
  font-family: var(--font-display);
  font-size: clamp(1.02rem, 1.25vw, 1.14rem);
  line-height: 1.68;
  color: var(--ink);
}
.note__body + .note__body { margin-top: 1em; }
.note__sign {
  margin-top: var(--sp-lg);
  padding-top: var(--sp-md);
  border-top: 1px solid var(--hairline);
  font-family: var(--font-display);
  font-style: italic;
  color: var(--secondary-ink);
}

/* ============================================================
   3 — anatomy of a memory
   ============================================================ */

.anatomy__lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-lg) clamp(34px, 5vw, 70px);
}
@media (min-width: 820px) {
  .anatomy__lead {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: start;
  }
}
.anatomy__lead-head .display { margin-top: var(--sp-sm); }
.anatomy__lead-body { max-width: 54ch; }

.anatomy__figure {
  position: relative;
  max-width: 340px;
  margin: clamp(38px, 5vw, 62px) auto 0;
}
.anatomy__polaroid { position: relative; z-index: 2; }

/* Field list: a readable spec list by default, callout labels pinned around
   the photograph once there is room for them. */
.fields {
  margin-top: var(--sp-lg);
  display: grid;
  font-size: .93rem;
}
.fields > div {
  display: grid;
  grid-template-columns: minmax(0, 150px) 1fr;
  gap: 3px 14px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px dashed var(--dashed-muted);
}
.fields > div:first-child { border-top: 1px dashed var(--dashed-muted); }
.fields dt {
  font-weight: 800; font-size: .66rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--category-ink);
}
.fields dd { color: var(--body-ink); }

/* Between the stacked and annotated layouts, give the field list room to
   breathe while keeping the photograph at its intended size. */
@media (min-width: 640px) and (max-width: 1059px) {
  .anatomy__figure { max-width: 490px; }
  .anatomy__polaroid { max-width: 340px; margin-inline: auto; }
}

@media (min-width: 1060px) {
  .anatomy__figure { max-width: none; margin-top: clamp(44px, 4.5vw, 68px); }
  .anatomy__stage {
    position: relative;
    width: 330px;
    margin-inline: auto;
  }
  .fields {
    margin-top: 0;
    display: block;
    font-size: .84rem;
  }
  .fields > div {
    position: absolute;
    display: block;
    width: 176px;
    padding: 0;
    border: 0;
  }
  .fields dt { display: block; }
  .fields dd { margin-top: 1px; line-height: 1.4; }
  /* hairline leader from each label toward the photograph */
  .fields > div::after {
    content: "";
    position: absolute;
    top: 7px;
    width: 30px;
    height: 1px;
    background: var(--dashed-muted);
  }
  .fields > div[data-side="left"] { text-align: right; right: calc(100% + 46px); }
  .fields > div[data-side="left"]::after { left: calc(100% + 8px); }
  .fields > div[data-side="right"] { left: calc(100% + 46px); }
  .fields > div[data-side="right"]::after { right: calc(100% + 8px); }
  .fields > div[data-pos="1"] { top: 4px; }
  .fields > div[data-pos="2"] { top: 96px; }
  .fields > div[data-pos="3"] { top: 188px; }
  .fields > div[data-pos="4"] { top: 274px; }
}

/* ============================================================
   4 — board
   ============================================================ */

.board-figure { position: relative; }
@media (min-width: 900px) {
  .board-figure { transform: rotate(0.7deg); }
}

/* ============================================================
   5 — journal
   ============================================================ */

/* Periods are a quiet navigation device, so they are plain and even. */
.periods { display: grid; gap: var(--sp-sm); }

.period {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: 13px 16px;
}
.period--current { border-left: 3px solid var(--sage); }
.period__text { min-width: 0; }
.period__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.06rem; color: var(--ink);
}
.period__meta {
  margin-top: 1px;
  font-weight: 800; font-size: .62rem; letter-spacing: .14em;
  text-transform: uppercase; color: #586344;
}
.period__count {
  margin-left: auto;
  flex: none;
  font-weight: 800; font-size: .82rem;
  color: var(--muted-ink);
}

/* A day sitting inside the current period. */
.day-row {
  display: flex;
  align-items: baseline;
  gap: var(--sp-md);
  margin: 0 0 var(--sp-xs) clamp(16px, 2.6vw, 30px);
  padding: 9px 4px 0;
  border-left: 1px dashed var(--dashed-muted);
  padding-left: var(--sp-md);
}
.day-row__date {
  font-weight: 800; font-size: .64rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted-ink);
  flex: none;
}
.day-row__item {
  font-family: var(--font-display);
  font-size: .98rem;
  color: var(--ink);
}

/* A chapter is something the reader made, so it gets weight the periods don't. */
.chapter-card {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  margin-top: var(--sp-lg);
  padding: 17px 19px;
  border-left: 3px solid var(--coral);
}
.chapter-card__bookmark { width: 30px; flex: none; opacity: .9; }
.chapter-card__text { min-width: 0; }
.chapter-card__label {
  font-weight: 800; font-size: .62rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--category-ink);
}
.chapter-card__title {
  margin-top: 3px;
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.24rem; color: var(--ink);
}
.chapter-card__range {
  margin-top: 2px;
  font-size: .86rem; color: var(--muted-ink);
}

/* ============================================================
   6 — passport
   ============================================================ */

.passport { display: grid; gap: var(--sp-lg); max-width: 540px; margin-inline: auto; }

.passport__cover {
  padding: 8px;
  border-radius: var(--r-xs);
  background: var(--teal);
  box-shadow: var(--shadow-lift);
}
.passport__keyline {
  padding: 18px 20px 17px;
  border: 1.5px solid var(--gold-trim);
  border-radius: 2px;
}
.passport__eyebrow {
  font-weight: 800; font-size: .63rem; letter-spacing: .3em;
  color: var(--cream);
}
.passport__name {
  margin-top: 4px;
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.9rem; color: var(--cream);
}
.passport__tagline {
  margin-top: 2px;
  font-family: var(--font-display); font-size: .9rem;
  color: var(--cream);
}
.passport__stats {
  display: flex; align-items: center; gap: var(--sp-md);
  margin-top: 14px; padding-top: 11px;
  border-top: 1px solid var(--gold-trim);
  font-weight: 800; font-size: .68rem; letter-spacing: .09em;
  color: var(--cream);
}
.passport__stat-divider { width: 1px; height: 20px; background: var(--gold-trim); }

.passport__page {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: 16px 18px 15px 22px;
}
.passport__page::before {
  content: "";
  position: absolute;
  top: 12px; bottom: 12px; left: 11px;
  border-left: 2px dotted var(--hairline);
}
.passport__place { min-width: 0; flex: 1; }
.passport__city {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.66rem; line-height: 1.16; color: var(--ink);
}
.passport__country {
  margin-top: 3px;
  font-weight: 800; font-size: .68rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--secondary-ink);
}
.passport__visits {
  display: flex; gap: 16px;
  margin-top: 11px; padding-top: 9px;
  border-top: 1px dashed var(--hairline);
}
.passport__visit-label {
  font-weight: 800; font-size: .58rem; letter-spacing: .13em; color: var(--muted-ink);
}
.passport__visit-value {
  margin-top: 1px;
  font-weight: 800; font-size: .78rem; color: var(--ink);
}

/* ============================================================
   7 — what's not in here
   ============================================================ */

.ledger-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(34px, 5vw, 58px);
}
@media (min-width: 900px) {
  .ledger-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

.ledger { margin-top: var(--sp-lg); }
.ledger li {
  display: flex;
  align-items: baseline;
  gap: var(--sp-sm);
  padding: 9px 0;
  border-bottom: 1px dashed var(--dashed-muted);
  color: var(--body-ink);
}
.ledger li::before {
  content: "—";
  flex: none;
  color: var(--muted-ink);
}

.keeps { margin-top: var(--sp-lg); display: grid; gap: var(--sp-md); }
.keeps h3 {
  font-family: var(--font-ui); font-weight: 800;
  font-size: .96rem; color: var(--ink);
}
.keeps p { margin-top: 3px; font-size: .95rem; color: var(--body-ink); }

/* pup identification card */
.pup-card {
  margin-top: clamp(34px, 4.5vw, 58px);
  padding: 0;
  min-width: 0;
  overflow: hidden;
}
.pup-card__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-sm);
  padding: 9px 15px;
  background: var(--biscuit);
  border-bottom: 1px solid var(--paper-edge);
  font-weight: 800; font-size: .62rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--text);
}
.pup-card__body { display: flex; align-items: center; gap: clamp(16px, 3vw, 34px); padding: 18px clamp(15px, 2.4vw, 26px); }
.pup-card__stamp { width: 74px; height: 74px; flex: none; opacity: .55; }
.pup-card__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px clamp(16px, 3vw, 40px);
  flex: 1; min-width: 0;
}
@media (min-width: 720px) {
  .pup-card__fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.pup-card__label { font-weight: 800; font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-ink); }
.pup-card__value { margin-top: 1px; font-family: var(--font-display); font-weight: 600; font-size: .98rem; color: var(--ink); }
.pup-card__mrz {
  padding: 8px clamp(15px, 2.4vw, 26px) 10px;
  border-top: 1px solid var(--hairline);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .68rem;
  letter-spacing: .08em;
  color: var(--muted-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   8 — closing
   ============================================================ */

.closing { padding-block: clamp(46px, 5.4vw, 80px); }
.closing__panel {
  max-width: 620px;
  margin-inline: auto;
  padding: clamp(32px, 5vw, 54px) clamp(24px, 4.5vw, 52px);
  text-align: center;
}
.closing__panel .display { margin-top: var(--sp-sm); max-width: 23ch; margin-inline: auto; }
.closing__panel .lede { margin: var(--sp-md) auto 0; }
.closing .signup { margin: var(--sp-xl) auto 0; }

/* ============================================================
   footer
   ============================================================ */

.footer {
  border-top: 1px solid var(--hairline);
  background: rgba(247, 241, 230, 0.6);
  padding-block: clamp(38px, 5vw, 58px) clamp(30px, 4vw, 44px);
}
.footer__top {
  display: grid;
  gap: var(--sp-xl);
  padding-bottom: var(--sp-xl);
  border-bottom: 1px solid var(--hairline);
}
@media (min-width: 760px) {
  .footer__top { grid-template-columns: minmax(0, 1.4fr) minmax(180px, .8fr); gap: var(--sp-lg); }
}
.footer__tag {
  margin-top: var(--sp-sm);
  font-family: var(--font-display);
  font-style: italic;
  color: var(--secondary-ink);
  max-width: 30ch;
}
.footer h2 {
  font-family: var(--font-ui); font-weight: 800;
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted-ink);
}
.footer__links { margin-top: var(--sp-sm); display: grid; gap: 2px; }
.footer__links a {
  display: inline-block;
  padding-block: 11px;
  color: var(--text);
  text-decoration: none;
  font-size: .95rem;
}
.footer__links a:hover { color: var(--action-strong); text-decoration: underline; }

.footer__legal {
  margin-top: var(--sp-lg);
  display: grid;
  gap: var(--sp-xs);
  font-size: .83rem;
  color: var(--muted-ink);
  max-width: 74ch;
}

/* ============================================================
   legal + support documents
   ============================================================ */

.doc { padding-block: clamp(38px, 6vw, 72px) clamp(52px, 8vw, 96px); }
.doc__inner { max-width: 720px; margin-inline: auto; }
.doc__meta { margin-top: var(--sp-md); font-size: .9rem; color: var(--muted-ink); }

.doc__body { margin-top: var(--sp-xl); }
.doc__body h2 {
  margin-top: var(--sp-xl);
  padding-top: var(--sp-md);
  border-top: 1px solid var(--hairline);
  font-size: 1.4rem;
}
.doc__body h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.doc__body h3 { margin-top: var(--sp-lg); font-size: 1.08rem; }
.doc__body p, .doc__body ul { margin-top: var(--sp-sm); color: var(--body-ink); }
.doc__body li { padding-left: 20px; position: relative; margin-top: 5px; }
.doc__body li::before {
  content: "—"; position: absolute; left: 0; color: var(--muted-ink);
}
.doc__body dl { margin-top: var(--sp-md); display: grid; gap: var(--sp-sm); }
.doc__body dt { font-weight: 800; font-size: .95rem; color: var(--ink); }
.doc__body dd { color: var(--body-ink); }

@media print {
  @page { margin: 18mm; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .masthead, .footer, .skip-link { display: none !important; }
  .doc { padding: 0; }
  .doc__inner { max-width: none; }
  .doc__body { margin-top: 18pt; }
  .doc__body h2, .doc__body h3, .doc__body dt { break-after: avoid; }
  .doc__body p, .doc__body li, .doc__body dd { orphans: 3; widows: 3; }
  a { color: inherit; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; overflow-wrap: anywhere; }
}

/* ============================================================
   motion — two moments only, both opt-in
   ============================================================ */

@media (prefers-reduced-motion: no-preference) {
  .settle {
    animation: settle .62s cubic-bezier(.22,.78,.34,1) both;
    animation-delay: calc(var(--i, 0) * 90ms);
  }
  @keyframes settle {
    from { opacity: 0; transform: translateY(-7px) rotate(0deg); }
    to   { opacity: 1; }
  }

}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ============================================================
   responsive adjustments
   ============================================================ */

@media (max-width: 899px) {
  .hero__board, .board-figure { transform: none; }
  .chapter--b, .chapter--c { margin-left: 0; }
}

/* Below this the two-column collage stops being legible, so the board
   becomes a single column of full-width cards. */
@media (max-width: 700px) {
  .board-composition { grid-template-columns: 1fr; gap: 16px; }
  .board-composition__item {
    grid-area: auto / auto / auto / auto !important;
    transform: none !important;
    margin-top: 0 !important;
  }
  .polaroid__photo { aspect-ratio: 1 / 1; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .signup__row { flex-direction: column; }
  .signup__row .btn { width: 100%; }
  .pup-card__fields { grid-template-columns: 1fr; }
  .passport__page { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .masthead .btn-quiet { padding: 8px 12px; font-size: .86rem; }
  .brand__name { font-size: 1.3rem; }
}

/* ============================================================
   scroll choreography
   Four moments, nothing else. Built on `position: sticky` for pinning
   and IntersectionObserver for reveals, so it behaves identically in
   every browser and degrades to the static page without JavaScript.
   ============================================================ */

/* ── 03 · periods pin while their days scroll past ─────────── */
@media (min-width: 900px) {
  .periods { position: relative; }
  .period { position: sticky; top: calc(50vh - 120px); }
  .period:nth-of-type(2) { top: calc(50vh - 62px); }
  .period:nth-of-type(3) { top: calc(50vh - 4px); }
}

@media (prefers-reduced-motion: no-preference) {

  /* ── 01 · the board fills as you scroll ─────────────────────
     The stage is taller than the viewport; the corkboard pins
     inside it and each memory lands as its sentinel passes. */
  @media (min-width: 900px) {
    .board-stage { height: 210vh; }
    .board-stage__cue { position: absolute; left: 0; width: 1px; height: 1px; }
    .board-stage__cue[data-cue="0"] { top: 34%; }
    .board-stage__cue[data-cue="1"] { top: 47%; }
    .board-stage__cue[data-cue="2"] { top: 60%; }
    .board-stage__cue[data-cue="3"] { top: 73%; }
    .board-stage__sticky {
      position: sticky;
      top: 14vh;
      display: grid;
      align-content: center;
      min-height: 72vh;
    }
    .js-motion .board-stage .board-composition__item {
      opacity: 0;
      transform: translateY(-16px) scale(1.03);
      transition: opacity .5s ease, transform .55s cubic-bezier(.22,.78,.34,1);
    }
    .board-stage .board-composition__item.is-landed {
      opacity: 1;
      transform: none;
    }
  }

  /* ── 02 · the photograph develops ───────────────────────────
     A blank print resolving as the memory comes into view. */
  .js-motion .anatomy__polaroid .polaroid__photo {
    filter: saturate(0.08) brightness(1.22) contrast(0.72);
    opacity: 0.55;
    transition: filter 1.5s ease, opacity 1.2s ease;
  }
  .anatomy__polaroid.is-developed .polaroid__photo {
    filter: none;
    opacity: 1;
  }
  .js-motion .anatomy__polaroid .polaroid__caption {
    opacity: 0;
    transition: opacity .6s ease .55s;
  }
  .anatomy__polaroid.is-developed .polaroid__caption { opacity: 1; }

  .js-motion .fields > div {
    opacity: 0;
    transition: opacity .5s ease;
    transition-delay: calc(var(--i, 0) * 110ms);
  }
  .fields.is-revealed > div { opacity: 1; }

  /* ── 04 · the passport assembles, then the stamp presses in ── */
  .js-motion .passport__cover, .js-motion .passport__page {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .6s ease, transform .7s cubic-bezier(.22,.78,.34,1);
  }
  .passport__page { transition-delay: .18s; }
  .passport.is-assembled .passport__cover,
  .passport.is-assembled .passport__page {
    opacity: 1;
    transform: none;
  }
}

/* The stamp presses in last, once the page beneath it has landed. */
.stamp { transition: opacity .5s ease .4s, transform .5s cubic-bezier(.2,.9,.3,1) .4s; }
.stamp[data-ink="waiting"] { opacity: 0; transform: rotate(-14deg) scale(1.13); }
.stamp[data-ink="inked"] { opacity: 1; transform: rotate(-6deg) scale(1); }

@media (prefers-reduced-motion: reduce) {
  .stamp[data-ink="waiting"] { opacity: 1; transform: none; }
}
