/* Two font files. Headings and labels: Baloo 2 (variable, Latin subset), so every weight asked for is real. Body: Source Sans. */
@font-face { font-family: Baloo; font-weight: 400 800; src: url('/assets/brand/v2026-11/fonts/baloo2-latin.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: Source; font-weight: 400; src: url('/assets/brand/v2026-11/fonts/source-sans.woff2') format('woff2'); font-display: swap; }

:root {
  --bg: #f7f1e6; --paper: #fffdf8; --mat: #efe5d3; --ink: #1c2422; --muted: #55605c; --line: #e2d6c2;
  --red: #c8201a; --teal: #0a5f66; --teal-ink: #fffdf8; --amber: #ffc867;
  --ring-a: #1c2422; --ring-b: #fffdf8;
  --display: Baloo, 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
  --body: Source, system-ui, Arial, sans-serif;
  --sh-low: 0 1px 2px rgba(60, 35, 15, .10), 0 4px 12px rgba(60, 35, 15, .08);
  --sh-high: 0 2px 4px rgba(60, 35, 15, .10), 0 18px 40px rgba(60, 35, 15, .18);
  --d-press: 90ms; --d-quick: 160ms; --d-glow: 400ms; --d-set: 1300ms;
  --e-out: cubic-bezier(.22, 1, .36, 1); --e-pop: cubic-bezier(.3, 1.5, .5, 1); --e-door: cubic-bezier(.3, 0, .1, 1);
  color-scheme: light;
}
@supports (color: color(display-p3 1 0 0)) {
  @media (color-gamut: p3) { :root:not([data-theme="dark"]) { --red: color(display-p3 .76 .17 .12); --teal: color(display-p3 .12 .37 .40); } }
}
:root[data-theme="dark"] {
  --bg: #101817; --paper: #1a2523; --mat: #22302e; --ink: #f2ede2; --muted: #a9b5b0; --line: #2c3d3b;
  --red: #ff7566; --teal: #86d6cf; --teal-ink: #0c1716; --ring-a: #f2ede2; --ring-b: #101817;
  --sh-low: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 12px rgba(0, 0, 0, .25);
  --sh-high: 0 2px 4px rgba(0, 0, 0, .3), 0 18px 40px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; font-synthesis: none; }
body { margin: 0; transition: background-color .9s ease, color .9s ease; background: var(--bg); color: var(--ink); font: 400 18px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: inherit; text-underline-offset: 4px; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ring-a); outline-offset: 3px; box-shadow: 0 0 0 3px var(--ring-b); border-radius: 6px; }
h1, h2, h3, strong, b { font-family: var(--display); font-weight: 600; }
h1, h2, h3 { font-weight: 750; line-height: 1.05; margin: 0 0 .4em; }
p { margin: 0 0 1em; }
.shell { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--paper); padding: 10px 14px; border: 2px solid var(--ink); border-radius: 6px; }
.skip-link:focus { top: 12px; }
.kicker { font: 600 13px/1.2 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--teal); margin: 0 0 6px; }

/* ---------- Header and hero ---------- */
.masthead { display: flex; align-items: center; gap: 24px; padding: 10px 0 0; }
.brand { display: block; border-radius: 6px; }
.brand img { display: block; height: 48px; width: auto; }
.brand .logo-dark, [data-theme="dark"] .brand .logo-light { display: none; }
[data-theme="dark"] .brand .logo-dark { display: block; }
.masthead nav { margin-left: auto; display: flex; gap: 24px; font-size: 16px; }
.masthead nav a { text-decoration: none; padding: 10px 0; }
.masthead nav a:hover { text-decoration: underline; }
.masthead nav { align-items: center; }
.theme-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  font: 600 15px/1 var(--display); transition: transform var(--d-quick) var(--e-out), border-color var(--d-quick); }
.theme-toggle:hover { transform: translateY(-1px); border-color: var(--amber); }
/* A little moon by day (tap for night) and a sun by night (tap for day). */
.theme-toggle i { width: 18px; height: 18px; border-radius: 50%; background: #2a3a6b; box-shadow: inset -5px -3px 0 0 #f4e9c8; transition: background .5s, box-shadow .5s; }
[data-theme="dark"] .theme-toggle i { background: var(--amber); box-shadow: 0 0 0 3px rgba(255, 200, 103, .25); }

.hero { text-align: center; padding: 8px 0 26px; }
.eyebrow { font: 600 13px/1.2 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--teal); margin-bottom: 8px; }
.hero h1 { font-size: clamp(38px, 6vw, 80px); line-height: .98; letter-spacing: -.035em; margin-bottom: 14px; }
.hero h1 span { color: var(--red); }
.lede { max-width: 640px; margin: 0 auto; color: var(--muted); font-size: 19px; line-height: 1.45; }
.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 24px; border-radius: 999px;
  background: var(--teal); color: var(--teal-ink); border: 2px solid var(--teal); text-decoration: none; font: 600 18px/1.2 var(--display); letter-spacing: .01em;
  transition: transform var(--d-quick) var(--e-out), box-shadow var(--d-quick) var(--e-out); }
.button:hover { transform: translateY(-1px); box-shadow: var(--sh-low); }
.button:active { transform: translateY(1px) scale(.98); transition-duration: var(--d-press); box-shadow: none; }
.button.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.button.small { min-height: 44px; padding: 8px 18px; font-size: 17px; }

/* ---------- The scene ---------- */
.workshop { position: relative; }
.stage { max-width: 1920px; margin-inline: auto; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.stage::-webkit-scrollbar { display: none; }
.scene { position: relative; width: 100%; aspect-ratio: 3200 / 1120; overflow: hidden; container-type: inline-size;
  --u: calc(100cqw / 3200); background: #d9cbb6; user-select: none; -webkit-user-select: none; isolation: isolate; }
.scene img { display: block; }
.bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.inside { position: absolute; inset: 0; pointer-events: none; }
.l { position: absolute; left: calc(var(--x) * 100% / 3200); top: calc(var(--y) * 100% / 1120); width: calc(var(--w) * 100% / 3200); margin: 0; padding: 0; }
.l > img { width: 100%; height: auto; }
img.l { height: auto; max-width: none; }
i.l { height: calc(var(--h) * 100% / 1120); pointer-events: none; }

/* Film grain and a soft warm vignette tie the layers into one picture. */
.scene::before { content: ''; position: absolute; inset: 0; z-index: 91; pointer-events: none; background: url('/assets/workshop/v1/scene/grain.png'); background-size: 64px; opacity: .07; mix-blend-mode: overlay; }
.scene::after { content: ''; position: absolute; inset: 0; z-index: 90; pointer-events: none; background: radial-gradient(ellipse 75% 85% at 56% 46%, rgba(40, 22, 8, 0) 58%, rgba(40, 22, 8, .26) 100%); }

/* Layout in scene pixels (3200 x 1120). Floor contact is y = 1040. */
#sh-tv { --x: 30; --y: 1030; --w: 480; --h: 44; z-index: 4; }
#sh-couch { --x: 380; --y: 1026; --w: 600; --h: 52; z-index: 4; }
#sh-plant { --x: 1002; --y: 1032; --w: 146; --h: 34; z-index: 4; }
#tv { --x: 50; --y: 609; --w: 437; z-index: 5; }
#tv-glow { --x: 96; --y: 628; --w: 345; z-index: 6; }
#tv-game { --x: 96; --y: 628; --w: 345; z-index: 6; }
#tv-spill { --x: 180; --y: 600; --w: 900; --h: 470; z-index: 9; }
#couch { --x: 400; --y: 739; --w: 552; z-index: 5; }
#robe { --x: 640; --y: 820; --w: 300; z-index: 7; }
#plant { --x: 990; --y: 663; --w: 170; z-index: 8; } /* pot base on the floor line (y 1048), level with the couch feet */
#inside-back { z-index: 10; }
#sh-shelf { --x: 2330; --y: 1042; --w: 740; --h: 44; }
#pegboard { --x: 1450; --y: 420; --w: 440; }
#shelf { --x: 2350; --y: 444; --w: 700; }
#wall-calendar { --x: 1950; --y: 430; --w: 170; }
#obj-phanda { --x: 2448; --y: 502; --w: 200; --i: 0; }
#obj-noobikids { --x: 2742; --y: 507; --w: 170; --i: 1; }
#obj-noobiaudit { --x: 2478; --y: 657; --w: 120; --i: 2; }
#obj-notaryprep { --x: 2735; --y: 662; --w: 170; --i: 3; }
#obj-lockedin { --x: 2634; --y: 827; --w: 132; --i: 4; }
#noobi { --x: 1132; --y: 393; --w: 680; z-index: 20; background: none; border: 0; pointer-events: none; }
.scene[data-noobi="front"] #noobi { z-index: 43; }
#inside-front { z-index: 30; }
#sh-bench { --x: 1280; --y: 1068; --w: 1020; --h: 46; }
#bench, #screens { --x: 1300; --y: 643; --w: 978; }
#obj-custom { --x: 2130; --y: 872; --w: 120; --i: 7; }
#bell { --x: 1548; --y: 786; --w: 100; }
#door-clip { --x: 1174; --y: 300; --w: 1876; height: calc(731 * 100% / 1120); overflow: hidden; z-index: 40; pointer-events: none; } /* the open doorway must not swallow clicks */
#coil { pointer-events: none; }
#coil { --x: 1132; --y: 250; --w: 1960; z-index: 41; }
#sky { --x: 396; --y: 167; --w: 653; --h: 473; z-index: 45; }
#sky-switch { --x: 396; --y: 167; --w: 653; height: calc(273 * 100% / 1120); z-index: 53; }
#screens { z-index: 45; pointer-events: none; }
#screen-spill { --x: 1440; --y: 520; --w: 700; --h: 400; z-index: 46; }
#sign-spill { --x: 1380; --y: 150; --w: 1460; --h: 420; z-index: 46; }
#sign { --x: 1592; --y: 4; --w: 1040; z-index: 47; }
#open-tag { --x: 2700; --y: 236; --w: 250; z-index: 48; }
#couch-hit { --x: 420; --y: 760; --w: 512; height: calc(280 * 100% / 1120); z-index: 52; }
#fx-exclaim { --x: 730; --y: 300; --w: 100; z-index: 60; }
#fx-spark { --x: 1440; --y: 790; --w: 80; z-index: 60; }
#fx-dust { --x: 0; --y: 950; --w: 380; z-index: 60; }

/* Contact shadows: warm, soft, never pure black. */
.sh { background: radial-gradient(ellipse at center, rgba(60, 35, 15, .42), rgba(60, 35, 15, .18) 45%, rgba(60, 35, 15, 0) 70%); }
#noobi .sh { position: absolute; left: 27%; width: 46%; top: 92.5%; height: 6.5%; }
.scene[data-noobi="behind"] #noobi .sh { opacity: 0; }

/* Light that lands on things. */
.spill { opacity: 0; transition: opacity var(--d-glow) var(--e-out); mix-blend-mode: screen; }
#sign-spill { background: radial-gradient(ellipse at 50% 12%, rgba(255, 200, 103, .5), rgba(255, 200, 103, .16) 42%, rgba(255, 200, 103, 0) 70%); }
#screen-spill { background: radial-gradient(ellipse at 62% 55%, rgba(110, 215, 225, .30), rgba(110, 215, 225, 0) 62%); }
#tv-spill { background: radial-gradient(ellipse at 22% 45%, rgba(120, 175, 255, .34), rgba(120, 175, 255, 0) 66%); }
.scene[data-lights="on"] #sign-spill, .scene[data-lights="on"] #screen-spill { opacity: 1; }
.scene[data-state="break"] #tv-spill, .scene[data-state="intro"] #tv-spill { opacity: 1; animation: flicker 2.4s steps(1) infinite; }

/* Noobi */
#noobi .body { display: block; position: relative; transform-origin: 50% 96%; animation: breathe 3.6s ease-in-out infinite; }
#noobi .body img { display: block; width: 100%; height: auto; pointer-events: none; transform-origin: 50% 96%; }
#noobi #noobi-ghost { position: absolute; inset: 0; opacity: 0; }
@keyframes breathe { 0%, 100% { transform: none; } 50% { transform: scale(.997, 1.012); } }
/* While he walks, scene.js drives a step bob and a lean through two custom properties. */
.scene[data-moving] #noobi .body { animation: none; transform: translateY(var(--bob, 0%)) rotate(var(--lean, 0deg)); }
#noobi .hit { position: absolute; left: 30%; width: 40%; top: 4%; height: 92%; pointer-events: auto; border-radius: 40%; }
#noobi:focus-visible { outline: none; box-shadow: none; }
#noobi:focus-visible .hit { outline: 2px solid #1c2422; outline-offset: 2px; box-shadow: 0 0 0 2px #fffdf8; }
#noobi.bump #noobi-img { animation: bump .26s var(--e-out); }
#noobi.settle #noobi-img { animation: settle .42s var(--e-out); }
@keyframes settle { 0% { transform: scale(1.05, .93); } 45% { transform: scale(.985, 1.025); } 100% { transform: none; } }
@keyframes bump { 0% { transform: scale(1, 1); } 40% { transform: scale(1.03, .96); } 100% { transform: scale(1, 1); } }

/* Door, sign and lights */
#door { position: absolute; left: 0; bottom: 0; width: 100%; height: auto; transition: transform var(--d-set) var(--e-door); }
.scene[data-door="open"] #door { transform: translateY(-101%); }
.scene.rattle #coil { animation: rattle .42s ease-out; }
@keyframes rattle { 0% { transform: none; } 25% { transform: translateY(-.9%) } 50% { transform: translateY(.5%) } 75% { transform: translateY(-.25%) } 100% { transform: none; } }
#sign .sign-off { width: 100%; height: auto; }
#sign .sign-logo { position: absolute; left: 19.2%; width: 61.6%; top: 59.7%; height: auto; transform: translateY(-50%); }
.bulbs i { position: absolute; inset: 0; background: url('/assets/workshop/v1/scene/sign-on.webp') 0 0 / 100% 100%; clip-path: inset(0 var(--r) 0 var(--l)); opacity: 0; }
.bulbs i:nth-child(1) { --l: 0%; --r: 84.25%; --n: 0; }
.bulbs i:nth-child(2) { --l: 15.75%; --r: 72.7%; --n: 1; }
.bulbs i:nth-child(3) { --l: 27.3%; --r: 61.25%; --n: 2; }
.bulbs i:nth-child(4) { --l: 38.75%; --r: 49.9%; --n: 3; }
.bulbs i:nth-child(5) { --l: 50.1%; --r: 38.6%; --n: 4; }
.bulbs i:nth-child(6) { --l: 61.4%; --r: 27.25%; --n: 5; }
.bulbs i:nth-child(7) { --l: 72.75%; --r: 15.8%; --n: 6; }
.bulbs i:nth-child(8) { --l: 84.2%; --r: 0%; --n: 7; }
.scene[data-lights="on"] .bulbs i { opacity: 1; }
.scene.lighting .bulbs i { animation: bulb 90ms calc(var(--n) * 70ms) both; }
.scene.lighting .bulbs i:nth-child(3) { animation: bulb-flicker 620ms 140ms both; }
@keyframes bulb { from { opacity: 0; } to { opacity: 1; } }
@keyframes bulb-flicker { 0% { opacity: 0; } 12% { opacity: 1; } 26% { opacity: .1; } 40% { opacity: 1; } 52% { opacity: .25; } 66%, 100% { opacity: 1; } }
#screens { opacity: 0; transition: opacity var(--d-glow) .25s; }
.scene[data-lights="on"] #screens { opacity: 1; }
#open-tag { background: #fff8e8; color: #0a5f66; border: calc(4 * var(--u)) solid #0a5f66; border-radius: calc(10 * var(--u));
  font: 600 max(11px, calc(30 * var(--u))) / 1.15 var(--display); text-align: center; text-transform: uppercase; letter-spacing: .06em;
  padding: calc(8 * var(--u)) calc(10 * var(--u)); transform: rotate(-3deg); transform-origin: top center; box-shadow: 0 calc(6 * var(--u)) 0 rgba(60, 35, 15, .2); }
.scene[data-state="break"] #open-tag { color: #8a4b00; border-color: #c9761b; }

/* The TV game. Built from the screen art: the same picture scrolls as the world, the hero is cut out and hops.
   It runs while Noobi plays (intro and break) and freezes mid-frame with a pause badge when he leaves. */
.tv-game { aspect-ratio: 300 / 180; overflow: hidden; pointer-events: none; -webkit-mask: url('/assets/workshop/v1/scene/tv-glow.webp') center / 100% 100% no-repeat; mask: url('/assets/workshop/v1/scene/tv-glow.webp') center / 100% 100% no-repeat; }
.tv-world { position: absolute; left: 0; top: 0; width: 400%; height: 100%; background: url('/assets/workshop/v1/scene/tv-world.webp') 0 0 / 50% 100% repeat-x; animation: tv-scroll 18s linear infinite; }
#tv-game .tv-hero { position: absolute; left: 24%; top: 33%; width: 13%; height: auto; animation: tv-hop 1.3s infinite; }
.tv-coin { position: absolute; top: 34%; left: 100%; width: 4%; aspect-ratio: 1; border-radius: 50%; background: #ffd84a; box-shadow: 0 0 0 1px #b8860b; animation: tv-coin 2.6s linear infinite; }
.tv-pause { position: absolute; right: 7%; top: 9%; width: 9%; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 0 0 1.5px #fff; opacity: 0;
  background: linear-gradient(90deg, transparent 30%, #fff 30% 43%, transparent 43% 57%, #fff 57% 70%, transparent 70%) center / 100% 46% no-repeat, rgba(10, 20, 40, .45); }
@keyframes tv-scroll { to { transform: translateX(-50%); } }
@keyframes tv-hop { 0%, 46%, 100% { transform: none; } 8%, 24%, 40% { transform: translateY(-4%); } 16%, 32% { transform: none; }
  60% { transform: translateY(-30%); animation-timing-function: cubic-bezier(.5, 0, .9, .5); } 72% { transform: translateY(-36%); } 88% { transform: none; } }
@keyframes tv-coin { 0% { left: 100%; opacity: 1; } 78% { left: 36%; opacity: 1; transform: none; } 84% { left: 32%; opacity: 0; transform: translateY(-120%) scale(1.6); } 100% { left: 32%; opacity: 0; } }
.scene:not([data-state="intro"]):not([data-state="break"]) #tv-game * { animation-play-state: paused; }
.scene:not([data-state="intro"]):not([data-state="break"]) .tv-pause { opacity: 1; }
.scene:not([data-state="intro"]):not([data-state="break"]) .tv-world, .scene:not([data-state="intro"]):not([data-state="break"]) .tv-hero { filter: brightness(.82) saturate(.85); }
@keyframes flicker { 0%, 100% { filter: none; } 20% { filter: brightness(1.15) hue-rotate(10deg); } 45% { filter: brightness(.9); } 70% { filter: brightness(1.1) hue-rotate(-12deg); } }

/* Clickable objects: lift on hover, dip when pressed, glow while their card is open. */
.obj { display: block; border-radius: 8px; text-decoration: none; pointer-events: auto; -webkit-tap-highlight-color: transparent; }
.obj::after { content: ''; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%); }
.obj img { transition: transform var(--d-quick) var(--e-pop), filter var(--d-quick) var(--e-out); filter: drop-shadow(0 calc(3 * var(--u)) calc(3 * var(--u)) rgba(60, 35, 15, .35)); }
@media (hover: hover) {
  .obj:hover img { transform: translateY(-5%); filter: drop-shadow(0 calc(14 * var(--u)) calc(10 * var(--u)) rgba(60, 35, 15, .4)); }
}
.obj:active img { transform: translateY(1%) scale(.97); transition-duration: var(--d-press); }
.obj[aria-expanded="true"] img { transform: translateY(-5%); filter: drop-shadow(0 0 calc(14 * var(--u)) rgba(255, 200, 103, .95)) drop-shadow(0 calc(10 * var(--u)) calc(8 * var(--u)) rgba(60, 35, 15, .35)); }
.scene .obj:focus-visible, .scene .couch-hit:focus-visible { outline: 2px solid #1c2422; outline-offset: 3px; box-shadow: 0 0 0 3px #fffdf8, 0 0 0 5px #1c2422; }
.scene[data-door="closed"] .obj { visibility: hidden; }
.ding img { animation: ding .5s ease-out; transform-origin: 50% 20%; }
/* The bell sits on the bench beside the laptop, with its own shadow so it does not float. */
.bell { background: none; border: 0; border-radius: 8px; pointer-events: auto; -webkit-tap-highlight-color: transparent; }
.bell::after { content: ''; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%); }
.bell img { position: relative; transition: transform var(--d-quick) var(--e-pop); }
.bell .sh { position: absolute; left: 2%; width: 96%; top: 80%; height: 30%; }
@media (hover: hover) { .bell:hover img { transform: translateY(-4%); } }
.bell:active img { transform: translateY(3%) scale(.97); transition-duration: var(--d-press); }
.scene .bell:focus-visible { outline: 2px solid #1c2422; outline-offset: 3px; box-shadow: 0 0 0 3px #fffdf8, 0 0 0 5px #1c2422; }
.scene[data-door="closed"] .bell { visibility: hidden; }
.scene[data-state="break"] .bell .tag { opacity: 1; }
.scene[data-state="break"] .bell img { animation: nudge 2.6s ease-in-out 1.2s infinite; }
@keyframes nudge { 0%, 86%, 100% { transform: none; } 90% { transform: rotate(-7deg); } 94% { transform: rotate(6deg); } }
@keyframes ding { 0% { transform: rotate(0); } 20% { transform: rotate(-11deg); } 45% { transform: rotate(8deg); } 70% { transform: rotate(-4deg); } 100% { transform: rotate(0); } }
.scene.lighting .obj img { animation: pop .5s calc(var(--i) * 70ms + 200ms) both; }
@keyframes pop { 0% { transform: scale(.85); filter: brightness(.6); } 60% { transform: scale(1.08); filter: brightness(1.2) drop-shadow(0 0 calc(18 * var(--u)) rgba(255, 200, 103, .9)); } 100% { transform: none; } }

/* Tags that invite: the couch, and Noobi while he is on a break. */
.tag { position: absolute; left: 50%; top: -6px; transform: translate(-50%, -100%); white-space: nowrap; background: #1c2422; color: #fffdf8;
  font: 600 14px/1.2 var(--display); letter-spacing: .02em; padding: 6px 11px 7px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity var(--d-quick), transform var(--d-quick) var(--e-out); z-index: 2; }
.tag::after { content: ''; position: absolute; left: 50%; top: 100%; width: 9px; height: 9px; background: inherit; transform: translate(-50%, -55%) rotate(45deg); }
.couch-hit:hover .tag, .couch-hit:focus-visible .tag, .couch-hit.hint .tag { opacity: 1; }
.couch-hit { background: transparent; border: 0; border-radius: 30px; }
.scene:not([data-state="open"]) .couch-hit { display: none; }
#noobi-tag { top: 12%; }
.scene[data-state="break"] #noobi:hover .tag, .scene[data-state="break"] #noobi:focus-visible .tag, .scene[data-state="break"] #noobi.hint .tag { opacity: 1; }

/* Effects */
.fx { opacity: 0; pointer-events: none; }
.fx.show { opacity: 1; }
#fx-exclaim.show { animation: exclaim .8s ease-out both; }
@keyframes exclaim { 0% { transform: translateY(20%) scale(.4); opacity: 0; } 25% { transform: translateY(-6%) scale(1.15); opacity: 1; } 40% { transform: none; } 85% { opacity: 1; } 100% { opacity: 0; } }
.scene.instant *, .scene.instant *::before, .scene.instant *::after { transition: none !important; animation: none !important; }
.scene[data-robe="worn"] #robe { opacity: 0; }

/* Camera stops (only matter when the scene is wider than the screen). */
.stop { position: absolute; top: 0; width: 1px; height: 1px; pointer-events: none; scroll-snap-align: center; }
.stop[data-stop="lounge"] { left: calc(580 * 100% / 3200); }
.stop[data-stop="bench"] { left: calc(1786 * 100% / 3200); }
.stop[data-stop="shelf"] { left: calc(2450 * 100% / 3200); } /* keeps the whole logo and every shelf object in a 390 px frame */

/* Controls that sit on the lower-left corner of the scene. */
.scene-controls { position: absolute; left: 0; right: 0; bottom: 12px; z-index: 70; display: flex; align-items: center; gap: 8px; pointer-events: none; }
.scene-controls > * { pointer-events: auto; }
.chip { min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(28, 36, 34, .25); background: rgba(255, 253, 248, .94); color: #1c2422;
  font: 600 15px/1.2 var(--display); letter-spacing: .01em; box-shadow: var(--sh-low); transition: transform var(--d-quick) var(--e-out), background var(--d-quick); }
.chip:hover { background: #fff; transform: translateY(-1px); }
.chip:active { transform: translateY(1px) scale(.98); transition-duration: var(--d-press); }
.chip.quiet { background: rgba(255, 253, 248, .7); box-shadow: none; }
.chip[hidden], .stops { display: none; }

/* ---------- Day and night ---------- */
/* Night is a cool layer multiplied over the room. Lit things (sign, screens, TV, the sky) sit above it.
   Switching themes fades the layer, so the room goes through a short dusk or dawn. */
.night { position: absolute; inset: 0; z-index: 44; pointer-events: none; background: rgb(24, 34, 74); mix-blend-mode: multiply; opacity: 0; transition: opacity 1.4s ease; }
[data-theme="dark"] .night { opacity: .78; }
/* With the lights on, the workshop is a pool of warm light and the lounge stays dim. */
.scene[data-lights="on"] .night { -webkit-mask-image: radial-gradient(ellipse 36% 78% at 66% 48%, rgba(0, 0, 0, .28) 35%, #000 100%); mask-image: radial-gradient(ellipse 36% 78% at 66% 48%, rgba(0, 0, 0, .28) 35%, #000 100%); }
/* Moon and stars, placed inside the window panes (between the bars) in scene pixels. */
.sky { opacity: 0; transition: opacity 1.2s ease; background:
  radial-gradient(circle calc(34 * var(--u)) at 87.1% 16.5%, #fff3cf 0 88%, rgba(255, 243, 207, 0) 100%),
  radial-gradient(circle calc(120 * var(--u)) at 87.1% 16.5%, rgba(255, 243, 207, .30), rgba(255, 243, 207, 0) 100%),
  radial-gradient(circle calc(5 * var(--u)) at 60.3% 9.5%, #fff 0 45%, transparent 100%),
  radial-gradient(circle calc(4 * var(--u)) at 68.3% 21.8%, #fff 0 45%, transparent 100%),
  radial-gradient(circle calc(5 * var(--u)) at 57.3% 43.3%, #fff 0 45%, transparent 100%),
  radial-gradient(circle calc(4 * var(--u)) at 91% 48.2%, #fff 0 45%, transparent 100%),
  radial-gradient(circle calc(5 * var(--u)) at 39.7% 26%, #fff 0 45%, transparent 100%); }
[data-theme="dark"] .sky { opacity: 1; transition-delay: .5s; animation: twinkle 4.5s ease-in-out 2s infinite; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .78; } }
.sky-switch { background: transparent; border: 0; border-radius: 10px; }
.sky-switch:hover .tag, .sky-switch:focus-visible .tag { opacity: 1; }
.sky-switch .tag { top: 30%; }
.scene[data-state="intro"] .sky-switch, .scene[data-state="opening"] .sky-switch, .scene[data-state="returning"] .sky-switch { display: none; }
[data-theme="dark"] .scene { background: #141a2a; }
[data-theme="dark"] #tv-glow, [data-theme="dark"] #tv-game { z-index: 45; }
[data-theme="dark"] #tv-spill { z-index: 46; }
[data-theme="dark"] #sign-spill { background: radial-gradient(ellipse at 50% 12%, rgba(255, 200, 103, .62), rgba(255, 200, 103, .2) 45%, rgba(255, 200, 103, 0) 72%); }
[data-theme="dark"] .scene::after { background: radial-gradient(ellipse 75% 85% at 60% 46%, rgba(6, 8, 20, 0) 50%, rgba(6, 8, 20, .5) 100%); }
[data-theme="dark"] .scene[data-lights="off"] #sign { filter: brightness(.5) saturate(.8); }
#sign { transition: filter var(--d-glow); }
[data-theme="dark"] .chip { border-color: rgba(255, 255, 255, .2); }

/* ---------- Product card ---------- */
.card { position: absolute; z-index: 80; width: 272px; background: var(--paper); color: var(--ink); border-radius: 14px; box-shadow: var(--sh-high), 0 0 0 1px rgba(60, 35, 15, .14); }
.card[hidden] { display: none !important; }
.card { max-height: calc(100svh - 24px); overflow-y: auto; }
.card.crowded { position: fixed; left: 50%; top: auto !important; bottom: 12px; width: min(460px, calc(100% - 24px)); margin-left: calc(min(460px, 100% - 24px) / -2); display: grid; grid-template-columns: 112px 1fr; }
.card.crowded .card-pointer { display: none; }
.card.crowded .card-shot { aspect-ratio: auto; border-radius: 14px 0 0 14px; }
.card.crowded.no-shot { grid-template-columns: 1fr; }
.card.crowded .card-body { padding: 14px 52px 16px 16px; }
.card.crowded .card-close { width: 40px; height: 40px; }
.card-shot { aspect-ratio: 16 / 9; background: var(--mat); border-radius: 14px 14px 0 0; overflow: hidden; }
.card-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.card.no-shot .card-shot { display: none; }
.card-body { padding: 14px 18px 18px; }
.card h3 { font-size: 24px; letter-spacing: -.01em; margin-bottom: 6px; }
.card h3:focus { outline: none; box-shadow: none; }
.card p { font-size: 16px; line-height: 1.45; margin-bottom: 10px; }
.card .kicker { font-size: 12px; margin-bottom: 4px; }
.card-access { color: var(--muted); font-size: 15px !important; }
.card-access:empty { display: none; }
.card-close { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 253, 248, .92); color: #1c2422; font: 400 24px/1 var(--body); box-shadow: var(--sh-low); }
.card-close::after { content: ''; position: absolute; inset: -6px; }
.card-close:hover { background: #fff; }
.card-pointer { position: absolute; top: var(--py, 50%); width: 14px; height: 14px; background: var(--paper); transform: translateY(-50%) rotate(45deg); box-shadow: 0 0 0 1px rgba(60, 35, 15, .14); z-index: -1; }
.card[data-side="left"] .card-pointer { right: -6px; }
.card[data-side="right"] .card-pointer { left: -6px; }

/* Before scene.js takes over a first visit, keep the couch state hidden so the open workshop never flashes. */
html[data-intro="first"] .scene:not([data-ready]) #noobi,
html[data-intro="first"] .scene:not([data-ready]) #robe,
html[data-intro="first"] .scene:not([data-ready]) #open-tag,
html[data-intro="first"] .scene:not([data-ready]) .obj,
html[data-intro="first"] .scene:not([data-ready]) .bell { visibility: hidden; }
html[data-intro="first"] .scene:not([data-ready]) #door { transform: none; }
html[data-intro="first"] .scene:not([data-ready]) .bulbs i,
html[data-intro="first"] .scene:not([data-ready]) .spill,
html[data-intro="first"] .scene:not([data-ready]) #screens { opacity: 0; }

/* ---------- Product list ---------- */
.products { padding: 72px 0 0; }
.services { padding: 72px 0 0; }
.products h2, .services h2 { font-size: clamp(30px, 3.4vw, 42px); letter-spacing: -.02em; margin-bottom: 8px; }
.section-lede { color: var(--muted); max-width: 560px; margin-bottom: 0; }
.product-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 24px; }
.product-list h3 { font-size: 23px; line-height: 1.15; letter-spacing: -.015em; margin-bottom: 8px; }
.product-list .desc { margin-bottom: 8px; font-size: 17px; line-height: 1.45; }
.product-list .access { font-size: 15px; line-height: 1.45; color: var(--muted); margin-bottom: 10px; }
.product-list .access:empty { display: none; }
.product-list .text a { color: var(--teal); font: 650 17px/1.2 var(--display); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; padding: 10px 0; transition: gap var(--d-quick) var(--e-out); }
.product-list li:hover .text a { gap: 12px; }

/* Tool cards, laid out like the shelf on the live site: two wide, three across, two wide. */
.tools { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tool { grid-column: span 2; position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--sh-low); transition: transform .3s var(--e-out), box-shadow .3s var(--e-out), border-color .3s; }
.tool.big { grid-column: span 3; }
.tool .shot { aspect-ratio: 16 / 10; overflow: hidden; background: var(--mat); border-bottom: 1px solid var(--line); }
.tool.big .shot { aspect-ratio: 16 / 9; }
.tool .thumb { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform .5s var(--e-out); }
.tool .text { display: flex; flex-direction: column; flex: 1; padding: 0 24px 16px; }
.tool .icon { position: relative; align-self: flex-end; width: 60px; height: 60px; margin: -30px 0 -14px; padding: 8px; object-fit: contain; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-low); transition: transform .3s var(--e-pop); }
.tool.big h3 { font-size: 28px; }
.tool.text-only .icon { align-self: center; width: 110px; height: 110px; margin: 24px 0; padding: 16px; }
.tool .text a { margin-top: auto; align-self: flex-start; }
.tool .text a::after { content: ''; position: absolute; inset: 0; } /* the whole card is the link */
@media (hover: hover) {
  .tool:hover { transform: translateY(-6px); box-shadow: var(--sh-high); border-color: var(--amber); }
  .tool:hover .thumb { transform: scale(1.03); }
  .tool:hover .icon { transform: translateY(-5px) rotate(-5deg); }
}
.tool:focus-within { border-color: var(--teal); }
/* Cards rise in as they scroll into view. scene.js only turns this on when it can also turn it off. */
.rv .tool { opacity: 0; }
.rv .tool.in { opacity: 1; animation: rise .6s var(--e-out) calc(var(--d, 0) * 80ms) backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }

.counter { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; padding: 32px; background: var(--mat); border-radius: 14px; }
.counter li { display: flex; align-items: flex-start; gap: 24px; min-width: 0; }
.drawing { flex: none; width: 88px; height: 88px; object-fit: contain; }

.footer { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; align-items: flex-start; border-top: 1px solid var(--line); margin-top: 72px; padding: 24px 0 48px; font-size: 15px; line-height: 1.45; }
.footer strong { font-size: 22px; line-height: 1.2; }
.footer p { color: var(--muted); margin: 4px 0 0; }
.footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
.footer nav a { padding: 10px 0; }
.footer .credit { flex-basis: 100%; font-size: 13px; }

/* ---------- Narrower screens ---------- */
/* Below 1181 px a side card would cover Noobi, so it becomes a bottom sheet. */
@media (max-width: 1180px) {
  .card { position: fixed; left: 50%; right: auto; top: auto !important; bottom: calc(12px + env(safe-area-inset-bottom)); width: min(460px, calc(100% - 24px)); margin-left: calc(min(460px, 100% - 24px) / -2); display: grid; grid-template-columns: 112px 1fr; }
  .card-pointer { display: none; }
  .card-shot { aspect-ratio: auto; border-radius: 14px 0 0 14px; }
  .card.no-shot { grid-template-columns: 1fr; }
  .card-body { padding: 14px 52px 16px 16px; }
  .card-close { width: 40px; height: 40px; }
  .card-close::after { inset: -4px; }
}
/* Below 1024 px the scene keeps its height and scrolls sideways between three stops, so nothing gets tiny. */
@media (max-width: 1023px) {
  .stage { scroll-snap-type: x proximity; }
  .stage.free { scroll-snap-type: none; }
  .scene { --sh: clamp(340px, min(56svh, 114vw), 520px); height: var(--sh); width: calc(var(--sh) * 3200 / 1120); aspect-ratio: auto; }
  .scene-controls { position: static; min-height: 52px; padding-top: 8px; }
  .stops { display: flex; gap: 4px; margin-right: auto; }
  .stops button { min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--muted); font: 600 15px/1 var(--display); letter-spacing: .01em; border-radius: 999px; }
  .stops button::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: currentColor; opacity: .45; }
  .stops button[aria-current="true"] { color: var(--ink); background: var(--mat); }
  .stops button[aria-current="true"]::before { opacity: 1; background: var(--red); }
  .chip { min-height: 44px; }
  .tool, .tool.big { grid-column: span 3; }
  .tool:last-child { grid-column: 2 / span 4; }
}
@media (max-width: 760px) {
  .masthead { flex-wrap: wrap; gap: 0 16px; }
  .brand img { height: 42px; }
  .masthead nav { margin-left: 0; flex-basis: 100%; gap: 14px; font-size: 16px; }
  .masthead { position: relative; }
  .theme-toggle { position: absolute; right: 0; top: 10px; padding: 6px 12px 6px 8px; } /* sits beside the logo, not in the link row */
  .masthead nav a { padding: 12px 0; }
  .hero { text-align: left; padding: 8px 0 16px; }
  .lede { margin-left: 0; font-size: 18px; }
  .actions { justify-content: flex-start; }
  .products, .services { padding-top: 48px; }
  .counter { grid-template-columns: 1fr; padding: 24px 16px; }
  .drawing { width: 64px; height: 64px; }
}
@media (max-width: 640px) {
  .tool, .tool.big, .tool:last-child { grid-column: 1 / -1; }
  .tool.big h3 { font-size: 24px; }
}
/* On phones the sign slides right so the whole logo sits in the shelf view. */
@media (max-width: 600px) {
  #sign { --x: 1930; }
  #sign-spill { --x: 1718; }
  #open-tag { --y: 268; }
}
@media (max-width: 420px) {
  .card-body { padding-right: 16px; }
  .card h3, .card .kicker { padding-right: 40px; }
  .card .button { font-size: 16px; padding: 8px 14px; white-space: nowrap; }
  .stops button { padding: 0 8px; }
  .card { grid-template-columns: 88px 1fr; }
}
@media (max-width: 360px) {
  .shell { width: calc(100% - 24px); }
  .actions .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tv-pause { opacity: 1 !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 404 page (for the live site; the local preview server does not serve it for unknown URLs). */
.lost { padding: 48px 0 72px; }
.lost img { width: min(260px, 60vw); height: auto; }

.lost .lede { margin-bottom: 16px; }

/* Stage 1: enhancement controls appear only after complete initialization. */
html:not([data-workshop-ready]) [data-js-control] { display: none !important; }
html:not([data-workshop-ready]) .scene * { animation: none !important; }
#noobi:disabled { cursor: default; }
.scene-controls { flex-wrap: wrap; }
.shelf-hint { font-size: 14px; color: var(--muted); }
@media (min-width: 1024px) { .shelf-hint { background: var(--paper); color: var(--ink); padding: 6px 10px; border-radius: 8px; } }
.chip { min-height: 44px; }
.scene[data-paused] *, .scene[data-paused] *::before, .scene[data-paused] *::after { animation-play-state: paused !important; }
html[data-motion="off"] { scroll-behavior: auto; }
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html[data-motion="off"].rv .tool { opacity: 1; transform: none; }
@media (max-width: 1023px) {
  .shelf-hint { flex-basis: 100%; order: 2; }
  .scene-controls .stops { flex-basis: 100%; order: -1; }
  .scene-controls { padding-bottom: 8px; }
}
@media (max-width: 760px) { .masthead nav { flex-wrap: wrap; gap: 0 12px; font-size: 15px; } }
@media (max-width: 360px) { .masthead nav { column-gap: 9px; } }

/* Stage 2 additions */
/* A build-note link sits below the card's own stretched link, so it needs its own layer to stay clickable. */
.tool .note-link { position: relative; z-index: 1; margin: 0; padding: 0 24px 16px; font-size: 15px; line-height: 1.35; }
.tool .note-link a { display: inline-block; padding: 8px 0; color: var(--muted); }
.tool .note-link a:hover { color: var(--teal); }
.services .section-lede a { color: var(--teal); }
/* Five nav links, one of them two words: keep them on one row on the narrowest phones. */
@media (max-width: 380px) { .masthead nav { font-size: 14px; column-gap: 8px; } }
