/* ==========================================================================
   TISSIO — design tokens
   One fluid system: type, spacing and stage heights scale continuously from
   a 320px phone to a 2560px display. Breakpoints only change layout.
   ========================================================================== */
:root {
  --ink: #15100c;
  --ink-2: #221812;
  --tissue: #f6f1e8;
  --tissue-2: #ece4d6;
  --cream: #f3e9da;
  --burgundy: #6d1a22;
  --red: #e0262b;
  --muted: rgba(243, 233, 218, .62);
  --line: rgba(243, 233, 218, .22);
  --ink-muted: rgba(21, 16, 12, .6);
  --ink-line: rgba(21, 16, 12, .16);
  --ease: cubic-bezier(.22, .8, .18, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);

  /* layout */
  --gutter: clamp(16px, 3.2vw, 56px);
  --rail: 0px;
  --header-h: clamp(60px, 7vw, 84px);
  --vh: 1svh;
  --stage-h: 100svh;

  /* type scale (fluid) */
  --fs-mono: clamp(10px, .62rem + .12vw, 13px);
  --fs-body: clamp(15px, .86rem + .22vw, 19px);
  --fs-lead: clamp(18px, 1rem + .7vw, 30px);
  --fs-h3: clamp(22px, 1.1rem + 1.1vw, 40px);
  --fs-h2: clamp(44px, 2rem + 5vw, 112px);
  --fs-display: clamp(64px, 25vw, 520px);

  --display: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "DM Mono", ui-monospace, monospace;
}
/* very short landscape screens (phones turned sideways, small laptops) */
@media (max-height: 560px) and (orientation: landscape) {
  :root { --fs-h2: clamp(32px, 7.5vh, 72px); --fs-display: min(18vw, 34vh); --header-h: 56px; }
}

/* ========================================================================== base */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; color: var(--cream); background: transparent;
  font-family: var(--display); font-size: var(--fs-body); line-height: 1.45;
  overflow-x: clip; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
body.is-loading, body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }

.eyebrow {
  font: 500 var(--fs-mono)/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.light .eyebrow { color: var(--ink-muted); }

h2 { font-size: var(--fs-h2); line-height: .9; letter-spacing: -.055em; font-weight: 600; }
h2 em { letter-spacing: -.03em; }

/* line-mask reveal: <span class="line"><span>…</span></span> */
.line { display: block; overflow: hidden; padding-bottom: .2em; margin-bottom: -.2em; }
.line > span { display: inline-block; transform: translateY(125%); transition: transform 1.1s var(--ease); }
.is-in .line > span, [data-reveal].is-in .line > span { transform: none; }
.line:nth-child(2) > span { transition-delay: .07s; }
.line:nth-child(3) > span { transition-delay: .14s; }

[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform 1.1s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }
h2[data-reveal] { opacity: 1; transform: none; }

/* ========================================================================== fixed layers */
.backdrop { position: fixed; inset: 0; z-index: -2; background: #1c130d; }
.gl { position: fixed; inset: 0; z-index: -1; width: 100vw; height: 100lvh; display: block; transition: opacity .6s; }
.no-webgl .gl { display: none; }
.grain {
  position: fixed; inset: -50%; z-index: 80; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0%,100% { transform: translate(0,0) } 20% { transform: translate(-3%,2%) } 40% { transform: translate(2%,-3%) } 60% { transform: translate(-2%,-1%) } 80% { transform: translate(3%,3%) } }

/* dimension callouts drawn around the unfolded sheet */
.dims { position: fixed; inset: 0; width: 100vw; height: 100lvh; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .5s; overflow: visible; }
.dims.is-on { opacity: 1; }
.dims line { stroke: var(--cream); stroke-width: 1; stroke-dasharray: 3 4; opacity: .7; }
.dims text { fill: var(--cream); font: 500 11px var(--mono); letter-spacing: .14em; }

/* ========================================================================== loader */
.loader { position: fixed; inset: 0; z-index: 200; pointer-events: none; transition: transform 1.25s var(--ease-io); }
.loader-sheet {
  position: absolute; inset: 0; background-color: var(--tissue);
  background-image:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.9) 0 1.2px, transparent 1.6px),
    radial-gradient(circle at 50% 50%, rgba(80,60,40,.12) 0 1.4px, transparent 2px),
    linear-gradient(45deg, transparent 48.5%, rgba(80,60,40,.06) 50%, transparent 51.5%),
    linear-gradient(-45deg, transparent 48.5%, rgba(80,60,40,.06) 50%, transparent 51.5%);
  background-size: 22px 22px, 22px 22px, 22px 22px, 22px 22px;
  background-position: 0 0, 1px 1px, 0 0, 0 0;
}
.loader-edge { position: absolute; left: 0; top: 100%; width: 100%; height: clamp(30px, 6vw, 80px); fill: var(--tissue); margin-top: -1px; }
.loader-inner { position: absolute; inset: 0; display: grid; place-content: center; gap: 18px; color: var(--ink); padding: var(--gutter); }
.loader-mark { font-size: clamp(56px, 16vw, 220px); font-weight: 700; letter-spacing: -.07em; line-height: .8; }
.loader-meta { display: flex; justify-content: space-between; font: 500 var(--fs-mono) var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); }
.loader-line { height: 1px; background: var(--ink-line); }
.loader-line span { display: block; height: 100%; width: calc(var(--load, 0) * 100%); background: var(--ink); transition: width .3s; }
.loader.is-done { transform: translateY(calc(-100% - 90px)); }

/* ========================================================================== header / nav / rail */
.site-header {
  position: fixed; z-index: 100; top: 0; left: 0; right: var(--rail); height: var(--header-h);
  display: grid; place-items: center; padding: 0 var(--gutter);
  color: var(--cream); transition: color .5s, transform .6s var(--ease);
}
.site-header[data-theme="light"] { color: var(--ink); }
.site-header.is-hidden { transform: translateY(-100%); }
/* solid backing over non-3D chapters so content never collides with the nav */
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s, background-color .4s;
  background: rgba(21,16,12,.82); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid var(--line); }
.site-header[data-solid="true"]::before { opacity: 1; }
.site-header[data-theme="light"]::before { background: rgba(246,241,232,.86); border-bottom-color: var(--ink-line); }
.menu-open .site-header::before { opacity: 0; }
.wordmark { position: absolute; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; font-size: clamp(18px, 1.5vw, 24px); font-weight: 700; letter-spacing: -.05em; }
.wordmark svg { width: .8em; height: .9em; fill: var(--red); }
.menu-button { position: absolute; left: var(--gutter); top: 50%; width: 44px; height: 44px; display: grid; place-items: center; transform: translateY(-50%); }
.menu-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.menu-button i { position: relative; display: block; width: 27px; height: 18px; }
.menu-button i::before, .menu-button i::after, .menu-button i b { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .4s var(--ease), opacity .25s, top .4s var(--ease); }
.menu-button i::before { top: 0; }
.menu-button i b { top: 8px; }
.menu-button i::after { top: 16px; }
.menu-open .menu-button i::before { top: 8px; transform: rotate(45deg); }
.menu-open .menu-button i b { opacity: 0; transform: scaleX(0); }
.menu-open .menu-button i::after { top: 8px; transform: rotate(-45deg); }
.menu-open .site-header { color: var(--ink); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 99; display: flex; flex-direction: column; justify-content: center; gap: 4px;
  padding: calc(var(--header-h) + 20px) var(--gutter) 32px; background: var(--tissue); color: var(--ink);
  clip-path: inset(0 0 100% 0); transition: clip-path .8s var(--ease-io); visibility: hidden;
}
.mobile-menu.is-open { clip-path: inset(0 0 0 0); visibility: visible; }
.mobile-menu a { display: flex; align-items: baseline; gap: 14px; font-size: clamp(44px, 13vw, 96px); font-weight: 600; letter-spacing: -.055em; line-height: 1; padding: 6px 0; border-bottom: 1px solid var(--ink-line); }
.mobile-menu small { font: 500 11px var(--mono); letter-spacing: .14em; color: var(--ink-muted); }
.mobile-menu p { margin-top: auto; font: 500 12px/1.6 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }

.rail { position: fixed; z-index: 101; top: 22px; right: clamp(10px,1.2vw,18px); bottom: 22px; width: 11px; display: none; pointer-events: none; }
.rail-bar { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(21,16,12,.34); transform: translateX(-50%); }
.rail-fill { position: absolute; inset: 0 0 auto; height: calc(var(--page, 0) * 100%); background: transparent; transition: height .12s linear; }
.rail-fill::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); transform: translate(-50%,50%); }
@media (min-width: 1025px) { .rail { display: block; } }

/* ========================================================================== shared sections */
main { position: relative; z-index: 1; margin-right: var(--rail); }
section, footer { position: relative; }
.pin { height: calc(var(--len, 4) * var(--stage-h)); }
.stage { position: sticky; top: 0; height: var(--stage-h); overflow: hidden; padding: calc(var(--header-h) + 2vh) var(--gutter) clamp(20px, 4vh, 48px); }
.light { background: var(--tissue); color: var(--ink); }
/* tissue emboss for light chapters — quilt lattice + pressed dots */
.light::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.95) 0 1px, transparent 1.6px),
    radial-gradient(circle at 50% 50%, rgba(90,70,50,.10) 0 1.3px, transparent 2px),
    linear-gradient(45deg, transparent 49%, rgba(90,70,50,.05) 50%, transparent 51%),
    linear-gradient(-45deg, transparent 49%, rgba(90,70,50,.05) 50%, transparent 51%);
  background-size: 26px 26px; background-position: 0 0, 1px 1px, 0 0, 0 0;
}
.light > * { position: relative; }
.pill {
  display: inline-flex; align-items: center; gap: 14px; min-height: 48px; padding: 0 22px; border-radius: 999px;
  background: var(--ink); color: var(--cream); font: 500 var(--fs-mono) var(--mono); letter-spacing: .12em; text-transform: uppercase;
  transition: transform .5s var(--ease), background .3s;
}
.pill:hover { transform: translateY(-2px); background: var(--burgundy); }

/* ========================================================================== 01 hero */
.hero {
  height: 100svh; min-height: 520px; display: grid; grid-template-rows: auto 1fr auto;
  padding: var(--header-h) var(--gutter) clamp(16px, 3.4vh, 40px);
}
/* scrims keep cream type legible over the scene */
.hero::before, .hero::after { content: ""; position: absolute; left: 0; right: 0; z-index: -1; pointer-events: none; }
.hero::before { top: 0; height: 42%; background: linear-gradient(rgba(22,13,8,.62), rgba(22,13,8,0)); }
.hero::after { bottom: 0; height: 38%; background: linear-gradient(rgba(22,13,8,0), rgba(22,13,8,.66)); }
.hero { isolation: isolate; }
.fallback { display: none; }
.hero-fallback {
  display: block; position: absolute; z-index: -1; left: 10%; right: 10%; top: 44%; width: 80%; height: 40%;
  object-fit: contain; opacity: 1; visibility: visible; transition: opacity .65s var(--ease), visibility 0s;
}
.scene-ready .hero-fallback { opacity: 0; visibility: hidden; transition: opacity .65s var(--ease), visibility 0s .65s; }
.no-webgl .hero-fallback { display: block; opacity: 1; visibility: visible; }
.hero-title {
  display: flex; white-space: nowrap; margin: clamp(10px, 3vh, 40px) 0 0 -.04em;
  font-size: var(--fit, var(--fs-display)); line-height: .74; font-weight: 700; letter-spacing: -.06em; color: var(--cream);
  pointer-events: none;
}
.hero-title .mask { display: block; overflow: hidden; padding-top: .04em; }
.hero-title .mask > span { display: block; }
.hero-bottom { grid-row: 3; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: var(--gutter); }
.hero-spec { justify-self: end; max-width: 62ch; text-align: right; font: 500 var(--fs-mono)/1.55 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hero-intro { max-width: 30ch; font-size: var(--fs-lead); line-height: 1.12; letter-spacing: -.025em; font-weight: 500; text-shadow: 0 2px 30px rgba(20,12,6,.45); }
.scroll-cue { display: flex; align-items: center; gap: 14px; font: 500 var(--fs-mono) var(--mono); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.scroll-cue i { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; font-style: normal; overflow: hidden; }
.scroll-cue i span { animation: cue 2s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(-140%) } 45%, 55% { transform: none } 100% { transform: translateY(140%) } }
/* intro choreography (after loader) */
[data-intro] { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.hero-title [data-intro] { opacity: 1; transform: translateY(110%); transition: transform 1.3s var(--ease); }
.is-ready [data-intro] { opacity: 1; transform: none; }
.hero-title .mask:nth-child(2) [data-intro] { transition-delay: .05s }
.hero-title .mask:nth-child(3) [data-intro] { transition-delay: .1s }
.hero-title .mask:nth-child(4) [data-intro] { transition-delay: .15s }
.hero-title .mask:nth-child(5) [data-intro] { transition-delay: .2s }
.hero-title .mask:nth-child(6) [data-intro] { transition-delay: .25s }
.hero-bottom [data-intro] { transition-delay: .45s; }
.hero-bottom [data-intro]:nth-child(2) { transition-delay: .55s; }
.hero-bottom [data-intro]:nth-child(3) { transition-delay: .65s; }

/* ========================================================================== 02 story */
.story { --len: 2.6; }
.story-phase {
  position: absolute; left: var(--gutter); top: 50%; transform: translateY(-50%);
  width: min(44vw, 640px); display: grid; gap: clamp(14px, 2.4vh, 28px); pointer-events: none;
}
.story-phase.is-out .line > span { transform: translateY(-125%); transition-duration: .6s; transition-delay: 0s; }
.story-progress { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(16px, 3.4vh, 40px); height: 1px; background: var(--line); }
.story-progress span { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--cream); }

/* ========================================================================== 03 features */
.features { --len: 4; }
.feature {
  position: absolute; left: var(--gutter); top: calc(var(--header-h) + 4vh); bottom: clamp(48px, 8vh, 96px);
  width: min(44vw, 620px); display: flex; flex-direction: column; justify-content: flex-end; gap: clamp(12px, 2vh, 22px); pointer-events: none;
}
.feature.is-in { pointer-events: auto; }
.feature-meter { transition: opacity .5s; }
.is-diving .feature-meter, .is-diving::after { opacity: 0; transition: opacity .5s; }
.feature-copygroup, .feature-chip { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .7s var(--ease); }
.feature.is-in .feature-copygroup, .feature.is-in .feature-chip { opacity: 1; transform: none; transition-delay: .16s; }
.feature.is-out .line > span { transform: translateY(-125%); transition-duration: .6s; transition-delay: 0s; }
.feature-copygroup { display: grid; gap: clamp(4px,1vh,10px); }
.feature h2 { max-width: 11ch; font-size: clamp(48px,6vw,92px); }
.feature-tagline { font: italic 400 clamp(22px,2.4vw,38px)/1 var(--serif); letter-spacing: -.02em; color: var(--cream); }
.feature-chip { display: flex; align-items: center; gap: 14px; margin: 0; padding: 8px 18px 8px 8px; width: fit-content; border-radius: 8px; background: rgba(246,241,232,.94); color: var(--ink); }
.feature-chip img { width: clamp(64px, 6vw, 92px); aspect-ratio: 1; object-fit: contain; mix-blend-mode: multiply; }
.feature-chip figcaption { font: 500 var(--fs-mono)/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.feature-chip b { color: var(--ink); font-weight: 500; }
.feature-meter { position: absolute; right: var(--gutter); bottom: clamp(16px, 3.4vh, 40px); display: flex; gap: 8px; }
.feature-meter span { width: clamp(28px, 4vw, 64px); height: 2px; background: var(--line); overflow: hidden; }
.feature-meter span::after { content: ""; display: block; height: 100%; width: calc(var(--fill, 0) * 100%); background: var(--cream); }

/* ========================================================================== 05 bundle (light) */
.bundle { padding: clamp(96px, 16vh, 200px) var(--gutter) clamp(72px, 12vh, 160px); }
.bundle-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); grid-template-rows: auto 1fr; column-gap: clamp(24px, 5vw, 96px); row-gap: clamp(18px, 3vh, 32px); }
.bundle-hero .eyebrow { grid-column: 1; }
.bundle-hero h2 { grid-column: 1; }
.bundle-copy { grid-column: 1; align-self: end; display: grid; gap: 24px; justify-items: start; max-width: 46ch; color: var(--ink-muted); }
.bundle-contents { width: 100%; padding: 13px 0; display: flex; flex-wrap: wrap; gap: 7px 0; color: var(--ink); border-top: 1px solid var(--ink-line); border-bottom: 1px solid var(--ink-line); }
.bundle-contents span { display: inline-flex; align-items: baseline; gap: 5px; font-size: 13px; line-height: 1.35; white-space: nowrap; }
.bundle-contents span:not(:last-child)::after { content: "·"; margin: 0 9px; color: var(--ink-muted); }
.bundle-contents strong { font: 600 12px/1 var(--mono); letter-spacing: -.02em; }
.bundle-showcase { grid-column: 2; grid-row: 1 / span 2; position: relative; aspect-ratio: 5 / 4; border-radius: 6px; background: #fff; overflow: hidden; box-shadow: 0 40px 80px -40px rgba(60,40,20,.35); }
.bundle-images img { position: absolute; inset: 6% 6% 16%; width: 88%; height: 78%; object-fit: contain; opacity: 0; transform: scale(.94) translateY(10px); transition: opacity .8s var(--ease), transform 1.1s var(--ease); }
.bundle-images img.is-active { opacity: 1; transform: none; }
.bundle-status { position: absolute; left: 20px; bottom: 18px; display: grid; gap: 4px; font: 500 var(--fs-mono) var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); }
.bundle-status strong { font: 600 clamp(18px, 1.6vw, 26px) var(--display); letter-spacing: -.03em; text-transform: none; color: var(--ink); }
.bundle-dots { position: absolute; right: 14px; bottom: 14px; display: flex; }
.bundle-dots button { width: 28px; height: 32px; display: grid; place-items: center; }
.bundle-dots button::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-line); transition: background .3s, transform .3s; }
.bundle-dots button.is-active::before { background: var(--ink); transform: scale(1.4); }
/* ========================================================================== 06 moments (dark table) */
.moments { color: var(--ink); margin-top: -35svh; padding: clamp(76px,12vh,132px) var(--gutter) clamp(96px,16vh,200px); --line: rgba(21,16,12,.2); --muted: rgba(21,16,12,.62); }
.moments h2 { text-shadow: 0 1px 0 rgba(255,255,255,.4); }
.table-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px var(--gutter); align-items: end; margin-bottom: clamp(40px, 8vh, 96px); }
.category-list { border-top: 1px solid var(--line); }
.category-list a {
  position: relative; display: grid; grid-template-columns: 4ch minmax(0, 1.3fr) minmax(0, 1fr) 44px; align-items: center; gap: var(--gutter);
  min-height: clamp(76px, 12vh, 140px); padding: 12px 0; border-bottom: 1px solid var(--line); isolation: isolate;
}
.category-list a::before { content: ""; position: absolute; inset: 0 calc(var(--gutter) * -1); z-index: -1; background: var(--ink); transform: scaleY(0); transform-origin: bottom; transition: transform .6s var(--ease); }
.category-list span, .category-list small { font: 500 var(--fs-mono) var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); transition: color .4s; }
.category-list strong { font-size: clamp(28px, 4.4vw, 84px); font-weight: 600; letter-spacing: -.05em; line-height: .95; transition: color .4s, transform .6s var(--ease); }
.category-list i { font-style: normal; font-size: 22px; justify-self: end; transition: transform .5s var(--ease), color .4s; }
.category-list img { position: absolute; right: 18%; top: 50%; width: clamp(120px, 14vw, 240px); aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; pointer-events: none; opacity: 0; transform: translateY(-50%) rotate(-4deg) scale(.85); transition: opacity .4s, transform .6s var(--ease); }
@media (hover: hover) {
  .category-list a:hover::before { transform: scaleY(1); }
  .category-list a:hover span, .category-list a:hover small, .category-list a:hover strong, .category-list a:hover i { color: var(--cream); }
  .category-list a:hover strong { transform: translateX(12px); }
  .category-list a:hover i { transform: rotate(45deg); }
  .category-list a:hover img { opacity: 1; transform: translateY(-50%) rotate(3deg) scale(1); }
}

/* ========================================================================== 07 catalog (light) */
.catalog { background: var(--ink); color: var(--cream); padding: clamp(96px, 16vh, 200px) var(--gutter); }
.catalog h2 { margin: 0 0 clamp(40px,7vh,88px); }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 18px); }
.catalog-card { display: flex; flex-direction: column; gap: 14px; padding: clamp(14px, 1.4vw, 22px); border-radius: 6px; background: rgba(243,233,218,.05); border: 1px solid var(--line); transition: transform .6s var(--ease), background .4s, box-shadow .6s var(--ease); }
.catalog-card .catalog-num { font: 500 var(--fs-mono) var(--mono); letter-spacing: .14em; color: var(--muted); }
.catalog-card .well { aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; border-radius: 4px; background: #fff; }
.catalog-card img { width: 92%; height: 92%; object-fit: contain; transition: transform .8s var(--ease); }
.catalog-card h3 { margin-top: auto; font-size: clamp(18px, 1.4vw, 24px); line-height: 1.1; letter-spacing: -.03em; font-weight: 600; }
.catalog-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font: 500 var(--fs-mono)/1.5 var(--mono); letter-spacing: .06em; color: var(--muted); }
.catalog-meta strong { color: var(--cream); font-size: 1.2em; white-space: nowrap; }
.catalog-card.is-featured { grid-column: span 2; background: var(--cream); color: var(--ink); border-color: transparent; }
.catalog-card.is-featured .well { aspect-ratio: 16 / 9; }
.catalog-card.is-featured .catalog-num, .catalog-card.is-featured .catalog-meta { color: var(--ink-muted); }
.catalog-card.is-featured .catalog-meta strong { color: var(--ink); }
.catalog-card.is-featured h3 { font-size: clamp(22px, 2.2vw, 40px); }
@media (hover: hover) {
  .catalog-card:hover { transform: translateY(-8px); background: rgba(243,233,218,.1); box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
  .catalog-card.is-featured:hover { background: #fff; }
  .catalog-card:hover img { transform: scale(1.05); }
}

/* ========================================================================== 08 subscription */
.subscription {
  isolation: isolate; overflow: hidden; padding: clamp(112px, 16vh, 190px) var(--gutter) clamp(88px, 13vh, 150px);
  background: var(--burgundy); color: var(--cream);
}
.subscription::before {
  content: ""; position: absolute; inset: 0; z-index: -2; opacity: .15; pointer-events: none;
  background-image:
    linear-gradient(45deg, transparent 49%, rgba(255,255,255,.16) 50%, transparent 51%),
    linear-gradient(-45deg, transparent 49%, rgba(255,255,255,.16) 50%, transparent 51%);
  background-size: 32px 32px;
}
.subscription::after {
  content: ""; position: absolute; z-index: -1; width: min(80vw, 1100px); aspect-ratio: 1; left: 50%; top: -70%; transform: translateX(-50%);
  border-radius: 50%; background: radial-gradient(circle, rgba(224,38,43,.32), transparent 68%); pointer-events: none;
}
.sub-header { max-width: 980px; margin: 0 auto; display: grid; justify-items: center; gap: clamp(12px, 2vh, 22px); text-align: center; }
.sub-header h2 { font-size: clamp(62px, 9vw, 156px); line-height: .8; }
.sub-header .line { padding-inline: .06em; }
.sub-lede { color: var(--muted); max-width: 42ch; font-size: var(--fs-lead); line-height: 1.2; letter-spacing: -.025em; }
.sub-plans {
  max-width: 1360px; margin: clamp(58px, 9vh, 100px) auto 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 22px); align-items: stretch;
}
.sub-plan {
  position: relative; overflow: hidden; min-height: clamp(460px, 52vw, 560px); padding: clamp(24px, 2.4vw, 38px);
  display: flex; flex-direction: column; color: var(--ink); background: var(--tissue); border: 1px solid rgba(255,255,255,.28); border-radius: 8px;
  box-shadow: 0 34px 80px -46px rgba(15,4,5,.85); transition: opacity .9s var(--ease), transform .7s var(--ease), box-shadow .5s var(--ease), background .35s;
}
.sub-plan:nth-child(2) { transition-delay: .08s; }
.sub-plan:nth-child(3) { transition-delay: .16s; }
.sub-plan.is-in.is-featured { transform: translateY(-14px); }
.sub-plan.is-featured::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--red); }
.sub-plan.is-featured { background: #fffaf1; }
.sub-plan.is-selected { box-shadow: 0 0 0 2px var(--red), 0 42px 90px -38px rgba(15,4,5,.95); }
.sub-plan-topline { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.sub-plan-topline > span { font: 500 var(--fs-mono) var(--mono); letter-spacing: .13em; color: var(--ink-muted); }
.sub-plan-topline > strong {
  padding: 7px 12px; border-radius: 999px; background: var(--ink); color: var(--cream);
  font: 500 var(--fs-mono) var(--mono); letter-spacing: .11em; text-transform: uppercase; white-space: nowrap;
}
.sub-plan h3 { margin-top: clamp(22px, 3vh, 34px); font-size: clamp(30px, 2.8vw, 50px); line-height: .96; letter-spacing: -.05em; font-weight: 600; }
.sub-price { margin: clamp(20px, 3vh, 34px) 0; display: flex; align-items: baseline; gap: 9px; }
.sub-price strong { font-size: clamp(54px, 5vw, 82px); line-height: .82; letter-spacing: -.065em; font-weight: 500; }
.sub-price span { font: 500 var(--fs-mono) var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); }
.sub-plan ul { margin: 0 0 clamp(28px, 4vh, 48px); padding: 0; list-style: none; border-top: 1px solid var(--ink-line); }
.sub-plan li { position: relative; padding: 14px 0 14px 22px; border-bottom: 1px dashed var(--ink-line); color: var(--ink-muted); }
.sub-plan li::before { content: ""; position: absolute; left: 1px; top: 50%; width: 7px; height: 7px; border-radius: 50%; background: var(--red); transform: translateY(-50%); }
.sub-plan button {
  min-height: 58px; margin-top: auto; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border: 1px solid var(--ink-line); border-radius: 3px; font: 500 var(--fs-mono) var(--mono); letter-spacing: .13em; text-transform: uppercase;
  transition: background .35s, color .35s, border-color .35s, transform .35s var(--ease);
}
.sub-plan button i { font-size: 18px; font-style: normal; }
.sub-plan button:hover { transform: translateY(-2px); border-color: var(--ink); }
.sub-plan.is-selected button { background: var(--burgundy); color: var(--cream); border-color: var(--burgundy); }
.custom-drop { max-width: 1360px; margin: clamp(24px,4vh,48px) auto 0; overflow: hidden; border: 1px solid rgba(255,255,255,.28); border-radius: 8px; background: rgba(21,16,12,.2); }
.custom-drop.is-saved { box-shadow: 0 0 0 2px var(--red); }
.custom-drop-toggle { width: 100%; min-height: 132px; padding: clamp(22px,2.5vw,36px); display: flex; align-items: center; justify-content: space-between; gap: 24px; text-align: left; }
.custom-drop-toggle > span { display: grid; gap: 6px; }
.custom-drop-toggle small, .custom-frequency > span, .custom-summary > span { font: 500 var(--fs-mono) var(--mono); letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.custom-drop-toggle strong { font-size: clamp(28px,3vw,48px); line-height: .95; letter-spacing: -.045em; }
.custom-drop-toggle em { font: 400 clamp(14px,1.2vw,18px) var(--display); color: var(--muted); }
.custom-drop-toggle > i { flex: 0 0 auto; width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.42); border-radius: 50%; font-size: 28px; font-style: normal; transition: transform .45s var(--ease), background .3s, color .3s; }
.custom-drop.is-open .custom-drop-toggle > i { transform: rotate(45deg); background: var(--cream); color: var(--ink); }
.custom-drop-builder[hidden] { display: none; }
.custom-drop-builder { padding: clamp(20px,2.5vw,36px); display: grid; grid-template-columns: minmax(0,1.55fr) minmax(260px,.75fr); gap: clamp(28px,4vw,64px); color: var(--ink); background: var(--tissue); border-top: 1px solid rgba(255,255,255,.28); }
.custom-products { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: clamp(18px,2vw,32px); border-top: 1px solid var(--ink-line); }
.custom-product { min-width: 0; min-height: 78px; display: grid; grid-template-columns: 50px minmax(0,1fr) auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--ink-line); }
.custom-product.has-items { background: rgba(109,26,34,.055); }
.custom-product img { width: 50px; height: 50px; object-fit: contain; border-radius: 3px; background: #fff; }
.custom-product-copy { min-width: 0; display: grid; gap: 3px; }
.custom-product-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.custom-product-copy small { font: 500 9px var(--mono); letter-spacing: .06em; color: var(--ink-muted); }
.qty-stepper { display: grid; grid-template-columns: 30px 26px 30px; align-items: center; border: 1px solid var(--ink-line); border-radius: 3px; overflow: hidden; }
.qty-stepper button { width: 30px; height: 32px; display: grid; place-items: center; font-size: 17px; transition: background .25s, color .25s; }
.qty-stepper button:hover:not(:disabled) { background: var(--ink); color: var(--cream); }
.qty-stepper button:disabled { opacity: .25; cursor: default; }
.qty-stepper output { text-align: center; font: 500 12px var(--mono); }
.custom-drop-controls { align-content: start; display: grid; gap: 24px; }
.custom-frequency { display: grid; gap: 12px; }
.custom-frequency > span, .custom-summary > span { color: var(--ink-muted); }
.custom-frequency > div { display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--ink-line); border-radius: 3px; overflow: hidden; }
.custom-frequency button { min-height: 46px; padding: 0 10px; font: 500 10px var(--mono); text-transform: uppercase; border-right: 1px solid var(--ink-line); transition: background .25s, color .25s; }
.custom-frequency button:last-child { border-right: 0; }
.custom-frequency button.is-selected { background: var(--ink); color: var(--cream); }
.custom-summary { min-height: 90px; padding: 18px 0; display: grid; align-content: center; gap: 8px; border-top: 1px solid var(--ink-line); border-bottom: 1px solid var(--ink-line); }
.custom-summary strong { font-size: clamp(20px,1.8vw,28px); line-height: 1.05; letter-spacing: -.035em; }
.custom-drop-save { min-height: 56px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; background: var(--burgundy); color: var(--cream); font: 500 var(--fs-mono) var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.custom-drop-save i { font-style: normal; font-size: 18px; }
.custom-drop-status { min-height: 1.4em; font-size: 13px; color: var(--ink-muted); }
.sub-footnote { margin: clamp(28px, 5vh, 52px) auto 0; text-align: center; font: 500 var(--fs-mono) var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ========================================================================== 09 founder's note */
.manifesto { padding: clamp(48px, 8vh, 92px) var(--gutter); }
.founder-note {
  overflow: hidden; background: #eee6da; color: var(--ink);
  background-image: radial-gradient(circle at 82% 18%, rgba(255,255,255,.72), transparent 32%), linear-gradient(120deg, rgba(139,37,50,.045), transparent 48%);
}
.founder-grid {
  max-width: 980px; margin: 0 auto; padding: clamp(18px,2vw,26px); display: grid;
  grid-template-columns: minmax(0,1fr) minmax(200px,240px); column-gap: clamp(26px,3vw,40px); row-gap: clamp(18px,2.4vh,24px); align-items: center;
  background: rgba(255,253,248,.86); border: 1px solid rgba(21,16,12,.12); border-radius: 20px;
  box-shadow: 0 30px 80px -54px rgba(60,40,20,.5); backdrop-filter: blur(8px);
}
.founder-portrait { position: relative; grid-column: 2; grid-row: 1; justify-self: end; width: 100%; max-width: 240px; margin: 0; min-width: 0; }
.founder-portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 34%; border-radius: 12px; box-shadow: 0 26px 56px -38px rgba(60,40,20,.5); }
.founder-heading { grid-column: 1; grid-row: 1; min-width: 0; align-self: center; }
.founder-heading .eyebrow { margin-bottom: clamp(14px,2vh,22px); color: var(--burgundy); }
.founder-heading h2 { max-width: 11.5ch; font-family: var(--display); font-size: clamp(42px,4.6vw,64px); font-weight: 600; line-height: .9; letter-spacing: -.05em; }
.founder-heading h2 em { color: var(--burgundy); font-weight: 400; }
.founder-copy { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(24px,3vw,40px); padding-top: clamp(16px,2vh,22px); border-top: 1px solid var(--ink-line); }
.founder-copy p { color: rgba(21,16,12,.72); font-size: clamp(13px,.92vw,16px); line-height: 1.55; }
.founder-copy p[lang="ml"] { font-family: system-ui, -apple-system, "Noto Sans Malayalam", sans-serif; line-height: 1.72; }
.founder-signoff { grid-column: 1 / -1; grid-row: 3; margin-top: 0; display: grid; gap: 3px; font-family: var(--serif); }
.founder-signoff span { color: var(--ink-muted); font-style: italic; font-size: 16px; }
.founder-signoff strong { font-size: clamp(19px,1.55vw,25px); font-weight: 400; }

/* ========================================================================== footer */
footer { background: var(--burgundy); color: var(--cream); padding: clamp(96px, 16vh, 200px) var(--gutter) 24px; overflow: hidden; }
footer h2 { max-width: 14ch; }
.footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); margin-top: clamp(56px, 10vh, 120px); padding-top: 24px; border-top: 1px solid var(--line); }
.footer-grid div { display: grid; gap: 8px; align-content: start; }
.footer-grid span { font: 500 var(--fs-mono) var(--mono); letter-spacing: .14em; color: var(--muted); margin-bottom: 6px; }
.footer-grid a { font: 500 clamp(13px, 1vw, 15px) var(--mono); letter-spacing: .1em; overflow-wrap: anywhere; }
.footer-grid a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.footer-mark { margin: clamp(40px, 8vh, 100px) -.04em -.12em; font-size: 26.5vw; line-height: .78; font-weight: 700; letter-spacing: -.07em; color: rgba(243,233,218,.08); white-space: nowrap; user-select: none; }
@media (min-width: 1025px) { .footer-mark { font-size: calc((100vw - var(--rail)) * .265); } }
.footer-bottom { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding-top: 16px; border-top: 1px solid var(--line); font: 500 var(--fs-mono) var(--mono); letter-spacing: .14em; }
.footer-bottom > :last-child { justify-self: end; }
.footer-credit { text-align: center; color: var(--muted); }

/* ==========================================================================
   TABLET (≤1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  .story-phase, .feature { width: min(52vw, 520px); }
  .bundle-hero { grid-template-columns: 1fr; grid-template-rows: none; }
  .bundle-hero > * { grid-column: 1 !important; grid-row: auto !important; }
  .bundle-showcase { margin-top: 16px; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sub-plans { grid-template-columns: 1fr; max-width: 720px; gap: 14px; }
  .sub-plan { min-height: 0; }
  .sub-plan.is-in.is-featured { transform: none; }
  .custom-drop { max-width: 720px; }
  .custom-drop-builder { grid-template-columns: 1fr; }
}

/* ==========================================================================
   PHONE (≤640px) — copy docks to the bottom of each stage over a soft scrim;
   the 3D object owns the upper half. Nothing overlaps, nothing scrolls sideways.
   ========================================================================== */
@media (max-width: 640px), (max-width: 1024px) and (orientation: portrait) {
  :root { --fs-h2: clamp(38px, 11.5vw, 72px); --fs-lead: clamp(18px, 5vw, 26px); }

  .hero-title { margin-top: 14px; }
  .hero-bottom { grid-template-columns: minmax(0,1fr) minmax(128px,.92fr); gap: 18px; }
  .hero-spec { grid-column: 2; justify-self: end; max-width: 22ch; text-align: right; font-size: clamp(8px,2.25vw,10px); line-height: 1.6; }
  .hero-intro { font-size: var(--fs-lead); max-width: 22ch; }
  .scroll-cue { display: none; }

  /* sticky stages: copy docked at bottom with gradient scrim */
  .stage::after { content: ""; position: absolute; inset: auto 0 0; height: 62%; z-index: 0; pointer-events: none; background: linear-gradient(to top, rgba(18,12,8,.92) 20%, rgba(18,12,8,.55) 60%, transparent); }
  .stage > * { z-index: 1; }
  .story { --len: 2.4; }
  .features { --len: 3.6; }
  .story-phase, .feature {
    left: var(--gutter); right: var(--gutter); width: auto; top: auto; transform: none;
    bottom: calc(clamp(16px, 3.4vh, 40px) + 28px);
  }
  .story-phase { gap: 12px; }
  .feature { top: auto; gap: 10px; }
  .feature-copygroup { gap: 3px; }
  .feature h2 { max-width: 12ch; font-size: clamp(38px,10.8vw,56px); }
  .feature-tagline { font-size: clamp(19px,5.8vw,27px); }
  .feature-chip { padding: 6px 14px 6px 6px; }
  .feature-chip img { width: 52px; }
  .feature-meter { left: var(--gutter); right: var(--gutter); }
  .feature-meter span { flex: 1; width: auto; }


  .table-heading { grid-template-columns: 1fr; }
  .category-list a { grid-template-columns: 3ch minmax(0, 1fr) 24px; grid-template-rows: auto auto; row-gap: 4px; column-gap: 14px; min-height: 0; padding: 20px 0; }
  .category-list span { grid-row: 1 / span 2; align-self: start; padding-top: 6px; }
  .category-list strong { font-size: clamp(26px, 8vw, 40px); }
  .category-list small { grid-column: 2; grid-row: 2; font-size: 10px; }
  .category-list i { grid-column: 3; grid-row: 1; }
  .category-list img { display: none; }

  .catalog-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .catalog-card { padding: 10px; gap: 10px; }
  .catalog-card h3 { font-size: 15px; }
  .catalog-meta { flex-direction: column; gap: 2px; font-size: 10px; }
  .catalog-card.is-featured { grid-column: 1 / -1; }

  .subscription { padding-top: 96px; padding-bottom: 88px; }
  .sub-header { justify-items: start; text-align: left; }
  .sub-header h2 { font-size: clamp(58px, 18vw, 92px); }
  .sub-header .line { padding-inline: 0 .06em; }
  .sub-lede { font-size: 18px; }
  .sub-plans { margin-top: 48px; }
  .sub-plan { padding: 24px; }
  .sub-plan h3 { font-size: clamp(32px, 10vw, 48px); }
  .sub-price strong { font-size: clamp(56px, 17vw, 76px); }
  .sub-footnote { text-align: left; line-height: 1.7; }

  .founder-grid { grid-template-columns: minmax(0,1fr) minmax(170px,32%); column-gap: 22px; }
  .founder-heading { grid-column: 1; grid-row: 1; }
  .founder-portrait { grid-column: 2; grid-row: 1; max-width: 240px; }
  .founder-copy { grid-column: 1 / -1; grid-row: 2; }
  .founder-signoff { grid-column: 1 / -1; grid-row: 3; }
  .founder-heading h2 { max-width: 11ch; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 640px) {
  .moments { margin-top: -26svh; padding-top: clamp(64px,10vh,92px); }
  .bundle-contents { width: 100%; gap: 5px 0; }
  .bundle-contents span { font-size: 12px; white-space: normal; }
  .bundle-contents span:not(:last-child)::after { margin-inline: 7px; }
  .custom-drop-toggle { min-height: 116px; padding: 20px; }
  .custom-drop-toggle em { max-width: 28ch; line-height: 1.35; }
  .custom-drop-toggle > i { width: 42px; height: 42px; font-size: 24px; }
  .custom-drop-builder { padding: 16px; gap: 28px; }
  .custom-products { grid-template-columns: 1fr; }
  .custom-product { grid-template-columns: 44px minmax(0,1fr) auto; min-height: 70px; gap: 9px; }
  .custom-product img { width: 44px; height: 44px; }
  .custom-product-copy strong { font-size: 12px; }
  .custom-frequency > div { grid-template-columns: 1fr; }
  .custom-frequency button { border-right: 0; border-bottom: 1px solid var(--ink-line); }
  .custom-frequency button:last-child { border-bottom: 0; }
  .founder-note { padding-top: 48px; padding-bottom: 56px; }
  .founder-grid { grid-template-columns: minmax(0,1fr) minmax(104px,35%); column-gap: 12px; row-gap: 24px; padding: 14px 14px 22px; border-radius: 16px; }
  .founder-portrait { max-width: 132px; }
  .founder-portrait img { border-radius: 10px; }
  .founder-heading h2 { font-size: clamp(34px,10.2vw,48px); }
  .founder-heading .eyebrow { margin-bottom: 10px; font-size: 8px; }
  .founder-copy { grid-template-columns: 1fr; }
  .footer-bottom { grid-template-columns: 1fr; gap: 8px; }
  .footer-bottom > :last-child { justify-self: start; }
  .footer-credit { text-align: left; }
}

/* short landscape: keep copy compact */
@media (max-height: 560px) and (orientation: landscape) {
  .hero { min-height: 100svh; }
  .scroll-cue, .feature-chip { display: none; }
  .hero-bottom { grid-template-columns: minmax(0,1fr) minmax(128px,.92fr); }
  .story-phase, .feature { width: min(44vw, 460px); }
}

/* large displays: cap measure */
@media (min-width: 1800px) {
  :root { --gutter: 72px; }
}

/* ========================================================================== reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .grain { animation: none; }
}
