/* GLN · 17 storybook — "A year at the Lins'" */

@font-face {
  font-family: "Young Serif";
  src: url(fonts/young-serif-400-latin.woff2) format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Playpen Sans";
  src: url(fonts/playpen-sans-300-800-latin.woff2) format("woff2");
  font-weight: 300 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* size-matched local stand-ins, measured against the webfonts */
@font-face { font-family: "Young Serif Stand-in"; src: local("Georgia"); size-adjust: 111.8%; ascent-override: 93.9%; descent-override: 33.1%; line-gap-override: 0%; }
@font-face { font-family: "Playpen Stand-in"; src: local("Trebuchet MS"); size-adjust: 107.4%; ascent-override: 108.9%; descent-override: 31.7%; line-gap-override: 0%; }

:root {
  --paper: #FFFFFF;
  --ink: #2B2A33;
  --ink-soft: #5C5A66;
  --sky: #9CC5D9;
  --leaf: #6FA36A;
  --mustard: #E3A92B;
  --plum: #5B3A5E;
  --rose: #E98A8A;
  --sky-wash: #E7F1F6;
  --mustard-wash: #F6DFA6;
  --rose-wash: #F5C6C1;
  --plum-wash: #ECE4EE;
  --err: #9B3340;

  /* 1px up to 1440 wide, growing to 1.5px at 2560: layout, display type, spacing */
  --u: clamp(1px, calc(0.357px + 0.04464vw), 1.5px);
  /* 1px up to 1440, 1.3px at 2560: running text */
  --t: clamp(1px, calc(0.6286px + 0.02579vw), 1.3px);
  --gut: max(20px, 5vw);

  --display: "Young Serif", "Young Serif Stand-in", Georgia, serif;
  --text: "Playpen Sans", "Playpen Stand-in", "Trebuchet MS", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-weight: 450;
  font-size: max(17px, calc(17 * var(--t)));
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
/* printed-paper grain over everything */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 100; pointer-events: none;
  background-image: url(img/paper-grain.png);
  background-image: image-set(url(img/paper-grain.webp) type("image/webp"), url(img/paper-grain.png) type("image/png"));
  background-size: 256px 256px;
  opacity: .9;
}
img, svg { display: block; max-width: 100%; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
a { color: inherit; }

.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 120; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 10px; text-decoration: none; }
.skip:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--plum); outline-offset: 4px; border-radius: 10px; }

/* ---------- buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: max(48px, calc(54 * var(--u)));
  padding: 0 calc(28 * var(--u));
  font: 650 max(17px, calc(17 * var(--t)))/1 var(--text);
  color: var(--ink); background: var(--mustard);
  border: 0;
  border-radius: 28px 20px 26px 18px / 20px 26px 18px 28px;
  box-shadow: 0 calc(4 * var(--u)) 0 var(--ink);
  text-decoration: none; cursor: pointer;
  transition: transform .2s cubic-bezier(.3, .7, .4, 1.5), box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px) rotate(-1.2deg); box-shadow: 0 calc(6 * var(--u)) 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); transition-duration: .06s; }
.btn-small { min-height: 44px; padding: 0 calc(18 * var(--u)); font-size: max(15px, calc(15 * var(--t))); box-shadow: 0 3px 0 var(--ink); }
.link {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 600; color: var(--plum);
  text-decoration: underline wavy var(--rose);
  text-decoration-thickness: 2px; text-underline-offset: .35em;
}
.link:hover { text-decoration-color: var(--plum); }

/* ---------- header ---------- */
.site-head {
  position: absolute; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(18 * var(--u)) var(--gut);
  pointer-events: none;
  transition: transform .5s cubic-bezier(.3, .7, .3, 1);
}
.site-head > * { pointer-events: auto; }
.wordmark {
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--display); font-size: max(26px, calc(32 * var(--u)));
  letter-spacing: .04em; color: var(--plum); text-decoration: none;
  transition: color .45s ease;
}
.motion .site-head { position: fixed; }
.hdr-hide .site-head { transform: translateY(-130%); }
@media (min-aspect-ratio: 1251/1000) { .hdr-night .site-head .wordmark { color: #fff; } }

/* ---------- spreads (shared) ---------- */
.spread { position: relative; background: var(--paper); overflow: hidden; }
.folio { display: none; }
.shade { position: absolute; inset: 0; z-index: 8; pointer-events: none; opacity: 0; }

/* the fold down the middle of a two-page spread */
@media (min-aspect-ratio: 1251/1000) {
  .spread::after, .page::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: 50%; z-index: 7;
    width: 8vw; transform: translateX(-50%); pointer-events: none;
    background: linear-gradient(90deg, rgba(43,42,51,0) 0%, rgba(43,42,51,.035) 38%, rgba(43,42,51,.1) 49.6%, rgba(255,255,255,.55) 50.4%, rgba(43,42,51,.03) 62%, rgba(43,42,51,0) 100%);
  }
  .back-cover::after { display: none; }
}

/* ---------- cover ---------- */
.spread-cover {
  min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center; column-gap: 4vw;
  padding: calc(92 * var(--u)) var(--gut) calc(48 * var(--u));
}
.cover-text { max-width: calc(660 * var(--u)); }
.title {
  font-size: max(42px, min(7.4vw, calc(112 * var(--u))));
  line-height: .98; color: var(--plum);
  margin-bottom: calc(22 * var(--u));
}
.title-art { display: block; }
.title .wd { display: inline-block; white-space: nowrap; }
.title .ch { display: inline-block; }
.title .br { display: block; }
.byline { font-weight: 600; color: var(--ink-soft); font-size: max(15px, calc(16 * var(--t))); margin-bottom: calc(14 * var(--u)); }
.sub { font-family: var(--display); font-size: max(19px, min(1.9vw, calc(26 * var(--u)))); line-height: 1.34; max-width: 22em; }
.cast { list-style: none; margin: calc(26 * var(--u)) 0 calc(30 * var(--u)); padding: 0; display: flex; flex-wrap: wrap; gap: calc(10 * var(--u)) calc(16 * var(--u)); }
.cast li { width: calc(80 * var(--u)); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; font-size: max(13px, calc(13.5 * var(--t))); line-height: 1.2; color: var(--ink-soft); }
.cast svg { width: calc(64 * var(--u)); height: calc(64 * var(--u)); overflow: visible; }
.cast li:last-child { width: calc(104 * var(--u)); }
.cast li:last-child svg { width: calc(104 * var(--u)); }
.eyes { fill: var(--ink); }
.cover-actions { display: flex; flex-wrap: wrap; align-items: center; gap: calc(14 * var(--u)) calc(26 * var(--u)); }
.cover-art { width: 100%; height: auto; max-height: calc(100svh - 150 * var(--u)); justify-self: center; overflow: visible; }
.corner {
  position: absolute; right: 0; bottom: 0; z-index: 9;
  width: calc(116 * var(--u)); height: calc(116 * var(--u));
  padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: 0;
}
.corner svg { width: 100%; height: 100%; transform-origin: 100% 100%; transition: transform .4s cubic-bezier(.3, .7, .3, 1.4); filter: drop-shadow(-3px -3px 6px rgba(43,42,51,.14)); }
.corner:hover svg, .corner:focus-visible svg { transform: scale(1.22); }
.corner:focus-visible { outline-offset: -6px; }

/* ---------- living room ---------- */
.room-art-wrap { position: relative; aspect-ratio: 16 / 9; }
.room-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.season-texts { padding: calc(20 * var(--u)) var(--gut) calc(60 * var(--u)); display: grid; gap: 0; }
.season {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); column-gap: 6vw; align-items: center;
  padding: calc(46 * var(--u)) 0; border-top: 2px dashed var(--plum-wash);
}
.season:first-child { border-top: 0; }
.season { grid-template-rows: auto auto; align-content: center; }
.season h2 { grid-column: 1; align-self: end; font-size: max(34px, min(4.6vw, calc(68 * var(--u)))); line-height: 1; margin-bottom: calc(16 * var(--u)); }
.season .story { grid-column: 1; align-self: start; font-family: var(--display); font-size: max(19px, min(2.05vw, calc(29.5 * var(--u)))); line-height: 1.34; max-width: 21em; margin: 0; }
.season-fig { grid-column: 2; grid-row: 1 / span 2; width: 100%; max-width: 340px; justify-self: center; }
.w { display: inline-block; }
.story, .season h2 { transition: color .5s ease; }

/* ---------- how it works ---------- */
.spread-how {
  min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); column-gap: 5vw; align-items: center;
  padding: calc(96 * var(--u)) var(--gut) calc(56 * var(--u));
}
.how-text h2 { font-size: max(32px, min(4.1vw, calc(62 * var(--u)))); line-height: 1.02; margin-bottom: calc(14 * var(--u)); max-width: 11em; }
.how-intro { font-family: var(--display); font-size: max(19px, min(1.8vw, calc(25 * var(--u)))); line-height: 1.3; margin-bottom: calc(22 * var(--u)); }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: calc(14 * var(--u)); max-width: 34em; }
.steps li { counter-increment: s; display: grid; grid-template-columns: calc(40 * var(--u)) minmax(0, 1fr); column-gap: calc(14 * var(--u)); align-items: start; font-size: max(16px, calc(17.5 * var(--t))); line-height: 1.45; }
.steps li::before {
  content: counter(s);
  width: calc(40 * var(--u)); height: calc(40 * var(--u)); border-radius: 50%;
  background: var(--mustard); color: var(--ink);
  display: grid; place-items: center;
  font-family: var(--display); font-size: calc(20 * var(--u)); line-height: 1; margin-top: -.15em;
}
.how-art { width: 100%; height: auto; max-height: calc(100svh - 160 * var(--u)); justify-self: center; }

/* ---------- normal pages after the book ---------- */
.page {
  position: relative; background: var(--paper);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  padding: calc(120 * var(--u)) 0 calc(110 * var(--u));
}
.page-l { padding: 0 6vw 0 var(--gut); }
.page-r { padding: 0 var(--gut) 0 6vw; }
.page h2 { font-size: max(32px, min(4vw, calc(58 * var(--u)))); line-height: 1.04; margin-bottom: calc(22 * var(--u)); }
.page p { max-width: 34em; }
.page-closer { border-top: 2px dashed var(--plum-wash); }
.page-closer .page-r h2 { margin-top: 0; }

.sum { display: flex; align-items: flex-end; flex-wrap: wrap; gap: calc(12 * var(--u)) calc(22 * var(--u)); margin: calc(30 * var(--u)) 0 calc(34 * var(--u)); }
.sum-item { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sum-item svg { height: calc(150 * var(--u)); width: auto; }
.sum-result svg { height: calc(104 * var(--u)); margin-bottom: calc(8 * var(--u)); overflow: visible; }
.sum-item figcaption { font-size: max(15px, calc(15.5 * var(--t))); color: var(--ink-soft); text-align: center; line-height: 1.25; }
.sum-item b { display: block; font-family: var(--display); font-weight: 400; font-size: max(24px, calc(30 * var(--u))); color: var(--ink); }
.sum .op { font-family: var(--display); font-size: max(20px, calc(24 * var(--u))); color: var(--plum); margin: 0 0 calc(40 * var(--u)); }

.panel-spec { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.2fr); gap: calc(30 * var(--u)); align-items: center; margin: calc(8 * var(--u)) 0 calc(18 * var(--u)); }
.spec-art { width: 100%; max-width: calc(300 * var(--u)); height: auto; }
.spec { margin: 0; display: grid; gap: 0; }
.spec div { display: grid; grid-template-columns: calc(96 * var(--u)) minmax(0, 1fr); gap: calc(12 * var(--u)); padding: calc(10 * var(--u)) 0; border-bottom: 2px dashed var(--plum-wash); }
.spec dt { color: var(--ink-soft); }
.spec dd { margin: 0; font-weight: 600; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.swatches span { display: inline-flex; align-items: center; gap: 8px; }
.swatches i { width: 1.1em; height: 1.1em; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px rgba(43,42,51,.35); }
.note { font-size: max(14px, calc(14.5 * var(--t))); color: var(--ink-soft); }
.facts { list-style: none; margin: calc(20 * var(--u)) 0 0; padding: 0; display: grid; gap: calc(12 * var(--u)); max-width: 34em; }
.facts li { position: relative; padding-left: calc(44 * var(--u)); }
.facts li::before {
  content: ""; position: absolute; left: 0; top: .05em;
  width: calc(30 * var(--u)); height: calc(30 * var(--u)); border-radius: 46% 54% 50% 50%;
  background: var(--leaf) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M8 15.5l4.6 4.5L22 10' fill='none' stroke='%23FFFFFF' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

/* visit */
.page-visit { border-top: 2px dashed var(--plum-wash); }
.lead { font-family: var(--display); font-size: max(20px, min(2vw, calc(28 * var(--u)))); line-height: 1.34; }
.shop { width: 100%; max-width: calc(560 * var(--u)); height: auto; margin: calc(26 * var(--u)) 0; }
.visit-info { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: calc(28 * var(--u)); align-items: start; }
address { font-style: normal; line-height: 1.6; }
address a { display: inline-block; padding: 6px 0; color: var(--plum); font-weight: 600; }
blockquote { margin: 0; padding: calc(18 * var(--u)) calc(22 * var(--u)); background: var(--mustard-wash); border-radius: 22px 30px 26px 18px / 18px 22px 30px 26px; transform: rotate(-1.2deg); }
blockquote p { font-family: var(--display); font-size: max(18px, calc(20 * var(--u))); line-height: 1.35; margin-bottom: .5em; }
blockquote footer { font-size: max(14px, calc(14.5 * var(--t))); color: var(--ink-soft); }

.visit-form { max-width: calc(560 * var(--u)); }
.form-intro { font-family: var(--display); font-size: max(20px, calc(24 * var(--u))); line-height: 1.3; margin-bottom: calc(26 * var(--u)); }
.field { margin: 0 0 calc(22 * var(--u)); border: 0; padding: 0; min-width: 0; }
.field > label, .field legend { display: block; font-weight: 650; margin-bottom: 6px; padding: 0; }
.opt { font-weight: 450; color: var(--ink-soft); }
input[type="text"], input[type="tel"], select, textarea {
  width: 100%; min-height: 50px;
  font: 450 max(17px, calc(18 * var(--t)))/1.4 var(--text); color: var(--ink);
  background: var(--sky-wash);
  border: 0; border-bottom: 3px solid var(--ink); border-radius: 14px 14px 0 0;
  padding: 11px 14px;
  transition: border-color .2s, background-color .2s;
}
textarea { resize: vertical; min-height: 110px; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%232B2A33' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 20px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--plum); outline-offset: 3px; border-radius: 14px 14px 0 0; background-color: #fff; }
[aria-invalid="true"] { border-bottom-color: var(--err) !important; }
.err { color: var(--err); font-weight: 600; font-size: max(15px, calc(15 * var(--t))); margin: 8px 0 0; }
.choice { display: flex; flex-wrap: wrap; gap: 10px; }
.choice legend { width: 100%; }
.choice label { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px;
  border: 2.5px solid var(--ink); border-radius: 24px 18px 22px 16px / 16px 22px 18px 24px;
  background: #fff; transition: background-color .2s, transform .2s cubic-bezier(.3,.7,.4,1.5);
}
.choice input:checked + span { background: var(--mustard); transform: rotate(-1.5deg); }
.choice input:focus-visible + span { outline: 3px solid var(--plum); outline-offset: 3px; }
.visit-form .btn { margin-top: calc(6 * var(--u)); }
.small { font-size: max(14px, calc(14.5 * var(--t))); color: var(--ink-soft); margin-top: calc(18 * var(--u)); }
.form-done { max-width: calc(560 * var(--u)); padding: calc(30 * var(--u)); background: var(--mustard-wash); border-radius: 30px 22px 34px 24px / 24px 34px 22px 30px; }
.form-done h3 { font-size: max(28px, calc(40 * var(--u))); line-height: 1.1; margin-bottom: .4em; }
.form-done:focus-visible { outline-offset: 6px; }

/* ---------- back cover ---------- */
.back-cover {
  position: relative; background: var(--plum); color: #fff;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 6vw; align-items: end;
  padding: calc(110 * var(--u)) var(--gut) calc(84 * var(--u));
}
.end { display: flex; align-items: flex-end; gap: calc(20 * var(--u)); }
.the-end { font-family: var(--display); font-size: max(56px, min(8.4vw, calc(128 * var(--u)))); line-height: .9; color: var(--mustard-wash); margin: 0 0 calc(10 * var(--u)); }
.end-cat { width: calc(250 * var(--u)); height: auto; flex: 0 0 auto; overflow: visible; }
.colophon p { max-width: 34em; }
.back-cover .wordmark-end { color: #FFFFFF; }
.wordmark-end { font-family: var(--display); font-size: max(40px, calc(56 * var(--u))); line-height: 1; letter-spacing: .04em; margin-bottom: .3em; }
.end-nav { display: flex; flex-wrap: wrap; gap: 6px 26px; margin: 0 0 calc(22 * var(--u)); }
.end-nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; text-decoration: underline wavy var(--mustard); text-decoration-thickness: 2px; text-underline-offset: .35em; }
.demo { font-size: max(14.5px, calc(15 * var(--t))); color: #E7E0E8; margin-bottom: .45em; }
.back-cover :focus-visible { outline-color: var(--mustard); }

/* ---------- SVG bits that animate ---------- */
.lids, .eyes, .breath, .mei-legs, .ring, .puff, .prop, .zzz text, .rays, .end-tail, .tail-tip, .pop, .pane-g { transform-box: fill-box; }
.lids, .eyes { transform-origin: 50% 50%; }
.breath { transform-origin: 50% 100%; }
.mei-legs { transform-origin: 50% 0; }
.ring, .puff, .zzz text, .rays, .prop, .pop { transform-origin: 50% 50%; }
.prop { transform-origin: 50% 100%; }
.tail-tip { transform-origin: 100% 100%; }
.end-tail { transform-origin: 0% 100%; }
.hand-h, .hand-m { transform-box: view-box; transform-origin: 0 0; }
.sv-live .fx-static { display: none; }

/* ================= Motion layout: the pinned book ================= */
.motion .book { position: relative; height: var(--book-h, 1100vh); }
.motion .stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  perspective: max(1800px, 240vw); perspective-origin: 50% 50%;
}
.motion .spread { position: absolute; inset: 0; min-height: 0; transform-origin: 0 50%; backface-visibility: hidden; }
.motion .spread.is-turning { will-change: transform; box-shadow: 0 0 calc(70 * var(--u)) rgba(43,42,51,.24); }
.motion .spread-cover { z-index: 3; }
.motion .spread-room { z-index: 2; padding: 0; }
.motion .spread-how { z-index: 1; }
.motion .room-art-wrap { position: absolute; inset: 0; aspect-ratio: auto; }
.motion .season-texts {
  position: absolute; z-index: 5; display: block; padding: 0;
  left: 5.6vw; top: max(96px, 10.5svh);
  width: min(40vw, calc(640 * var(--u)));
}
.motion .season { position: absolute; top: 0; left: 0; right: 0; display: block; padding: 0; border: 0; pointer-events: none; }
.motion .season-fig { display: none; }
.motion .folio { display: block; position: absolute; z-index: 5; bottom: calc(18 * var(--u)); margin: 0; font-size: max(14px, calc(15 * var(--t))); color: var(--ink-soft); }
.motion .folio-l { left: var(--gut); }
.motion .folio-r { right: var(--gut); }
.motion .spread-room .folio { color: #6B5A45; }
@media (min-aspect-ratio: 1251/1000) {
  .motion .spread-room.is-night .season { color: #FFFFFF; }
}

/* portrait screens: picture on top, words underneath */
@media (max-aspect-ratio: 5/4) {
  .spread-cover, .spread-how { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: calc(18 * var(--u)); padding-top: calc(78 * var(--u)); }
  .cover-text { max-width: none; }
  .cover-art, .how-art { flex: 1 1 auto; min-height: 0; max-height: none; height: 100%; width: 100%; }
  .motion .room-art-wrap { top: 62px; bottom: auto; height: calc(50% - 34px); }
  .motion .season-texts { left: var(--gut); right: var(--gut); width: auto; top: calc(50% + 46px); }
  .season { grid-template-columns: minmax(0, 1fr); }
  .season-fig { grid-column: 1; grid-row: auto; max-width: 300px; margin-top: 20px; justify-self: start; }
}
@media (max-aspect-ratio: 5/4) and (min-width: 700px) {
  .spread-cover { padding-left: 8vw; padding-right: 8vw; }
  .title { font-size: 9vw; }
}

/* ---------- smaller screens ---------- */
@media (max-width: 900px) {
  .page { grid-template-columns: minmax(0, 1fr); row-gap: 64px; padding: 80px 0 72px; }
  .page-l, .page-r { padding: 0 var(--gut); }
  .back-cover { grid-template-columns: minmax(0, 1fr); row-gap: 40px; padding-top: 72px; }
  .visit-info { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .spread-cover { padding-top: 72px; padding-bottom: 20px; gap: 12px; }
  .title { font-size: 44px; margin-bottom: 10px; }
  .byline { font-size: 15px; margin-bottom: 8px; }
  .sub { font-size: 18px; margin-bottom: 0; }
  .cast { margin: 14px 0 16px; gap: 6px; flex-wrap: nowrap; }
  .cast li { width: 50px; flex: 0 0 auto; font-size: 12.5px; }
  .cast li:nth-child(4) { width: 70px; }
  .cast svg { width: 44px; height: 44px; }
  .cast li:last-child, .cast li:last-child svg { width: 64px; }
  .cover-actions { gap: 4px 20px; }
  .cover-actions .link { display: none; }
  .byline { font-size: 13.5px; }
  .corner { width: 76px; height: 76px; }
  .spread-how { padding-top: 70px; padding-bottom: 20px; gap: 10px; }
  .how-text h2 { font-size: 28px; }
  .how-intro { font-size: 17px; margin-bottom: 10px; }
  .steps { gap: 7px; }
  .steps li { font-size: 16px; line-height: 1.36; grid-template-columns: 28px minmax(0, 1fr); column-gap: 10px; }
  .steps li::before { width: 28px; height: 28px; font-size: 15px; }
  .season h2 { font-size: 32px; margin-bottom: 8px; }
  .season .story { font-size: 19px; }
  .panel-spec { grid-template-columns: minmax(0, 1fr); }
  .spec-art { max-width: 220px; }
  .sum { gap: 10px 14px; }
  .sum-item svg { height: 118px; }
  .sum-result svg { height: 84px; }
  .end { flex-wrap: wrap; }
  .end-cat { width: 190px; }
}
@media (max-width: 600px) and (max-height: 700px) {
  .sub { display: none; }
}
/* very short landscape windows (phones on their side) */
@media (max-height: 560px) and (min-aspect-ratio: 1251/1000) {
  .title { font-size: 40px; }
  .sub, .cast { display: none; }
  .season h2 { font-size: 26px; }
  .season .story { font-size: 16px; }
  .motion .season-texts { top: 64px; }
  .how-text h2 { font-size: 26px; }
  .steps li { font-size: 14px; }
  .how-intro { display: none; }
}

/* ================= Intro (first screen, CSS only, starts from an inline class) ================= */
.intro .title .ch { animation: drop .62s cubic-bezier(.2, .9, .3, 1.25) both; animation-delay: calc(110ms + var(--i) * 24ms); animation-play-state: paused; }
.intro.fonts-go .title .ch { animation-play-state: running; }
.intro .c-frame { animation: pop .62s cubic-bezier(.2, .8, .2, 1.08) .04s both; transform-box: fill-box; transform-origin: 50% 60%; }
.intro .c-curtains { animation: settle .8s cubic-bezier(.2, .8, .2, 1) .08s both; }
.intro .pane-g { animation: paint .68s cubic-bezier(.3, .6, .2, 1) both; }
.intro .pane-g:nth-child(1) { animation-delay: .16s; }
.intro .pane-g:nth-child(2) { animation-delay: .28s; }
.intro .pane-g:nth-child(3) { animation-delay: .40s; }
.intro .pane-g:nth-child(4) { animation-delay: .52s; }
.intro .c-sill { animation: settle .5s ease-out .3s both; }
.intro .c-cat .pop { animation: popin .6s cubic-bezier(.3, .7, .3, 1.5) .62s both; transform-origin: 50% 100%; }
.intro .c-cup .pop { animation: popin .5s cubic-bezier(.3, .7, .3, 1.5) .72s both; transform-origin: 50% 100%; }
.intro .c-jar .pop { animation: popin .5s cubic-bezier(.3, .7, .3, 1.5) .8s both; transform-origin: 50% 100%; }
.intro .byline { animation: rise .55s cubic-bezier(.2, .8, .2, 1) .46s both; }
.intro .sub { animation: rise .55s cubic-bezier(.2, .8, .2, 1) .56s both; }
.intro .cast li { animation: rise .5s cubic-bezier(.2, .8, .2, 1.2) both; }
.intro .cast li:nth-child(1) { animation-delay: .66s; }
.intro .cast li:nth-child(2) { animation-delay: .71s; }
.intro .cast li:nth-child(3) { animation-delay: .76s; }
.intro .cast li:nth-child(4) { animation-delay: .81s; }
.intro .cast li:nth-child(5) { animation-delay: .86s; }
.intro .cover-actions { animation: rise .55s cubic-bezier(.2, .8, .2, 1) .9s both; }
.intro .corner { animation: rise .5s cubic-bezier(.2, .8, .2, 1) 1.05s both; }
@keyframes drop { from { opacity: 0; transform: translateY(-.3em) rotate(-8deg); } 55% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes settle { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes popin { from { opacity: 0; transform: translateY(8px) scale(.6); } to { opacity: 1; transform: none; } }
@keyframes paint { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }

/* ================= Reduced motion: a plain stacked book ================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- language switch: EN / 中文 ---------- */
.lang { display: flex; align-items: center; margin-left: auto; margin-right: calc(12 * var(--u)); font-size: max(15px, calc(15 * var(--t))); font-weight: 600; color: var(--ink-soft); }
.lang__btn { min-width: 44px; min-height: 44px; padding: 0 6px; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; border-radius: 10px; }
.lang__btn[lang="zh-CN"] { font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC", sans-serif; }
.lang__btn[aria-pressed="true"] { color: var(--plum); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.lang__btn:hover { color: var(--plum); }
.lang__btn:focus-visible { outline: 3px solid var(--mustard); outline-offset: 1px; }
.lang__sep { opacity: .5; }
@media (min-aspect-ratio: 1251/1000) { .hdr-night .site-head .lang { color: #fff; } .hdr-night .site-head .lang__btn[aria-pressed="true"] { color: #fff; } }
@media (max-width: 420px) { .lang { margin-right: 4px; } .lang__btn { padding: 0 2px; } }

/* ---------- Chinese ---------- */
:lang(zh) {
  --display: "Young Serif", "Noto Sans SC", "Noto Sans SC Fallback", sans-serif;
  --text: "Playpen Sans", "Noto Sans SC", "Noto Sans SC Fallback", sans-serif;
}
:lang(zh) body { line-height: 1.8; }
:lang(zh) h1, :lang(zh) h2, :lang(zh) h3 { letter-spacing: 0; line-height: 1.3; text-wrap: balance; }
:lang(zh) p, :lang(zh) li, :lang(zh) blockquote { text-wrap: pretty; }
:lang(zh) i, :lang(zh) em { font-style: normal; }
:lang(zh) .title { font-size: max(40px, min(6.4vw, calc(96 * var(--u)))); line-height: 1.12; }
:lang(zh) .sub, :lang(zh) .how-intro, :lang(zh) .lead, :lang(zh) .form-intro { font-size: max(17px, min(1.6vw, calc(22 * var(--u)))); line-height: 1.6; }
:lang(zh) .season .story { font-size: max(17px, min(1.75vw, calc(25 * var(--u)))); line-height: 1.6; max-width: 20em; }
:lang(zh) blockquote p { line-height: 1.6; }
:lang(zh) .the-end { line-height: 1.1; }
@media (max-width: 600px) {
  :lang(zh) .title { font-size: 40px; }
  :lang(zh) .season .story { font-size: 17px; }
}
@media (max-width: 600px) and (max-height: 700px) { :lang(zh) .season .story { font-size: 15px; } }
:lang(zh) .season h2 { font-size: max(30px, min(3.9vw, calc(58 * var(--u)))); }
:lang(zh) .how-text h2 { font-size: max(28px, min(3.4vw, calc(52 * var(--u)))); max-width: 10em; }
:lang(zh) .page h2 { font-size: max(28px, min(3.4vw, calc(50 * var(--u)))); }
@media (max-width: 900px) { :lang(zh) .how-text h2 { font-size: 26px; } :lang(zh) .season h2 { font-size: 28px; } }
@media (max-width: 600px) and (max-height: 700px) { :lang(zh) .season h2, :lang(zh) .how-text h2 { font-size: 24px; } }
