/* Pile ou Face, direction 1: Cire et Fumée / Wax & Smoke (gpt-taste).
   A painting lit by one candle. A fixed darkness layer covers the
   paintings; two holes in it are the light: the chapter's candle and the
   visitor's own (the cursor). Text sits above the darkness, always legible.
   Native scroll, CSS sticky, GSAP only for scrubbed effects. */

:root {
  --black: #0A0705;
  --umber: #2B1A10;
  --ochre: #D99A55;
  --ochre-hi: #F2C27E;
  --ink: #1B0F07;
  --ink-2: #4A2E18;
  --wax: #F3E2C0;
  --smoke: #8C8178;
  --flame: #FFB25C;
  --gold: #D9A441;
  --serif: 'Cormorant', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Geist', system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 72px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ui-fg: var(--wax);
  --ui-bg: rgba(20, 12, 7, .6);
}
body[data-tone="light"] { --ui-fg: var(--ink); --ui-bg: rgba(242, 194, 126, .55); }

html { background: var(--black); }
body { background: var(--black); color: var(--wax); font-family: var(--sans); font-size: 17px; line-height: 1.6; }
main { overflow-x: clip; width: 100%; max-width: 100%; }
::selection { background: var(--flame); color: var(--ink); }

/* ---------- the darkness, with two holes of light ---------- */
.dark {
  position: fixed; inset: 0; z-index: 5; pointer-events: none; background: rgba(6, 4, 3, var(--a, .88));
  -webkit-mask-image:
    radial-gradient(circle var(--rc, 0px) at var(--cx, 30%) var(--cy, 60%), transparent 0, transparent 35%, #000 100%),
    radial-gradient(circle var(--rm, 160px) at var(--mx, -999px) var(--my, -999px), transparent 0, transparent 30%, #000 100%);
  mask-image:
    radial-gradient(circle var(--rc, 0px) at var(--cx, 30%) var(--cy, 60%), transparent 0, transparent 35%, #000 100%),
    radial-gradient(circle var(--rm, 160px) at var(--mx, -999px) var(--my, -999px), transparent 0, transparent 30%, #000 100%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  transition: opacity .8s var(--ease);
}
body.lit .dark { opacity: 0; }
.smoke { position: fixed; inset: 0; z-index: 6; pointer-events: none; }

/* ---------- split nav ---------- */
.nav { position: fixed; z-index: 60; top: 18px; left: var(--gutter); right: var(--gutter); display: flex; justify-content: space-between; pointer-events: none; }
.nav > div { pointer-events: auto; display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 999px; background: var(--ui-bg); color: var(--ui-fg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px rgba(243, 226, 192, .1); transition: background-color .6s var(--ease), color .6s var(--ease); }
.nav a, .nav button, .nav span { height: 36px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; font: 500 14px/1 var(--sans); transition: background-color .3s var(--ease); }
.nav a { font: 600 italic 20px/1 var(--serif); }
.nav a:hover, .nav button:hover { background: rgba(243, 226, 192, .14); }
.nav [aria-pressed="true"] { background: var(--flame); color: var(--ink); }
.nav .clock { font-variant-numeric: tabular-nums; opacity: .75; }
/* sound: three bars that dance while the music plays */
.nav .snd .eq { height: 12px; padding: 0; gap: 2px; align-items: flex-end; }
.nav .snd .eq i { width: 2px; height: 4px; border-radius: 1px; background: currentColor; transition: height .3s var(--ease); }
.nav .snd[aria-pressed="true"] .eq i { animation: snd-eq .9s ease-in-out infinite alternate; }
.nav .snd[aria-pressed="true"] .eq i:nth-child(2) { animation-delay: -.3s; }
.nav .snd[aria-pressed="true"] .eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes snd-eq { from { height: 3px; } to { height: 12px; } }
.nav .snd .lbl { height: auto; padding: 0; }
html.rm .nav .snd .eq i { animation: none; height: 8px; }

.peek { position: fixed; z-index: 60; right: var(--gutter); bottom: 20px; height: 48px; padding: 0 6px 0 18px; display: inline-flex; align-items: center; gap: 12px; border-radius: 999px;
  background: var(--ui-bg); color: var(--ui-fg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px rgba(243, 226, 192, .1);
  font: 500 13px/1 var(--sans); user-select: none; -webkit-user-select: none; touch-action: none; transition: transform .4s var(--ease); }
.peek:active { transform: scale(.97); }
.peek i { width: 36px; height: 36px; border-radius: 999px; background: linear-gradient(90deg, var(--ochre-hi) 50%, var(--black) 50%); box-shadow: inset 0 0 0 2px var(--ui-fg); transition: transform .6s var(--ease); }
.peek.held i { transform: rotate(180deg); }

.btn { display: inline-flex; align-items: center; justify-content: center; height: 56px; padding: 0 28px; border-radius: 999px; font: 600 15px/1 var(--sans); white-space: nowrap; transition: transform .5s var(--ease), background-color .3s, color .3s, box-shadow .3s; position: relative; z-index: 10; }
.btn:active { transform: scale(.97); }
.btn-wax { background: var(--wax); color: var(--ink); }
.btn-wax:hover { background: var(--flame); }
.btn-ghost { color: var(--wax); box-shadow: inset 0 0 0 1px rgba(243, 226, 192, .35); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--wax); background: rgba(243, 226, 192, .08); }
.btn-ink { background: var(--ink); color: var(--wax); }
.btn-ink:hover { background: var(--umber); }

.dot { position: fixed; left: 0; top: 0; z-index: 90; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 999px; background: var(--flame); pointer-events: none; opacity: 0; display: grid; place-items: center;
  box-shadow: 0 0 14px 4px rgba(255, 178, 92, .5); transition: width .45s var(--ease), height .45s var(--ease), margin .45s var(--ease), opacity .3s; }
.dot span { font: 600 11px/1 var(--sans); color: var(--ink); opacity: 0; white-space: nowrap; transition: opacity .2s; }
@media (pointer: fine) { .dot { opacity: 1; } }
.dot.on { width: 70px; height: 70px; margin: -35px 0 0 -35px; }
.dot.on span { opacity: 1; }

/* ---------- candle (CSS) ---------- */
.candle { position: relative; width: 56px; height: calc(var(--h, 1) * 220px); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.candle .body { position: relative; width: 56px; flex: 1; border-radius: 6px 6px 3px 3px; background: linear-gradient(90deg, #c9a77a, #f3e2c0 40%, #e3c79c 70%, #a8875c); box-shadow: inset 0 10px 14px -8px rgba(255, 230, 180, .9); transform-origin: bottom; }
.candle .body::before { content: ''; position: absolute; left: 6px; top: -3px; width: 12px; height: 34px; border-radius: 0 0 6px 6px; background: #f6e8cc; }
.candle .pool { position: absolute; left: 4px; right: 4px; top: 0; height: 0; border-radius: 4px; background: #f8ecd4; }
.candle .wick { position: absolute; top: -14px; left: 50%; width: 3px; height: 14px; margin-left: -1.5px; background: #2a1a0e; border-radius: 2px; }
.candle .flame { position: absolute; top: -66px; left: 50%; width: 26px; height: 54px; margin-left: -13px; transform-origin: 50% 100%; }
.candle .flame::before { content: ''; position: absolute; inset: 0; border-radius: 50% 50% 46% 46% / 64% 64% 36% 36%;
  background: radial-gradient(50% 60% at 50% 72%, #fffbe8 0 22%, #ffd78a 40%, var(--flame) 62%, rgba(255, 120, 40, 0) 76%); animation: burn 1.6s infinite alternate ease-in-out; }
.candle .flame::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 120px; height: 120px; margin-left: -60px; border-radius: 999px; background: radial-gradient(circle, rgba(255, 178, 92, .35), rgba(255, 178, 92, 0) 65%); }
.ch:not(.live) .candle .flame::before { animation-play-state: paused; }
@keyframes burn { 0% { transform: scale(1, 1) skewX(0); } 40% { transform: scale(.95, 1.05) skewX(-3deg); } 100% { transform: scale(1.04, .97) skewX(2deg); } }
.snuffer { position: absolute; top: -150px; left: 50%; width: 46px; height: 70px; margin-left: -23px; background: linear-gradient(90deg, #6b5338, #b89a6a, #5a4630); clip-path: polygon(50% 0, 100% 100%, 0 100%); opacity: 0; }
.snuffer::after { content: ''; position: absolute; left: 50%; top: -60px; width: 3px; height: 70px; background: #8a7150; }

/* ---------- hero: artistic asymmetry ---------- */
.hero { position: relative; min-height: 100dvh; overflow: hidden; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; padding: 120px var(--gutter) 80px; align-items: center; background: radial-gradient(70% 70% at 72% 62%, #4a2c16 0, #1a0f08 55%, var(--black) 100%); }
.hero-copy { grid-column: 1 / span 8; position: relative; z-index: 10; }
.hero h1 { font: 500 clamp(4rem, 9.5vw, 10rem)/.86 var(--serif); letter-spacing: -.03em; color: var(--wax); }
.hero h1 .ln { display: block; white-space: nowrap; }
.hero h1 i { font-style: italic; color: var(--ochre-hi); font-weight: 400; }
.wick-pill { display: inline-block; width: 1.3em; height: .62em; border-radius: 999px; vertical-align: .06em; margin: 0 .1em; position: relative; overflow: hidden; background: radial-gradient(60% 100% at 50% 100%, #6b3a16, #1b0f07 75%); box-shadow: inset 0 0 0 1px rgba(243, 226, 192, .2); }
.wick-pill::after { content: ''; position: absolute; left: 50%; top: 14%; width: .2em; height: .38em; margin-left: -.1em; border-radius: 50% 50% 46% 46% / 64% 64% 36% 36%; background: radial-gradient(50% 60% at 50% 70%, #fffbe8, var(--flame) 60%, transparent 76%); animation: burn 1.3s infinite alternate ease-in-out; }
.hero p { margin: 30px 0 38px; max-width: 42ch; font-size: clamp(17px, 1.3vw, 20px); color: rgba(243, 226, 192, .72); }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.still { position: absolute; right: -2vw; bottom: -4vh; width: min(58vw, 820px); z-index: 1; }
.still svg { width: 100%; height: auto; display: block; overflow: visible; }
.still .candle-slot { position: absolute; left: 24%; bottom: 33%; z-index: 2; }
.coin3d { position: absolute; left: 58%; bottom: 31%; width: 120px; height: 120px; perspective: 900px; z-index: 2; }
.coin3d .c { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(68deg) rotateZ(var(--rz, 0deg)) rotateY(var(--ry, 0deg)); }
.coin3d .c i { position: absolute; inset: 0; border-radius: 999px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: inset 0 0 0 4px rgba(90, 50, 20, .6); }
.coin3d .c i:first-child { background: radial-gradient(circle at 35% 30%, #fff0c8, var(--gold) 55%, #7a5216); }
.coin3d .c i:last-child { background: radial-gradient(circle at 35% 30%, #5a4630, #1b0f07 70%); transform: rotateY(180deg); }

/* ---------- interest: gapless bento, 4 cells (4x2 | 8 / 4 | 4) ---------- */
.intro { position: relative; padding: clamp(140px, 20vh, 220px) var(--gutter); background: linear-gradient(180deg, var(--black), #160d07); }
.intro h2 { font: 500 clamp(2.8rem, 5.6vw, 6rem)/.95 var(--serif); letter-spacing: -.02em; max-width: 1200px; margin-bottom: clamp(56px, 9vh, 100px); position: relative; z-index: 10; }
.intro h2 i { color: var(--ochre-hi); }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: minmax(250px, auto); grid-auto-flow: dense; gap: 14px; }
.cell { position: relative; overflow: hidden; border-radius: 26px; padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; justify-content: flex-end; z-index: 10; }
.cell .fx { position: absolute; inset: 0; transition: transform 1.2s var(--ease); }
.cell:hover .fx { transform: scale(1.06); }
.cell > *:not(.fx) { position: relative; }
.cell h3 { font: 500 clamp(2rem, 3.2vw, 3.4rem)/.95 var(--serif); margin-bottom: 12px; }
.cell p { max-width: 38ch; font-size: 16px; }
.c1 { grid-column: span 4; grid-row: span 2; background: var(--ochre); color: var(--ink); }
.c1 .fx { background: radial-gradient(60% 50% at 50% 30%, #ffe2a8 0, rgba(255, 226, 168, 0) 70%); }
.c2 { grid-column: span 8; background: #120b07; color: var(--wax); box-shadow: inset 0 0 0 1px rgba(243, 226, 192, .08); }
.c2 .fx { background: radial-gradient(30% 60% at 80% 50%, rgba(140, 129, 120, .18), transparent 70%); }
.c3 { grid-column: span 4; background: var(--umber); color: var(--wax); }
.c3 .fx { background: radial-gradient(40% 40% at 70% 30%, rgba(255, 178, 92, .35), transparent 70%); }
.c4 { grid-column: span 4; background: var(--wax); color: var(--ink); }
.c4 .fx { background: repeating-linear-gradient(90deg, rgba(27, 15, 7, .05) 0 1px, transparent 1px 22px); }
/* card illustrations, drawn in each card's text colour */
.cell .art { position: absolute; pointer-events: none; color: inherit; }
.cell .art svg { display: block; width: 100%; height: 100%; overflow: visible; }
.c1 .art { top: 6%; left: 8%; right: 8%; height: 54%; }
.c2 .art { top: 0; right: 0; bottom: 0; width: 60%; -webkit-mask: linear-gradient(90deg, transparent, #000 22%); mask: linear-gradient(90deg, transparent, #000 22%); }
.c3 .art { top: 18px; right: 18px; width: clamp(92px, 9vw, 128px); aspect-ratio: 1; }
.c4 .art { top: 22px; left: 22px; right: 22px; height: 104px; }
/* keep the text of the small cards below their drawing */
.c3 { padding-top: calc(clamp(92px, 9vw, 128px) + 34px); }
.c4 { padding-top: 146px; }
.ctime { font: 500 10px/1 var(--sans); fill: currentColor; opacity: .7; }
/* the Shadow card's etching shows only inside a circle of light that follows
   the cursor, and wanders on its own when nobody is pointing */
@property --mx { syntax: '<percentage>'; inherits: true; initial-value: 60%; }
@property --my { syntax: '<percentage>'; inherits: true; initial-value: 70%; }
.c2 .reveal { -webkit-mask: radial-gradient(circle 150px at var(--mx) var(--my), #000 0 30%, transparent 100%); mask: radial-gradient(circle 150px at var(--mx) var(--my), #000 0 30%, transparent 100%); }
.c2 [data-shadow-art] { animation: wander 11s ease-in-out infinite alternate; }
.c2 [data-shadow-art].tracking { animation: none; }
@keyframes wander { 0% { --mx: 30%; --my: 75%; } 35% { --mx: 55%; --my: 60%; } 70% { --mx: 80%; --my: 35%; } 100% { --mx: 62%; --my: 80%; } }
.cflame { transform-box: fill-box; transform-origin: 50% 100%; animation: cflame 1.8s ease-in-out infinite alternate; }
@keyframes cflame { 0% { transform: scale(1, 1); } 45% { transform: scale(.94, 1.08); } 100% { transform: scale(1.05, .95); } }
.cflick { animation: cflick 2.6s ease-in-out infinite alternate; }
@keyframes cflick { 0% { opacity: .75; } 50% { opacity: 1; } 100% { opacity: .85; } }
.c3 .art .cflame, .c3 .art .cflick { animation-duration: 1.2s; }
html.rm .cflame, html.rm .cflick, html.rm .c2 [data-shadow-art] { animation: none; }

/* horizontal accordion: the seven hours */
.hours { display: flex; gap: 10px; height: 64vh; margin-top: 14px; position: relative; z-index: 10; }
.hour { position: relative; flex: 1; min-width: 0; border-radius: 26px; overflow: hidden; background: var(--hb); color: var(--ink); transition: flex-grow .8s var(--ease); cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; padding: 24px; text-align: left; }
.hour:hover, .hour:focus-visible { flex-grow: 4.2; }
.hour .t { font: 600 15px/1 var(--sans); font-variant-numeric: tabular-nums; }
.hour .titles { opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease), transform .7s var(--ease); min-width: 260px; }
.hour:hover .titles, .hour:focus-visible .titles { opacity: 1; transform: none; transition-delay: .15s; }
.hour .titles b { display: block; font: 500 clamp(1.6rem, 2.2vw, 2.4rem)/1 var(--serif); margin-bottom: 10px; }
.hour .titles span { display: block; font-size: 14px; }
/* time and titles sit above the glow and the scene, so the glow that grows
   on hover never washes them out */
.hour .t, .hour .titles { position: relative; z-index: 2; color: var(--ink); }
.hour .glow { position: absolute; left: 50%; bottom: 0; width: 140%; aspect-ratio: 1; transform: translate(-50%, 50%); border-radius: 999px; background: radial-gradient(circle, rgba(255, 230, 180, .55), transparent 65%); transition: transform 1.2s var(--ease); pointer-events: none; }
.hour:hover .glow { transform: translate(-50%, 40%) scale(1.2); }
/* hour scenes: small and still while the card is closed; on hover or focus
   they grow, rise above the titles and come alive */
.hour .hart { position: absolute; left: 50%; top: 46%; width: min(86%, 260px); aspect-ratio: 5 / 4; color: var(--ink); pointer-events: none;
  transform: translate(-50%, -50%) scale(.8); opacity: .8; transition: transform .9s var(--ease), opacity .5s var(--ease); }
.hour .hart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.hour:hover .hart, .hour:focus-visible .hart { transform: translate(-50%, -62%) scale(1); opacity: 1; }
.hart [class*="hx-"] { transform-box: fill-box; animation-play-state: paused; }
.hour:hover .hart [class*="hx-"], .hour:focus-visible .hart [class*="hx-"] { animation-play-state: running; }
.hx-flame { transform-origin: 50% 100%; animation: hx-flame 1.1s ease-in-out infinite alternate; }
.hx-d2 { animation-delay: -.4s; }
@keyframes hx-flame { 0% { transform: scale(1, 1); } 50% { transform: scale(.88, 1.14); } 100% { transform: scale(1.08, .92); } }
.hx-rise { animation: hx-rise 1.8s ease-out infinite; }
@keyframes hx-rise { 0% { transform: translate(0, 0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(6px, -46px); opacity: 0; } }
.hx-sink { animation: hx-sink 6s ease-in-out infinite alternate; }
@keyframes hx-sink { to { transform: translateY(26px); opacity: .45; } }
.hx-slide { animation: hx-slide 3.2s ease-in-out infinite alternate; }
@keyframes hx-slide { 0%, 20% { transform: translateX(0); } 80%, 100% { transform: translateX(-30px); } }
.hx-pulse { transform-origin: 50% 50%; animation: hx-pulse 1.6s ease-in-out infinite alternate; }
@keyframes hx-pulse { 0% { opacity: .5; } 100% { opacity: 1; } }
.hx-float { animation: hx-float 3.2s ease-in-out infinite alternate; }
@keyframes hx-float { 0%, 30% { transform: translateY(12px); opacity: 0; } 100% { transform: translateY(-26px); opacity: .9; } }
.hx-halo { transform-origin: 50% 50%; animation: hx-halo 1.5s ease-in-out infinite; }
@keyframes hx-halo { 0%, 100% { opacity: .3; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.1); } }
.hx-swing { transform-box: view-box; transform-origin: 100px 26px; animation: hx-swing 1.4s ease-in-out infinite alternate; }
@keyframes hx-swing { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
.hx-clap { transform-box: view-box; transform-origin: 100px 40px; animation: hx-clap 1.4s ease-in-out infinite alternate; animation-delay: -.25s; }
@keyframes hx-clap { from { transform: rotate(10deg); } to { transform: rotate(-10deg); } }
.hx-ring { transform-origin: 50% 50%; animation: hx-ring 1.4s ease-out infinite; opacity: 0; }
@keyframes hx-ring { 0% { transform: scale(.8); opacity: .9; } 100% { transform: scale(1.25); opacity: 0; } }
.hx-sway { transform-box: view-box; transform-origin: 100px 56px; animation: hx-sway 2.2s ease-in-out infinite alternate; }
@keyframes hx-sway { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
.hx-flicker { animation: hx-flicker .9s steps(2) infinite alternate; }
@keyframes hx-flicker { 0% { opacity: 1; } 100% { opacity: .65; } }
.hx-bob { transform-box: view-box; transform-origin: 100px 120px; animation: hx-bob 2.4s ease-in-out infinite alternate; }
@keyframes hx-bob { 0% { transform: translateY(-3px) rotate(-4deg); } 100% { transform: translateY(3px) rotate(4deg); } }
.hx-wave { animation: hx-wave 2.4s linear infinite; }
@keyframes hx-wave { to { transform: translateX(-60px); } }
.hx-drop { animation: hx-drop 1.65s ease-in infinite; opacity: 0; }
@keyframes hx-drop { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 80% { transform: translateY(78px); opacity: 1; } 100% { transform: translateY(84px); opacity: 0; } }
html.rm .hart [class*="hx-"] { animation: none !important; }

/* marquee: the myths, struck through */
.marquee { position: relative; z-index: 10; background: var(--black); padding: 30px 0; overflow: hidden; white-space: nowrap; box-shadow: inset 0 1px 0 rgba(243, 226, 192, .08), inset 0 -1px 0 rgba(243, 226, 192, .08); }
.marquee .track { display: inline-flex; gap: 56px; padding-left: 56px; animation: run 60s linear infinite; }
.marquee.paused .track { animation-play-state: paused; }
.marquee span { font: italic 500 clamp(26px, 3vw, 46px)/1 var(--serif); color: var(--smoke); text-decoration: line-through; text-decoration-color: var(--flame); text-decoration-thickness: 2px; }
@keyframes run { to { transform: translateX(-50%); } }

/* ---------- chapters ---------- */
.ch { position: relative; }
.backdrop { position: sticky; top: 0; height: 100dvh; margin-bottom: -100dvh; overflow: hidden; z-index: 1; }
.backdrop .paint { position: absolute; inset: 0; }
.backdrop .paint svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.backdrop .paint-b { opacity: 0; }
.grid { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; padding: 0 var(--gutter); }
.pin { grid-column: 1 / span 5; position: sticky; top: 0; height: 100dvh; z-index: 10; display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 2.4vw, 40px); align-items: end; padding: 110px 0 clamp(70px, 12vh, 120px); }
.pin .candle-wrap { align-self: end; padding-bottom: 6px; }
/* desktop: one fixed candle stands where every chapter's candle stood */
.onecandle { position: fixed; left: var(--gutter); bottom: calc(clamp(70px, 12vh, 120px) + 6px); z-index: 10; pointer-events: none; opacity: 0; transition: opacity .5s var(--ease); }
.onecandle.on { opacity: 1; }
@media (min-width: 768px) { .ch .pin .candle-wrap .candle { visibility: hidden; } }
@media (max-width: 767px) { .onecandle { display: none; } }
html.rm .onecandle { display: none; }
html.rm .ch .pin .candle-wrap .candle { visibility: visible; }
.texts { position: relative; align-self: center; }
.text { transition: opacity .5s var(--ease); }
.text-b { position: absolute; inset: 0; opacity: 0; display: flex; flex-direction: column; justify-content: center; }
.when { font: 600 14px/1 var(--sans); display: inline-flex; gap: 10px; align-items: center; margin-bottom: 20px; font-variant-numeric: tabular-nums; }
.when::before { content: ''; width: 26px; height: 1px; background: currentColor; }
/* the Lantern text is a page held up to the candle; the Shadow text floats in the dark */
.text-a { color: var(--ink); padding: clamp(24px, 2.6vw, 38px); border-radius: 22px;
  background: radial-gradient(120% 120% at 0% 100%, #fbefd4 0, #efd6a6 55%, #d9b27a 100%);
  box-shadow: -30px 30px 80px -20px rgba(255, 178, 92, .45), inset 0 1px 0 rgba(255, 255, 255, .6); }
.text-b { padding: clamp(24px, 2.6vw, 38px); }
.text-b, .text-bm { color: var(--wax); }
.text-bm { display: none; }
.text-bm .story { color: rgba(243, 226, 192, .75); }
.text h2 { font: 500 clamp(2.8rem, 4.4vw, 5rem)/.94 var(--serif); letter-spacing: -.02em; margin-bottom: 22px; text-wrap: balance; }
.text-b h2 { font-style: italic; }
.story { font-size: clamp(16px, 1.15vw, 18px); line-height: 1.6; max-width: 40ch; }
.text-a .story { color: var(--ink-2); }
.text-b .story { color: rgba(243, 226, 192, .75); }
.story .w { opacity: .18; transition: opacity .3s linear; }
.story .w.on { opacity: 1; }

.flow { grid-column: 7 / span 6; position: relative; z-index: 10; padding: 50vh 0 0; }
.facts { display: grid; gap: 16vh; }
.gap { height: 120vh; }
.tail { height: 50vh; }
.fact { border-radius: 26px; padding: clamp(26px, 3vw, 42px); transform-origin: 50% 80%; }
/* a faint drawing of the fact's subject behind every card */
.fact { position: relative; overflow: hidden; isolation: isolate; }
.fact > *:not(.fart) { position: relative; z-index: 1; }
.fart { position: absolute; right: -4%; bottom: -6%; width: min(56%, 300px); aspect-ratio: 1; z-index: 0; pointer-events: none; transition: transform 1.2s var(--ease), opacity .6s; }
.fart svg { display: block; width: 100%; height: 100%; }
.facts-a .fart { color: var(--ink); opacity: .13; }
.facts-b .fart { color: var(--wax); opacity: .12; }
.fact:hover .fart { transform: scale(1.05) rotate(-2deg); opacity: .2; }
.facts-a .fact { background: rgba(243, 226, 192, .92); color: var(--ink); box-shadow: 0 30px 60px -30px rgba(40, 20, 5, .6); }
.facts-b .fact { background: rgba(20, 13, 8, .92); color: var(--wax); box-shadow: inset 0 0 0 1px rgba(243, 226, 192, .1); }
.fact .big { font: 500 clamp(2.6rem, 4.2vw, 4.8rem)/.95 var(--serif); letter-spacing: -.02em; margin-bottom: 16px; font-variant-numeric: lining-nums; }
.fact .txt { font-size: 16px; line-height: 1.6; max-width: 46ch; }
.facts-a .fact .txt { color: var(--ink-2); }
.facts-b .fact .txt { color: rgba(243, 226, 192, .72); }
.fact .src { margin-top: 18px; font: 500 12.5px/1.4 var(--sans); opacity: .6; }
.fact .act { margin-top: 18px; height: 42px; padding: 0 18px; border-radius: 999px; background: var(--flame); color: var(--ink); font: 600 14px/1 var(--sans); transition: background-color .3s, transform .4s var(--ease); }
.fact .act:hover { background: var(--wax); }
.fact .act:active { transform: scale(.97); }
.fact .out { margin-top: 10px; min-height: 1.5em; font-size: 15px; }

/* peek */
.ch.peeking .text-a { opacity: 0; }
.ch.peeking .text-b { opacity: 1; }
.ch.peeking.in-b .text-a { opacity: 1; }
.ch.peeking.in-b .text-b { opacity: 0; }
.ch.peeking .paint-a { opacity: 0 !important; }
.ch.peeking .paint-b { opacity: 1 !important; }
.ch.peeking.in-b .paint-a { opacity: 1 !important; }
.ch.peeking.in-b .paint-b { opacity: 0 !important; }

/* ---------- myths list ---------- */
.myths { position: relative; padding: clamp(140px, 20vh, 220px) var(--gutter); background: var(--black); }
.myths h2 { font: 500 clamp(2.8rem, 5.4vw, 6rem)/.95 var(--serif); max-width: 1100px; margin-bottom: clamp(56px, 9vh, 100px); position: relative; z-index: 10; }
.mlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 48px; position: relative; z-index: 10; }
.mlist div p:first-child { font: 500 clamp(1.5rem, 2vw, 2.1rem)/1.15 var(--serif); margin-bottom: 8px; }
.mlist div p:first-child span { background: linear-gradient(var(--flame), var(--flame)) 0 58% / calc(var(--k, 0) * 100%) 2px no-repeat; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.mlist div p:last-child { color: var(--smoke); font-size: 15px; }

/* ---------- action ---------- */
.action { position: relative; min-height: 100dvh; display: grid; place-items: center; text-align: center; padding: clamp(140px, 20vh, 220px) var(--gutter); background: radial-gradient(60% 60% at 50% 70%, #3a2414, var(--black) 70%); }
.action > div { position: relative; z-index: 10; }
.action h2 { font: 500 clamp(3.4rem, 8vw, 9rem)/.88 var(--serif); letter-spacing: -.03em; max-width: 1200px; margin: 0 auto 26px; }
.action p { max-width: 42ch; margin: 0 auto 40px; font-size: clamp(18px, 1.5vw, 22px); color: rgba(243, 226, 192, .8); }
.action .ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.action .door { position: absolute; left: 50%; bottom: 14vh; width: min(30vw, 300px); height: 4px; margin-left: min(-15vw, -150px); background: #fff2d0; box-shadow: 0 0 60px 20px rgba(255, 210, 140, .6); opacity: .1; transition: opacity 1.4s var(--ease); z-index: 10; }
.action.knocked .door { opacity: 1; }
/* the knock: rings from the door, then the door's light spills across the floor */
.krings { position: absolute; left: 50%; bottom: 14vh; width: 0; height: 0; z-index: 10; pointer-events: none; }
.krings i { position: absolute; left: -60px; top: -60px; width: 120px; height: 120px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 226, 170, .8); opacity: 0; }
.action { overflow: hidden; }
.spill { position: absolute; left: 50%; bottom: 14vh; width: min(78vw, 760px); height: 74vh; transform: translateX(-50%) scaleY(0); transform-origin: 50% 100%; opacity: 0; z-index: 9; pointer-events: none;
  clip-path: polygon(0 0, 100% 0, 66% 100%, 34% 100%);
  background: linear-gradient(0deg, rgba(255, 230, 180, .42), rgba(255, 200, 130, .12) 50%, rgba(255, 200, 130, 0)); }
html.rm .action.knocked .spill { transform: translateX(-50%); opacity: 1; }
/* the coin on its edge, beside the night's last candle */
.edge-scene { position: relative; width: min(460px, 86vw); height: 250px; margin: 0 auto 34px; perspective: 900px; }
.edge-scene .table { position: absolute; left: -12%; right: -12%; bottom: -6px; height: 70px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(110, 64, 28, .55), rgba(60, 34, 14, .25) 60%, transparent); }
.ecoin-wrap { position: absolute; left: 50%; bottom: 30px; width: 140px; height: 140px; margin-left: -70px; transform-style: preserve-3d; }
.ecoin { position: absolute; inset: 0; transform-style: preserve-3d; transform-origin: 50% 100%; transform: rotateY(28deg); }
.ec-rim, .ec-face { position: absolute; inset: 0; border-radius: 50%; }
.ec-rim { background: linear-gradient(90deg, #6e4a20, #b8894a 50%, #6e4a20); }
.ec-face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
/* the Lantern face: polished bronze, a raised rim, a flame struck in the middle */
.ec-a { transform: translateZ(5px);
  background:
    radial-gradient(circle at 50% 56%, #fff3cf 0 5%, transparent 5.5%),
    radial-gradient(16% 26% at 50% 50%, #8a5a26 0 60%, transparent 62%),
    radial-gradient(circle, transparent 0 58%, rgba(70, 40, 12, .55) 60% 63%, transparent 64%),
    radial-gradient(circle at 34% 28%, #ffe7b0, #d9a441 38%, #9a6a2a 72%, #5e3a14);
  box-shadow: inset 0 0 0 5px rgba(255, 226, 160, .35), inset 0 -8px 16px rgba(60, 30, 8, .45); }
/* the Shadow face: blackened silver, a crescent struck in it */
.ec-b { transform: rotateY(180deg) translateZ(5px);
  background:
    radial-gradient(circle at 58% 42%, #2b231c 0 17%, transparent 17.5%),
    radial-gradient(circle at 50% 46%, #cfc4b4 0 22%, transparent 22.5%),
    radial-gradient(circle, transparent 0 58%, rgba(200, 190, 175, .35) 60% 63%, transparent 64%),
    radial-gradient(circle at 34% 28%, #8c8178, #4a423b 45%, #1f1a16 80%);
  box-shadow: inset 0 0 0 5px rgba(243, 226, 192, .18), inset 0 -8px 16px rgba(0, 0, 0, .5); }
.ec-shadow { position: absolute; left: 50%; bottom: -6px; width: 150px; height: 14px; border-radius: 50%; transform: translateX(-50%) scaleX(.6);
  background: radial-gradient(closest-side, rgba(0, 0, 0, .7), transparent); }
@media (max-width: 767px) {
  .edge-scene { height: 210px; }
  .ecoin-wrap { width: 110px; height: 110px; margin-left: -55px; }
}
.foot { position: relative; z-index: 10; background: var(--black); color: var(--smoke); padding: 80px var(--gutter) 120px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px 24px; font-size: 14.5px; }
.foot .col { grid-column: span 3; }
.foot h3 { font: 500 22px/1.2 var(--serif); color: var(--wax); margin-bottom: 10px; }
.foot a { display: block; padding: 3px 0; transition: color .25s; }
.foot a:hover { color: var(--flame); }
.foot .base { grid-column: 1 / -1; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; padding-top: 30px; box-shadow: inset 0 1px 0 rgba(243, 226, 192, .1); }
.foot .base a { display: inline; color: var(--wax); }

#app { transition: opacity .3s; }
#app.swap { opacity: 0; }

/* ---------- reduced motion: all candles lit ---------- */
html.rm .dark, html.rm .smoke { display: none; }
html.rm .story .w { opacity: 1; }
html.rm .backdrop .paint-b { opacity: .6; }
html.rm .marquee .track, html.rm .candle .flame::before, html.rm .wick-pill::after { animation: none; }

/* ---------- mobile (< 768) ---------- */
@media (max-width: 767px) {
  .nav .clock, .nav .hide-sm { display: none; }
  /* on phones the sound button keeps only its bars */
  .nav .snd { padding: 0 12px; }
  .nav .snd .lbl { display: none; }
  .hero { display: block; padding: 110px 16px 56px; }
  .hero h1 { font-size: 17vw; }
  /* the candle stands taller than the drawing it sits on: leave room so its
     flame clears the buttons */
  .still { position: relative; right: auto; bottom: auto; width: 110%; margin: 150px -5% 0; }
  .bento { grid-template-columns: 1fr; }
  .c1, .c2, .c3, .c4 { grid-column: 1; grid-row: auto; }
  .c1 { min-height: 480px; }
  .c2 { min-height: 440px; }
  .c2 .art { width: 100%; bottom: 40%; -webkit-mask: none; mask: none; }
  .c3, .c4 { min-height: 300px; }
  .hours { flex-direction: column; height: auto; }
  .hour { min-height: 88px; }
  .hour .titles { opacity: 1; transform: none; min-width: 0; padding-right: 108px; }
  /* phones: the scene sits at the right of each row and moves on its own */
  .hour .hart, .hour:hover .hart { left: auto; right: 12px; top: 50%; width: 96px; transform: translateY(-50%); opacity: 1; }
  .hart [class*="hx-"] { animation-play-state: running; }
  .grid { grid-template-columns: 1fr; padding: 0 16px; }
  /* phones: a plain stack, no pinning; the Shadow text sits before its facts */
  .pin { grid-column: 1; grid-template-columns: auto 1fr; height: auto; position: relative; padding: 110px 0 24px; align-items: end; gap: 16px; }
  .pin .candle-wrap { transform: scale(.7); transform-origin: bottom left; margin-right: -14px; }
  .text-b { display: none; }
  .text-a { opacity: 1 !important; transform: none !important; }
  .text-bm { display: block; padding: 0 0 var(--step); }
  .story .w { opacity: 1; }
  .gap { height: var(--step); }
  .text h2 { font-size: 40px; }
  /* one even step between every card of a chapter, and before the next one */
  .ch { --step: 96px; }
  .flow { grid-column: 1; padding-top: calc(var(--step) - 24px); }
  .facts { gap: var(--step); }
  .tail { height: 0; }
  .fact { margin-bottom: 0; }
  .mlist { grid-template-columns: 1fr; }
  .foot .col { grid-column: 1 / -1; }
  .peek span { display: none; }
}
