/* Hallmark · shape: Photographic (with a pinned book) · genre: atmospheric · theme: Spore (deal 1/3, seed royal-society-private-social-6c31·67ffafb7·2026-10-28·r0) · job: join · draw: manual
 * hero: Stage, copy left and a lamp-lit photograph right · nav: wordmark and one action · footer: the name at full width · imagery: generated photographs (gpt-image) and the real book pages · signature: THE ROYAL CODE opens page by page as the four gifts are read · spore: head-torch, ochre for gold
 * axes: dark/roman-serif/warm · posture: committed · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P3 H3 E3 S4 R3 V3 · weakest: copy volume (user's approved copy kept whole), split across screens so no screen carries more than one idea */
/* waive 58: the copy is the user's approved final text; it is kept in full and paced one block per screen */
/* waive 23: the reading time is the gift's one figure; it takes the gold as a price would */
/* waive spore-motion: the user asked for GSAP scroll scenes; motion is limited to the film strip, the book and one entrance per block */
@import url("./tokens.css");
@import url("./base.css");

:root {
  --nav-h: 76px;
  --photo-ring: inset 0 0 0 1px oklch(94% 0.03 85 / 0.08);
  --scrim: oklch(13% 0.009 60 / 0.6);
  --ease-ui: cubic-bezier(0.23, 1, 0.32, 1);
  --color-ink-wash: oklch(94% 0.03 85 / 0.06);
  --color-rule-strong: oklch(40% 0.02 60);
  --shadow-page: 0 30px 60px oklch(6% 0.01 60 / 0.55);
  --color-spine: oklch(8% 0.01 60 / 0.35);
}

body { font-size: 1.0625rem; letter-spacing: -0.01em; word-break: keep-all; }
.serif { font-family: var(--font-outlier); font-weight: 400; letter-spacing: -0.01em; }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); }
.section { padding-block: var(--section-gap); }

/* type */
h1 { font-size: clamp(2.375rem, 4.2vw + 0.5rem, 4.5rem); line-height: 1.12; max-width: 13ch; }
h2 { font-size: clamp(1.875rem, 2.4vw + 0.75rem, 3.25rem); line-height: 1.18; max-width: 18ch; }
h3 { font-size: var(--text-title); line-height: 1.35; font-weight: 600; letter-spacing: -0.02em; }
.lead { font-size: clamp(1.25rem, 0.9vw + 0.95rem, 1.75rem); line-height: 1.45; color: var(--color-ink); letter-spacing: -0.02em; max-width: 26ch; }
.body { color: var(--color-ink-2); max-width: 40ch; }
.body + .body { margin-top: var(--space-md); }
.body strong { color: var(--color-ink); font-weight: 600; }
.small { font-size: var(--text-sm); color: var(--color-muted); }

/* photographs */
.photo { position: relative; overflow: hidden; border-radius: var(--radius-card); background: var(--color-paper-2); }
.photo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: var(--photo-ring); pointer-events: none; }
.photo img { width: 100%; height: 100%; object-fit: cover; }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 52px; padding: 0 var(--space-lg); border-radius: var(--radius-pill); font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; cursor: pointer; border: 0;
  transition: background-color var(--dur-short) var(--ease-ui), color var(--dur-short) var(--ease-ui), box-shadow var(--dur-short) var(--ease-ui), transform 160ms var(--ease-ui); }
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--color-accent); color: var(--color-accent-ink); }
.btn--primary:hover { background: var(--color-accent-2); }
.btn--secondary { background: transparent; color: var(--color-ink); box-shadow: inset 0 0 0 1.5px var(--color-ink-2); }
.btn--secondary:hover { box-shadow: inset 0 0 0 1.5px var(--color-ink); background: var(--color-ink-wash); }
.btn--small { min-height: 40px; padding: 0 var(--space-md); font-size: var(--text-sm); }
.nowrap { white-space: nowrap; }
.btn--wide { white-space: normal; text-align: center; padding-block: var(--space-sm); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; transition: none; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; }
.link { color: var(--color-ink); text-decoration: underline; text-decoration-color: var(--color-muted); transition: text-decoration-color var(--dur-short) var(--ease-ui); }
.link:hover { text-decoration-color: var(--color-accent); }

/* nav */
.nav { position: relative; z-index: var(--z-raised); }
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); height: var(--nav-h); }
.brand { display: flex; align-items: baseline; gap: var(--space-sm); text-decoration: none; min-width: 0; }
.brand .serif { font-size: 1.375rem; color: var(--color-ink); white-space: nowrap; }
.brand .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* hero */
.hero { padding-top: var(--space-md); padding-bottom: var(--section-gap-s); }
.hero .grid { align-items: center; row-gap: var(--space-xl); }
.hero-copy { grid-column: 1 / span 6; display: grid; gap: var(--space-lg); }
.hero-copy .lead { max-width: 28ch; }
.hero-copy .body { max-width: 38ch; }
.hero-photo { grid-column: 8 / span 5; aspect-ratio: 2 / 3; max-height: calc(100svh - var(--nav-h) - 32px); width: 100%; justify-self: end; }
.hero-photo img { object-position: 50% 40%; }

/* scene */
.scene-head { display: grid; gap: var(--space-lg); margin-bottom: var(--space-2xl); }
.scene-head h2 { max-width: 20ch; }
.scene-head .grid > :first-child { grid-column: 1 / span 6; }
.scene-head .grid > :last-child { grid-column: 8 / span 5; align-self: end; }
.strip { display: grid; gap: var(--space-3xl); }
.frame { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); align-items: end; }
.frame .photo { grid-column: 1 / span 7; aspect-ratio: 3 / 2; }
.frame--tall .photo { grid-column: 1 / span 5; aspect-ratio: 2 / 3; }
.frame-text { grid-column: 9 / span 4; display: grid; gap: var(--space-md); padding-bottom: var(--space-sm); }
.frame--tall .frame-text { grid-column: 7 / span 5; }
.frame-text .body { max-width: 34ch; }
.frame-text h3 { font-size: clamp(1.375rem, 1vw + 1rem, 1.875rem); line-height: 1.3; }

/* horizontal film strip, switched on by script on wide screens */
.strip.is-h { display: flex; gap: var(--space-3xl); width: max-content; padding-right: var(--gutter); }
.strip.is-h .frame { display: flex; align-items: flex-end; gap: var(--space-2xl); flex: none; }
.strip.is-h .frame .photo { height: min(72svh, 700px); width: auto; flex: none; }
.strip.is-h .frame-text { width: 340px; flex: none; }
.pin-h { overflow: hidden; }
.pin-h.is-pinned { height: 100svh; display: flex; flex-direction: column; justify-content: center; }

/* easy start */
.easy .grid { row-gap: var(--space-xl); }
.easy-head { grid-column: 1 / span 5; display: grid; gap: var(--space-lg); align-content: start; position: sticky; top: var(--space-2xl); }
.easy-body { grid-column: 7 / span 6; display: grid; gap: var(--space-xl); }
.promises { list-style: none; margin: 0; padding: 0; }
.promises li { padding-block: var(--space-lg); border-top: var(--rule-hair) solid var(--color-rule); font-size: clamp(1.25rem, 0.8vw + 1rem, 1.625rem); font-weight: 600; letter-spacing: -0.02em; color: var(--color-ink); }
.promises li:last-child { border-bottom: var(--rule-hair) solid var(--color-rule); }
.statement { font-size: clamp(1.25rem, 0.8vw + 1rem, 1.625rem); line-height: 1.5; color: var(--color-ink); letter-spacing: -0.02em; max-width: 30ch; }
.easy-photo { grid-column: 1 / -1; aspect-ratio: 21 / 9; margin-top: var(--space-2xl); }

/* filter */
.band { background: var(--color-paper-3); color: var(--color-ink); }
.filter .grid { row-gap: var(--space-xl); }
.filter-head { grid-column: 1 / span 5; display: grid; gap: var(--space-lg); align-content: start; }
.filter-rows { grid-column: 7 / span 6; margin: 0; }
.filter-rows > div { padding-block: var(--space-xl); border-top: var(--rule-hair) solid var(--color-rule-strong); display: grid; gap: var(--space-sm); }
.filter-rows > div:last-child { border-bottom: var(--rule-hair) solid var(--color-rule-strong); }
.filter-rows dt { font-size: clamp(1.25rem, 0.8vw + 1rem, 1.625rem); font-weight: 600; letter-spacing: -0.02em; color: var(--color-ink); }
.filter-rows dd { margin: 0; color: var(--color-ink-2); max-width: 46ch; }
.filter-rows dd strong { color: var(--color-ink); font-weight: 600; }

/* gift */
.gift-intro { display: grid; gap: var(--space-xl); margin-bottom: var(--space-3xl); }
.gift-intro .grid { row-gap: var(--space-xl); align-items: center; }
.gift-intro-copy { grid-column: 1 / span 8; display: grid; gap: var(--space-lg); }
.gift-intro-copy h2 { font-size: clamp(1.75rem, 1.6vw + 1rem, 2.625rem); max-width: none; text-wrap: wrap; }
.gift-intro-copy h2 .line { display: block; }
.gift-intro-copy .lead { max-width: 32ch; }
.gift-intro-copy h2 .serif { white-space: nowrap; }
.book-still { grid-column: 9 / span 4; aspect-ratio: 4 / 5; }

.reader { position: relative; }
.reader .grid { align-items: center; row-gap: var(--space-xl); }
.reader-list { grid-column: 1 / span 6; }
.reader-list h3 { font-size: var(--text-md); font-weight: 500; color: var(--color-muted); margin-bottom: var(--space-md); }
.gifts { list-style: none; margin: 0; padding: 0; }
.gifts li { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: var(--space-lg); padding-block: var(--space-lg); border-top: var(--rule-hair) solid var(--color-rule); transition: opacity var(--dur-long) var(--ease-ui); }
.gifts li:last-child { border-bottom: var(--rule-hair) solid var(--color-rule); }
.gifts .thumb { width: 88px; aspect-ratio: 3 / 4; border-radius: 6px; }
.gifts .gift-name { font-size: clamp(1.25rem, 0.8vw + 1rem, 1.625rem); font-weight: 600; letter-spacing: -0.02em; color: var(--color-ink); margin-bottom: var(--space-2xs); }
.gifts p:not(.gift-name) { color: var(--color-ink-2); }
.book { grid-column: 8 / span 5; position: relative; aspect-ratio: 3 / 4; perspective: 1800px; display: none; }
.book .page { position: absolute; inset: 0; border-radius: 4px 10px 10px 4px; overflow: hidden; transform-origin: left center; backface-visibility: hidden; box-shadow: var(--shadow-page); will-change: transform; }
.book .page img { width: 100%; height: 100%; object-fit: cover; }
.book .page::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 18px; background: linear-gradient(90deg, var(--color-spine), transparent); z-index: 1; pointer-events: none; }
.reader.is-book .book { display: block; }
.reader.is-book .gifts .thumb { display: none; }
.reader.is-book .gifts li { grid-template-columns: minmax(0, 1fr); opacity: 0.38; }
.reader.is-book .gifts li.is-on { opacity: 1; }
.reader.is-pinned { min-height: 100svh; display: flex; align-items: center; }
.reader.is-pinned > .container { width: 100%; }

.time { margin-top: var(--space-3xl); }
.time .grid { align-items: end; row-gap: var(--space-lg); }
.time-figure { grid-column: 1 / span 5; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: var(--space-xs); color: var(--color-ink); }
.time-figure .serif { font-size: clamp(7rem, 14vw, 13rem); line-height: 0.8; color: var(--color-accent); font-variant-numeric: lining-nums; }
.time-figure span:last-child { font-size: clamp(1.5rem, 2vw, 2.25rem); font-weight: 600; }
.time-copy { grid-column: 6 / span 7; display: grid; gap: var(--space-md); }
.time-copy .statement { max-width: 34ch; }

.howto { margin-top: var(--space-3xl); background: var(--color-paper-2); border-radius: var(--radius-card); padding: var(--space-2xl); }
.howto .grid { row-gap: var(--space-xl); }
.howto-head { grid-column: 1 / span 4; display: grid; gap: var(--space-sm); align-content: start; }
.howto-head h3 { font-size: clamp(1.375rem, 1vw + 1rem, 1.875rem); }
.steps { grid-column: 5 / span 8; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-columns); }
.steps li { display: grid; gap: var(--space-sm); align-content: start; }
.steps .serif { font-size: 2.5rem; line-height: 1; color: var(--color-accent); }
.steps p { color: var(--color-ink-2); }
.steps strong { color: var(--color-ink); font-weight: 600; }

/* closing */
.closing .grid { align-items: center; row-gap: var(--space-xl); }
.closing-photo { grid-column: 1 / span 5; aspect-ratio: 2 / 3; max-height: 88svh; width: 100%; }
.closing-photo img { transform-origin: 50% 45%; }
.closing-copy { grid-column: 7 / span 6; display: grid; gap: var(--space-lg); justify-items: start; }
.closing-copy .btn { min-height: 60px; font-size: 1.0625rem; padding-inline: var(--space-xl); }

/* footer */
.footer { padding-top: var(--section-gap-s); padding-bottom: calc(var(--space-xl) + env(safe-area-inset-bottom)); }
.footer-name { font-family: var(--font-outlier); font-size: clamp(3.5rem, 13.5vw, 13rem); line-height: 0.9; letter-spacing: -0.03em; color: var(--color-ink); margin: 0 0 var(--space-xl); }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-sm) var(--space-xl); color: var(--color-muted); font-size: var(--text-sm); }

/* sticky mobile action */
.dock { display: none; }

@media (max-width: 60rem) {
  .hero-copy, .hero-photo, .scene-head .grid > :first-child, .scene-head .grid > :last-child,
  .easy-head, .easy-body, .filter-head, .filter-rows, .gift-intro-copy, .book-still, .reader-list,
  .time-figure, .time-copy, .howto-head, .steps, .closing-photo, .closing-copy { grid-column: 1 / -1; }
  .frame .photo, .frame--tall .photo, .frame-text, .frame--tall .frame-text { grid-column: 1 / -1; }
  .frame { row-gap: var(--space-lg); }
  .frame--tall .photo { aspect-ratio: 4 / 5; }
  .easy-head { position: static; }
  .hero-photo { max-height: none; }
  .book-still { max-width: 560px; }
  .closing-photo { max-width: 560px; }
}

@media (max-width: 40rem) {
  :root { --nav-h: 60px; }
  .brand .small { display: none; }
  .hero { padding-top: 0; }
  .hero .grid { row-gap: var(--space-lg); }
  .hero-photo { order: -1; aspect-ratio: 4 / 5; max-height: 46svh; }
  .hero-copy { gap: var(--space-md); }
  .hero-copy .actions .btn { flex: 1 1 100%; }
  .strip { gap: var(--space-2xl); }
  .easy-photo { aspect-ratio: 4 / 3; margin-top: var(--space-lg); }
  .howto { padding: var(--space-xl) var(--space-lg); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li { grid-template-columns: 44px minmax(0, 1fr); align-items: baseline; }
  .closing-copy .btn { width: 100%; }
  .gifts li { grid-template-columns: 72px minmax(0, 1fr); gap: var(--space-md); }
  .gifts .thumb { width: 72px; }
  .dock { display: block; position: fixed; inset: auto 0 0 0; z-index: var(--z-sticky); padding: var(--space-sm) var(--gutter) calc(var(--space-sm) + env(safe-area-inset-bottom)); background: var(--color-paper); box-shadow: 0 -1px 0 var(--color-rule); transition: transform var(--dur-long) var(--ease-ui); }
  .dock .btn { width: 100%; }
  .dock.is-away { transform: translateY(110%); }
  .footer { padding-bottom: calc(var(--space-3xl) + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .dock { transition: none; }
  .btn:active { transform: none; }
}
