/* Foundation: the hairline world. Paper or night plate, chroma-free greys, 0.9px strokes,
   one electric-blue accent for the live point. Geist for text, Geist Mono for read-outs and
   measurements, one Instrument Serif italic word per heading. */
@font-face{font-family:Geist;src:url('../hairline/fonts/Geist-Variable.woff2') format('woff2');font-weight:100 900;font-display:swap}
@font-face{font-family:'Geist Mono';src:url('../hairline/fonts/GeistMono-Variable.woff2') format('woff2');font-weight:100 900;font-display:swap}
@font-face{font-family:'Instrument Serif';src:url('../hairline/fonts/InstrumentSerif-Italic.woff2') format('woff2');font-style:italic;font-weight:400;font-display:swap}

:root{
  color-scheme:light;
  --paper:#ffffff;--stone:#f4f4f5;--plate:#ffffff;--plate-2:#fafafa;
  --ink:#0a0a0a;--ink-2:#3f3f46;--muted:#696972;--faint:#a1a1aa;
  --line:rgb(10 10 10/.08);--line-2:rgb(10 10 10/.15);
  --accent:#0759ff;--accent-2:#0047d6;--accent-soft:rgb(7 89 255/.12);--on-accent:#ffffff;
  --scrim:rgb(250 250 250/.72);
  --card:0 0 0 1px rgb(0 0 0/.06),0 1px 2px -1px rgb(0 0 0/.06),0 2px 4px 0 rgb(0 0 0/.04);
  --lift:0 1px 2px rgb(0 0 0/.03),0 10px 28px -16px rgb(0 0 0/.16);
  --lift-lg:0 1px 2px rgb(0 0 0/.03),0 2px 6px rgb(0 0 0/.03),0 32px 64px -34px rgb(0 0 0/.26);
  /* the line world's palette, shared with the hairline figures: set darker and a touch heavier than
     hairline's own so the drawing reads at a glance */
  --hl-plate:var(--paper);--hl-hi:#141416;--hl-edge:#6b6b74;--hl-mid:#9d9da6;--hl-lo:#d8d8dd;--hl-w:1.2;--hl-screen:#16171a;--hl-glare:rgb(255 255 255/.26);
  --hairline-stroke:var(--hl-w);--hairline-plate:var(--hl-plate);--hairline-hi:var(--hl-hi);--hairline-edge:var(--hl-edge);--hairline-mid:var(--hl-mid);--hairline-lo:var(--hl-lo);
  --sans:Geist,ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif;
  --mono:'Geist Mono',ui-monospace,'SF Mono',Menlo,Consolas,monospace;
  --serif:'Instrument Serif',Georgia,serif;
  --ease-out:cubic-bezier(.23,1,.32,1);
  --ease-drawer:cubic-bezier(.32,.72,0,1);
  --ease-expo:cubic-bezier(.16,1,.3,1);
  /* a critically damped spring, sampled: leaves rest gently, settles on a long tail */
  --spring:linear(0,.057,.18,.32,.454,.572,.67,.749,.811,.859,.896,.923,.944,.959,.97,.979,.985,.989,.992,.994,.996,.997,.998,.999,1);
  --topbar:56px;--gutter:clamp(18px,4.5vw,64px);
}
:root[data-theme=dark]{
  color-scheme:dark;
  --paper:#08090a;--stone:#121315;--plate:#0e0f11;--plate-2:#141518;
  --ink:#ededef;--ink-2:#c4c6cc;--muted:#83858d;--faint:#5b5d64;
  --line:rgb(255 255 255/.08);--line-2:rgb(255 255 255/.15);
  --accent:#4d8dff;--accent-2:#7aa9ff;--accent-soft:rgb(77 141 255/.16);--on-accent:#04070d;
  --scrim:rgb(8 9 10/.72);
  --card:0 0 0 1px rgb(255 255 255/.07),0 1px 2px -1px rgb(0 0 0/.6),0 2px 4px 0 rgb(0 0 0/.4);
  --lift:0 1px 2px rgb(0 0 0/.5),0 10px 28px -16px rgb(0 0 0/.9);
  --lift-lg:0 1px 2px rgb(0 0 0/.5),0 2px 6px rgb(0 0 0/.4),0 32px 64px -34px rgb(0 0 0/.95);
  --hl-hi:#f4f4f6;--hl-edge:#a3a3ad;--hl-mid:#6c6c75;--hl-lo:#38383f;--hl-screen:#020203;--hl-glare:rgb(255 255 255/.16);
}

*{box-sizing:border-box}
html{scroll-padding-top:0;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{margin:0;background:var(--paper);color:var(--ink);font:400 15px/1.6 var(--sans);font-synthesis-weight:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}
h1,h2,h3,h4,p{margin-top:0}
em{font-style:italic}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit}
img,video,svg{display:block}
::selection{background:var(--accent);color:var(--on-accent)}
:focus-visible{outline:1.5px solid var(--ink);outline-offset:3px;border-radius:6px}
html{scrollbar-color:var(--line-2) transparent;scrollbar-width:thin}
::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--line-2);border-radius:10px;border:3px solid var(--paper)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}

.skip{position:fixed;top:12px;left:12px;z-index:60;transform:translateY(-160%);padding:10px 14px;border-radius:10px;background:var(--ink);color:var(--paper);font-size:13px;font-weight:500;transition:transform .2s var(--ease-out)}
.skip:focus{transform:none}

/* The line world: one fixed drawing behind every section (world.js draws and steers it). */
.world{position:fixed;inset:0;z-index:0;pointer-events:none;contain:strict}
/* Stars, floor and scene are three stacked drawings, each its own compositor layer. */
.world svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible;transform-origin:0 0;will-change:transform,opacity}
.world :where(path,polygon,ellipse,line,circle){fill:var(--hl-plate);stroke:var(--hl-mid);stroke-width:var(--hl-w);vector-effect:non-scaling-stroke;stroke-linejoin:round;stroke-linecap:round;transition:stroke .26s cubic-bezier(.5,0,.1,1),fill .26s cubic-bezier(.5,0,.1,1)}
.world :where(.nf){fill:none}
.world :where(.fo){stroke:none}
.world :where(.sil){stroke:var(--hl-edge)}
.world :where(.hi){stroke:var(--hl-hi)}
.world :where(.lo){stroke:var(--hl-lo)}
.world :where(.dash){stroke-dasharray:1 3.5}
.world :where(.dot){stroke:none;fill:var(--hl-hi)}
.world :where(.dot.m){fill:var(--hl-edge)}
.world :where(.dot.off){fill:var(--hl-lo)}
.world :where(.accent){stroke:var(--accent)}
.world :where(.dot.accent){fill:var(--accent);stroke:none}
.world :where(.screen){fill:var(--hl-screen);stroke:var(--hl-hi)}
.world :where(.glare){stroke:var(--hl-glare)}
.world :where(.eye){fill:var(--accent);stroke:none}
.world :where(.puff){stroke-width:calc(var(--hl-w) * 2)}
.world :where(.puff-fill){stroke:none}
/* a blade is too fine for a round tip to show, and some twenty thousand of them are drawn */
.world :where(.grass){stroke-linecap:butt}
/* While the camera rests, the scene's strokes are scaled to it (world.js sets --cam-s) rather
   than held at a pixel by vector-effect, which lets the GPU keep the paths that did not change. */
.world .at-rest :where(path,polygon,ellipse,line,circle){vector-effect:none;stroke-width:calc(var(--hl-w) / var(--cam-s,1))}
.world .at-rest :where(.dash){stroke-dasharray:calc(1 / var(--cam-s,1)) calc(3.5 / var(--cam-s,1))}
.world .at-rest :where(.puff){stroke-width:calc(var(--hl-w) * 2 / var(--cam-s,1))}
.world .at-rest .growing :where(path,polygon,ellipse,line,circle){vector-effect:non-scaling-stroke;stroke-width:var(--hl-w)}
.world .speck{fill:var(--hl-plate);fill-opacity:.01;stroke:none}
html.over-wheel{cursor:pointer}
.world .grid{fill:none;stroke:var(--hl-lo);stroke-width:1}
.world .stars circle{fill:var(--hl-edge);stroke:none}
.world .stars circle.b{fill:var(--hl-hi)}
.world .stars .tw{animation:twinkle var(--tw-d,5s) ease-in-out var(--tw-dl,0s) 1;animation-play-state:paused}
.world[data-stars] .stars .tw{animation-play-state:running}
html.project-modal-open .world .stars .tw{animation-play-state:paused}
@keyframes twinkle{50%{opacity:.2}}
@keyframes cosmos-pulse{50%{opacity:.3;transform:scale(.84)}}
.world .cosmos-tw{transform-box:fill-box;transform-origin:center;animation:cosmos-pulse var(--tw-d,5s) ease-in-out var(--tw-dl,0s) infinite}
html.project-modal-open .world .cosmos-tw{animation-play-state:paused}
/* The entrance: each part of the plinth and the rover draws its strokes, then fills its plates. */
.world[data-intro] path.draw:not(.dash),.world[data-intro] .draw path:not(.dash){stroke-dasharray:1 1;stroke-dashoffset:calc(1 - var(--d,0));stroke-opacity:min(1,calc(var(--d,0) * 40));fill-opacity:var(--f,0)}
.world[data-intro] .draw .dash{opacity:var(--f,0)}

main>section,main>footer{position:relative;z-index:1}

/* Top bar: the sound and theme switches, in a pill that frosts once the hero has gone. */
.topbar{position:fixed;top:0;left:0;right:0;z-index:40;display:flex;align-items:center;justify-content:flex-end;height:var(--topbar);padding:0 var(--gutter);pointer-events:none}
.topbar>*{pointer-events:auto}
.topbar-right{position:relative;display:flex;align-items:center;gap:2px;padding:3px;border-radius:13px;isolation:isolate}
.topbar-right::before{content:'';position:absolute;inset:0;z-index:-1;border-radius:inherit;background:color-mix(in srgb,var(--paper) 78%,transparent);-webkit-backdrop-filter:blur(14px) saturate(1.2);backdrop-filter:blur(14px) saturate(1.2);box-shadow:0 0 0 1px var(--line);opacity:var(--bar-solid,0);transition:opacity .35s var(--ease-out)}
.theme-toggle{position:relative;display:grid;place-items:center;width:36px;height:36px;padding:0;border:0;border-radius:10px;background:transparent;color:var(--ink);cursor:pointer;transition:background-color .2s,transform .16s var(--ease-out)}
.theme-toggle::after{content:'';position:absolute;inset:-4px}
@media(hover:hover){.theme-toggle:hover{background:var(--stone)}}
.theme-toggle:active{transform:scale(.92)}
.theme-toggle svg{width:18px;height:18px;overflow:visible;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle .sun-core{vector-effect:non-scaling-stroke;transform-box:fill-box;transform-origin:center;transition:transform .5s var(--spring)}
.theme-toggle .moon-bite{transition:transform .5s var(--spring)}
.theme-toggle .sun-rays{transform-origin:12px 12px;transition:transform .5s var(--spring),opacity .3s var(--ease-out)}
.theme-toggle[data-mode=dark] .sun-core{transform:scale(1.5)}
.theme-toggle[data-mode=dark] .moon-bite{transform:translate(-7px,7px)}
.theme-toggle[data-mode=dark] .sun-rays{transform:rotate(-40deg) scale(.4);opacity:0}
/* The theme change wipes across from the switch (chrome.js runs it as a view transition). */
html.theme-vt::view-transition-old(root),html.theme-vt::view-transition-new(root){animation:none;mix-blend-mode:normal}
html.theme-vt::view-transition-new(root){z-index:2}
/* Sound: the waves fold away and a cross comes in when it is off. */

/* Buttons share one press: a short scale that lands at once. */
.press{transition:transform .16s var(--ease-out)}
.press:active{transform:scale(.97)}

/* Section blocks rise in as they enter the viewport and settle back out as they leave. */
.motion-ready .reveal{opacity:0;translate:0 28px;filter:blur(6px);transition:opacity .8s var(--ease-expo) var(--reveal-delay,0ms),translate 1s var(--ease-expo) var(--reveal-delay,0ms),filter .8s var(--ease-expo) var(--reveal-delay,0ms)}
.motion-ready .reveal.in-view{opacity:1;translate:0 0;filter:none}

@media(prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}}
@media(prefers-reduced-motion:reduce){
  .motion-ready .reveal{translate:none;filter:none;transition:opacity .3s linear}
  .theme-toggle *{transition:none!important}
  .world .stars .tw,.world .cosmos-tw{animation:none}
}
