/* 3DCraft website. The palette is taken from the renders: their paper background, the brass of the
   sundial, the copper of the hex key stand, the slate of the sundial's slab. */
@font-face { font-family: "Instrument Serif"; src: url(fonts/instrument-serif-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(fonts/instrument-serif-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url(fonts/inter-var.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/jetbrains-mono-var.woff2) format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }

:root {
  --paper: #ebe9e5;        /* exactly the background of every render: the models float without a frame */
  --paper-hi: #f4f3f0;
  --rule: #d2cec6;
  --ink: #151413;
  --ink-2: #3b3936;
  --dim: #6b675f;
  --brass: #8c6b1f;        /* display text on paper */
  --gold: #dba032;         /* fills, the engine's hub */
  --gold-hi: #f0cf85;
  --copper: #d55e13;       /* the hex key stand */
  --slate: #25282a;        /* the sundial's slab, darkened: the dark panels */
  --slate-2: #303437;
  --slate-line: #41474b;
  --on-slate: #eeece7;
  --on-slate-dim: #a3a39d;
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --pad: clamp(20px, 4.4vw, 64px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure, ol, ul { margin: 0; }
code, pre { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--gold-hi); }

.wrap { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: var(--pad); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.kicker { font: 500 .74rem/1.3 var(--mono); letter-spacing: .13em; text-transform: uppercase; color: var(--dim); }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 24px; border-radius: 99px; background: var(--ink); color: #fff; font-weight: 600; font-size: .97rem; line-height: 1.2; text-decoration: none; border: 0; cursor: pointer; font-family: inherit; transition: transform .25s var(--ease), background .25s; }
.btn:hover { transform: translateY(-2px); background: #000; }
.btn-small { padding: 9px 18px; font-size: .88rem; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-hi); }
.btn.is-soon { cursor: default; opacity: .92; } .btn.is-soon:hover { transform: none; background: var(--gold); }
.link { font-weight: 600; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat; padding-bottom: 3px; transition: background-size .3s var(--ease); }
.link:hover { background-size: 0 1.5px; background-position: 100% 100%; }
.label { font-size: .84rem; line-height: 1.5; color: var(--ink-2); border-top: 1px solid var(--ink); padding-top: 10px; max-width: 34ch; }
.label b { display: block; font: 500 .7rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 5px; }

/* things come in as they are scrolled to (only with script, and only when motion is welcome) */
.js .reveal { opacity: 0; translate: 0 26px; transition: opacity .9s var(--ease), translate .9s var(--ease); }
.js .reveal.in { opacity: 1; translate: 0 0; }

/* ---------- navigation ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; gap: 26px; padding: 14px var(--pad); font-size: .92rem; transition: background .3s, box-shadow .3s; }
.nav.scrolled { background: rgba(235, 233, 229, .93); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 1px 0 var(--rule); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.06rem; letter-spacing: -.01em; text-decoration: none; margin-right: auto; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { text-decoration: none; opacity: .82; transition: opacity .2s; }
.nav-links a:hover { opacity: 1; }
.lang { display: flex; gap: 2px; font: 500 .76rem var(--mono); }
.lang a, .foot nav a[hreflang] { text-decoration: none; padding: 5px 7px; border-radius: 6px; opacity: .55; }
.lang a[aria-current], .foot nav a[aria-current] { opacity: 1; background: rgba(21, 20, 19, .08); }
.star-link { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-weight: 600; font-size: .86rem; padding: 7px 12px; border-radius: 99px; border: 1px solid rgba(21, 20, 19, .25); transition: background .25s, border-color .25s; }
.star-link:hover { background: var(--paper-hi); border-color: var(--ink); }
.star-link .star { color: var(--gold); transition: rotate .6s var(--ease); } .star-link:hover .star { rotate: 72deg; }
.foot nav a { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 900px) { .nav-links { display: none; } .nav { gap: 10px; } }
@media (max-width: 420px) { .star-link span { display: none; } .lang a { padding: 5px 5px; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: max(100svh, 640px); overflow: clip; display: flex; align-items: flex-end; }
.hero-model { position: absolute; inset: 0; pointer-events: none; }
.hero-model video { position: absolute; height: 108%; width: auto; max-width: none; aspect-ratio: 4 / 3; top: -1%; left: 50%; translate: -19% 0;
  -webkit-mask-image: radial-gradient(closest-side, #000 86%, transparent 100%); mask-image: radial-gradient(closest-side, #000 86%, transparent 100%);
  animation: model-in 1.6s var(--ease) both; }
.hero-model .label { position: absolute; left: 41.5%; bottom: clamp(26px, 5vh, 48px); width: 270px; animation: fade-up 1s var(--ease) 1.5s both; }
.hero-copy { position: relative; z-index: 2; padding: 0 var(--pad) clamp(40px, 8vh, 76px); max-width: 720px; }
.method { font: 400 clamp(2.7rem, 5.6vw, 5.3rem)/.98 var(--serif); letter-spacing: -.015em; margin-bottom: 28px; }
.method span { display: block; white-space: nowrap; animation: fade-up 1s var(--ease) both; }
.method span:nth-child(1) { animation-delay: .15s; } .method span:nth-child(2) { animation-delay: .55s; } .method span:nth-child(3) { animation-delay: .95s; }
.method em { color: var(--brass); }
.hero h1 { font: 400 1.1rem/1.55 var(--sans); max-width: 43ch; color: var(--ink-2); margin-bottom: 30px; animation: fade-up 1s var(--ease) 1.25s both; }
.cta { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; animation: fade-up 1s var(--ease) 1.4s both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(22px); } }
@keyframes model-in { from { opacity: 0; scale: 1.05; } }
/* the engine drifts back as the page scrolls on, where the browser can tie an animation to the scroll */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero-model { animation: model-out linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
    @keyframes model-out { to { transform: translateY(9%) scale(.93); opacity: .35; } }
  }
}
@media (max-width: 900px) {
  .hero { flex-direction: column; align-items: stretch; min-height: 0; padding-top: 64px; }
  .hero-model { position: relative; inset: auto; }
  .hero-model video { position: relative; height: auto; width: 134%; top: 0; left: 0; translate: -15% 0; margin: -4% 0 -9%; }
  .hero-model .label { position: relative; left: 0; bottom: 0; width: auto; margin: 0 var(--pad) 26px; order: 3; }
  .hero-copy { padding-bottom: 44px; order: 2; }
  .hero { display: grid; }
  .hero-model { display: contents; }
  .hero-model video { order: 1; } .method span { white-space: normal; }
}

/* ---------- commands, not buttons ---------- */
.statement { padding-block: clamp(90px, 15vh, 180px); max-width: 1080px; text-align: center; }
.statement h2 { font: 400 clamp(2.3rem, 5.2vw, 4.6rem)/1.02 var(--serif); letter-spacing: -.015em; margin: 18px auto 30px; max-width: 16ch; text-wrap: balance; }
.statement p:last-child { font-size: clamp(1.08rem, 1.5vw, 1.3rem); line-height: 1.6; color: var(--ink-2); max-width: 58ch; margin-inline: auto; text-wrap: pretty; }

/* ---------- three ways ---------- */
.ways-title { font: 500 .8rem/1.3 var(--mono); letter-spacing: .13em; text-transform: uppercase; color: var(--dim); padding-bottom: 22px; }
.ways-title::after { content: ""; display: block; height: 1px; background: var(--ink); margin-top: 22px; }
.way { display: grid; grid-template-columns: clamp(70px, 12vw, 190px) minmax(0, 1fr); gap: 0 clamp(16px, 3vw, 48px); align-items: start; padding-block: clamp(50px, 9vh, 110px); }
.way .num { font: 400 clamp(5rem, 13vw, 12rem)/.74 var(--serif); color: var(--brass); }
.way h3 { font: 400 clamp(2rem, 4vw, 3.6rem)/1.04 var(--serif); letter-spacing: -.012em; margin-bottom: 20px; text-wrap: balance; }
.way p { font-size: clamp(1.05rem, 1.35vw, 1.2rem); line-height: 1.62; color: var(--ink-2); max-width: 60ch; text-wrap: pretty; }
.way-media { grid-template-columns: clamp(70px, 12vw, 190px) minmax(0, 1fr) minmax(0, 1.15fr); }
.way-figure { position: relative; margin: -6% -4% -8% -6%; }
.way-figure video { width: 100%; aspect-ratio: 4 / 3; -webkit-mask-image: radial-gradient(closest-side, #000 84%, transparent 100%); mask-image: radial-gradient(closest-side, #000 84%, transparent 100%); }
.way-figure .label { margin: -4% 0 0 12%; position: relative; }
.fields { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fields b { flex-basis: 100%; font: 500 .7rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; }
.fields span { font-size: .84rem; line-height: 1.3; border: 1px solid var(--rule); background: var(--paper-hi); padding: 6px 12px; border-radius: 99px; color: var(--ink-2); }
@media (max-width: 900px) {
  .way, .way-media { grid-template-columns: 1fr; }
  .way .num { font-size: 6.5rem; margin-bottom: 26px; }
  .way-figure { margin: 6px calc(-1 * var(--pad)) 0; } .way-figure .label { margin: -2% var(--pad) 0; }
}

/* the code panel */
.code { background: var(--slate); color: var(--on-slate); border-radius: 16px; overflow: hidden; box-shadow: 0 30px 70px -40px rgba(21, 20, 19, .6); align-self: center; }
.code-head { font: 500 .7rem var(--mono) !important; letter-spacing: .12em; text-transform: uppercase; color: var(--on-slate-dim) !important; padding: 18px 22px 0; }
.tabs { display: flex; gap: 4px; padding: 12px 16px 0; border-bottom: 1px solid var(--slate-line); }
.tabs button { font: 500 .86rem var(--sans); color: var(--on-slate-dim); background: none; border: 0; padding: 10px 14px 12px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--on-slate); border-color: var(--gold); }
.panel pre { margin: 0; padding: 22px; font-size: .8rem; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.panel .code-note { font: 400 .86rem/1.5 var(--sans) !important; color: var(--on-slate-dim) !important; padding: 0 22px 22px; margin-top: -6px; }
.panel pre i { font-style: normal; color: var(--on-slate-dim); }
.js .panel[hidden] { display: none; }

/* ---------- the command log ---------- */
.log { --step: 26vh; position: relative; margin-block: clamp(10px, 3vh, 40px) clamp(40px, 8vh, 100px); }
.js .log { height: calc(100vh + var(--lines) * var(--step)); }
.log-pin { display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); }
.js .log-pin { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.log-left { background: var(--slate); color: var(--on-slate); padding: clamp(74px, 11vh, 110px) clamp(22px, 3.4vw, 54px) 34px; display: flex; flex-direction: column; min-height: 0; }
.log-left .kicker { color: var(--gold); }
.log-left h3 { font: 400 clamp(1.9rem, 3.3vw, 3.1rem)/1.04 var(--serif); letter-spacing: -.012em; margin: 14px 0 14px; }
.log-left h3 span { color: var(--gold-hi); font-style: italic; }
.log-intro { color: var(--on-slate-dim); font-size: .95rem; line-height: 1.55; max-width: 50ch; margin-bottom: 22px; }
.log-window { flex: 1; min-height: 0; overflow: hidden; border-block: 1px solid var(--slate-line); position: relative; }
.log-lines { list-style: none; margin: 0; padding: 0; font: 400 .8rem/1.2 var(--mono); transition: transform .5s var(--ease); }
.log-lines li { display: grid; grid-template-columns: 26px 128px minmax(0, 1fr) 18px; gap: 10px; align-items: center; padding: 11px 12px; border-bottom: 1px solid var(--slate-2); color: var(--on-slate-dim); white-space: nowrap; transition: background .3s, color .3s, opacity .3s; }
.log-lines code { color: var(--on-slate); font-size: inherit; }
.log-lines .a { overflow: hidden; text-overflow: ellipsis; }
.log-lines .ok { color: #8fc79a; text-align: right; transition: opacity .3s; }
.js .log-lines li.todo { opacity: .34; } .js .log-lines li.todo .ok { opacity: 0; }
.log-lines li.now { background: var(--gold); color: #5b3c08; border-radius: 6px; border-color: transparent; }
.log-lines li.now code, .log-lines li.now .ok { color: var(--ink); font-weight: 700; }
.log-note { margin-top: 16px; font-size: .86rem; line-height: 1.5; color: var(--on-slate-dim); max-width: 52ch; transition: opacity .5s; }
.js .log:not(.done) .log-note { opacity: 0; }
.log-right { position: relative; display: flex; flex-direction: column; min-height: 0; padding-top: 60px; }
.log-frames { position: relative; flex: 1; min-height: 0; }
.log-frames img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .45s; }
.log-frames img.on { opacity: 1; }
html:not(.js) .log-frames img:last-child { opacity: 1; position: relative; }
.log-player { padding: 0 clamp(22px, 3.4vw, 54px) 34px; }
.log-bar { height: 5px; border-radius: 9px; background: var(--rule); position: relative; }
.log-bar i { position: absolute; inset: 0 auto 0 0; width: calc(var(--p, 1) * 100%); border-radius: 9px; background: var(--gold); transition: width .35s var(--ease); }
.log-bar i::after { content: ""; position: absolute; right: -8px; top: -6px; width: 17px; height: 17px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); }
.log-player p { display: flex; justify-content: space-between; gap: 14px; margin-top: 15px; font: 400 .78rem var(--mono); color: var(--dim); }
.log-player b { color: var(--ink); font-weight: 600; }
@media (max-width: 900px) {
  .log { --step: 22vh; }
  .log-pin { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .log-right { order: -1; padding-top: 56px; height: 44vh; }
  html:not(.js) .log-right { height: auto; }
  .log-player { padding-bottom: 14px; } .log-player p { font-size: .68rem; white-space: nowrap; margin-top: 12px; }
  .log-left { padding-top: 22px; padding-bottom: 18px; }
  .log-left h3 { font-size: 1.7rem; margin: 8px 0; } .log-intro { display: none; }
  .log-lines li { grid-template-columns: 20px 112px minmax(0, 1fr) 14px; gap: 7px; padding: 10px 6px; font-size: .72rem; }
  .log-note { font-size: .78rem; margin-top: 10px; }
}

/* ---------- the showcase ---------- */
.models { padding-block: clamp(80px, 13vh, 160px) clamp(60px, 9vh, 110px); overflow: clip; }
.models h2 { font: 400 clamp(2.2rem, 4.8vw, 4.3rem)/1.03 var(--serif); letter-spacing: -.015em; max-width: 21ch; margin: 16px 0 16px; text-wrap: balance; }
.models-counts { font: 500 .8rem var(--mono); letter-spacing: .06em; color: var(--dim); margin-bottom: clamp(26px, 5vh, 56px); }
.marquee { overflow: hidden; }
.marquee .track { display: flex; width: max-content; will-change: transform; }
/* without script the rows drift by themselves; with script they drift and can be dragged or swiped */
html:not(.js) .marquee .track { animation: drift 150s linear infinite; }
html:not(.js) .marquee.rev .track { animation-direction: reverse; animation-duration: 170s; }
.js .marquee { cursor: grab; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.js .marquee.dragging { cursor: grabbing; }
.marquee img { -webkit-user-drag: none; }
.models-counts span { opacity: .75; white-space: nowrap; }
@keyframes drift { to { transform: translateX(-50%); } }
.marquee figure { width: clamp(190px, 21vw, 300px); flex: none; }
.marquee img { width: 100%; aspect-ratio: 4 / 3; transition: scale .6s var(--ease); -webkit-mask-image: radial-gradient(closest-side, #000 76%, transparent 100%); mask-image: radial-gradient(closest-side, #000 76%, transparent 100%); }
.marquee:not(.dragging) figure:hover img { scale: 1.12; }
.marquee figcaption { margin: 0 16px 26px; padding-top: 8px; border-top: 1px solid var(--rule); font-size: .74rem; color: var(--dim); line-height: 1.35; }
.marquee figcaption b { display: block; font: 400 1.12rem/1.15 var(--serif); color: var(--ink); margin-bottom: 2px; }

/* ---------- try it here ---------- */
.try { background: var(--slate); color: var(--on-slate); padding-block: clamp(80px, 13vh, 150px); }
.try-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.try .kicker { color: var(--gold); }
.try h2 { font: 400 clamp(2.2rem, 4.4vw, 4rem)/1.03 var(--serif); letter-spacing: -.015em; margin: 16px 0 22px; text-wrap: balance; }
.try p { color: #cfcdc7; max-width: 48ch; }
.try-note { margin-top: 30px; border-left: 3px solid var(--gold); padding: 2px 0 2px 20px; max-width: 52ch; }
.try-note h3 { font: 500 .72rem/1.3 var(--mono); letter-spacing: .13em; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; }
.try-note ul { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; }
.try-note li { font-size: .97rem; line-height: 1.55; color: #cfcdc7; }
.try-note li b { color: var(--on-slate); font-weight: 600; }
.try .try-note p { font-size: .97rem; color: var(--on-slate); }
.try-window { position: relative; border-radius: 14px; overflow: hidden; background: var(--paper); aspect-ratio: 16 / 10; box-shadow: 0 40px 90px -40px #000; border: 1px solid #000; }
.try-window img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.try-window iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--paper); }
.try-veil { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px; text-align: center; padding: 20px; color: var(--ink); }
.try-veil .btn { font-size: 1.08rem; padding: 17px 30px; box-shadow: 0 16px 40px -14px rgba(21, 20, 19, .55); }
.try-veil .btn i { font-style: normal; font-size: .8em; }
.try-veil small { font: 500 .74rem var(--mono); color: var(--ink-2); background: rgba(244, 243, 240, .9); padding: 6px 12px; border-radius: 6px; }
@media (max-width: 520px) { .panel pre { font-size: .72rem; padding: 18px; } .panel .code-note { padding: 0 18px 18px; } }
@media (max-width: 900px) { .try-grid { grid-template-columns: 1fr; } .try-veil .btn { font-size: .95rem; padding: 13px 20px; } }

/* ---------- the story ---------- */
.story { padding-block: clamp(90px, 15vh, 180px) clamp(60px, 10vh, 120px); }
.story h2 { font: 400 clamp(2.3rem, 5.2vw, 4.6rem)/1.02 var(--serif); letter-spacing: -.015em; margin: 16px 0 clamp(30px, 5vh, 54px); max-width: 16ch; text-wrap: balance; }
.story-text { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 4vw, 64px); }
.story-text p { font-size: clamp(1.05rem, 1.35vw, 1.2rem); line-height: 1.65; color: var(--ink-2); text-wrap: pretty; }
.quote { font: italic 400 clamp(2.4rem, 6.4vw, 6rem)/1 var(--serif); letter-spacing: -.02em; color: var(--brass); margin-block: clamp(60px, 11vh, 130px); max-width: 15ch; text-wrap: balance; }
.stand { border-top: 1px solid var(--ink); padding-top: 22px; display: grid; grid-template-columns: clamp(140px, 24vw, 330px) minmax(0, 1fr); gap: 20px; }
.stand p:last-child { font-size: clamp(1.05rem, 1.35vw, 1.2rem); line-height: 1.65; color: var(--ink-2); max-width: 62ch; }
.stand b { color: var(--ink); }
@media (max-width: 900px) { .story-text, .stand { grid-template-columns: 1fr; } }

/* ---------- open source ---------- */
.open { background: var(--slate); color: var(--on-slate); padding-block: clamp(70px, 11vh, 130px); }
.open-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 5vw, 80px); align-items: end; }
.open .kicker { color: var(--gold); }
.open h2 { font: 400 clamp(2.2rem, 4.6vw, 4.1rem)/1.03 var(--serif); letter-spacing: -.015em; margin-top: 16px; max-width: 14ch; text-wrap: balance; }
.open p:not(.kicker) { color: #cfcdc7; max-width: 52ch; font-size: clamp(1.05rem, 1.35vw, 1.2rem); line-height: 1.62; }
.open .cta { margin-top: 28px; animation: none; }
.open .btn .star { transition: rotate .6s var(--ease), scale .6s var(--ease); }
.open .btn:hover .star { rotate: 72deg; scale: 1.25; }
@media (max-width: 900px) { .open-grid { grid-template-columns: 1fr; } }

/* ---------- download ---------- */
.download { padding-block: clamp(60px, 10vh, 120px) clamp(80px, 12vh, 150px); }
.download h2 { font: 400 clamp(2.2rem, 4.8vw, 4.3rem)/1.03 var(--serif); letter-spacing: -.015em; margin: 16px 0 18px; }
.dl-body { max-width: 62ch; color: var(--ink-2); margin-bottom: clamp(26px, 5vh, 44px); }
.noaccount { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 14px clamp(20px, 4vw, 64px); align-items: start; background: var(--paper-hi); border: 1px solid var(--rule); border-left: 4px solid var(--gold); border-radius: 4px 14px 14px 4px; padding: clamp(22px, 3vw, 34px); margin-bottom: clamp(30px, 6vh, 60px); }
.noaccount h3 { font: 400 clamp(1.8rem, 3.2vw, 2.7rem)/1.05 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.noaccount p { color: var(--ink-2); max-width: 62ch; }
@media (max-width: 900px) { .noaccount { grid-template-columns: 1fr; } }
.dl-body code, .unsigned code { font-size: .88em; background: rgba(21, 20, 19, .07); padding: 2px 6px; border-radius: 5px; overflow-wrap: anywhere; }
.dl-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.dl-grid article { padding: 26px 22px 30px 0; border-bottom: 1px solid var(--rule); display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; align-content: start; }
.dl-grid article + article { padding-left: 22px; border-left: 1px solid var(--rule); }
.dl-grid h3 { font: 400 2rem/1 var(--serif); flex-basis: 100%; }
.dl-grid p { font-size: .88rem; color: var(--dim); flex-basis: 100%; margin: -8px 0 8px; }
.dl-soon { font: 500 .74rem/1.45 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--brass); border: 1px solid currentColor; border-radius: 9px; padding: 8px 12px; }
.unsigned { margin-top: clamp(30px, 6vh, 60px); max-width: 78ch; }
.unsigned h3 { font: 400 1.7rem/1.1 var(--serif); margin-bottom: 12px; }
.unsigned p, .unsigned li { color: var(--ink-2); font-size: .98rem; }
.unsigned ul { padding-left: 1.1em; margin: 14px 0 22px; display: grid; gap: 10px; }
@media (max-width: 900px) {
  .dl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl-grid article:nth-child(odd) { padding-left: 0; border-left: 0; }
}
@media (max-width: 520px) { .dl-grid { grid-template-columns: 1fr; } .dl-grid article + article { padding-left: 0; border-left: 0; } }

/* ---------- footer ---------- */
.foot { background: var(--slate); color: var(--on-slate-dim); padding-block: clamp(50px, 8vh, 90px) 36px; font-size: .9rem; }
.foot-drawn { font: italic 400 clamp(1.6rem, 3.2vw, 2.7rem)/1.1 var(--serif); color: var(--on-slate); max-width: 24ch; margin-bottom: clamp(40px, 7vh, 80px); text-wrap: balance; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px; border-top: 1px solid var(--slate-line); padding-top: 24px; }
.foot .brand { color: var(--on-slate); margin-right: 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-left: auto; align-items: center; }
.foot nav a { text-decoration: none; } .foot nav a:hover { color: var(--on-slate); }
.foot nav a[aria-current] { background: rgba(255, 255, 255, .1); color: var(--on-slate); }
@media (max-width: 700px) { .foot nav { margin-left: 0; } }

/* ---------- when motion is not welcome ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; translate: none; }
  html:not(.js) .marquee { overflow-x: auto; }
}

/* ---- 404: the page for an address that does not exist ---- */
.lost main { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(20px, 4vw, 60px); padding: 90px var(--pad) 50px; max-width: 1320px; margin-inline: auto; }
.lost main > img { width: 100%; -webkit-mask-image: linear-gradient(to right, transparent, #000 26%); mask-image: linear-gradient(to right, transparent, #000 26%); }   /* the shadow runs to the picture's edge */
.lost-copy .kicker { margin-bottom: 22px; }
.lost-copy h1, .lost-copy h2 { font: 400 clamp(2rem, 4.2vw, 3.4rem)/1.08 var(--serif); letter-spacing: -.01em; text-wrap: balance; margin-bottom: 14px; }
.lost-copy h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); color: var(--ink-2); }
.lost-copy p { color: var(--ink-2); max-width: 40ch; }
.lost-copy p + p { margin-top: 22px; }
.lost-copy div + div { margin-top: clamp(34px, 6vh, 56px); padding-top: clamp(28px, 5vh, 44px); border-top: 1px solid var(--rule); }
@media (max-width: 760px) {
  .lost main { grid-template-columns: 1fr; align-content: center; padding-top: 80px; }
  .lost main > img { max-width: 420px; margin-inline: auto; }
}

/* ---- the gallery (examples/): every model with its file ---- */
.models-all { margin-top: clamp(8px, 2vh, 20px); }
.gallery-head { padding-top: clamp(120px, 21vh, 200px); padding-bottom: clamp(20px, 5vh, 50px); }
.gallery-head h1 { font: 400 clamp(2.6rem, 6.2vw, 5.6rem)/1 var(--serif); letter-spacing: -.02em; max-width: 15ch; margin: 16px 0 24px; text-wrap: balance; }
.gallery-lead { max-width: 60ch; font-size: 1.1rem; color: var(--ink-2); }
.gallery-parts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.gallery-parts a { display: inline-flex; align-items: baseline; gap: 10px; padding: 9px 18px; border: 1px solid var(--ink); border-radius: 99px; font-weight: 600; font-size: .92rem; text-decoration: none; transition: background .25s, color .25s; }
.gallery-parts a span { font: 500 .74rem var(--mono); color: var(--dim); transition: color .25s; }
.gallery-parts a:hover { background: var(--ink); color: #fff; }
.gallery-parts a:hover span { color: var(--gold-hi); }
.gallery-note { margin-top: 18px; font-size: .86rem; color: var(--dim); }
.gallery-part { padding-block: clamp(44px, 8vh, 90px); }
.part-head { display: grid; grid-template-columns: 1fr auto; column-gap: 20px; align-items: baseline; border-top: 1px solid var(--ink); padding-top: 18px; margin-bottom: clamp(20px, 4vh, 44px); }
.part-head h2 { font: 400 clamp(2rem, 4.2vw, 3.6rem)/1.05 var(--serif); letter-spacing: -.01em; }
.part-count { font: 500 .8rem var(--mono); letter-spacing: .06em; color: var(--dim); }
.part-body { grid-column: 1 / -1; max-width: 62ch; color: var(--ink-2); margin-top: 12px; }
.part-body code { font-size: .88em; background: rgba(21, 20, 19, .07); padding: 2px 6px; border-radius: 5px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: clamp(30px, 4vw, 52px) clamp(22px, 3vw, 44px); }
.card { display: flex; flex-direction: column; scroll-margin-top: 90px; }
.card img { width: 100%; aspect-ratio: 4 / 3; -webkit-mask-image: radial-gradient(closest-side, #000 76%, transparent 100%); mask-image: radial-gradient(closest-side, #000 76%, transparent 100%); }
.card .kicker { border-top: 1px solid var(--rule); padding-top: 12px; }
.card h3 { font: 400 1.65rem/1.1 var(--serif); margin: 8px 0 10px; text-wrap: balance; }
.card-text { font-size: .9rem; line-height: 1.52; color: var(--ink-2); margin-bottom: 18px; }
.card-links { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; font-size: .88rem; }
.card-links .btn span { font: 500 .7rem var(--mono); opacity: .72; }
.card-licence { margin-top: 14px; font-size: .76rem; color: var(--dim); }
.card:target h3 { color: var(--brass); }
.gallery-lead b { white-space: nowrap; }

/* ---- the guide (guide/<version>/): the chapters at the left, the text, this page's headings at the right ---- */
/* the frame is as wide as the navigation, so the chapters stand under the logo, and the text takes all the
   room between the two side columns (Johan, 2026-11-10: a guide may use the whole width of the screen) */
.guide-frame { display: grid; grid-template-columns: 270px minmax(0, 1fr) 220px; gap: clamp(28px, 3.4vw, 60px); align-items: start; max-width: none; padding-top: 110px; padding-bottom: clamp(60px, 10vh, 120px); }
.guide-menu, .guide-here { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow-y: auto; font-size: .88rem; scrollbar-width: thin; }
.guide-menu summary { display: none; }
.guide-version { font: 500 .7rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 14px; }
.guide-menu h2, .guide-here h2 { font: 500 .7rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin: 22px 0 8px; }
.guide-here h2 { margin-top: 0; }
.guide-menu ol, .guide-here ul { list-style: none; padding: 0; }
.guide-menu a, .guide-here a { display: flex; gap: 10px; padding: 5px 10px 5px 0; text-decoration: none; color: var(--ink-2); line-height: 1.35; border-radius: 6px; }
.guide-menu a span { flex: none; width: 1.5em; font: 500 .72rem/1.7 var(--mono); color: var(--dim); text-align: right; }
.guide-menu a:hover, .guide-here a:hover { color: var(--ink); }
.guide-menu a[aria-current] { color: var(--ink); font-weight: 600; }
.guide-menu a[aria-current] span { color: var(--copper); }
.guide-menu p a { font-weight: 600; color: var(--ink); }
.guide-here a { padding-left: 12px; border-left: 1px solid var(--rule); border-radius: 0; font-size: .84rem; }
.guide-here a:hover { border-left-color: var(--ink); }

.prose { min-width: 0; font-size: 1.02rem; line-height: 1.68; }
.prose > * + * { margin-top: 1.05em; }
.prose h1 { font: 400 clamp(2.3rem, 4.6vw, 3.9rem)/1.04 var(--serif); letter-spacing: -.015em; text-wrap: balance; margin-bottom: .5em; }
.prose h2 { font: 400 clamp(1.7rem, 2.8vw, 2.25rem)/1.12 var(--serif); margin-top: 2em; padding-top: .8em; border-top: 1px solid var(--rule); text-wrap: balance; }
.prose h3 { font: 600 1.12rem/1.3 var(--sans); margin-top: 1.9em; }
.prose h4 { font: 600 1rem/1.3 var(--sans); margin-top: 1.6em; }
.prose h2, .prose h3, .prose h4 { scroll-margin-top: 90px; }
.prose a { color: var(--ink); text-decoration-color: var(--brass); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.prose a:hover { color: var(--brass); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose li > p + p, .prose li > p + pre, .prose li > pre + p, .prose li > ul, .prose li > ol { margin-top: .7em; }
.prose code { font-size: .86em; background: rgba(21, 20, 19, .07); padding: 2px 6px; border-radius: 5px; overflow-wrap: anywhere; }
.prose pre { background: var(--slate); color: var(--on-slate); border-radius: 12px; padding: 18px 20px; font-size: .84rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.prose pre code { background: none; padding: 0; font-size: 1em; border-radius: 0; }
.prose blockquote { margin-inline: 0; padding: 14px 20px; background: var(--paper-hi); border-left: 3px solid var(--gold); border-radius: 0 12px 12px 0; }
.prose blockquote > * + * { margin-top: .7em; }
.prose img { border-radius: 10px; border: 1px solid var(--rule); background: #fff; }
.prose .table { overflow-x: auto; }
.prose table { border-collapse: collapse; width: 100%; font-size: .9rem; line-height: 1.5; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 9px 14px 9px 0; border-bottom: 1px solid var(--rule); }
.prose th { font: 500 .72rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); border-bottom-color: var(--ink); white-space: nowrap; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin-block: 2em; }
.guide-turn { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 3.4em; padding-top: 1.4em; border-top: 1px solid var(--ink); }
.guide-turn a { display: block; text-decoration: none; font: 400 1.35rem/1.2 var(--serif); }
.guide-turn a span { display: block; font: 500 .7rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.guide-turn .next { grid-column: 2; text-align: right; }
.guide-source { font-size: .8rem; color: var(--dim); margin-top: 2em; }
.guide .nav-links a[aria-current] { opacity: 1; font-weight: 600; }
.guide .foot { padding-top: 36px; }
@media (max-width: 1180px) {
  .guide-frame { grid-template-columns: 240px minmax(0, 1fr); }
  .guide-here { display: none; }
}
@media (max-width: 959px) {
  .guide-frame { grid-template-columns: minmax(0, 1fr); padding-top: 84px; gap: 26px; }
  .guide-menu { position: static; max-height: none; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper-hi); }
  .guide-menu summary { display: block; cursor: pointer; padding: 12px 16px; font-weight: 600; }
  .guide-menu nav { padding: 4px 16px 16px; }
}
@media (max-width: 700px) { .prose table { min-width: 640px; } }   /* a table scrolls sideways rather than breaking its words */
