@font-face { font-family: "Fraunces"; src: url(/fonts/fraunces.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(/fonts/fraunces-italic.woff2) format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url(/fonts/nunito-sans.woff2) format("woff2"); font-weight: 200 1000; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --board: #fafdff; --grid: 171, 169, 166;
  --paper: #FAF6EF; --cream: #F3EBDD; --line: #E4DACA; --ink: #2B2724; --ink-soft: #6E6459;
  --crayon: #E0A400;
  --image: #F7B500; --video: #E5484D; --threed: #2D6AE3; --audio: #2FA866; --edit: #F2762E; --community: #8A63D2;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --serif: "Fraunces", Georgia, serif; --sans: "Nunito Sans", system-ui, sans-serif;
  --top: 76px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100svh; display: flex; flex-direction: column;
  font-family: var(--sans); color: var(--ink); -webkit-font-smoothing: antialiased;
  /* the canvas background of the product: Seyès ruling (4 rows per big square), warm grey on bluish white */
  background-color: var(--board);
  background-image:
    linear-gradient(90deg, rgba(var(--grid), .11) 1px, transparent 1px),
    linear-gradient(rgba(var(--grid), .11) 1px, transparent 1px),
    linear-gradient(rgba(var(--grid), .05) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px, 48px 12px;
  background-position: -1px -1px;
  overflow-x: hidden;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.strip { display: flex; height: 8px; position: relative; z-index: 3; }
.strip i { flex: 1; }
.strip i:nth-child(1) { background: var(--image); } .strip i:nth-child(2) { background: var(--video); }
.strip i:nth-child(3) { background: var(--threed); } .strip i:nth-child(4) { background: var(--audio); }
.strip i:nth-child(5) { background: var(--edit); } .strip i:nth-child(6) { background: var(--community); }
.strip i:nth-child(7) { background: var(--ink); }

/* ink is drawn on the page, under the box; while a tool is in hand a transparent pad above everything catches the pointer */
#doodle { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
#doodle-input { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
body.drawing #doodle-input { pointer-events: auto; touch-action: none; }
body.drawing.has-tin #doodle-input { cursor: none; }

/* ---- top bar: centred menu, zipper on the right */
/* no stacking context on the bar itself: the nav sits above the 3D scene, the zipper above everything,
   including the full-screen zipper transition, so you can watch it run too */
header.top { position: relative; height: calc(var(--top) - 8px); display: flex; align-items: center; justify-content: center; padding: 0 clamp(14px, 3vw, 28px); }
.nav { position: relative; z-index: 30; display: flex; gap: clamp(18px, 3vw, 34px); font-weight: 800; font-size: 15px; }
.nav a { color: var(--ink); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; transition: border-color .2s; }
.nav a:first-child { font-family: var(--serif); font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--crayon); }
.soon-tab { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 0; color: #a9a29a; cursor: default; user-select: none; }
.soon-tab small { font-size: 9.5px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: #8d857c; background: #efebe5; border-radius: 999px; padding: 2px 7px; transform: translateY(-2px); }
.zip { position: absolute; z-index: 1001; right: clamp(10px, 2.4vw, 24px); top: 2px; display: flex; align-items: flex-start; gap: 6px; border: 0; padding: 0; margin: 0; background: none; cursor: pointer; font: inherit; color: var(--ink); }
.zip canvas { display: block; width: 150px; height: 70px; }
.zip .zl { font-size: 12px; font-weight: 900; letter-spacing: .08em; padding-top: 11px; opacity: .38; transition: opacity .3s; }
.zip .zl.on { opacity: 1; }
.zip:focus-visible { outline: 3px solid var(--crayon); outline-offset: 4px; border-radius: 8px; }
.zip.flat canvas { display: none; }
.zip.flat::before { content: ""; width: 34px; height: 18px; margin-top: 8px; border-radius: 999px; background: var(--cream); order: 1; }
.zipfx { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 1000; }

/* ---- stage: the box fills it, the title floats on top and fades when the box opens */
main.stage { position: relative; flex: 1 0 auto; min-height: 520px; } /* takes what the bar and the footer leave: the footer stays on the first screen */
.stage .tin { position: absolute; inset: 0; margin: 0; }
.tin > canvas, .tin > .fallback, .tin noscript img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.stage .tin > canvas { top: calc(-1 * var(--top)); height: calc(100% + var(--top)); } /* the scene runs up under the nav bar */
.tin > canvas { opacity: 0; transition: opacity .7s ease; } .tin.ready > canvas { opacity: 1; } /* fades in as the box drops */
/* the skeleton node graph around the closed box: under the 3D scene, in once the box has landed, gone when it opens */
#nodes { position: absolute; left: 0; top: calc(-1 * var(--top)); width: 100%; height: calc(100% + var(--top)); pointer-events: none; opacity: 0; transition: opacity .8s ease 1.1s; }
body.has-tin #nodes { opacity: 1; }
body.tin-open #nodes { opacity: 0; transition: opacity .25s ease; }
.tin > .fallback, .tin noscript img { object-fit: contain; object-position: center 70%; }
.intro { position: absolute; z-index: 2; left: 0; right: 0; top: clamp(8px, 3vh, 34px); padding: 0 20px; text-align: center; pointer-events: none; transition: opacity .45s ease, transform .6s var(--spring); }
.intro > * { pointer-events: auto; } /* the text stays selectable over the 3D scene; only the empty space lets clicks through */
body.tin-open .intro { opacity: 0; transform: translateY(-18px); }
body.tin-open .intro > * { pointer-events: none; }
h1.title { margin: 0 auto; max-width: 18em; font-family: var(--serif); font-weight: 600; font-size: clamp(32px, 4.4vw, 56px); letter-spacing: -.025em; line-height: 1.04; }
.lede { margin: 12px auto 0; max-width: 33em; color: var(--ink-soft); font-size: clamp(15px, 1.7vw, 18px); line-height: 1.5; font-weight: 600; }
/* ---- the locked box's tease: the room goes dark; the light is drawn in the 3D scene, in front of the veil */
.dim { position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: 0; background: rgb(16, 9, 0); } /* the same dark as the 3D room */
body.teasing .stage .tin > canvas { z-index: 41; } /* the box and its light in front of the dark veil while it lasts */

/* ---- draggable node cards, and the settings panel (?gui) */
.tin.over-node > canvas { cursor: grab; }
body.dragging-node, body.dragging-node * { cursor: grabbing !important; user-select: none; }
.tune { position: fixed; z-index: 1003; left: 14px; bottom: 14px; width: 290px; max-height: calc(100vh - 28px); overflow: auto; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .96); box-shadow: 0 10px 30px rgba(43, 39, 36, .18); font: 600 12px/1.3 var(--sans); color: var(--ink); }
.tune-head { display: block; width: 100%; margin: 0 0 6px; padding: 0 !important; border: 0 !important; background: none !important; text-align: left; font-weight: 900 !important; }
.tune.min { width: auto; } .tune.min > :not(.tune-head) { display: none; } .tune.min .tune-head { margin: 0; }
.tune h3 { margin: 10px 0 6px; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.tune h3:first-child { margin-top: 0; }
.tune label { display: grid; grid-template-columns: 78px 1fr 44px; gap: 6px; align-items: center; margin: 3px 0; }
.tune input[type="range"] { width: 100%; }
.tune select { width: 100%; min-width: 0; font: inherit; padding: 2px 4px; border: 1px solid #d8d4cc; border-radius: 6px; background: #fff; }
.tune-curve { width: 44px; height: 26px; }
.tune output { text-align: right; font-variant-numeric: tabular-nums; }
.tune .row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tune .tune-check { display: flex; gap: 8px; align-items: center; grid-template-columns: none; margin: 10px 0 2px; }
.tune button { border: 1px solid #d8d4cc; background: #fff; border-radius: 8px; padding: 5px 9px; font: inherit; cursor: pointer; }
.tune button:hover { background: #f4f1ea; }
.tune textarea { width: 100%; height: 110px; margin-top: 8px; font: 11px/1.35 ui-monospace, Menlo, monospace; border: 1px solid #d8d4cc; border-radius: 8px; padding: 6px; }

/* ---- the notice (teaser page): the sheet from inside the lid, laid on the page below the box */
body.has-notice main.stage { flex: none; height: calc(100svh - var(--top) - 64px); }
body.has-notice .stage .tin > canvas { height: calc(100% + var(--top) + 45svh); } /* the floating box and its light reach down over the notice (the notice stays above it, except while the box teases) */
.notice { position: relative; z-index: 1; padding: 24px 20px 80px; display: flex; justify-content: center; }
.sheet { position: relative; width: min(720px, 100%); padding: clamp(28px, 6vw, 64px); background: #fcfcfa; border-radius: 10px; color: #141414; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; transform: rotate(-0.6deg); box-shadow: 0 1px 1px rgba(43, 39, 36, .06), 0 2px 6px rgba(43, 39, 36, .05), 0 18px 40px -12px rgba(43, 39, 36, .16); }
.nt-square { position: absolute; top: clamp(28px, 6vw, 64px); right: clamp(28px, 6vw, 64px); width: 34px; height: 34px; background: var(--video); }
.sheet h2 { margin: 0; font-size: clamp(40px, 7vw, 64px); font-weight: 700; letter-spacing: -.02em; line-height: 1; padding-right: 48px; }
.nt-box { margin: 10px 0 0; font-size: 14px; }
.nt-rule { border: 0; height: 3px; background: #141414; margin: 18px 0 26px; }
.nt-rule.thin { height: 1px; margin: 22px 0 12px; }
.nt-lead { margin: 0; font-size: clamp(20px, 3vw, 28px); font-weight: 700; line-height: 1.2; }
.nt-body { margin: 10px 0 0; font-size: 15.5px; line-height: 1.5; color: #555; }
.nt-list { list-style: none; margin: 0; padding: 0; }
.nt-list li { display: grid; grid-template-columns: 34px 110px 1fr; gap: 6px 10px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid #dadada; font-size: 15px; line-height: 1.45; }
.nt-n { font-size: 12px; font-weight: 700; }
.nt-kind { font-weight: 700; font-size: 17px; }
.nt-cartouche { margin: 30px 0 0; padding: 14px 18px; border: 1.5px solid #141414; font-size: 15px; line-height: 1.45; }
.nt-foot { display: flex; justify-content: space-between; gap: 16px; margin: 26px 0 0; font-size: 12px; }
@media (max-width: 560px) { .nt-list li { grid-template-columns: 30px 1fr; } .nt-models { grid-column: 2; } }

/* ---- the demo: a small floating bubble, and the video in a lightbox (full screen on phones) */
.reel { position: fixed; z-index: 25; right: clamp(12px, 2.4vw, 26px); bottom: clamp(12px, 2.4vw, 26px); width: 96px; height: 96px; padding: 0; border: 0; border-radius: 50%; background: #f1efea; overflow: hidden; cursor: pointer; box-shadow: 0 1px 2px rgba(43, 39, 36, .06), 0 8px 24px rgba(43, 39, 36, .08); transition: transform .35s var(--spring), box-shadow .35s; }
.reel:hover { transform: scale(1.05); box-shadow: 0 1px 2px rgba(43, 39, 36, .06), 0 12px 30px rgba(43, 39, 36, .12); }
.reel-thumb { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #f1efea; }
/* its label: a small black tooltip that follows the pointer (placed by site.js) */
.reel-tip { position: fixed; z-index: 1002; left: 0; top: 0; padding: 6px 10px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 800; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s; }
.reel-tip.on { opacity: 1; }
.lightbox { width: min(1120px, 92vw); max-width: none; max-height: none; padding: 0; border: 0; border-radius: 16px; background: #111; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.lightbox::backdrop { background: rgba(250, 253, 255, .82); backdrop-filter: blur(6px); }
.lightbox video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #111; }
.lightbox-close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); cursor: pointer; }
.lightbox-close::before, .lightbox-close::after { content: ""; position: absolute; left: 11px; top: 17px; width: 14px; height: 2px; border-radius: 1px; background: var(--ink); transform: rotate(45deg); }
.lightbox-close::after { transform: rotate(-45deg); }
.picks button { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; padding: 0; }

/* ---- manifesto & legal */
main.prose { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: clamp(18px, 5vh, 56px) 20px 10px; position: relative; z-index: 1; }
.prose h1 { margin: 0 0 14px; font-family: var(--serif); font-weight: 600; font-size: clamp(40px, 6vw, 62px); letter-spacing: -.025em; line-height: 1.05; }
.prose .intro-p { font-size: clamp(18px, 2vw, 21px); line-height: 1.55; font-weight: 600; margin: 0 0 8px; }
.prose h2 { margin: 36px 0 8px; font-family: var(--serif); font-weight: 600; font-size: 24px; letter-spacing: -.01em; display: flex; gap: 14px; align-items: baseline; }
.prose h2 .n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-family: var(--sans); font-size: 14px; font-weight: 900; color: #fff; transform: translateY(-3px); }
.prose h2:nth-of-type(6n+1) .n { background: var(--image); } .prose h2:nth-of-type(6n+2) .n { background: var(--video); }
.prose h2:nth-of-type(6n+3) .n { background: var(--threed); } .prose h2:nth-of-type(6n+4) .n { background: var(--audio); }
.prose h2:nth-of-type(6n+5) .n { background: var(--community); } .prose h2:nth-of-type(6n) .n { background: var(--ink); }
.prose p { margin: 0; line-height: 1.65; font-size: 17px; background: rgba(250, 253, 255, .82); }
.prose .intro { position: static; padding: 0; text-align: left; font-size: clamp(18px, 2vw, 21px); line-height: 1.55; font-weight: 600; pointer-events: auto; }
.prose .back { margin-top: 40px; }
.prose a, footer a { color: var(--ink); font-weight: 800; text-decoration: underline; text-decoration-style: wavy; text-decoration-color: var(--crayon); text-underline-offset: 4px; }
.prose a:hover, footer a:hover { text-decoration-color: var(--video); }

footer { position: relative; z-index: 1; padding: 16px 20px 22px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 18px; font-size: 14px; color: var(--ink-soft); font-weight: 600; text-align: center; }
body:not(.home) footer { margin-top: clamp(48px, 9vh, 90px); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--crayon); outline-offset: 3px; }

@media (max-width: 640px) {
  .lightbox { width: 100vw; height: 100dvh; border-radius: 0; display: none; }
  .lightbox[open] { display: flex; align-items: center; }
  .lightbox video { aspect-ratio: auto; height: 100%; object-fit: contain; }
  :root { --top: 70px; }
  header.top { justify-content: flex-start; }
  .nav { gap: 14px; font-size: 14px; }
  .zip canvas { width: 112px; height: 56px; }
}
@media (min-width: 901px) { body.home footer { padding-left: 150px; padding-right: 150px; } } /* clear of the demo bubble in its corner */
@media (max-width: 900px) { /* narrow screens: the bubble leaves its corner and sits above the footer, in the flow */
  .reel { position: static; align-self: center; width: 76px; height: 76px; margin-top: 6px; flex: none; }
  .reel:hover { transform: none; }
}
@media (max-width: 1080px) { .soon-tab small { display: none; } }   /* below this the labels would run into the zipper */
@media (max-width: 560px) { .soon-tab { display: none; } } /* no room next to the zipper on phones */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
