@font-face { font-family: 'Jost'; src: url('../assets/fonts/Jost-latin.woff2') format('woff2'); font-weight: 300 500; font-display: swap; }

:root {
  --ink: #3b3d40;
  --ink-soft: rgba(59, 61, 64, 0.62);
  --ink-faint: rgba(59, 61, 64, 0.38);
  --paper: #e7e8e9;
  --track: 0.34em;
  --pad-x: max(22px, 4.5vw);
  --pad-y: max(20px, 5.2vh);
  --ease: cubic-bezier(.22, .61, .36, 1);
}
* { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); font-family: 'Jost', 'Futura', 'Avenir Next', system-ui, sans-serif; font-weight: 300; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 1px solid var(--ink-soft); outline-offset: 6px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sr-only button:focus-visible { position: fixed; left: 50%; bottom: 14vh; transform: translateX(-50%); width: auto; height: auto; clip: auto; padding: 10px 18px; background: rgba(255,255,255,.7); z-index: 50; }

#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; display: block; z-index: 0; touch-action: pan-y; }
#track { position: relative; z-index: -1; width: 1px; }
body.is-grab, body.is-grab * { cursor: grabbing !important; }
body.is-hover #gl { cursor: pointer; }

/* chrome: tiny, letter-spaced, like a film title card */
.chrome { position: fixed; z-index: 10; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: baseline; padding: var(--pad-y) var(--pad-x) 0; pointer-events: none; }
.chrome > * { pointer-events: auto; }
.brand, .nav { font-size: clamp(12px, 0.92vw, 15px); letter-spacing: var(--track); text-decoration: none; color: var(--ink-soft); transition: color .4s var(--ease), opacity 1.2s var(--ease); }
.brand:hover, .nav:hover { color: var(--ink); }

/* intro */
#intro { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; pointer-events: none; }
.intro-line { margin: 0; font-size: clamp(18px, 1.9vw, 30px); letter-spacing: 0.62em; padding-left: 0.62em; color: var(--ink); opacity: 0; font-weight: 300; }
.intro-line span { display: inline-block; opacity: 0; transform: translateY(0.35em); filter: blur(4px); transition: opacity 1.2s var(--ease), transform 1.4s var(--ease), filter 1.2s var(--ease); }
.intro-line.on { opacity: 1; }
.intro-line.on span { opacity: 1; transform: none; filter: none; }
.intro-line.off { opacity: 0; transition: opacity 1s var(--ease), letter-spacing 1.6s var(--ease); letter-spacing: 0.9em; }

/* project label next to the meteorite */
.label { position: fixed; z-index: 5; left: 0; top: 0; will-change: transform, opacity; opacity: 0; pointer-events: none; }
.label .num { display: block; font-size: clamp(10px, 0.72vw, 12px); letter-spacing: 0.42em; color: var(--ink-soft); margin-bottom: 1.25em; }
.label .title { margin: 0; font-weight: 300; font-size: clamp(18px, 1.42vw, 25px); letter-spacing: 0.36em; color: var(--ink); line-height: 1; }
.label .meta { margin: 1.1em 0 0; font-size: clamp(10px, 0.7vw, 12px); letter-spacing: 0.2em; color: var(--ink-faint); white-space: nowrap; }
.label .cta { margin-top: 1.6em; display: inline-flex; align-items: center; gap: 0.9em; font-size: clamp(10px, 0.72vw, 12px); letter-spacing: 0.3em; color: var(--ink); opacity: 0; transform: translateX(-6px); transition: opacity .6s var(--ease), transform .8s var(--ease); pointer-events: none; }
.label .cta i { display: inline-block; width: 28px; height: 1px; background: currentColor; position: relative; transition: width .6s var(--ease); }
.label .cta i::after { content: ''; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }
.label.show-cta .cta { opacity: 1; transform: none; pointer-events: auto; }
.label.show-cta .cta i { width: 40px; }
.label.portrait { text-align: center; }
.label.portrait .cta { justify-content: center; }
@media (pointer: coarse) {
  .label .cta { opacity: 1; transform: none; pointer-events: auto; padding: 14px 22px; margin-top: 1.2em; border: 1px solid var(--ink-faint); border-radius: 999px; background: rgba(255,255,255,.28); }
}

.scroll-cue { position: fixed; z-index: 5; left: 50%; bottom: max(26px, 7.2vh); transform: translateX(-50%); font-size: clamp(10px, 0.72vw, 12px); letter-spacing: 0.34em; padding-left: 0.34em; color: var(--ink-soft); opacity: 0; white-space: nowrap; pointer-events: none; transition: opacity 1s var(--ease); }
.scroll-cue::after { content: ''; display: block; width: 1px; height: 26px; margin: 14px auto 0; background: linear-gradient(var(--ink-faint), transparent); animation: cue 2.8s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); opacity: 0; } 30% { opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

.dots { position: fixed; z-index: 5; right: var(--pad-x); top: 50%; transform: translateY(-50%); display: grid; gap: 14px; opacity: 0; transition: opacity 1s var(--ease); }
.dots i { width: 5px; height: 5px; border-radius: 50%; border: 1px solid var(--ink-faint); transition: background .6s var(--ease), transform .6s var(--ease); }
.dots i.on { background: var(--ink-soft); border-color: var(--ink-soft); transform: scale(1.15); }

/* outro */
.outro { position: fixed; z-index: 6; left: 50%; bottom: 13vh; transform: translate(-50%, 12px); width: min(560px, 84vw); text-align: center; opacity: 0; pointer-events: none; transition: none; }
.outro h2 { margin: 0 0 1.2em; font-weight: 300; font-size: clamp(18px, 1.6vw, 26px); letter-spacing: 0.4em; padding-left: 0.4em; }
.outro p { margin: 0 auto; max-width: 34em; font-size: clamp(13px, 0.95vw, 15px); line-height: 1.85; letter-spacing: 0.04em; color: var(--ink-soft); }
.outro-links { margin-top: 2.2em !important; display: flex; gap: 2.4em; justify-content: center; }
.outro-links a, .outro-links button { font-size: 12px; letter-spacing: 0.3em; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--ink-faint); padding-bottom: 6px; }

/* ---------------- case study ---------------- */
.case.dark { --ink: #dedfe2; --ink-soft: rgba(222,223,226,.64); --ink-faint: rgba(222,223,226,.38); }
.case.dark::before { background: radial-gradient(ellipse 50% 72% at 50% 50%, rgba(6,6,8,.5), rgba(6,6,8,.22) 55%, rgba(6,6,8,0) 100%); }
.case.dark .case-close:hover, .case.dark .c-continue:hover { background: rgba(255,255,255,.07); }
.case.dark .case-progress { background: rgba(222,223,226,.14); }
.case.dark .c-pull .bar { background: rgba(222,223,226,.16); }
.c-sec.c-slot { min-height: 100vh; display: grid; align-content: start; justify-items: center; padding: 13vh 0 0; }
.c-cap { margin: 0; font-size: 12px; letter-spacing: .14em; color: var(--ink-faint); }
.case { position: fixed; inset: 0; z-index: 30; }
.case[hidden] { display: none; }
/* a calm, bright veil down the reading column so text never fights the crystals */
.case::before { content: ''; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse 46% 78% at 50% 52%, rgba(240,241,242,.82), rgba(240,241,242,.5) 55%, rgba(240,241,242,0) 100%); opacity: 0; transition: opacity 1.2s var(--ease); }
.case.on::before { opacity: 1; }
.case-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; outline: none; }
.case-scroll::-webkit-scrollbar { display: none; }
.case-close { position: fixed; z-index: 3; top: calc(var(--pad-y) - 10px); right: calc(var(--pad-x) - 10px); width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; opacity: 0; transition: opacity .8s var(--ease), background .4s; }
.case-close:hover { background: rgba(255,255,255,.4); }
.case-close i { position: relative; width: 18px; height: 18px; }
.case-close i::before, .case-close i::after { content: ''; position: absolute; left: 50%; top: 50%; width: 22px; height: 1px; background: var(--ink); transform: translate(-50%, -50%) rotate(45deg); }
.case-close i::after { transform: translate(-50%, -50%) rotate(-45deg); }
.case.on .case-close { opacity: 1; }
.case-progress { position: fixed; left: var(--pad-x); right: var(--pad-x); bottom: 22px; height: 1px; background: rgba(59,61,64,.12); opacity: 0; transition: opacity .8s; }
.case.on .case-progress { opacity: 1; }
.case-progress i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--ink-soft); }

.case-inner { --col: min(620px, 86vw); padding: 0 var(--pad-x); }
.c-sec { min-height: 100vh; display: grid; align-content: center; justify-items: center; padding: 14vh 0; }
.c-hero { min-height: 100vh; text-align: center; }
.c-kicker { font-size: 11px; letter-spacing: 0.42em; padding-left: 0.42em; color: var(--ink-soft); margin: 0 0 2.4em; }
.c-title { margin: 0; font-weight: 300; font-size: clamp(44px, 7vw, 120px); letter-spacing: 0.24em; padding-left: 0.24em; line-height: 1; }
.c-lede { margin: 2.2em auto 0; max-width: 30em; font-size: clamp(15px, 1.15vw, 19px); line-height: 1.75; color: var(--ink-soft); letter-spacing: 0.02em; }
.c-meta { margin-top: 4.5em; display: flex; gap: clamp(20px, 4vw, 64px); justify-content: center; flex-wrap: wrap; }
.c-meta div { text-align: left; }
.c-meta dt { font-size: 10px; letter-spacing: 0.36em; color: var(--ink-faint); margin-bottom: 0.9em; }
.c-meta dd { margin: 0; font-size: 13px; letter-spacing: 0.06em; }
.c-down { margin-top: 8vh; font-size: 10px; letter-spacing: 0.4em; color: var(--ink-faint); }

.c-text { width: var(--col); }
.c-text h3 { margin: 0 0 1.6em; font-weight: 400; font-size: 11px; letter-spacing: 0.42em; color: var(--ink-soft); }
.c-text p { margin: 0; font-size: clamp(17px, 1.3vw, 21px); line-height: 1.8; letter-spacing: 0.01em; color: var(--ink); }
.c-fig { width: min(1180px, 92vw); margin: 0; perspective: 1400px; }
.c-fig .plate { transform-style: preserve-3d; will-change: transform, opacity; border-radius: 18px; box-shadow: 0 50px 90px -40px rgba(40, 44, 52, .32), 0 18px 34px -24px rgba(40, 44, 52, .28); background: #fff; }
.c-fig svg { display: block; width: 100%; height: auto; border-radius: 18px; }
.c-fig figcaption { margin-top: 1.6em; font-size: 12px; letter-spacing: 0.14em; color: var(--ink-faint); text-align: center; }
.c-steps { width: min(1080px, 88vw); display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 64px); margin-top: 4em; }
.c-steps h4 { margin: 0 0 1em; font-weight: 400; font-size: 15px; letter-spacing: 0.12em; }
.c-steps p { margin: 0; font-size: 15px; line-height: 1.75; color: var(--ink-soft); }
.c-steps .n { display: block; font-size: 10px; letter-spacing: 0.4em; color: var(--ink-faint); margin-bottom: 1.4em; }
.c-out { width: min(1080px, 88vw); display: grid; grid-template-columns: repeat(3, 1fr); gap: 4vw; margin-top: 4em; text-align: center; }
.c-out b { display: block; font-weight: 300; font-size: clamp(40px, 5vw, 84px); letter-spacing: 0.04em; line-height: 1; }
.c-out span { display: block; margin-top: 1.2em; font-size: 13px; letter-spacing: 0.08em; color: var(--ink-soft); }
.c-end { min-height: 100vh; text-align: center; }
.c-end .next { font-size: 11px; letter-spacing: 0.42em; color: var(--ink-faint); margin-bottom: 2.4em; }
.c-continue { display: inline-flex; align-items: center; gap: 1.2em; font-size: 13px; letter-spacing: 0.34em; padding: 18px 30px 18px 34px; border: 1px solid var(--ink-faint); border-radius: 999px; transition: background .5s var(--ease), border-color .5s; }
.c-continue:hover { background: rgba(255,255,255,.55); border-color: var(--ink-soft); }
.c-continue i { width: 30px; height: 1px; background: currentColor; position: relative; }
.c-continue i::after { content: ''; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }
.c-links { margin: 0 0 2.4em; display: flex; gap: 2.4em; justify-content: center; }
.c-links a { font-size: 12px; letter-spacing: 0.3em; text-decoration: none; border-bottom: 1px solid var(--ink-faint); padding-bottom: 6px; }
.c-pull { margin-top: 4em; font-size: 10px; letter-spacing: 0.36em; color: var(--ink-faint); }
.c-pull .bar { display: block; width: 120px; height: 1px; margin: 1.4em auto 0; background: rgba(59,61,64,.14); position: relative; overflow: hidden; }
.c-pull .bar i { position: absolute; inset: 0; background: var(--ink-soft); transform: scaleX(0); transform-origin: left; }
.c-spacer { height: 40vh; }
@media (max-width: 760px) { .c-spacer { height: 12vh; } .c-end .next { margin-top: 10vh; } }
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 1.1s var(--ease), transform 1.3s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .c-steps, .c-out { grid-template-columns: 1fr; gap: 3em; }
  .c-meta { gap: 22px 34px; }
  .label .meta { white-space: normal; max-width: 70vw; }
  .dots { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue::after { animation: none; }
  [data-reveal] { transition: opacity .4s linear; transform: none; }
}

/* sound toggle */
.snd { position: fixed; z-index: 10; right: var(--pad-x); bottom: max(22px, 5.2vh); display: inline-flex; align-items: center; gap: 1em; font-size: clamp(10px, 0.72vw, 12px); letter-spacing: 0.3em; color: var(--ink-soft); transition: color .4s var(--ease); }
.snd:hover { color: var(--ink); }
.snd i { display: inline-flex; align-items: flex-end; gap: 2px; height: 10px; }
.snd i b { display: block; width: 1px; height: 3px; background: currentColor; }
.snd.on i b { animation: eq 1.3s ease-in-out infinite; }
.snd.on i b:nth-child(2) { animation-delay: .25s; } .snd.on i b:nth-child(3) { animation-delay: .5s; } .snd.on i b:nth-child(4) { animation-delay: .12s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 10px; } }

/* cursor: a ring and a dot, white, inverted against whatever is beneath so it reads on the pale world and in the dark cave */
#cur { position: fixed; z-index: 70; left: 0; top: 0; width: 44px; height: 44px; margin: -22px 0 0 -22px; pointer-events: none; opacity: 0; transition: opacity .35s; mix-blend-mode: difference; }
#cur i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid #fff; transform: scale(.5); transition: transform .45s var(--ease), background .35s, border-color .35s; }
#cur::after { content: ''; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease); }
#cur.rock i { transform: scale(1); }
#cur.rock::after { transform: scale(.6); }
#cur.grab i { transform: scale(.72); background: rgba(255,255,255,.18); }
#cur.link i { transform: scale(.82); background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.7); }
@media (pointer: fine) { body.has-cursor, body.has-cursor * { cursor: none !important; } }
@media (prefers-reduced-motion: reduce) { .snd.on i b { animation: none; height: 7px; } }

/* tuner (?tune) */
#tuner { position: fixed; z-index: 99; right: 12px; bottom: 12px; width: 260px; max-height: 80vh; overflow: auto; background: rgba(255,255,255,.88); font: 11px/1.4 ui-monospace, Menlo, monospace; padding: 10px; border-radius: 8px; color: #222; }
#tuner label { display: grid; grid-template-columns: 90px 1fr 42px; gap: 6px; align-items: center; margin: 3px 0; }
#tuner button { border: 1px solid #999; padding: 3px 8px; border-radius: 4px; margin-top: 6px; }
#fallback[hidden] { display: none; }
#fallback { position: fixed; inset: 0; display: grid; place-items: center; font-size: 14px; letter-spacing: .1em; }
