/* spellpup.com — "the page is the object": the site is one of Pup's picture books.
   Foundation from tasteskill's base.css (MIT). Tokens: colours from the subject (Pup's room at night, book
   paper, Pup's fur, the app icon's coral, the app's green action); type made for children's books and
   beginning readers. One radius for everything: square, like paper. */

@font-face { font-family: "Grandstander"; src: url("fonts/grandstander-400-900.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Andika"; src: url("fonts/andika-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Andika"; src: url("fonts/andika-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #352112;          /* the wood of Pup's room at night */
  --surface: #4a2f1a;
  --ink: #e9e7e2;         /* book paper */
  --paper: #e9e7e2;
  --paper-ink: #2b1a0c;
  --accent: #237a3b;      /* the app's green action */
  --accent-press: #1b6430;
  --accent-ink: #f6f6f4;
  --field-1: #eba646;  --field-1-ink: #2b1a0c;   /* Pup's fur */
  --field-2: #f47e6e;  --field-2-ink: #2b1a0c;   /* the app icon's coral */

  --font-display: "Grandstander", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --font-text: "Andika", ui-rounded, system-ui, -apple-system, sans-serif;

  /* five sizes, no more */
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.375rem, 1.15rem + 0.8vw, 1.875rem);
  --step-title: clamp(1.875rem, 1.2rem + 2.1vw, 3.5rem);
  --step-head: clamp(2.75rem, 1.2rem + 5.4vw, 6.25rem);

  --margin: clamp(1rem, 2.2vw, 2rem);
  --gutter: clamp(1rem, 2vw, 2rem);
  --section: clamp(7.5rem, 13vw, 13rem);
  --radius-lg: 32px;       /* panels and big cards: Apple-style rounded, inset from the screen edges (owner preference) */
  --radius: 22px;          /* pictures and cards */
  --radius-sm: 14px;       /* small pictures: slips, covers in the shelf row, stamps */

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  color-scheme: dark;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-text); font-size: var(--step-body); line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
h1, h2, h3, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
::selection { background: var(--field-1); color: var(--field-1-ink); }
:focus-visible { outline: 3px solid var(--field-1); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; text-wrap: balance; letter-spacing: -0.02em; line-height: 1; }
p { max-width: 62ch; text-wrap: pretty; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--paper); color: var(--paper-ink); padding: 0.6rem 1rem; }
.skip:focus { left: var(--margin); top: var(--margin); }

/* ---------- controls ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3.25rem; padding: 0 1.6rem; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; white-space: nowrap;
  font-family: var(--font-display); font-weight: 700; font-size: var(--step-body);
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease;
}
.button:hover { background: var(--accent-press); }
.button:active { transform: scale(0.97); }
.button svg { width: 1.1rem; height: 1.1rem; }
.link { text-decoration: underline; text-underline-offset: 0.22em; text-decoration-thickness: 0.08em; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); transition: text-decoration-color var(--t-hover) ease; }
.link:hover { text-decoration-color: currentColor; }

/* ---------- the opening: an open picture book, with the shelf rising below ---------- */
.bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem var(--margin); min-height: 72px; }
.bar__mark { font-family: var(--font-display); font-weight: 900; font-size: var(--step-lead); text-decoration: none; letter-spacing: -0.02em; }
.bar__links { display: flex; gap: clamp(1rem, 2.4vw, 2rem); flex-wrap: wrap; justify-content: flex-end; }
.spread { display: grid; grid-template-columns: 5fr 7fr; margin-inline: var(--margin); border-radius: var(--radius-lg); overflow: hidden; height: calc(100svh - 72px - 9.5rem); min-height: 30rem; max-height: 52rem; }
.spread__page { background: var(--paper); color: var(--paper-ink); padding: clamp(1.5rem, 4vw, 4rem); display: flex; flex-direction: column; justify-content: center; gap: 1.5rem; }
.spread__page h1 { font-size: var(--step-title); font-weight: 900; }
.spread__page p { max-width: 34ch; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.spread__picture { position: relative; overflow: hidden; background: var(--surface); }
.spread__picture img { width: 100%; height: 100%; object-fit: cover; object-position: 78% 50%; }
.spread__picture::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 14px; background: color-mix(in srgb, var(--paper-ink) 18%, transparent); z-index: 1; }
.hero__shelf { margin-top: 1.75rem; padding-inline: var(--margin); }
.hero__covers { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(0.75rem, 1.6vw, 1.5rem); align-items: end; }
.hero__covers li { transform: rotate(var(--r, 0deg)); transform-origin: 50% 100%; }
.hero__covers img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); }
.hero__ledge { margin-top: 0.75rem; border-radius: var(--radius-sm); background: var(--field-1); color: var(--field-1-ink); padding: 0.9rem 1.25rem; font-family: var(--font-display); font-weight: 700; font-size: var(--step-body); max-width: none; }
@media (max-width: 860px) {
  :root { --radius-lg: 24px; --radius: 18px; }
  .bar__links .link:nth-child(2), .bar__links .link:nth-child(3) { display: none; }
  .spread { grid-template-columns: 1fr; height: auto; max-height: none; min-height: 0; }
  .spread__picture { order: -1; aspect-ratio: 3 / 2; }
  .spread__picture img { object-position: 85% 50%; }
  .spread__picture::before { display: none; }
  .spread__page { padding: 1.75rem 1.25rem 2rem; }
  .spread__page h1 { font-size: var(--step-title); }
  .hero__actions .button { width: 100%; }
}
@media (max-width: 560px) {
  .spread__picture { aspect-ratio: 4 / 5; }
  .spread__picture img { object-position: 50% 50%; }
  .hero__covers { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 46vw; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.5rem; }
  .hero__covers li { scroll-snap-align: start; }
}

/* ---------- books that grow (showcase) ---------- */
/* Watch: the 25-second tour, right after the opening shelf. Plays only when tapped, with sound. */
.watch { margin: var(--gutter) var(--margin) 0; border-radius: var(--radius-lg); background: var(--paper); color: var(--paper-ink); padding: clamp(3rem, 7vw, 6rem) var(--margin) clamp(2.5rem, 6vw, 5rem); display: grid; justify-items: center; text-align: center; gap: 1rem; position: relative; z-index: 3; }
.watch h2 { font-family: var(--font-display); font-weight: 900; font-size: var(--step-title); line-height: 1.05; }
.watch > p { max-width: 46ch; }
.watch__frame { position: relative; width: min(100%, 1120px); aspect-ratio: 16 / 9; margin-top: 1.25rem; border-radius: var(--radius-lg); overflow: hidden; background: var(--paper-ink); }
.watch__frame video { display: block; width: 100%; height: 100%; object-fit: contain; }
.watch-link { display: inline-flex; align-items: center; gap: 0.45rem; }
.watch + .mat { margin-top: var(--gutter); }

.mat { position: relative; min-height: 92svh; overflow: hidden; display: grid; z-index: 2; background: var(--surface); margin-inline: var(--margin); border-radius: var(--radius-lg); }
.mat__picture { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.mat__text {
  position: relative; z-index: 2; align-self: start; margin: clamp(3rem, 8svh, 6rem) 0 0 18%;
  width: min(36rem, 100% - 2 * var(--margin)); padding: 1.75rem 2rem 2rem;
  background: rgba(30, 18, 8, 0.74); color: var(--ink); border-radius: var(--radius);
}
.mat__text h2 { font-size: var(--step-lead); }
.line { margin-top: 1rem; font-weight: 700; font-size: var(--step-title); line-height: 1.25; position: relative; padding-bottom: 2.6rem; }
.word { font-weight: 700; padding: 0 0.08em; transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.word:hover { background: color-mix(in srgb, var(--field-1) 30%, transparent); }
.word:active { transform: translateY(1px); }
.word.is-reading { background: var(--field-1); color: var(--field-1-ink); }
.paw { position: absolute; left: 0; bottom: 0; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--field-2); color: var(--paper); display: grid; place-items: center; transform: translateX(var(--paw-x, 0px)); transition: transform 260ms var(--ease-out); }
.paw svg { width: 62%; height: 62%; }
.mat__text p { margin-top: 1rem; }
.mat__text .button { margin-top: 1.5rem; }
.slips { position: absolute; z-index: 1; pointer-events: none; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; padding-inline: var(--margin); align-items: end; }
.slip { pointer-events: auto; border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: var(--paper); color: var(--paper-ink); padding: 1rem 1.1rem 0; height: var(--h); overflow: hidden; font-size: var(--step-small); line-height: 1.5; transform-origin: 50% 100%; }
.slip:nth-child(2) { transform: rotate(-1.4deg); }
.slip:nth-child(5) { transform: rotate(1.2deg); }
.slip h3 { font-size: var(--step-body); letter-spacing: -0.01em; }
.slip__grade { margin-top: 0.15rem; }
.slip__cut { letter-spacing: 0.3em; margin: 0.35rem 0 0.4rem; }
.slip p + p { margin-top: 0.5rem; }
@media (max-width: 860px) {
  .mat { min-height: 100svh; }
  .mat__text { margin: 2.5rem var(--margin) 0; width: auto; padding: 1.25rem 1.25rem 1.5rem; }
  .slips { pointer-events: auto; left: var(--margin); right: var(--margin); padding-inline: 0; overflow-x: auto; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 42vw; scroll-snap-type: x mandatory; }
  .slip { scroll-snap-align: start; height: calc(var(--h) * 0.85); }
}

/* ---------- a visit with Pup (drag row) ---------- */
.visit { padding-block: var(--section) calc(var(--section) * 0.8); position: relative; z-index: 2; background: var(--bg); }
.visit__top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; padding-inline: var(--margin); }
.visit__top h2 { grid-column: 1 / 7; }
.visit__top p { grid-column: 7 / 11; font-size: var(--step-lead); line-height: 1.3; }
.visit__top .visit__nav { grid-column: 11 / 13; justify-self: end; }
.visit__controls { margin: 1.5rem var(--margin) 0; }
.visit__top h2 { font-size: var(--step-head); }
.visit__nav { display: flex; gap: 8px; }
.visit__nav button { width: 3rem; height: 3rem; border-radius: 50%; background: var(--paper); color: var(--paper-ink); display: grid; place-items: center; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease; }
.visit__nav button:hover { background: var(--field-1); }
.visit__nav button:active { transform: scale(0.94); }
.visit__nav svg { width: 1.25rem; height: 1.25rem; }
.visit__bar { height: 6px; background: var(--surface); border-radius: 3px; overflow: hidden; }
.visit__bar span { display: block; height: 100%; width: 12%; background: var(--ink); transition: width 160ms linear; }
.visit__row { display: flex; gap: 32px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 2.5rem var(--margin) 0; padding: 0 0 1rem; scrollbar-width: none; overscroll-behavior-x: contain; }
.visit__row::-webkit-scrollbar { display: none; }
.moment { flex: 0 0 280px; scroll-snap-align: start; display: flex; flex-direction: column; }
.moment h3 { font-size: var(--step-lead); }
.moment p { margin-top: 0.5rem; line-height: 1.45; min-height: 4.4em; }
.moment img { margin-top: var(--gap, 96px); aspect-ratio: 4 / 5; width: 100%; object-fit: cover; object-position: top; background: var(--surface); border-radius: var(--radius); }
@media (max-width: 860px) {
  .visit__nav { display: none; }
  .visit__row { gap: 16px; }
  .visit__top { grid-template-columns: 1fr; row-gap: 1rem; }
  .visit__top h2, .visit__top p { grid-column: 1; }
  .moment { flex-basis: 72vw; }
  .moment img { margin-top: calc(var(--gap, 96px) * 0.45); }
}

/* ---------- what's inside (stacked sheets) ---------- */
.inside { padding-top: var(--section); position: relative; z-index: 2; background: var(--bg); }
.inside > h2 { font-size: var(--step-head); padding-inline: var(--margin); margin-bottom: 3rem; }
.sheet {
  position: sticky; top: calc(var(--k) * 72px); min-height: 62svh;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
  grid-template-rows: 72px 1fr; padding-inline: clamp(1rem, 2.5vw, 2.5rem); margin-inline: var(--margin);
  background: var(--sheet-bg); color: var(--sheet-ink); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.sheet h3 { grid-column: 1 / 7; grid-row: 1; align-self: center; font-size: var(--step-title); }
.sheet__text { grid-column: 1 / 6; grid-row: 2; align-self: start; padding-top: clamp(1.5rem, 5svh, 3.5rem); }
.sheet__text p:first-child { font-family: var(--font-display); font-weight: 700; }
.sheet__text p { max-width: 40ch; }
.sheet__text p + p { margin-top: 0.9rem; }
.sheet figure { grid-column: 7 / 13; grid-row: 2; overflow: hidden; border-radius: var(--radius); margin-bottom: var(--gutter); }
.sheet__scene { display: block; border-radius: var(--radius); margin-top: 1.5rem; width: min(100%, 22rem); aspect-ratio: 4 / 3; object-fit: cover; }
.sheet figure img, .sheet figure video { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.sheet figure video { object-position: 50% 78%; background: var(--surface); }
.sheet:nth-of-type(1) { --sheet-bg: var(--paper); --sheet-ink: var(--paper-ink); }
.sheet:nth-of-type(2) { --sheet-bg: var(--field-1); --sheet-ink: var(--field-1-ink); }
.sheet:nth-of-type(3) { --sheet-bg: var(--field-2); --sheet-ink: var(--field-2-ink); }
.sheet:nth-of-type(4) { --sheet-bg: var(--surface); --sheet-ink: var(--ink); }
@media (max-width: 860px) {
  .sheet { position: relative; top: 0; grid-template-columns: 1fr; grid-template-rows: auto auto auto; min-height: 0; }
  .sheet h3 { padding-block: 1rem; }
  .sheet h3 { grid-column: 1; font-size: var(--step-lead); }
  .sheet figure { grid-column: 1; grid-row: 2; margin: 0; aspect-ratio: 4 / 3; }
  .sheet__text { grid-column: 1; grid-row: 3; padding: 1.25rem 0 2rem; }
  .sheet__scene { display: none; }
}

/* ---------- the whole shelf (gallery) ---------- */
.shelf { padding: var(--section) var(--margin) 0; position: relative; z-index: 3; background: var(--bg); }
.shelf h2 { font-size: var(--step-head); }
.shelf__intro { margin-top: 1rem; font-size: var(--step-lead); max-width: 34ch; line-height: 1.3; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 12px; margin-top: 2.5rem; }
.tile { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; }
.tile figure { overflow: hidden; }
.tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 500ms var(--ease-out); }
.tile__strip { min-height: 92px; padding: 12px; background: var(--strip-bg); color: var(--strip-ink); display: grid; align-content: space-between; gap: 0.4rem; font-size: var(--step-small); line-height: 1.35; }
.tile__strip strong { font-family: var(--font-display); font-weight: 800; font-size: var(--step-body); letter-spacing: -0.01em; line-height: 1.15; }
.tile__vals { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 0.75rem; font-variant-numeric: tabular-nums; }
.tile__vals span { white-space: nowrap; }
.tile:nth-child(4n+1) { --strip-bg: var(--paper); --strip-ink: var(--paper-ink); }
.tile:nth-child(4n+2) { --strip-bg: var(--field-1); --strip-ink: var(--field-1-ink); }
.tile:nth-child(4n+3) { --strip-bg: var(--surface); --strip-ink: var(--ink); }
.tile:nth-child(4n+4) { --strip-bg: var(--field-2); --strip-ink: var(--field-2-ink); }
@media (hover: hover) and (pointer: fine) { .tile:hover img { transform: scale(1.04); } }
@media (max-width: 860px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 8px; }
  .tile:nth-child(4n+3) { --strip-bg: var(--field-2); --strip-ink: var(--field-2-ink); }
  .tile:nth-child(4n+4) { --strip-bg: var(--surface); --strip-ink: var(--ink); }
}

/* ---------- what SpellPup never does (the printed card) ---------- */
.promise { margin: var(--section) var(--margin) 0; border-radius: var(--radius-lg); background: var(--field-1); color: var(--field-1-ink); height: clamp(36rem, 92svh, 58rem); overflow: hidden; display: grid; justify-items: center; padding-top: clamp(4rem, 10svh, 7rem); position: relative; z-index: 3; }
.promise__card { align-self: start; width: min(56vw, 760px); aspect-ratio: 5 / 7; border-radius: var(--radius-lg); background: var(--paper); color: var(--paper-ink); padding: 56px; text-align: center; transform: rotate(-1.5deg); }
.promise__card h2 { font-size: var(--step-title); }
.promise__card figure { margin-top: 2.25rem; }
.promise__card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 62%; border-radius: var(--radius-sm); }
.promise__card ul { margin-top: 2rem; padding: 0; list-style: none; font-size: var(--step-lead); line-height: 1.7; }
.promise__card li { text-wrap: balance; }
@media (max-width: 860px) {
  .promise__card { width: calc(100% - 2 * var(--margin)); aspect-ratio: auto; min-height: 120%; padding: 28px; transform: rotate(-1deg); }
  .promise__card ul { font-size: var(--step-body); }
}

/* ---------- questions (split) ---------- */
.questions { margin: var(--gutter) var(--margin) 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--paper); color: var(--paper-ink); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding: 0 var(--margin); position: relative; z-index: 3; }
.questions__text { grid-column: 1 / 6; padding-block: var(--section); }
.questions__text h2 { font-size: var(--step-title); }
.facts { margin-top: 1.5rem; }
.facts li + li { margin-top: 0.2rem; }
.faq { margin-top: 2.25rem; }
.faq details + details { margin-top: 1.75rem; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; font-family: var(--font-display); font-weight: 700; font-size: var(--step-lead); line-height: 1.2; min-height: 44px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.chev { flex: none; width: 14px; height: 14px; position: relative; transition: transform var(--t-hover) var(--ease-out); }
.chev::before, .chev::after { content: ""; position: absolute; top: 6px; width: 9px; height: 2px; background: currentColor; }
.chev::before { left: 0; transform: rotate(45deg); }
.chev::after { right: 0; transform: rotate(-45deg); }
.faq details[open] .chev { transform: rotate(180deg); }
.faq details p { margin-top: 0.6rem; }
.questions__actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }
.questions__art { grid-column: 7 / 13; position: relative; padding-bottom: 80px; }
.questions__tall { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); }
.questions__art { padding-block: var(--gutter) 80px; }
.questions__square { position: absolute; width: 34%; aspect-ratio: 1; object-fit: cover; left: -40px; bottom: 40px; border: 10px solid var(--paper); border-radius: calc(var(--radius) + 10px); }
@media (max-width: 860px) {
  .questions { grid-template-columns: 1fr; }
  .questions__art { grid-column: 1; order: -1; margin: 0 calc(var(--margin) * -1); padding-bottom: 0; }
  .questions__tall { aspect-ratio: 4 / 5; border-radius: 0; }
  .questions__art { padding-block: 0; }
  .questions__square { width: 38%; left: auto; right: var(--margin); bottom: -28px; }
  .questions__text { grid-column: 1; padding-block: 3.5rem var(--section); }
  .questions__actions .button { width: 100%; }
}

/* ---------- tell me when it's out (the reply card) ---------- */
.reply { margin: var(--gutter) var(--margin) 0; border-radius: var(--radius-lg); background: var(--accent); color: var(--accent-ink); min-height: 62svh; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding: 0 var(--margin); overflow: hidden; position: relative; z-index: 3; }
.reply__note { grid-column: 1 / 5; align-self: end; margin-bottom: 64px; font-size: var(--step-lead); line-height: 1.3; }
.reply__card { grid-column: 6 / 13; align-self: end; margin-bottom: -60px; aspect-ratio: 7 / 5; border-radius: var(--radius-lg); background: var(--paper); color: var(--paper-ink); padding: 48px; display: grid; align-content: center; justify-items: center; text-align: center; gap: 1rem; transform: rotate(2deg); transform-origin: 50% 100%; }
.reply__card h2 { font-size: var(--step-title); }
.reply__card p { max-width: 34ch; }
.reply__card .button { width: 100%; min-height: 56px; margin-top: 0.75rem; background: var(--paper-ink); color: var(--paper); }
.reply__card .button:hover { background: #000; }
@media (max-width: 860px) {
  .reply { grid-template-columns: 1fr; padding-top: 4rem; }
  .reply__note { grid-column: 1; margin-bottom: 2rem; align-self: start; }
  .reply__card { grid-column: 1; width: 90%; justify-self: center; padding: 28px; aspect-ratio: auto; min-height: 20rem; transform: rotate(1deg); margin-bottom: -40px; }
}

/* ---------- footer (the back of the card) ---------- */
.back { background: var(--bg); padding: var(--section) var(--margin) 0; position: relative; z-index: 3; }
.back__card {
  width: min(100%, 72rem); margin-inline: auto; background: var(--paper); color: var(--paper-ink);
  padding: 72px clamp(1.25rem, 4vw, 3.5rem) 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem var(--gutter);
  min-height: 420px; position: relative; border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.back__card::before {
  /* the scalloped top edge of the card: a row of paper semicircles */
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 40px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='40'%3E%3Ccircle cx='40' cy='40' r='40' fill='%23e9e7e2'/%3E%3C/svg%3E") 50% 100% / 80px 40px repeat-x;
}
.back__sign h2 { font-size: var(--step-title); }
.back__sign p { margin-top: 1rem; }
.back__address { display: grid; gap: 12px; align-content: start; padding-top: 104px; }
.back__stamp { position: absolute; top: 72px; right: clamp(1.25rem, 4vw, 3.5rem); width: 88px; background: var(--paper); padding: 6px; transform: rotate(3deg); border-radius: var(--radius-sm); }
.back__stamp img { border-radius: 10px; }
.back__stamp img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.back__imprint { grid-column: 1 / -1; justify-self: center; max-width: none; text-align: center; font-size: var(--step-small); align-self: end; }
@media (max-width: 860px) {
  .back__card { grid-template-columns: 1fr; padding-top: 64px; }
  .back__card::before { height: 28px; background-size: 56px 28px; }
  .back__stamp { width: 64px; top: 56px; }
  .back__sign { padding-right: 84px; }
  .back__address { padding-top: 0; }
}

/* ---------- document pages (privacy, help) ---------- */
.doc-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.25rem var(--margin); }
.doc-top a { text-decoration: none; }
.doc-top .mark { font-family: var(--font-display); font-weight: 900; font-size: var(--step-lead); }
.doc-top nav { display: flex; gap: 1.25rem; }
.doc-top nav a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.22em; transition: text-decoration-color var(--t-hover) ease; }
.doc-top nav a:hover, .doc-top nav a[aria-current="page"] { text-decoration-color: currentColor; }
.leaflet { width: min(100% - 2 * var(--margin), 52rem); margin: clamp(1rem, 4vw, 3rem) auto var(--section); border-radius: var(--radius-lg); background: var(--paper); color: var(--paper-ink); padding: clamp(1.5rem, 5vw, 4rem); }
.leaflet__head { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: end; }
.leaflet__head img { width: clamp(110px, 18vw, 200px); aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
.leaflet h1 { font-size: var(--step-head); }
.leaflet .updated { margin-top: 0.75rem; }
.leaflet__head + p { margin-top: 2rem; }
.leaflet h2 { font-size: var(--step-lead); margin: 2.5rem 0 0.75rem; }
.leaflet p + p, .leaflet ul + p, .leaflet p + ul { margin-top: 0.9rem; }
.leaflet ul { padding-left: 1.25rem; }
.leaflet li + li { margin-top: 0.45rem; }
.leaflet .summary, .leaflet .contact { margin-top: 2rem; border-radius: var(--radius-sm); background: var(--field-1); color: var(--field-1-ink); padding: 1.5rem 1.75rem; }
.leaflet .summary h2, .leaflet .contact h2 { margin-top: 0; }
.leaflet .faq summary { font-size: var(--step-body); }
@media (max-width: 560px) { .doc-top nav a[href^="mailto"] { display: none; } }
.doc-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding: 0 var(--margin) 2rem; font-size: var(--step-small); }
.doc-foot nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* ---------- motion (content stays visible without script; reduced motion drops all travel) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0.35; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .slip[data-reveal] { opacity: 1; transform: translateY(40%) rotate(var(--tilt, 0deg)); }
  .js .slip[data-reveal].is-in { transform: rotate(var(--tilt, 0deg)); }
  .slip:nth-child(2) { --tilt: -1.4deg; }
  .slip:nth-child(5) { --tilt: 1.2deg; }
  .js .promise__card[data-reveal] { opacity: 1; transform: translateY(60px) rotate(-4deg); }
  .js .promise__card[data-reveal].is-in { transform: rotate(-1.5deg); }
  @media (max-width: 860px) { .js .promise__card[data-reveal].is-in { transform: rotate(-1deg); } }
  .js .reply__card[data-reveal] { opacity: 1; transform: translateY(80px) rotate(6deg); }
  .js .reply__card[data-reveal].is-in { transform: rotate(2deg); }
  .js .hero__covers li { animation: shelve 900ms var(--ease-expo) both; animation-delay: calc(var(--i, 0) * 90ms + 300ms); }
  .js .spread__page > * { animation: rise 800ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms + 100ms); }
  .spread__picture img { animation: drift 26s var(--ease-soft) infinite alternate; }
}
@keyframes shelve { from { opacity: 0; transform: translateY(70%) rotate(0deg); } to { opacity: 1; transform: rotate(var(--r, 0deg)); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.07) translate(-1%, -1%); } }
@media (prefers-reduced-motion: reduce) {
  .sheet { position: relative; top: 0; }
}

/* Continuous ("squircle") corners, the curve Apple uses, where supported; a plain radius elsewhere. */
@supports (corner-shape: squircle) {
  :root { --radius-lg: 44px; --radius: 30px; --radius-sm: 18px; }
  @media (max-width: 860px) { :root { --radius-lg: 32px; --radius: 24px; } }
  .spread, .app, .hero__covers img, .hero__ledge, .mat, .mat__text, .slip, .moment img, .sheet, .sheet figure, .sheet__scene,
  .tile, .promise, .promise__card, .promise__card img, .questions, .questions__tall, .questions__square, .reply,
  .reply__card, .back__card, .back__stamp, .leaflet, .leaflet__head img, .leaflet .summary, .leaflet .contact {
    corner-shape: squircle;
  }
}

/* ---------- the two apps, side by side as the first thing on the page (owner: Pup's Day Out must not be hidden) ---------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); margin-inline: var(--margin); height: calc(100svh - 72px - 1.5rem); min-height: 34rem; max-height: 56rem; }
.duo { grid-template-rows: minmax(0, 1fr) auto; }
.app { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--paper); color: var(--paper-ink); min-height: 0; }
.app__picture { position: relative; min-height: 12rem; overflow: hidden; background: var(--surface); }
.app__picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; }
.app--game .app__picture { background: #8fc6ea; }
.app--game .app__picture img { object-position: 68% 55%; }
.app__text { align-content: start; padding: clamp(1.25rem, 2.6vw, 2.5rem); display: grid; gap: 0.75rem; }
.app__kicker { font-family: var(--font-display); font-weight: 700; color: var(--accent); font-size: var(--step-small); text-transform: uppercase; letter-spacing: 0.08em; }
.app--game .app__kicker { color: #b5502f; }
.app__text h2 { font-size: clamp(1.6rem, 1rem + 1.6vw, 2.75rem); font-weight: 900; }
.app__text p { max-width: 44ch; }
.app__text .hero__actions { margin-top: 0.5rem; }
.button.soon { background: var(--field-1); color: var(--field-1-ink); cursor: default; }
.button.soon:hover { background: var(--field-1); }
.button.soon:active { transform: none; }
@media (max-width: 860px) {
  .duo { grid-template-columns: 1fr; grid-template-rows: none; height: auto; max-height: none; min-height: 0; }
  .app { grid-row: auto; grid-template-rows: auto auto; }
  .app__picture { aspect-ratio: 16 / 10; min-height: 0; }
  .app__picture img { object-position: 80% 50%; }
}
@media (prefers-reduced-motion: no-preference) {
  .js .app__text > * { animation: rise 800ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms + 100ms); }
  .app__picture img { animation: drift 26s var(--ease-soft) infinite alternate; }
}
