@font-face { font-family: "Source Serif 4"; src: url("/fonts/source-serif-4.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/ibm-plex-mono.woff2") format("woff2"); font-weight: 400; font-display: swap; }

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; background: var(--paper); font-family: var(--serif); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; transition: background-color .5s var(--ease), color .5s var(--ease); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--muted); }
::selection { background: var(--ink); color: var(--paper); }

.scene { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
header, main, footer { position: relative; z-index: 1; }

.top { display: flex; justify-content: space-between; align-items: center; padding: 26px var(--gutter); }
.mark { display: inline-flex; align-items: center; gap: 11px; font-size: var(--t-mark); letter-spacing: -0.012em; text-decoration: none; }
.mark:hover { color: var(--ink); }
.sym { width: 19px; height: 19px; fill: currentColor; position: relative; top: -1px; }
.label, .nav a, .foot { font-family: var(--mono); font-size: var(--t-label); letter-spacing: 0.08em; text-transform: uppercase; }
.nav { display: flex; align-items: center; }
.nav a { text-decoration: none; margin-left: 28px; }
.theme { margin-left: 24px; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 1px solid var(--rule); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; transition: border-color .3s, transform .5s var(--ease); }
.theme:hover { border-color: var(--ink); transform: rotate(-20deg); }
.theme svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; grid-area: 1 / 1; transition: opacity .4s, transform .6s var(--ease); }
.theme .sun { opacity: 0; transform: rotate(60deg) scale(.6); }
:root[data-theme="light"] .theme .sun { opacity: 1; transform: none; }
:root[data-theme="light"] .theme .moon { opacity: 0; transform: rotate(-60deg) scale(.6); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme .sun { opacity: 1; transform: none; }
  :root:not([data-theme="dark"]) .theme .moon { opacity: 0; transform: rotate(-60deg) scale(.6); }
}

.hero { position: relative; min-height: calc(100svh - 82px); display: flex; flex-direction: column; justify-content: flex-end; padding: 0 var(--gutter) clamp(56px, 11vh, 128px); }
.hero h1 { margin: 0; max-width: 17ch; font-weight: 400; font-size: var(--t-display); line-height: 1.04; letter-spacing: -0.028em; }

/* word-by-word line reveal */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.split .w > span { display: inline-block; transform: translateY(105%); transition: transform 1.25s var(--ease); transition-delay: calc(var(--i) * 45ms + 150ms); }
.split.in .w > span { transform: none; }
.fade { opacity: 0; transition: opacity 1.2s var(--ease); }
.ready .fade { opacity: 1; }
.d1 { transition-delay: .5s } .d2 { transition-delay: .65s }

/* closing line */
.close { padding: 10vh var(--gutter) 24vh; }
.close { min-height: 70vh; display: flex; align-items: center; }
.close p { margin: 0 0 0 46%; max-width: 20ch; font-size: var(--t-statement); line-height: 1.14; letter-spacing: -0.02em; }
@media (max-width: 760px) { .close p { margin-left: 0; } }

/* scroll story: the scene sits on the left, statements pass on the right */
.story { padding: 0 var(--gutter); }
.steps { margin-left: 46%; padding: 14vh 0 14vh; }
.step { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; }
.say { margin: 0; max-width: 22ch; font-size: var(--t-statement); line-height: 1.14; letter-spacing: -0.02em; }
.say .word { opacity: .14; transition: opacity .25s linear; }
html.grabbing, html.grabbing * { cursor: grabbing !important; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 9999; }

.body p { margin: 0 0 0.9em; font-size: var(--t-body); line-height: 1.36; letter-spacing: -0.01em; }
.body p.quiet { color: var(--muted); }
.rise { opacity: 0; transform: translateY(22px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.rise.in { opacity: 1; transform: none; }

.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px var(--gutter) 28px; color: var(--muted); }
.foot a { text-decoration: none; }
.foot-links { display: inline-flex; gap: 28px; }
.foot-mark { display: inline-flex; align-items: center; gap: 10px; }
.foot-mark .sym { width: 13px; height: 13px; top: 0; }

.doc { max-width: 680px; padding: 8vh var(--gutter) 12vh; }
.doc h1 { font-weight: 400; font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.02em; margin: 0 0 0.6em; }
.doc p, .doc li { font-size: 19px; line-height: 1.5; }
.doc .label { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .split .w > span, .fade, .rise, .say .word, .step .label { transition: none !important; transform: none !important; opacity: 1 !important; filter: none !important; }
}
@media (max-width: 760px) {
  .nav a { display: none; }
  .theme { margin-left: 0; }
  .hero { min-height: calc(94svh - 82px); justify-content: flex-start; padding-top: 14svh; }
    .steps { margin-left: 0; padding: 30vh 0 20vh; }
  .step { min-height: 58vh; justify-content: flex-end; padding-bottom: 10vh; }
    }
