/* Sonic Apothecary II. Self-contained; no external dependencies. */
[hidden] { display: none !important; }

@font-face { font-family: 'Futura LT'; src: url('assets/fonts/FuturaLTLight.woff2') format('woff2'), url('assets/fonts/FuturaLTLight.ttf') format('truetype'); font-weight: 100 900; font-style: normal; font-display: swap; }
/* Futura's question mark is its S-shaped curl; the site uses Jost Light's conventional one instead (SIL OFL, 716-byte
   subset with only U+003F). Declared after Futura so it wins for that one character. */
@font-face { font-family: 'Futura LT'; src: url('assets/fonts/Jost-question.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+003F; }

:root {
  --bg: #06060a;
  --ink: #f1ede6;
  --ink-dim: rgba(241, 237, 230, 0.82);
  --ink-faint: rgba(241, 237, 230, 0.6);
  --hair: rgba(241, 237, 230, 0.22);
  --glow: 0 0 1px rgba(6,6,10,.9), 0 1px 3px rgba(6,6,10,.75), 0 0 22px rgba(6,6,10,.8), 0 0 48px rgba(6,6,10,.55);
  --scrim: 0.56;
  --accent: #e6dccb;
  --slow: 1.6s;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font: 'Futura LT', 'Futura', 'Avenir Next', 'Helvetica Neue', sans-serif;   /* the only typeface on the site */
  --display: var(--font);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { background: var(--bg); color: var(--ink); font-family: var(--font); font-weight: 300;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow: hidden; }
body { -webkit-tap-highlight-color: transparent; touch-action: manipulation; overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.screen, .brand, .homenav { text-shadow: var(--glow); }
.signup { text-shadow: none; }
a { color: inherit; text-decoration: none; }
img { display: block; }
::selection { background: rgba(235,230,222,.2); }

#app { position: fixed; inset: 0; width: 100%; height: 100dvh; overflow: hidden; }

/* ---------- brand ---------- */
.brand { position: fixed; top: max(18px, env(safe-area-inset-top)); left: 0; right: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; gap: 0; pointer-events: none;
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
/* On the questions the header comes part way down towards the question, so the screen is not top heavy. */
:root { --brand-drop: clamp(12px, calc(9vh - 18px), 64px); }
#app[data-phase="reflect"] .brand { transform: translateY(var(--brand-drop)); }
.brand::before { content: ''; position: absolute; left: 15%; right: 15%; top: -220%; bottom: -160%; z-index: -1;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(6,6,10,.55) 0%, rgba(6,6,10,.3) 40%, rgba(6,6,10,0) 75%); }
.brand > * { position: relative; }
.mark { --gap: calc(var(--mk) * 0.17); display: flex; flex-direction: column; align-items: center; }
.mark img { display: block; width: auto; filter: drop-shadow(0 1px 3px rgba(6,6,10,.85)) drop-shadow(0 0 18px rgba(6,6,10,.75)); }
.mark-name { height: calc(var(--mk) * 0.297); }
.mark-cn { height: calc(var(--mk) * 0.366); margin-top: var(--gap); }
.brand .mark { --mk: clamp(40px, 5.2vw, 56px); }
.home-brand .mark { --mk: clamp(50px, 6.4vw, 66px); --gap: calc(var(--mk) * 0.3); }
.brand-title { font-family: var(--display); font-size: clamp(0.78rem, 1.9vw, 0.95rem); line-height: 1; letter-spacing: 0.4em; text-transform: uppercase; color: var(--ink); padding-left: 0.4em; font-weight: 300; margin-top: calc(clamp(40px, 5.2vw, 56px) * 0.17 - 2px); }   /* minus the space above the capitals */
.tiny.chrome-home { position: fixed; top: max(12px, env(safe-area-inset-top)); right: 6px; z-index: 22; text-shadow: var(--glow); color: var(--ink);
  opacity: 0; pointer-events: none; transition: opacity 1.2s var(--ease); }
#app[data-phase="reflect"] .tiny.chrome-home, #app[data-phase="before"] .tiny.chrome-home, #app[data-phase="return"] .tiny.chrome-home, #app[data-phase="offerings"] .tiny.chrome-home { opacity: 1; pointer-events: auto; }
.tiny.to-home { display: block; margin: 0.6rem auto 0; color: var(--ink-dim); }
#app[data-phase="listen"] .brand, #app[data-phase="receive"] .brand, #app[data-phase="return"] .brand,
#app[data-phase="arrive"] .brand, #app[data-phase="arrive-out"] .brand, #app[data-phase="home"] .brand { opacity: 0; }

/* ---------- screens ---------- */
.screen { position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transition: opacity var(--slow) var(--ease), visibility 0s linear var(--slow); }
.screen.is-active { opacity: 1; visibility: visible; transition: opacity var(--slow) var(--ease); }

.backdrop { position: absolute; inset: 0; overflow: hidden; background: var(--bg); }
.backdrop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.backdrop canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.backdrop .fx2d { pointer-events: none; }
.backdrop video.bgvideo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform 1.9s var(--ease); }
.backdrop video.bgvideo.is-push { transform: scale(1.08); }
.backdrop video.loop-portrait { display: none; }
@media (max-aspect-ratio: 1/1) {
  .backdrop.has-loop video.loop-portrait[src] { display: block; }
  .backdrop.has-loop:has(video.loop-portrait[src]) canvas.gl, .backdrop.has-loop:has(video.loop-portrait[src]) canvas.fx2d { display: none; }
}
@media (min-aspect-ratio: 1/1) {
  .screen-track .backdrop.has-loop video.track-loop[src] { display: block; inset: 0 auto 0 50%; width: auto; height: 100%; aspect-ratio: 9 / 16;
    transform: translateX(-50%); object-fit: cover;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16%, #000 84%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 16%, #000 84%, transparent 100%); }
  .screen-track .backdrop.has-loop:has(video.track-loop[src]) canvas.gl { display: none; }
  .screen-track .backdrop.has-loop:has(video.track-loop[src]) img.art { filter: blur(38px) brightness(0.74) saturate(1.1); transform: scale(1.15); }
  .backdrop video.eclipse-film { object-fit: contain; object-position: 50% 36%; background: #000; transform: none; }
}
.veil-home { background: linear-gradient(to bottom, rgba(6,6,10,.18) 0%, rgba(6,6,10,0) 20%, rgba(6,6,10,.2) 40%, rgba(6,6,10,.26) 60%, rgba(6,6,10,.6) 84%, rgba(6,6,10,.88) 100%); }
.veil-offerings { background: linear-gradient(to bottom, rgba(6,6,10,.55) 0%, rgba(6,6,10,.35) 50%, rgba(6,6,10,.8) 100%); }
.veil { position: absolute; inset: 0; pointer-events: none; }
.veil-arrive { background: linear-gradient(to bottom, rgba(6,6,10,.25) 0%, rgba(6,6,10,0) 35%, rgba(6,6,10,.5) 65%, rgba(6,6,10,.92) 100%); }
.veil-reflect { background: radial-gradient(ellipse at 50% 45%, rgba(6,6,10,0) 0%, rgba(6,6,10,.35) 70%, rgba(6,6,10,.7) 100%); }
.veil-track { background: linear-gradient(to bottom, rgba(6,6,10,.45) 0%, rgba(6,6,10,.22) 40%, rgba(6,6,10,.6) 78%, rgba(6,6,10,.88) 100%);
  transition: opacity 3s var(--ease); }
#app[data-phase="listen"] .veil-track { opacity: 0.3; }
.veil-return { position: absolute; inset: 0; background: rgba(6,6,10,.58); opacity: 0; transition: opacity 3s var(--ease); pointer-events: none; }
#app[data-phase="return"] .veil-return { opacity: 1; }

.content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: safe center; text-align: center; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(var(--brandh, 60px) + 36px) 24px max(56px, env(safe-area-inset-bottom)); }
.content > * { flex-shrink: 0; }
.content p { margin: 0; max-width: 34ch; font-size: clamp(1.04rem, 2.6vw, 1.2rem); line-height: 1.7; color: var(--ink); font-weight: 400; }
.content p + p { margin-top: 0.9em; }
.content p.quiet { color: var(--ink); opacity: 0.92; }
.content em { font-style: normal; }

.eyebrow { display: block; font-family: var(--display); font-size: 0.74rem; letter-spacing: 0.4em; text-transform: uppercase; color: var(--ink-dim); padding-left: 0.4em; font-weight: 400; }

/* feathered scrim behind each text block; --scrim is set per screen from the artwork's brightness */
.block { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; }
.block::before { content: ''; position: absolute; left: -34%; right: -34%; top: -32%; bottom: -32%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 48% 48% at 50% 50%, rgba(6,6,10,calc(var(--scrim) * 0.45)) 0%, rgba(6,6,10,0) 70%),
    linear-gradient(to bottom, rgba(6,6,10,0) 0%, rgba(6,6,10,calc(var(--scrim) * 0.55)) 14%, rgba(6,6,10,var(--scrim)) 30%, rgba(6,6,10,var(--scrim)) 70%, rgba(6,6,10,calc(var(--scrim) * 0.55)) 86%, rgba(6,6,10,0) 100%);
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, #000 20%, #000 80%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, #000 20%, #000 80%, rgba(0,0,0,0) 100%); }
.block > * { position: relative; }

/* staggered reveal */
.reveal > * { opacity: 0; transform: translateY(10px); filter: blur(6px);
  transition: opacity 1.8s var(--ease), transform 1.8s var(--ease), filter 1.8s var(--ease); }
.reveal.is-in > * { opacity: 1; transform: none; filter: blur(0); }
.reveal.is-in > :nth-child(1) { transition-delay: 0.15s; }
.reveal.is-in > :nth-child(2) { transition-delay: 0.55s; }
.reveal.is-in > :nth-child(3) { transition-delay: 0.95s; }
.reveal.is-in > :nth-child(4) { transition-delay: 1.35s; }
.reveal.is-in > :nth-child(5) { transition-delay: 1.75s; }
.reveal.is-in > :nth-child(6) { transition-delay: 2.15s; }
.reveal.is-in > :nth-child(7) { transition-delay: 2.55s; }

/* ---------- CTA: text with a hairline that opens ---------- */
.cta { position: relative; display: inline-block; margin-top: 2.6rem; min-height: 56px; padding: 18px 12px 14px;
  font-family: var(--display); font-size: 0.92rem; letter-spacing: 0.42em; text-transform: uppercase; padding-left: calc(12px + 0.42em); font-weight: 300; }
.cta::after { content: ''; position: absolute; left: 50%; bottom: 8px; width: 22px; height: 1px; background: var(--ink);
  transform: translateX(-50%); opacity: 0.85; transition: width 1.1s var(--ease), opacity 1.1s var(--ease); }
.cta:hover::after, .cta:focus-visible::after { width: 100%; opacity: 1; }
.cta:focus-visible { outline: none; }

.tiny { font-family: var(--display); font-size: 0.72rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-faint); padding: 14px 10px; min-height: 44px; font-weight: 300;
  transition: color 0.8s var(--ease); padding-left: calc(10px + 0.3em); }
.tiny:hover { color: var(--ink); }

.foot { position: absolute; left: 0; right: 0; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 3;
  display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ---------- home ---------- */
.home-media .home-still, .home-media .home-loop { position: absolute; inset: auto; max-width: none; object-fit: cover; transform: none; transition: none; }
.home-media .home-still { animation: homeBreathe 28s ease-in-out infinite alternate; }
@keyframes homeBreathe { from { transform: scale(1); } to { transform: scale(1.03); } }
.home-scroll { position: absolute; inset: 0; z-index: 2; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.home-page { position: relative; min-height: 100%; }
.home-stack { position: absolute; left: 0; right: 0; margin: 0 auto; width: min(560px, calc(100% - 40px)); text-align: center; }
.home-stack.block::before { top: -14px; bottom: -30px;
  background:
    radial-gradient(ellipse 50% 46% at 50% 52%, rgba(6,6,10,calc(var(--scrim) * 0.5)) 0%, rgba(6,6,10,0) 72%),
    linear-gradient(to bottom, rgba(6,6,10,0) 0%, rgba(6,6,10,calc(var(--scrim) * 0.7 + 0.1)) 10%, rgba(6,6,10,calc(var(--scrim) + 0.18)) 22%, rgba(6,6,10,calc(var(--scrim) + 0.18)) 80%, rgba(6,6,10,calc(var(--scrim) * 0.6)) 92%, rgba(6,6,10,0) 100%); }
.home-brand { display: flex; flex-direction: column; align-items: center; margin-bottom: clamp(26px, 4.2vh, 40px); }
.home-title { font-size: clamp(0.8rem, 1.9vw, 0.98rem); line-height: 1; letter-spacing: 0.4em; padding-left: 0.4em; text-transform: uppercase; color: var(--ink); margin-top: calc(clamp(50px, 6.4vw, 66px) * 0.3 - 2px); }
.home-stack .hello { margin: 0 0 clamp(0.9rem, 2.2vh, 1.4rem); font-size: clamp(2.1rem, 6.4vw, 3.2rem); }
.home-copy { margin: 0 auto; max-width: 38ch; font-size: clamp(1.02rem, 2.5vw, 1.12rem); line-height: 1.6; color: var(--ink); }
.home-stack .cta { margin-top: calc(clamp(1.6rem, 4vh, 2.6rem) + var(--begin-push, 0px)); }
.homenav { position: absolute; left: 0; right: 0; bottom: max(8px, env(safe-area-inset-bottom)); z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 0 8px; }
.navrow { display: flex; justify-content: center; flex-wrap: wrap; gap: 0 2px; }
.navrow .tiny { color: var(--ink); font-size: 0.64rem; letter-spacing: 0.22em; padding: 11px 7px 11px calc(7px + 0.22em); min-height: 38px; }
.navrow-social .tiny { color: var(--ink-dim); }
.navrow .tiny:hover { color: var(--ink); }

/* ---------- arrive: eclipse ---------- */
.screen-arrive { cursor: pointer; }
.eclipse-words { position: absolute; z-index: 3; transform: translate(-50%, -50%); text-align: center; pointer-events: none;
  line-height: 1.55; letter-spacing: 0.04em; color: var(--ink); opacity: 0; filter: blur(6px); transition: opacity 1.6s var(--ease), filter 1.6s var(--ease); }
.eclipse-words.is-in { opacity: 1; filter: blur(0); }
.eclipse-words p { margin: 0; }
.eclipse-words p + p { margin-top: 0.35em; }

/* ---------- offerings ---------- */
.content-offerings { justify-content: safe center; --scrim: 0.45; }
.content-reflect { --scrim: 0.4; }
.offer-title { font-family: var(--display); margin: 1.2rem 0 1.6rem; font-weight: 300; font-size: clamp(2rem, 8vw, 3.4rem); letter-spacing: 0.32em; text-transform: uppercase; padding-left: 0.32em; line-height: 1.1; }
.content-offerings .offer-lede { margin: 1.2rem auto 0; max-width: 26ch; font-size: clamp(1.15rem, 3.2vw, 1.5rem); line-height: 1.5; font-weight: 400; }
.signup-inline { width: min(420px, 100%); display: flex; flex-direction: column; align-items: center; margin: 1.8rem auto 0; }
.signup-inline .cta { margin-top: 1.2rem; }
.signup-inline .signup-thanks { display: none; margin: 1.4rem 0 0; color: var(--ink); }
.signup-inline.is-done .field, .signup-inline.is-done .cta, .signup-inline.is-done .signup-small { display: none; }
.signup-inline.is-done .signup-thanks { display: block; }

/* ---------- sign-up ---------- */
.signup { position: fixed; inset: 0; z-index: 50; background: rgba(6,6,10,.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; visibility: hidden; transition: opacity 0.8s var(--ease), visibility 0s linear 0.8s; }
.signup.is-open { opacity: 1; visibility: visible; transition: opacity 0.8s var(--ease); }
.signup-continue { display: none; margin: 1.8rem auto 0; color: var(--ink-dim); }
.signup.is-after .signup-continue { display: inline-block; }
.signup.is-after .dialog-close { display: none; }
.signup-panel { width: min(440px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; margin: 0; }
.signup-title { font-family: var(--display); margin: 1rem 0 0.8rem; font-weight: 200; font-size: clamp(1.5rem, 6vw, 2.2rem); letter-spacing: 0.3em; text-transform: uppercase; padding-left: 0.3em; }
.signup-copy { margin: 0 0 1.8rem; font-size: 1rem; line-height: 1.7; color: var(--ink-dim); max-width: 32ch; font-weight: 400; }
.field { width: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.field-label { font-size: 0.68rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--ink-faint); text-align: left; padding-left: 0.34em; }
.field-input { width: 100%; min-height: 56px; padding: 14px 4px; font: 300 1.05rem var(--font); letter-spacing: 0.04em; color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid rgba(235,230,222,.35); border-radius: 0; outline: none; text-align: center; transition: border-color 0.8s var(--ease); -webkit-appearance: none; }
.field-input::placeholder { color: rgba(241,237,230,.45); }
.field-input:focus { border-color: var(--ink); }
.signup-submit { margin-top: 1.4rem; }
.signup-small { margin: 1.2rem 0 0; max-width: 36ch; font-size: 0.74rem; line-height: 1.6; letter-spacing: 0.04em; color: var(--ink-dim); text-align: center; }
.signup-small a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
form.is-busy .cta { opacity: 0.5; pointer-events: none; }
.signup-thanks { display: none; margin: 1.6rem 0 0; color: var(--ink); }
.signup-panel.is-done .field, .signup-panel.is-done .signup-submit, .signup-panel.is-done .signup-small { display: none; }
.signup-panel.is-done .signup-thanks { display: block; }

/* ---------- arrive (legacy block kept for the flash) ---------- */
.hello { font-family: var(--display); margin: 0 0 1.4rem; font-weight: 300; font-size: clamp(2.6rem, 9vw, 4.4rem); letter-spacing: 0.34em; text-transform: uppercase; padding-left: 0.34em; line-height: 1; }
@media (max-width: 420px) {
  .foot { gap: 2px; }
  .foot .tiny { letter-spacing: 0.2em; padding-left: calc(10px + 0.2em); font-size: 0.6rem; }
}
@media (max-height: 600px) {
  .hello { font-size: clamp(1.8rem, 6vh, 2.6rem); margin-bottom: 0.8rem; }
  .content p { line-height: 1.5; font-size: 0.95rem; }
  .content p + p { margin-top: 0.5em; }
  .cta { margin-top: 1.4rem; }
}

@media (max-aspect-ratio: 5/7) { .screen-arrive .backdrop img { object-position: 50% 28%; } }
.flash { position: absolute; inset: 0; z-index: 5; background: #fff8f0; opacity: 0; pointer-events: none; }

/* ---------- reflect ---------- */
.stepper { position: absolute; left: 0; right: 0; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 4; display: flex; align-items: center; justify-content: center; gap: clamp(14px, 6vw, 48px); }
.stepper .tiny { color: var(--ink); min-width: 72px; }
.step-next { visibility: hidden; }
.step-next.is-on { visibility: visible; }
.content-reflect { justify-content: safe center; padding-bottom: 72px; padding-top: calc(var(--brandh, 60px) + 24px + var(--brand-drop)); }
.qwrap { width: min(560px, 100%); align-items: stretch; transition: opacity 1.1s var(--ease), transform 1.1s var(--ease), filter 1.1s var(--ease); }
.qwrap.is-out { opacity: 0; transform: translateY(-14px) scale(0.985); filter: blur(8px); }
.question { margin: 0 auto 2.2rem; font-family: var(--display); font-weight: 300; font-size: clamp(1.45rem, 5.2vw, 2.15rem); line-height: 1.35; letter-spacing: 0.02em; max-width: 22ch; }
.answers { display: flex; flex-direction: column; border-top: 1px solid var(--hair); }
.answer { display: block; width: 100%; padding: 17px 8px; min-height: 60px; border-bottom: 1px solid var(--hair);
  font-size: clamp(1.06rem, 3.6vw, 1.3rem); letter-spacing: 0.1em; color: var(--ink); font-weight: 400;
  transition: color 0.9s var(--ease), text-shadow 0.9s var(--ease), letter-spacing 0.9s var(--ease), opacity 1.2s var(--ease); }
.answer:hover, .answer:focus-visible { color: #fff; text-shadow: var(--glow), 0 0 22px rgba(241,237,230,.5); outline: none; }
.answer.is-chosen { color: #fff; text-shadow: var(--glow), 0 0 30px rgba(255,255,255,.75); letter-spacing: 0.16em; }
.answers.is-settled .answer:not(.is-chosen) { opacity: 0.18; }
.dots { display: flex; justify-content: center; gap: 12px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink); opacity: 0.4; box-shadow: 0 0 6px rgba(6,6,10,.9); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.dots i.is-on { opacity: 1; transform: scale(1.3); }
.dots i.is-done { opacity: 0.7; }

/* ---------- receive ---------- */
.screen-receive { background: #000; }
.bloom { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; border-radius: 50%; transform: translate(-50%, -50%) scale(1);
  background: radial-gradient(circle, rgba(255,250,240,1) 0%, rgba(255,244,232,1) 34%, rgba(255,228,208,.55) 58%, rgba(255,220,200,0) 100%);
  opacity: 0; will-change: transform, opacity; }
.screen-receive.is-active .bloom { animation: bloom 3.6s var(--ease) forwards; }
@keyframes bloom { 0% { opacity: 0; transform: translate(-50%,-50%) scale(1); } 25% { opacity: 1; transform: translate(-50%,-50%) scale(14); } 100% { opacity: 1; transform: translate(-50%,-50%) scale(900); } }
.receive-label { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; color: rgba(6,6,10,.75); opacity: 0; z-index: 2; }
.screen-receive.is-active .receive-label { animation: label 3.6s var(--ease) forwards; }
@keyframes label { 0%, 35% { opacity: 0; } 55% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- track ---------- */
.content-before, .content-return { position: absolute; inset: 0; transition: opacity 2.2s var(--ease), visibility 0s linear 2.2s; }
.content-before { opacity: 0; visibility: hidden; }
.content-return { opacity: 0; visibility: hidden; justify-content: flex-start; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding-top: max(96px, calc(env(safe-area-inset-top) + 72px)); }
#app[data-phase="before"] .content-before { opacity: 1; visibility: visible; transition: opacity 2.2s var(--ease); }
#app[data-phase="return"] .content-return { opacity: 1; visibility: visible; transition: opacity 2.6s var(--ease); }

.theme { margin-bottom: 1.4rem; }
.track-title { font-family: var(--display); margin: 0 0 1.3rem; font-weight: 300; font-size: clamp(2rem, 8vw, 3.6rem); letter-spacing: 0.3em; text-transform: uppercase; padding-left: 0.3em; line-height: 1.1; }
.descriptor { color: var(--ink) !important; }
.intention { margin-top: 1.6em !important; color: var(--ink) !important; font-style: italic; }
.art-note { margin-top: 1.4em !important; font-size: 0.72rem !important; letter-spacing: 0.12em; color: var(--ink-dim) !important; }

.listen-layer { position: absolute; inset: 0; z-index: 3; opacity: 0; visibility: hidden; transition: opacity 2s var(--ease), visibility 0s linear 2s; }
#app[data-phase="listen"] .listen-layer { opacity: 1; visibility: visible; transition: opacity 2s var(--ease); }
.breath { --ring: max(150px, 24vmin); position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center;
  opacity: 0; transition: opacity 2.4s var(--ease); pointer-events: none; }
.breath > * { grid-area: 1 / 1; }
.breath.is-on { opacity: 1; }
.ring { width: var(--ring); height: var(--ring); border-radius: 50%; border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 0 40px rgba(255,255,255,.12), inset 0 0 40px rgba(255,255,255,.06); transform: scale(1); transition: transform 4s var(--ease); }
.ring.is-in { transform: scale(1.32); transition-duration: 4s; }
.ring.is-out { transform: scale(1); transition-duration: 6s; }
.breath.no-ring .ring { visibility: hidden; }   /* same box, so the words keep their place */
.breath-text { font-family: var(--display); font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink); padding-left: 0.3em; font-weight: 400; white-space: nowrap;
  transition: opacity 1.2s var(--ease); }
.pause-panel { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px;
  background: radial-gradient(ellipse 70% 55% at 50% 50%, rgba(6,6,10,.62) 0%, rgba(6,6,10,.3) 60%, rgba(6,6,10,.12) 100%);
  opacity: 0; visibility: hidden; transition: opacity 1.1s var(--ease), visibility 0s linear 1.1s; }
#app[data-paused="true"] .pause-panel { opacity: 1; visibility: visible; transition: opacity 1.1s var(--ease); }
#app[data-paused="true"] .breath { opacity: 0; }
.pause-title { margin: 0.9rem 0 0.4rem; font-weight: 300; font-size: clamp(1.6rem, 6vw, 2.4rem); letter-spacing: 0.3em; padding-left: 0.3em; text-transform: uppercase; }
.pause-time { font-size: 0.78rem; letter-spacing: 0.16em; color: var(--ink-dim); min-height: 1.2em; }
.pause-panel .cta { margin-top: 1.4rem; }
.pause-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 6px; margin-top: 0.6rem; }
@media (max-width: 520px) { .pause-actions { flex-direction: column; align-items: center; gap: 0; } }
.pause-actions .tiny { color: var(--ink); }
#app[data-paused="true"] .backdrop.env canvas { filter: brightness(0.7); }
.backdrop.env canvas { transition: filter 2s var(--ease); }

.return-block, .after-block { width: min(560px, 100%); display: flex; flex-direction: column; align-items: center; }
.return-title { font-family: var(--display); margin: 0 0 1.6rem; font-weight: 300; font-size: clamp(1.9rem, 7vw, 3rem); letter-spacing: 0.34em; text-transform: uppercase; padding-left: 0.34em; }
.after-block { margin-top: 3.4rem; padding-bottom: 40px; --scrim: 0.62; opacity: 0; transform: translateY(12px); filter: blur(6px); transition: opacity 2.4s var(--ease), transform 2.4s var(--ease), filter 2.4s var(--ease); }
.after-block.is-in { opacity: 1; transform: none; filter: blur(0); }
.note { margin-top: 1.2rem !important; font-style: italic; color: var(--ink) !important; }
.actions { display: flex; flex-direction: column; width: 100%; align-self: stretch; margin-top: 2.6rem; border-top: 1px solid var(--hair); }
.action { display: block; width: 100%; padding: 19px 8px; min-height: 60px; border-bottom: 1px solid var(--hair); text-align: center;
  font-family: var(--display); font-size: 0.88rem; letter-spacing: 0.34em; text-transform: uppercase; padding-left: calc(8px + 0.34em); color: var(--ink); font-weight: 300;
  transition: text-shadow 0.9s var(--ease), color 0.9s var(--ease); }
.action:hover, .action:focus-visible { color: #fff; text-shadow: var(--glow), 0 0 22px rgba(241,237,230,.5); outline: none; }
.listen-row { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 15px 8px 9px; }
.listen-row .listen-album { display: block; color: var(--ink); padding: 4px 0; font-size: 1.06em; transition: text-shadow 0.9s var(--ease), color 0.9s var(--ease); }
.listen-row .listen-album:hover, .listen-row .listen-album:focus-visible { color: #fff; text-shadow: var(--glow), 0 0 22px rgba(241,237,230,.5); outline: none; }
.listen-row .single-link { min-height: 36px; padding: 8px 10px 4px calc(10px + 0.28em); color: var(--ink-dim); }
.listen-row .single-link[hidden], .note[hidden], .note-label[hidden] { display: none; }
.archive-link { margin-top: 1.6rem; }

/* ---------- about ---------- */
.dialog-close { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 10px; }

.toast { position: fixed; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  font-size: 0.64rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--ink); padding: 12px 18px 12px calc(18px + 0.34em);
  background: rgba(6,6,10,.7); border: 1px solid var(--hair); opacity: 0; transition: opacity 0.8s var(--ease); pointer-events: none; white-space: nowrap; }
.toast.is-on { opacity: 1; }

/* standalone documents: 404 and privacy (no journey app) */
html.doc { overflow: auto; }
.doc-page { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: max(56px, env(safe-area-inset-top)) 24px max(48px, env(safe-area-inset-bottom)); }
.doc-page .doc-title { margin: 1rem 0 1.2rem; font-weight: 300; font-size: clamp(1.8rem, 7vw, 2.8rem); letter-spacing: 0.3em; padding-left: 0.3em; text-transform: uppercase; }
.doc-page p { margin: 0; max-width: 34ch; font-size: clamp(1rem, 2.6vw, 1.15rem); line-height: 1.7; }
.doc-page .tiny { margin-top: 0.6rem; }
.doc-text { width: min(680px, 100%); margin: 0 auto; padding: max(64px, env(safe-area-inset-top)) 24px 72px; text-align: left; }
.doc-text h1 { margin: 1rem 0 0.4rem; font-weight: 300; font-size: clamp(1.6rem, 6vw, 2.4rem); letter-spacing: 0.3em; text-transform: uppercase; }
.doc-text h2 { margin: 2.2rem 0 0.6rem; font-weight: 400; font-size: 0.78rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--ink-dim); }
.doc-text p, .doc-text li { font-size: 1rem; line-height: 1.75; font-weight: 400; color: var(--ink); }
.doc-text p { margin: 0 0 0.9rem; }
.doc-text ul { margin: 0 0 0.9rem; padding-left: 1.1em; }
.doc-text a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.doc-text .doc-meta { color: var(--ink-dim); font-size: 0.86rem; }
.doc-text .doc-home { display: inline-block; margin-top: 2.4rem; }

/* film grain */
.grain { position: fixed; inset: 0; z-index: 30; pointer-events: none; opacity: 0.035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

@media (prefers-reduced-motion: reduce) {
  .reveal > *, .qwrap, .after-block { transition-duration: 0.4s; }
  .ring { transition-duration: 0.4s !important; }
}
