/* The Lunchbox Storybook. Platform-native CSS, no libraries.
   Scroll scenes read custom properties that app.js writes:
   --p pinned progress, --a hero scatter, --q intro lighting, --v intro visibility, --e opener entry. */

:root {
  --paper: #f6eedc;
  --ink: #2a2320;
  --tomato: #cf3f2a;
  --mustard: #f0b93b;
  --teal: #2f8f8a;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --mono: "Courier Prime", "Courier New", monospace;
  --spring: linear(0, 0.009, 0.281 6.7%, 0.723 12.9%, 1.077, 1.149 24.3%, 1.163, 1.154 29.9%, 1.009 41.1%, 0.915 53%, 0.95 68.7%, 1.013 89.5%, 1);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --bar-h: 52px;

  /* era backgrounds, named so each opener can show the previous one behind its iris */
  --bg-intro: var(--paper);
  --bg-50s: #f3ead6; --bg-60s: #f4d98c; --bg-70s: #ead9bd; --bg-80s: #16153a;
  --bg-90s: #dff0ea; --bg-00s: #dfe5ee; --bg-10s: #f6efe8;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--bar-h); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--serif); font-size: 17px; line-height: 1.55; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
em { font-style: italic; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

.skip { position: fixed; left: 12px; top: -80px; z-index: 100; background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: 6px; }
.skip:focus { top: 8px; }

.eyebrow { font-family: var(--mono); font-size: .8rem; letter-spacing: .22em; text-transform: uppercase; color: var(--accent, var(--tomato)); }

/* ---------- top bar and chapter rail ---------- */
.bar { position: fixed; inset: 0 0 auto 0; height: var(--bar-h); z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 clamp(14px, 3vw, 32px); background: rgba(246, 238, 220, .94); border-bottom: 1px solid rgba(42, 35, 32, .12); font-family: var(--mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.bar__mark { text-decoration: none; font-weight: 700; white-space: nowrap; }
.bar__where { color: #6d6258; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar__progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; }
.bar__progress i { display: block; height: 100%; background: var(--tomato); transform-origin: left; transform: scaleX(var(--scroll, 0)); }

.rail { position: fixed; right: 14px; top: 50%; transform: translateY(-50%); z-index: 40; display: flex; flex-direction: column; gap: 10px; mix-blend-mode: difference; }
.rail a { display: flex; align-items: center; justify-content: flex-end; gap: 8px; color: #fff; text-decoration: none; font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; opacity: .55; transition: opacity .3s; }
.rail a span { opacity: 0; transform: translateX(6px); transition: opacity .3s, transform .3s; }
.rail a i { order: 2; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #fff; transition: transform .4s var(--spring), background .3s; }
.rail a:hover, .rail a.on { opacity: 1; }
.rail a:hover span, .rail a.on span { opacity: 1; transform: none; }
.rail a.on i { background: #fff; transform: scale(1.5); }
@media (max-width: 900px) { .rail { display: none; } }

/* ---------- depth layers (shared) ---------- */
.layer { position: absolute; inset: 0; }
.layer[aria-hidden="true"] { pointer-events: none; }

/* ---------- HERO ---------- */
.hero { --p: 0; --a: 0; --q: 0; --v: 0; height: 300vh; background: var(--paper); position: relative; }
.hero__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }

/* depth 0: sunburst that turns as the page scrolls */
.hero__burst { position: absolute; left: 50%; top: 50%; width: 160vmax; height: 160vmax; margin: -80vmax 0 0 -80vmax; background: repeating-conic-gradient(from 0deg, rgba(207, 63, 42, .09) 0 5deg, transparent 5deg 10deg, rgba(240, 185, 59, .13) 10deg 15deg, transparent 15deg 20deg); -webkit-mask: radial-gradient(circle, transparent 0, #000 16%, transparent 46%); mask: radial-gradient(circle, transparent 0, #000 16%, transparent 46%); transform: rotate(calc(var(--p) * 60deg)); }
/* depth 1: halftone and a soft light behind the title */
.hero__dots { position: absolute; inset: 0; background: radial-gradient(rgba(42, 35, 32, .13) 1.3px, transparent 1.6px) 0 0 / 15px 15px; -webkit-mask: radial-gradient(ellipse at center, transparent 30%, #000 100%); mask: radial-gradient(ellipse at center, transparent 30%, #000 100%); }
.hero__glow { position: absolute; inset: 0; background: radial-gradient(ellipse 46% 40% at 50% 50%, rgba(255, 250, 236, .95), rgba(255, 250, 236, 0) 70%); }

/* the boxes: outer element scatters on scroll, .hbox__drop enters once, .hbox__float idles */
.hbox { position: absolute; left: var(--x); top: var(--y); width: var(--w); --z: .9;
  transform: translate(-50%, -50%) translate(calc(var(--dx) * var(--a) * 1vw), calc(var(--dy) * var(--a) * 1vh)) scale(calc(1 + var(--a) * var(--z))) rotate(var(--r));
  opacity: calc(1 - clamp(0, (var(--a) - .5) * 2.4, 1)); will-change: transform; }
.hbox--d2 { --w: clamp(64px, 8.5vw, 140px); --z: .3; filter: blur(1px); }
.hbox--d3 { --w: clamp(104px, 15.5vw, 250px); }
.hbox--d5 { --w: clamp(190px, 27vw, 430px); --z: 1.8; filter: blur(5px); opacity: calc(.9 - clamp(0, var(--a) * 2.2, .9)); }
.hbox__drop { animation: drop 1.1s var(--spring) both; animation-delay: calc(var(--k) * 70ms + 150ms); }
.hbox__float { animation: float calc(6s + var(--k) * .43s) ease-in-out infinite alternate; }
.hbox__img { width: 100%; filter: drop-shadow(0 16px 14px rgba(70, 40, 15, .3)); }
@keyframes drop { from { transform: translateY(-120vh) rotate(-18deg); } to { transform: none; } }
@keyframes float { from { transform: translateY(-7px) rotate(-1.2deg); } to { transform: translateY(9px) rotate(1.4deg); } }

/* depth 4: title */
.hero__copy { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: var(--bar-h) 16px 0; transform: scale(calc(1 + var(--a) * .2)); opacity: calc(1 - clamp(0, var(--a) * 1.8, 1)); }
.hero__eyebrow { animation: fade .8s .2s both; }
.hero__title { font-size: clamp(3.1rem, 10.6vw, 10.2rem); line-height: .92; font-weight: 900; letter-spacing: -.025em; font-variation-settings: "SOFT" 100, "WONK" 1; margin: .22em 0 .2em; }
.hero__title .line { display: block; overflow: hidden; padding: .06em .12em .14em; margin: -.06em -.12em -.14em; }
.hero__title .line > span { display: block; animation: lineup 1s var(--ease) both; }
.hero__title .line:nth-child(1) > span { animation-delay: .25s; }
.hero__title .line:nth-child(2) > span { animation-delay: .4s; }
.hero__title em { color: var(--tomato); font-weight: 600; }
.hero__sub { font-size: clamp(1.05rem, 1.9vw, 1.45rem); font-style: italic; animation: fade .9s .8s both; }
.hero__cue { position: absolute; bottom: 26px; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; font-family: var(--mono); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: #6d6258; animation: fade 1s 1.4s both; }
.hero__cue i { width: 1.5px; height: 34px; background: var(--ink); transform-origin: top; animation: cue 1.8s var(--ease) infinite; }
@keyframes lineup { from { transform: translateY(112%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cue { 0% { transform: scaleY(0); } 55% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* depth 4: the opening lines, lit one word at a time */
.hero__intro { display: grid; place-items: center; padding: var(--bar-h) 22px 0; opacity: var(--v); transform: translateY(calc((1 - var(--v)) * 36px)); pointer-events: none; }
.hero__once { max-width: 21em; font-size: clamp(1.45rem, 3.5vw, 3.1rem); line-height: 1.22; font-weight: 500; text-align: center; font-variation-settings: "SOFT" 100; text-wrap: balance; }
/* --q is stretched past 1 so the last words (whose --t is close to 1) reach full strength too */
.hero__once .w { opacity: calc(.13 + .87 * clamp(0, (var(--q) * 1.14 - var(--t)) * 9, 1)); }

@media (max-width: 700px) {
  .m-hide { display: none; }
  .hbox--d3 { --w: clamp(100px, 31vw, 150px); }
  .hbox--d2 { --w: 76px; }
  .hero__once { max-width: 16em; }
}

/* ---------- contents ---------- */
.contents { background: var(--paper); padding: clamp(5rem, 12vw, 9rem) 20px; position: relative; }
.contents__inner { max-width: 880px; margin: 0 auto; }
.contents__title { font-size: clamp(2.3rem, 6vw, 4.6rem); line-height: 1; font-weight: 800; letter-spacing: -.02em; margin: .5rem 0 2.6rem; font-variation-settings: "SOFT" 100, "WONK" 1; }
.contents__title em { color: var(--tomato); font-weight: 500; }
.toc__row { display: flex; align-items: baseline; gap: .9rem; padding: 1.05rem .2rem; border-top: 1px solid rgba(42, 35, 32, .18); text-decoration: none; transition: transform .45s var(--spring), color .2s; }
.toc li:last-child .toc__row { border-bottom: 1px solid rgba(42, 35, 32, .18); }
.toc__row:hover { transform: translateX(12px); color: var(--tomato); }
.toc__no { font-family: var(--mono); font-size: .85rem; color: var(--tomato); width: 1.6em; }
.toc__name { font-size: clamp(1.25rem, 2.6vw, 1.85rem); font-weight: 700; }
.toc__name em { display: block; font-size: .62em; font-weight: 400; opacity: .75; }
.toc__dots { flex: 1; border-bottom: 2px dotted rgba(42, 35, 32, .35); transform: translateY(-.35em); min-width: 1.5rem; }
.toc__count { font-family: var(--mono); font-size: .85rem; white-space: nowrap; }
@media (max-width: 560px) { .toc__dots { display: none; } .toc__row { justify-content: space-between; } .toc__name { flex: 1; } }

/* ---------- chapters: one theme per decade ---------- */
.chapter { background: var(--bg); color: var(--ink); position: relative; --muted: color-mix(in srgb, var(--ink) 68%, var(--bg)); --line: color-mix(in srgb, var(--ink) 22%, var(--bg)); }
.era-50s { --bg: var(--bg-50s); --ink: #2a2320; --accent: #bf3725; --c1: #7cc5bd; --c2: #f0b93b; --c3: #e9897b; }
.era-60s { --bg: var(--bg-60s); --ink: #2b1d3a; --accent: #6332a3; --c1: #f08a3c; --c2: #e8567f; --c3: #8f6fd0; }
.era-70s { --bg: var(--bg-70s); --ink: #3a2414; --accent: #a4460d; --c1: #d98a2b; --c2: #8a9a4b; --c3: #b5532f; }
.era-80s { --bg: var(--bg-80s); --ink: #f4efff; --accent: #ff6cb6; --c1: #35d0e0; --c2: #ff5fb0; --c3: #ffd23f; }
.era-90s { --bg: var(--bg-90s); --ink: #1d2b3a; --accent: #6f37b5; --c1: #2bb5a4; --c2: #f6c445; --c3: #f0719b; }
.era-00s { --bg: var(--bg-00s); --ink: #171c2b; --accent: #2748cf; --c1: #a9bde8; --c2: #b7e04a; --c3: #ff8a4c; }
.era-10s { --bg: var(--bg-10s); --ink: #2a2422; --accent: #c2412c; --c1: #f5b8a8; --c2: #a8d8c4; --c3: #f3d27a; }
.from-intro { --prev: var(--bg-intro); } .from-50s { --prev: var(--bg-50s); } .from-60s { --prev: var(--bg-60s); }
.from-70s { --prev: var(--bg-70s); } .from-80s { --prev: var(--bg-80s); } .from-90s { --prev: var(--bg-90s); } .from-00s { --prev: var(--bg-00s); }

/* opener: the new decade opens through a circle (iris) over the previous decade's colour, then pins */
.opener { --e: 1; --p: 1; height: 190vh; background: var(--prev); position: relative; }
.opener__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--prev); --show: clamp(0, (var(--p) - .1) * 6, 1); }
/* the iris: a plain disc in the new decade's colour that grows by transform only (cheap on phones);
   the scene's contents fade in once the disc has covered the screen */
.opener__iris { position: absolute; left: 50%; top: 50%; width: 64vmax; height: 64vmax; margin: -32vmax 0 0 -32vmax; border-radius: 50%; background: var(--bg); transform: scale(calc(var(--e) * .85 + clamp(0, var(--p) * 3.4, 1) * 2.3)); will-change: transform; }
.opener__stage > .layer { opacity: var(--show); }
.opener__pattern { position: absolute; inset: -10%; opacity: .9; transform: translateY(calc((.5 - var(--p)) * 6%)); }
.era-50s .opener__pattern { background: radial-gradient(color-mix(in srgb, var(--c1) 55%, transparent) 5px, transparent 6px) 0 0 / 64px 64px, radial-gradient(color-mix(in srgb, var(--c2) 60%, transparent) 2.5px, transparent 3.5px) 32px 32px / 64px 64px; }
.era-60s .opener__pattern { background: repeating-radial-gradient(circle at 50% 50%, transparent 0 46px, color-mix(in srgb, var(--c1) 30%, transparent) 46px 60px); }
.era-70s .opener__pattern { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--c1) 55%, transparent) 62% 68%, color-mix(in srgb, var(--c3) 55%, transparent) 68% 74%, color-mix(in srgb, var(--c2) 55%, transparent) 74% 80%, transparent 80%); }
.era-80s .opener__pattern { background: linear-gradient(color-mix(in srgb, var(--c1) 22%, transparent) 1.5px, transparent 1.5px) 0 0 / 56px 56px, linear-gradient(90deg, color-mix(in srgb, var(--c2) 22%, transparent) 1.5px, transparent 1.5px) 0 0 / 56px 56px; -webkit-mask: linear-gradient(transparent 20%, #000); mask: linear-gradient(transparent 20%, #000); }
.era-90s .opener__pattern { background: repeating-linear-gradient(45deg, transparent 0 34px, color-mix(in srgb, var(--c1) 26%, transparent) 34px 44px, transparent 44px 78px, color-mix(in srgb, var(--c3) 26%, transparent) 78px 88px); }
.era-00s .opener__pattern { background: repeating-linear-gradient(90deg, transparent 0 22px, color-mix(in srgb, var(--accent) 12%, transparent) 22px 24px); }
.era-10s .opener__pattern { background: radial-gradient(color-mix(in srgb, var(--c2) 70%, transparent) 9px, transparent 10px) 0 0 / 90px 90px; }

/* bleed typography: the decade slides across behind everything */
.opener .depth-1 { display: grid; place-items: center; }
.opener__decade { font-size: clamp(9rem, 36vw, 36rem); font-weight: 900; line-height: 1; letter-spacing: -.04em; white-space: nowrap; color: transparent; -webkit-text-stroke: 2px color-mix(in srgb, var(--accent) 26%, transparent); font-variation-settings: "SOFT" 100, "WONK" 1; transform: translateX(calc((.5 - var(--p)) * 34%)); }

.peek { position: absolute; width: clamp(104px, 16vw, 240px); }
.peek__img { width: 100%; filter: drop-shadow(0 18px 16px rgba(0, 0, 0, .28)); }
.peek--1 { left: 5%; top: 13%; transform: translateY(calc((var(--p) - 1) * 34vh)) rotate(-8deg); }
.peek--2 { right: 6%; top: 15%; transform: translateY(calc((var(--p) - 1) * 52vh)) rotate(7deg); }
.peek--3 { left: 15%; bottom: 6%; transform: translateY(calc((1 - var(--p)) * 36vh)) rotate(-4deg); width: clamp(90px, 12vw, 180px); }

.opener__text { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: var(--bar-h) 22px 0; }
.opener__title { font-size: clamp(2.2rem, 6.2vw, 5.4rem); line-height: 1; font-weight: 800; letter-spacing: -.02em; max-width: 13em; margin: .6rem 0 1.1rem; font-variation-settings: "SOFT" 100, "WONK" 1; text-wrap: balance; transform: translateY(calc((1 - clamp(0, (var(--p) - .1) * 4, 1)) * 44px)); }
.opener__label { display: block; font-size: .42em; font-weight: 500; font-style: italic; color: var(--accent); margin-bottom: .35em; letter-spacing: 0; }
.opener__intro { max-width: 30em; font-size: clamp(1.02rem, 1.6vw, 1.25rem); color: var(--muted); opacity: clamp(0, (var(--p) - .24) * 4, 1); transform: translateY(calc((1 - clamp(0, (var(--p) - .24) * 4, 1)) * 24px)); }
.opener__count { margin-top: 1.4rem; font-family: var(--mono); font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; border: 1.5px solid currentColor; border-radius: 999px; padding: .45rem 1rem .35rem; opacity: clamp(0, (var(--p) - .34) * 4, 1); }
@media (max-width: 700px) { .peek { width: 96px; } .peek--1 { left: 4%; top: 10%; } .peek--2 { right: 4%; top: 11%; } .peek--3 { left: 50%; margin-left: -45px; bottom: 5%; } .opener { height: 165vh; } }

/* ---------- the shelf of cards ---------- */
.shelf { --gap: clamp(18px, 2.6vw, 34px); max-width: 1200px; margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) clamp(16px, 4vw, 44px) clamp(5rem, 10vw, 8rem); display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(2.6rem, 5vw, 4.2rem) var(--gap); }
/* content-visibility: cards far off screen are not laid out or painted at all, which is what keeps a 92-card page light */
.card { flex: 0 1 calc((100% - var(--gap) * 2) / 3); min-width: 0; display: flex; flex-direction: column; scroll-margin-top: 90px; content-visibility: auto; contain-intrinsic-size: auto 560px; }
@media (max-width: 940px) { .card { flex-basis: calc((100% - var(--gap)) / 2); } }
@media (max-width: 600px) { .card { flex-basis: 100%; } }

.card__stage { position: relative; height: 300px; }
/* the backdrop: show or era artwork behind the box, washed in the decade's colour until you point at it */
.plate { position: absolute; top: 4px; left: 6%; width: 56%; height: 232px; overflow: hidden; background: var(--pc); transform: rotate(-2.5deg); box-shadow: 0 14px 20px -12px rgba(0, 0, 0, .45); transition: transform .7s var(--spring); }
.card:nth-child(even) .plate { left: auto; right: 6%; transform: rotate(2.5deg); }
.tone-1 { --pc: var(--c1); } .tone-2 { --pc: var(--c2); } .tone-3 { --pc: var(--c3); }
.plate--circle { width: 222px; height: 222px; border-radius: 50%; }
.plate--arch { border-radius: 999px 999px 10px 10px; }
.plate--tile { border-radius: 16px; }
.plate--screen { border-radius: 26% / 20%; height: 200px; top: 14px; }
.art { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.plate .art { filter: grayscale(1) contrast(1.2); mix-blend-mode: multiply; opacity: .78; transition: filter .6s var(--ease), opacity .6s var(--ease); }
.card:hover .plate .art, .card:focus-within .plate .art { filter: none; mix-blend-mode: normal; opacity: 1; }
.card:hover .plate { transform: rotate(0deg) scale(1.04); }
@media (hover: none) { .plate .art { filter: grayscale(.55) contrast(1.05); opacity: .9; } }

.card__img { position: absolute; right: 4%; bottom: 23px; max-height: 188px; width: auto; max-width: 64%; object-fit: contain; filter: drop-shadow(0 14px 12px rgba(0, 0, 0, .38)); transition: transform .6s var(--spring); transform-origin: 50% 90%; }
.card:nth-child(even) .card__img { right: auto; left: 4%; }
.card__shelf { position: absolute; left: 4%; right: 4%; bottom: 14px; height: 9px; border-radius: 3px; background: var(--line); box-shadow: 0 7px 10px -4px rgba(0, 0, 0, .28); }
.card__missing { position: absolute; right: 4%; bottom: 23px; width: 170px; height: 130px; border: 2px dashed var(--line); border-radius: 12px; display: grid; place-items: center; text-align: center; font-family: var(--mono); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); background: var(--bg); line-height: 1.5; }
.card:hover .card__img { transform: translateY(-9px) rotate(var(--tilt)); }

/* the television: feature pieces get their artwork on a console set that switches on as it scrolls in */
.tv { position: absolute; left: 0; top: 34px; width: 80%; aspect-ratio: 4 / 3; display: grid; grid-template-columns: 1fr 14%; gap: 4.5%; padding: 5%; border-radius: 22px; background: linear-gradient(160deg, #8a5630, #5a321b 70%); box-shadow: inset 0 0 0 3px #3b2112, inset 0 2px 0 4px rgba(255, 255, 255, .08), 0 22px 28px -14px rgba(0, 0, 0, .55); }
.tv::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: -11px; height: 11px; background: linear-gradient(90deg, #3b2112 0 14%, transparent 14% 86%, #3b2112 86%); }
.tv__ears { position: absolute; left: 50%; top: -32px; width: 2px; height: 34px; background: #3b2112; transform-origin: bottom; transform: rotate(-32deg); }
.tv__ears::after { content: ""; position: absolute; inset: 0; background: inherit; transform-origin: bottom; transform: rotate(64deg); }
.tv__screen { position: relative; overflow: hidden; border-radius: 30px / 26px; background: #14110f; box-shadow: inset 0 0 0 4px #1d1713; }
.tv__screen::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(rgba(0, 0, 0, .2) 0 1px, transparent 1px 3px), radial-gradient(ellipse at 28% 18%, rgba(255, 255, 255, .28), transparent 52%); box-shadow: inset 0 0 34px rgba(0, 0, 0, .65); }
.tv__side { display: flex; flex-direction: column; align-items: center; gap: 9%; padding-top: 10%; }
.tv__side i { width: 78%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f1e3c2, #a8946c 70%); box-shadow: 0 2px 3px rgba(0, 0, 0, .5); }
.tv__side b { flex: 1; width: 78%; margin-bottom: 12%; border-radius: 4px; background: repeating-linear-gradient(#2c190d 0 2px, #6b4022 2px 5px); }
.js .card .tv .art { clip-path: inset(49.4% 0 49.4% 0); filter: brightness(4) saturate(0); }
.js .card.in .tv .art { clip-path: inset(0); filter: none; transition: clip-path .45s var(--ease) .55s, filter .9s ease-out .75s; }

.card__body { padding: 1rem .2rem 0; display: flex; flex-direction: column; gap: .4rem; }
.card__no { font-family: var(--mono); font-size: .76rem; letter-spacing: .2em; color: var(--accent); }
.card__title { font-size: 1.42rem; line-height: 1.12; font-weight: 800; letter-spacing: -.01em; font-variation-settings: "SOFT" 100; text-wrap: balance; }
.card__meta { font-family: var(--mono); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.card__story { font-size: 1rem; margin-top: .25rem; }
.card__note { align-self: flex-start; font-family: var(--mono); font-size: .72rem; letter-spacing: .05em; color: var(--accent); border: 1.5px solid currentColor; border-radius: 5px; padding: .3rem .55rem .2rem; transform: rotate(-1.2deg); margin-top: .3rem; }
.card__links { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; margin-top: .45rem; font-family: var(--mono); font-size: .74rem; letter-spacing: .04em; }
.card__ask { color: var(--ink); font-weight: 700; text-underline-offset: 3px; }
.card__src { color: var(--muted); text-underline-offset: 3px; }
.card__ask:hover, a.card__src:hover { color: var(--accent); }

/* feature spreads: the pieces the catalogue calls out as key or premium */
.card--feature { flex-basis: 100%; flex-direction: row; align-items: center; gap: clamp(1.4rem, 5vw, 4.5rem); max-width: 1000px; padding: 1rem 0; }
.card--feature:nth-of-type(even) { flex-direction: row-reverse; }
.card--feature .card__stage { flex: 0 0 46%; height: auto; aspect-ratio: 1 / .92; }
.card--feature .card__img, .card--feature:nth-child(even) .card__img { right: 0; left: auto; max-height: 52%; max-width: 58%; }
.card--feature .card__shelf { left: 0; right: 0; }
.card--feature .card__body { flex: 1; padding: 0; }
.card--feature .card__title { font-size: clamp(2rem, 4.2vw, 3.2rem); font-weight: 900; font-variation-settings: "SOFT" 100, "WONK" 1; }
.card--feature .card__story { font-size: clamp(1.1rem, 1.7vw, 1.32rem); line-height: 1.5; }
.card--feature .card__story::first-letter { float: left; font-size: 3.3em; line-height: .82; font-weight: 900; padding: .06em .1em 0 0; color: var(--accent); }
@media (max-width: 760px) {
  .card--feature, .card--feature:nth-of-type(even) { flex-direction: column; align-items: stretch; gap: 0; }
  .card--feature .card__stage { flex: none; width: 100%; max-width: 420px; margin: 0 auto; }
  .card--feature .card__body { padding: 1rem .2rem 0; }
}

/* reveal on enter (only when scripts run, so nothing is hidden without them) */
.js .reveal, .js .card { opacity: 0; transform: translateY(38px); }
.js .reveal.in, .js .card.in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js .card .plate, .js .card .tv { scale: .6; opacity: 0; }
.js .card.in .plate, .js .card.in .tv { scale: 1; opacity: 1; transition: scale .8s var(--spring) calc(var(--i, 0) * 90ms + 80ms), opacity .4s calc(var(--i, 0) * 90ms + 80ms), transform .7s var(--spring); }
.js .card .card__img { opacity: 0; translate: 0 26px; }
.js .card.in .card__img { opacity: 1; translate: 0 0; transition: opacity .5s calc(var(--i, 0) * 90ms + 180ms), translate .9s var(--spring) calc(var(--i, 0) * 90ms + 180ms), transform .6s var(--spring); }

/* ---------- inquiry: a thermos-plaid page with an index card ---------- */
.inquire { --accent: #f0b93b; position: relative; color: #f6eedc; padding: clamp(5rem, 11vw, 9rem) 20px; background-color: #1f4a3b;
  background-image: repeating-linear-gradient(0deg, rgba(0, 0, 0, .16) 0 26px, transparent 26px 78px), repeating-linear-gradient(90deg, rgba(0, 0, 0, .16) 0 26px, transparent 26px 78px), repeating-linear-gradient(0deg, transparent 0 50px, rgba(240, 185, 59, .28) 50px 53px, transparent 53px 78px), repeating-linear-gradient(90deg, transparent 0 50px, rgba(207, 63, 42, .34) 50px 53px, transparent 53px 78px); }
.inquire__inner { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.inquire__title { font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.02; font-weight: 800; letter-spacing: -.02em; margin: .6rem 0 1.2rem; font-variation-settings: "SOFT" 100, "WONK" 1; }
.inquire__title em { color: var(--mustard); font-weight: 500; }
.inquire__text { font-size: 1.12rem; max-width: 26em; color: rgba(246, 238, 220, .88); }
.form { background: #fffaf0; color: #2a2320; border-radius: 6px; padding: clamp(1.4rem, 3.4vw, 2.4rem); box-shadow: 0 30px 50px -18px rgba(0, 0, 0, .55); border-top: 7px solid var(--tomato); background-image: repeating-linear-gradient(transparent 0 35px, rgba(47, 143, 138, .16) 35px 36px); display: grid; gap: 1.05rem; rotate: 1deg; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.05rem; }
.field { display: grid; gap: .3rem; }
.field span { font-family: var(--mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: #6d6258; }
.field span i { text-transform: none; letter-spacing: 0; }
.field input, .field textarea { font: inherit; font-size: 1.05rem; color: inherit; background: rgba(255, 255, 255, .85); border: 1.5px solid #cdbfa6; border-radius: 5px; padding: .62rem .75rem; width: 100%; min-width: 0; }
.field textarea { resize: vertical; min-height: 7.5rem; }
.field input:focus, .field textarea:focus { outline: 3px solid rgba(47, 143, 138, .45); border-color: var(--teal); }
.field.bad input, .field.bad textarea { border-color: var(--tomato); }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; }
.form__send { font-family: var(--mono); font-size: .86rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #fffaf0; background: var(--tomato); border: 0; border-radius: 999px; padding: .95rem 1.7rem .85rem; cursor: pointer; transition: transform .5s var(--spring), background .2s; }
.form__send:hover { transform: translateY(-3px) rotate(-1.5deg); background: #b23220; }
.form__send[disabled] { opacity: .6; cursor: progress; }
.form__status { flex: 1; min-width: 12rem; font-size: .95rem; }
.form__status.ok { color: #1f6b4f; font-weight: 600; }
.form__status.err { color: #b23220; font-weight: 600; }
@media (max-width: 860px) { .inquire__inner { grid-template-columns: 1fr; } .form { rotate: none; } }
@media (max-width: 520px) { .form__row { grid-template-columns: 1fr; } }

/* ---------- the end ---------- */
.end { --accent: var(--mustard); background: #221c19; color: #f6eedc; padding: clamp(5rem, 12vw, 10rem) 20px clamp(4rem, 8vw, 6rem); text-align: center; }
.end__inner { max-width: 760px; margin: 0 auto; }
.end__title { font-size: clamp(3.4rem, 12vw, 9rem); line-height: .95; font-weight: 900; letter-spacing: -.03em; margin: .5rem 0 2.4rem; font-variation-settings: "SOFT" 100, "WONK" 1; }
.end__title em { display: block; font-size: .3em; font-weight: 400; letter-spacing: 0; color: var(--mustard); margin-top: .5em; }
.end__stats { display: flex; justify-content: center; gap: clamp(1.6rem, 6vw, 4.5rem); margin-bottom: 2.8rem; }
.end__stats b { display: block; font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; line-height: 1; color: #ef6a55; }
.end__stats span { font-family: var(--mono); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; opacity: .8; }
.end__note { font-size: .92rem; color: rgba(246, 238, 220, .7); max-width: 40em; margin: 0 auto 2.2rem; }
.end__back { font-family: var(--mono); font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; text-underline-offset: 5px; }

/* ---------- phones and tablets: same story, cheaper to draw ---------- */
@media (hover: none), (pointer: coarse) {
  /* backdrop art as a simple wash over the decade colour: no blend modes or filters to composite */
  .plate .art { mix-blend-mode: normal; filter: none; opacity: .42; }
  .card__img, .peek__img { filter: none; }
  .hbox--d2, .hbox--d5 { filter: none; }
  .hero__burst { transform: none; }
  .hero__dots { display: none; }
  .tv { box-shadow: inset 0 0 0 3px #3b2112; }
  .plate, .card__shelf, .form { box-shadow: none; }
  .js .card .tv .art, .js .card.in .tv .art { clip-path: none; filter: none; transition: none; }
}

/* ---------- reduced motion: a finished, still page ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .hero { --a: 0; --q: 1; --v: 1; height: auto; }
  .hero__stage { position: relative; height: auto; }
  .hero__copy { position: relative; min-height: 100svh; }
  .hero__intro { position: relative; padding: 2rem 22px 6rem; }
  .hero__cue { display: none; }
  .opener { --e: 1; --p: 1; height: 100vh; height: 100svh; }
}
