/* SOLENNE — fictional botanical fragrance house (Launchlight Studio portfolio concept)
   Type: Instrument Serif (display) + Geist (text), both SIL OFL via Google Fonts. */
:root {
  --ivory: #F4EEE4;
  --stone: #E2D9CB;
  --stone-2: #CFC3B1;
  --aubergine: #2E1A2B;
  --aubergine-2: #452B40;
  --ink: #2E1A2B;
  --ink-soft: #5B4757;      /* 7.6:1 on ivory */
  --tangerine: #E8742C;
  --tangerine-ink: #B5501A; /* 4.6:1 on ivory for small accent text */
  --lilac: #D9CFE6;
  --line: rgba(46, 26, 43, .16);
  --display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --text: "Geist", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(18px, 4vw, 64px);
  --head-h: 64px;
  --ease: cubic-bezier(.22, .7, .18, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--head-h); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 400 1.0625rem/1.65 var(--text); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--tangerine); outline-offset: 3px; border-radius: 2px; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 100; background: var(--aubergine); color: var(--ivory); padding: 10px 16px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- Type ---------- */
.eyebrow { font: 500 .74rem/1.4 var(--text); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); display: flex; gap: 14px; align-items: baseline; }
.eyebrow > span:first-child { font: italic 400 1.05rem var(--display); letter-spacing: 0; text-transform: none; color: var(--tangerine-ink); }
.eyebrow-light { color: rgba(244, 238, 228, .72); }
.eyebrow-light span { color: var(--tangerine); }
.display-lg, .display-xl { font-family: var(--display); font-weight: 400; letter-spacing: -.015em; line-height: .98; text-wrap: balance; }
.display-lg { font-size: clamp(2.6rem, 1.2rem + 4.6vw, 5.6rem); }
.display-xl { font-size: clamp(3rem, 1rem + 7.4vw, 8.6rem); }
.display-lg em, .display-xl em, .arrival-line em { font-style: italic; color: var(--tangerine-ink); }
.display-light { color: var(--ivory); }
.display-light em { color: var(--tangerine); }
.img-note { font: 400 .72rem var(--text); letter-spacing: .04em; color: var(--ink-soft); margin-top: 10px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 0; border: 1px solid var(--aubergine); font: 500 .92rem var(--text); letter-spacing: .02em; text-decoration: none; cursor: pointer; transition: background-color .3s var(--ease), color .3s var(--ease), transform .2s var(--ease), box-shadow .3s var(--ease); }
.btn-solid { background: var(--aubergine); color: var(--ivory); }
.btn-solid:hover { background: var(--aubergine-2); box-shadow: inset 0 -3px 0 var(--tangerine); }
.btn-line { background: transparent; color: var(--aubergine); }
.btn-line:hover { background: var(--aubergine); color: var(--ivory); }
.btn:active { transform: translateY(1px); }

/* ---------- Header ---------- */
.site-head { position: fixed; inset: 0 0 auto; z-index: 40; height: var(--head-h); display: flex; align-items: center; gap: 28px; padding: 0 var(--gutter); color: var(--ink); background: rgba(244, 238, 228, .9); border-bottom: 1px solid transparent; transition: background-color .5s var(--ease), color .5s var(--ease), border-color .5s; }
.site-head.is-scrolled { border-bottom-color: var(--line); }
.site-head.is-dark { background: rgba(46, 26, 43, .92); color: var(--ivory); border-bottom-color: rgba(244,238,228,.12); }
.mark { font: 400 1.5rem/1 var(--display); letter-spacing: .32em; text-decoration: none; margin-right: auto; padding: 8px 0; }
.chapters ul { display: flex; gap: 4px; }
.chapters a { display: block; padding: 10px 12px; font-size: .86rem; text-decoration: none; position: relative; }
.chapters a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 1px; background: var(--tangerine); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.chapters a:hover::after, .chapters a:focus-visible::after { transform: scaleX(1); }
.chapters .nav-cta { border: 1px solid currentColor; margin-left: 8px; }
.chapters .nav-cta::after { display: none; }
.chapters .nav-cta:hover { background: var(--tangerine); border-color: var(--tangerine); color: var(--aubergine); }
.head-meta { display: flex; align-items: center; gap: 14px; }
.concept-tag { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; padding: 5px 10px; border: 1px dashed currentColor; opacity: .85; white-space: nowrap; }
.back { font-size: .86rem; text-decoration: none; white-space: nowrap; padding: 10px 0; }
.back:hover { text-decoration: underline; text-decoration-color: var(--tangerine); text-underline-offset: 4px; }
@media (max-width: 1100px) { .chapters li:not(:last-child) { display: none; } }
@media (max-width: 760px) {
  :root { --head-h: 56px; }
  .site-head { gap: 12px; }
  .mark { font-size: 1.2rem; letter-spacing: .24em; }
  .chapters { display: none; }
  .concept-tag { font-size: .62rem; padding: 4px 8px; }
  .tag-long { display: none; }
}
@media (max-width: 420px) { .back-word { display: none; } .back::after { content: "Back"; } }

/* ---------- I. Arrival ---------- */
.arrival { position: relative; min-height: 100vh; min-height: 100svh; display: grid; align-items: center; overflow: hidden; background: var(--ivory); }
.arrival-media { position: absolute; inset: 0; z-index: 0; }
.arrival-media img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; transform-origin: 70% 55%; }
.arrival-copy { position: relative; z-index: 1; padding: calc(var(--head-h) + 32px) var(--gutter) 48px; max-width: min(52vw, 760px); }
.wordmark { font: 400 clamp(4.2rem, 1rem + 11.5vw, 13.5rem)/.86 var(--display); letter-spacing: .02em; margin: 22px 0 18px -.04em; display: flex; }
.wordmark span { display: inline-block; }
.arrival-line { font: 400 clamp(1.8rem, 1rem + 2.2vw, 3rem)/1.05 var(--display); }
.arrival-lede { margin-top: 18px; max-width: 34ch; color: var(--ink-soft); }
.arrival-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.img-note-arrival { position: absolute; right: var(--gutter); bottom: 16px; z-index: 1; }

/* Entrance (CSS only, so it never blocks content; disabled for reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  .js .arrival-media img { animation: settle 2.2s var(--ease) both; }
  .js .wordmark span { animation: rise 1.1s var(--ease) both; animation-delay: calc(.08s * var(--i, 0) + .15s); }
  .js .arrival-line, .js .arrival-lede, .js .arrival-actions, .js .arrival .eyebrow { animation: fade .9s var(--ease) both; }
  .js .arrival .eyebrow { animation-delay: .1s; }
  .js .arrival-line { animation-delay: .7s; }
  .js .arrival-lede { animation-delay: .85s; }
  .js .arrival-actions { animation-delay: 1s; }
}
@keyframes settle { from { transform: scale(1.05); } to { transform: scale(1); } }
@keyframes rise { from { transform: translateY(.35em); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Phones and portrait tablets: text on plain ivory above a recomposed portrait crop */
@media (max-width: 760px), (max-width: 1100px) and (orientation: portrait) {
  .arrival { display: flex; flex-direction: column; align-items: stretch; min-height: 0; }
  .arrival-media { position: relative; inset: auto; order: 2; aspect-ratio: 1100 / 1372; }
  .arrival-media img { object-position: 50% 50%; }
  .arrival-copy { order: 1; max-width: none; padding: calc(var(--head-h) + 22px) var(--gutter) 22px; }
  .wordmark { font-size: clamp(4rem, 23.5vw, 12rem); margin: 12px 0 8px -.04em; letter-spacing: 0; }
  .eb-long { display: none; }
  .arrival-lede { margin-top: 10px; font-size: 1rem; }
  .arrival-actions { margin-top: 20px; }
  .arrival-actions { flex-direction: column; }
  .arrival-actions .btn { width: 100%; }
  .img-note-arrival { position: static; order: 3; padding: 8px var(--gutter) 0; text-align: right; }
}

/* ---------- II. The object ---------- */
.object { position: relative; background: var(--ivory); padding: clamp(80px, 10vw, 140px) var(--gutter); }
.object-stage { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 110px); align-items: center; max-width: 1320px; margin: 0 auto; }
.object-copy { display: grid; gap: 34px; align-content: center; }
.notes { display: grid; gap: 0; border-top: 1px solid var(--line); }
.notes li { display: grid; grid-template-columns: 3rem 1fr; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--line); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.note-n { font: italic 400 1.2rem var(--display); color: var(--tangerine-ink); }
.notes h3 { font: 400 1.6rem/1.1 var(--display); margin-bottom: 4px; }
.notes p { color: var(--ink-soft); max-width: 38ch; }
.object-figure { justify-self: center; width: min(100%, 560px); }
.object-frame { aspect-ratio: 1592 / 2240; overflow: hidden; background: var(--stone); transform-origin: 50% 40%; will-change: transform; }
.object-frame img { width: 100%; height: 100%; object-fit: cover; }
/* Desktop sticky sequence (enabled by JS only) */
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .js .object.is-sequenced { height: 230vh; padding: 0 var(--gutter); }
  .js .object.is-sequenced .object-stage { position: sticky; top: 0; height: 100vh; padding-top: var(--head-h); }
  .js .object.is-sequenced .object-figure { width: min(100%, 50vh); }
  .js .object.is-sequenced .notes li { opacity: .22; transform: translateX(-8px); }
  .js .object.is-sequenced .notes li.on { opacity: 1; transform: none; }
}
@media (max-width: 900px) {
  .object-stage { grid-template-columns: 1fr; }
  .object-figure { order: -1; width: min(100%, 460px); }
}

/* ---------- III. The botanical story ---------- */
.botanical { position: relative; color: var(--ivory); padding: clamp(100px, 12vw, 180px) var(--gutter) clamp(90px, 10vw, 150px); isolation: isolate; }
.botanical-bg { position: absolute; inset: 0; z-index: -1; background: var(--aubergine); clip-path: inset(var(--curtain, 0%) var(--curtain-x, 0%) 0 var(--curtain-x, 0%)); }
.botanical-inner { position: relative; max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 28px); row-gap: clamp(60px, 9vw, 130px); }
.botanical-inner > .eyebrow, .botanical-inner > h2 { grid-column: 1 / span 8; }
.botanical-inner > h2 { margin-top: -40px; }
.fragment { position: absolute; z-index: 0; font: italic 400 clamp(6rem, 3rem + 14vw, 19rem)/1 var(--display); color: rgba(244, 238, 228, .06); pointer-events: none; white-space: nowrap; will-change: transform; }
.f1 { top: 2%; right: -1%; } .f2 { top: 44%; left: -3%; } .f3 { top: 74%; right: 4%; }
.passage { position: relative; z-index: 1; display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; align-items: center; }
.panel { overflow: hidden; background: var(--aubergine-2); will-change: transform; }
.panel img { width: 100%; height: 100%; object-fit: cover; }
.panel-peel { grid-column: 2 / span 3; aspect-ratio: 450 / 1320; }
.panel-leaf { grid-column: 7 / span 6; grid-row: 1; aspect-ratio: 4 / 3; }
.panel-stone { grid-column: 1 / span 5; aspect-ratio: 8 / 3; }
.p1 .passage-text { grid-column: 7 / span 5; }
.p2 .passage-text { grid-column: 2 / span 4; grid-row: 1; }
.p3 .passage-text { grid-column: 7 / span 5; }
.passage-n { font: 500 .72rem var(--text); letter-spacing: .16em; text-transform: uppercase; color: var(--tangerine); margin-bottom: 14px; }
.passage-text h3 { font: 400 clamp(2rem, 1.2rem + 2.2vw, 3.4rem)/1.02 var(--display); margin-bottom: 14px; text-wrap: balance; }
.passage-text p:last-child { color: rgba(244, 238, 228, .82); max-width: 36ch; font-size: 1.08rem; }
.fictional-note { grid-column: 1 / -1; font-size: .78rem; color: rgba(244, 238, 228, .62); position: relative; z-index: 1; }
@media (max-width: 900px) {
  .botanical-inner { grid-template-columns: 1fr; row-gap: 64px; }
  .botanical-inner > .eyebrow, .botanical-inner > h2, .passage, .fictional-note { grid-column: 1; }
  .botanical-inner > h2 { margin-top: -30px; }
  .passage { display: grid; grid-template-columns: 1fr; gap: 22px; }
  .panel-peel, .panel-leaf, .panel-stone, .p1 .passage-text, .p2 .passage-text, .p3 .passage-text { grid-column: 1; grid-row: auto; }
  .panel-peel { width: 46%; }
  .panel-leaf { width: 92%; margin-left: auto; }
  .panel-stone { width: 64%; }
  .fragment { font-size: clamp(5rem, 30vw, 9rem); }
}

/* ---------- IV. The collection ---------- */
.collection { background: var(--stone); padding: clamp(90px, 11vw, 160px) var(--gutter); }
.collection-head { max-width: 1320px; margin: 0 auto clamp(40px, 6vw, 80px); display: grid; gap: 20px; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); align-items: end; }
.collection-head .eyebrow { grid-column: 1 / -1; }
.collection-sub { color: var(--ink-soft); max-width: 36ch; }
.collection-spread { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.still-frame { position: relative; aspect-ratio: 2048 / 1360; overflow: hidden; background: var(--stone-2); }
.still-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); transform-origin: var(--fx, 49%) 55%; }
.still-dim { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 15% 46% at var(--fx, 49%) 46%, rgba(226, 217, 203, 0) 60%, rgba(226, 217, 203, .58) 100%); transition: background-position .8s var(--ease); }
.collection-spread[data-active="0"] { --fx: 27%; }
.collection-spread[data-active="1"] { --fx: 49%; }
.collection-spread[data-active="2"] { --fx: 71%; }
.collection-spread .still-frame img { transform: scale(1.04); }
.picker { display: grid; border-top: 1px solid var(--line); }
.picker button { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 2.6rem 1fr auto; align-items: center; gap: 12px; padding: 16px 4px; border-bottom: 1px solid var(--line); cursor: pointer; min-height: 64px; transition: background-color .3s var(--ease), padding .3s var(--ease); }
.picker button:hover { background: rgba(244, 238, 228, .5); }
.picker button:focus-visible { outline: 2px solid var(--tangerine); outline-offset: -2px; }
.picker button[aria-selected="true"] { padding-left: 14px; background: var(--ivory); box-shadow: inset 3px 0 0 var(--tangerine); }
.pick-n { font: italic 400 1.1rem var(--display); color: var(--tangerine-ink); }
.pick-name { font: 400 clamp(1.8rem, 1.2rem + 1.4vw, 2.6rem)/1 var(--display); }
.pick-tone { width: 14px; height: 14px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 1px rgba(46,26,43,.2); }
.panels { margin-top: 28px; display: grid; gap: 28px; }
.item-panel { display: grid; grid-template-columns: 140px 1fr; gap: 20px; align-items: start; }
.item-panel img { width: 140px; background: var(--ivory); }
.item-panel[hidden] { display: none; }
.js .item-panel:not([hidden]) { animation: fade .6s var(--ease) both; }
.item-kind { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.item-panel h3 { font: 400 2.4rem/1 var(--display); margin: 8px 0; }
.item-line { color: var(--ink-soft); margin-bottom: 14px; }
.item-notes { display: grid; border-top: 1px solid var(--line); }
.item-notes div { display: grid; grid-template-columns: 4.5rem 1fr; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.item-notes dt { color: var(--ink-soft); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; padding-top: 3px; }
@media (max-width: 900px) {
  .collection-head, .collection-spread { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { .item-panel { grid-template-columns: 110px 1fr; } .item-panel img { width: 110px; } }

/* ---------- V. Final impression ---------- */
.final { position: relative; background: var(--lilac); overflow: hidden; }
.final-media { position: relative; }
.final-media img { width: 100%; height: auto; aspect-ratio: 2400 / 1029; object-fit: cover; transform-origin: 70% 60%; will-change: transform; }
.final-statement { position: absolute; left: var(--gutter); top: 50%; transform: translateY(-50%); max-width: 46%; }
.final-statement .display-xl { color: var(--aubergine); }
.img-note-final { position: absolute; right: var(--gutter); bottom: 12px; margin: 0; }
@media (max-width: 760px), (max-width: 1100px) and (orientation: portrait) {
  .final { display: flex; flex-direction: column; }
  .final-statement { position: static; transform: none; max-width: none; order: -1; padding: 72px var(--gutter) 24px; }
  .final-media img { aspect-ratio: 900 / 1125; }
  .img-note-final { position: static; padding: 8px var(--gutter) 0; text-align: right; }
}

/* ---------- Scent guide ---------- */
.scent { background: var(--lilac); padding: clamp(70px, 9vw, 130px) var(--gutter) clamp(90px, 10vw, 150px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.scent-intro { display: grid; gap: 18px; max-width: 30rem; }
.scent-intro p { color: var(--ink-soft); }
.guide { display: grid; gap: 22px; }
.guide[hidden] { display: none; }
.guide-progress { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); min-height: 1.2em; }
.q { border: 0; padding: 0; margin: 0; min-width: 0; }
.q legend { font: 400 clamp(1.6rem, 1.1rem + 1.4vw, 2.4rem)/1.1 var(--display); padding: 0; margin-bottom: 16px; }
.q-n { display: block; font: 500 .72rem var(--text); letter-spacing: .16em; color: var(--tangerine-ink); margin-bottom: 8px; }
.opts { display: grid; gap: 8px; }
.opts label { position: relative; }
.opts input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opts span { display: flex; align-items: center; min-height: 54px; padding: 0 18px; border: 1px solid rgba(46,26,43,.3); background: rgba(244,238,228,.45); transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s; }
.opts label:hover span { border-color: var(--aubergine); }
.opts input:checked + span { background: var(--aubergine); color: var(--ivory); border-color: var(--aubergine); box-shadow: inset 3px 0 0 var(--tangerine); }
.opts input:focus-visible + span { outline: 2px solid var(--tangerine); outline-offset: 3px; }
.js .guide.is-stepped .q { display: none; }
.js .guide.is-stepped .q.is-current { display: block; animation: fade .5s var(--ease) both; }
.guide-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.guide-error { color: #8A2E1C; font-size: .92rem; min-height: 1.4em; }
.result { grid-column: 2; display: grid; grid-template-columns: 160px 1fr; gap: 24px; align-items: start; padding: 28px; background: var(--ivory); border-top: 3px solid var(--tangerine); }
.result[hidden] { display: none; }
.result img { width: 160px; }
.result h3 { font: 400 3rem/1 var(--display); margin: 8px 0 10px; }
.result p:not(.item-kind) { color: var(--ink-soft); }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.js .result:not([hidden]) { animation: fade .6s var(--ease) both; }
@media (max-width: 900px) {
  .scent { grid-template-columns: 1fr; }
  .result { grid-column: 1; }
}
@media (max-width: 480px) { .result { grid-template-columns: 1fr; } .result img { width: 140px; } }

/* ---------- Reveals (classes are added by JS only) ---------- */
.rv { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.rv.in { opacity: 1; transform: none; }

/* ---------- Footer ---------- */
.foot { background: var(--aubergine); color: rgba(244, 238, 228, .8); padding: 60px var(--gutter) 40px; display: grid; gap: 14px; font-size: .92rem; }
.foot-mark { font: 400 clamp(3rem, 10vw, 8rem)/1 var(--display); letter-spacing: .2em; color: var(--ivory); }
.foot p { max-width: 72ch; }
.foot nav { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 10px; }
.foot nav a { color: var(--ivory); padding: 8px 0; }

/* ---------- Reduced motion: complete static version ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .rv { opacity: 1; transform: none; }
  .botanical-bg { clip-path: none; }
  .panel, .fragment, .object-frame, .final-media img { transform: none !important; }
}


/* ---------- Detail chapter (photographic version) ---------- */
.detail { position: relative; background: var(--ivory); padding: clamp(80px, 10vw, 140px) var(--gutter); }
.detail-stage { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 110px); align-items: center; max-width: 1320px; margin: 0 auto; }
.detail-copy { display: grid; gap: 24px; max-width: 30rem; }
.detail-copy > p:last-child { color: var(--ink-soft); font-size: 1.08rem; }
.detail-figure { justify-self: center; width: min(100%, 520px); }
.object-frame-full { aspect-ratio: 750 / 935; }
@media (max-width: 900px) { .detail-stage { grid-template-columns: 1fr; } .detail-figure { order: -1; } }
.when-3d { display: none; }

/* ======================================================================
   3D MODE (html.has-3d): one fixed environment layer + one shared canvas.
   Stacking: environment (0) < botanical imagery (1) < 3D bottle (3) < text and UI (5+).
   ====================================================================== */
.env, .stage { display: none; }
.has-3d .env { display: block; position: fixed; inset: 0; z-index: 0; background: var(--ivory); pointer-events: none; }
.has-3d .stage { display: block; position: fixed; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .6s var(--ease); }
.has-3d.stage-ready .stage { opacity: 1; }
.has-3d body { background: transparent; }
.has-3d .arrival, .has-3d .object, .has-3d .detail, .has-3d .botanical, .has-3d .collection, .has-3d .final { background: transparent; }
.has-3d .arrival-copy, .has-3d .object-copy, .has-3d .detail-copy, .has-3d .passage-text, .has-3d .botanical-inner > .eyebrow,
.has-3d .botanical-inner > h2, .has-3d .fictional-note, .has-3d .collection-head, .has-3d .collection-list, .has-3d .final-statement,
.has-3d .img-note { position: relative; z-index: 5; }
.has-3d .site-head { z-index: 40; }
.has-3d .scent, .has-3d .foot { position: relative; z-index: 6; }
.has-3d .when-3d { display: inline; }
.has-3d .when-photo { display: none; }

/* Photographs that contain the original bottle are reserved for the no-WebGL version. */
.has-3d .arrival-media, .has-3d .object-figure, .has-3d .detail-figure { display: none; }
.has-3d .collection-still { visibility: hidden; }
.has-3d .item-panel { grid-template-columns: 1fr; }
.has-3d .item-panel img { display: none; }

/* I. Arrival: botanical crops around the live bottle, multiplied into the ivory */
.arrival-deco { display: none; }
.has-3d .arrival-deco { display: block; position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.has-3d .arrival-deco img { position: absolute; mix-blend-mode: multiply; }
.has-3d .deco-peel { height: 74vh; width: auto; right: 24vw; top: 9vh; }
.has-3d .deco-leaf { width: min(26vw, 380px); right: 31vw; bottom: 17vh; }
.has-3d .deco-linen { left: 0; right: 0; bottom: 0; width: 100%; height: 13vh; object-fit: cover; object-position: 50% 0; }
.has-3d .arrival-copy { max-width: min(46vw, 700px); }

/* II. Object and III. Detail: bounded sticky stages on large screens; the bottle owns the right side */
.has-3d .notes li { transition: opacity .45s var(--ease), transform .45s var(--ease); }
.has-3d .detail-copy { max-width: 26rem; }
@media (min-width: 901px) and (orientation: landscape), (min-width: 1101px) {
  .has-3d .object { height: 330vh; padding: 0 var(--gutter); }
  .has-3d .object-stage { position: sticky; top: 0; height: 100vh; padding-top: var(--head-h); grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .has-3d .object-copy { max-width: 30rem; }
  .has-3d .notes li { opacity: .3; transform: translateX(-6px); }
  .has-3d .notes li.on { opacity: 1; transform: none; }
  .has-3d .detail { height: 250vh; padding: 0 var(--gutter); }
  .has-3d .detail-stage { position: sticky; top: 0; height: 100vh; padding-top: var(--head-h); align-items: end; padding-bottom: 14vh; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}

/* IV. Botanical: light lilac scene; text on the right, imagery drifting behind the bottle on the left */
.has-3d .botanical { color: var(--ink); }
.has-3d .botanical-bg { display: none; }
.has-3d .display-light { color: var(--ink); }
.has-3d .display-light em { color: var(--tangerine-ink); }
.has-3d .eyebrow-light { color: var(--ink-soft); }
.has-3d .eyebrow-light > span:first-child { color: var(--tangerine-ink); }
.has-3d .passage-n { color: var(--tangerine-ink); }
.has-3d .passage-text p:last-child { color: var(--ink-soft); }
.has-3d .fictional-note { color: var(--ink-soft); }
.has-3d .fragment { color: rgba(46, 26, 43, .06); z-index: 1; }
.has-3d .panel { position: relative; z-index: 1; background: transparent; }
.has-3d .panel img { mix-blend-mode: multiply; }
@media (min-width: 901px) {
  .has-3d .botanical-inner > .eyebrow, .has-3d .botanical-inner > h2 { grid-column: 7 / span 6; }
  .has-3d .p1 .passage-text, .has-3d .p2 .passage-text, .has-3d .p3 .passage-text { grid-column: 7 / span 5; grid-row: 1; }
  .has-3d .panel-peel { grid-column: 1 / span 2; grid-row: 1; }
  .has-3d .panel-leaf { grid-column: 2 / span 4; grid-row: 1; }
  .has-3d .panel-stone { grid-column: 1 / span 4; grid-row: 1; }
}

/* V. Collection: the still-life column becomes the bottle's space */
.has-3d .collection-spread { align-items: center; }

/* VI. Final */
.has-3d .final { min-height: 100vh; display: grid; align-items: center; }
.has-3d .final-media { position: absolute; inset: 0; }
.has-3d .final-media picture, .has-3d .img-note-final { display: none; }

/* Phones and portrait tablets: after the arrival the bottle lives in a compact band under the
   header. The band (and the canvas, masked to it) sit above the text, which scrolls up into the
   band's soft lower edge and disappears beneath it, so the model never covers a word or control. */
.band { display: none; }
@media (max-width: 760px), (max-width: 1100px) and (orientation: portrait) {
  :root { --band-h: 42svh; }
  .has-3d .band { display: block; position: fixed; left: 0; right: 0; top: 0; height: var(--band-h); z-index: 6; pointer-events: none; opacity: 0; transition: opacity .35s var(--ease);
    -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 36px), transparent); }
  .has-3d.band-on .band { opacity: 1; }
  .has-3d.band-on .stage { z-index: 7;
    -webkit-mask-image: linear-gradient(180deg, #000 calc(var(--band-h) - 40px), transparent calc(var(--band-h) - 6px)); mask-image: linear-gradient(180deg, #000 calc(var(--band-h) - 40px), transparent calc(var(--band-h) - 6px)); }
  .has-3d .scent, .has-3d .foot { z-index: 8; }
  .has-3d .arrival { min-height: 100svh; }
  .has-3d .arrival-copy { padding-bottom: 50svh; max-width: none; }
  .has-3d .deco-peel { height: 34svh; right: 4vw; top: auto; bottom: 14svh; }
  .has-3d .deco-leaf { width: 34vw; right: auto; left: 2vw; bottom: 6svh; }
  .has-3d .deco-linen { height: 7svh; }
  .has-3d .img-note-arrival { position: absolute; bottom: 8px; right: var(--gutter); padding: 0; }
  /* each chapter opens with the band's height of space, so its first line starts below the model */
  .has-3d .object, .has-3d .detail, .has-3d .botanical, .has-3d .collection, .has-3d .final { padding-top: calc(var(--band-h) - var(--head-h) + 8px); }
  .has-3d .collection-still { display: none; }
  .has-3d .final { display: block; min-height: 0; padding-bottom: 10svh; }
  .has-3d .final-statement { position: relative; transform: none; max-width: none; }
  .has-3d .notes li { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .has-3d .object, .has-3d .detail { height: auto !important; }
  .has-3d .object-stage, .has-3d .detail-stage { position: relative !important; height: auto !important; }
  .has-3d .notes li { opacity: 1 !important; transform: none !important; }
}

/* 3D refinements: keep the arrival credit pinned, and feather the botanical crops so no
   rectangular photo edge shows against the live environment colour. */
.has-3d .img-note-arrival { position: absolute; }
.has-3d .arrival-deco img, .has-3d .panel img {
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 58%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 58%, transparent 100%);
}
.has-3d .deco-linen { -webkit-mask-image: linear-gradient(180deg, transparent, #000 45%); mask-image: linear-gradient(180deg, transparent, #000 45%); }
