/* script_path: ~/Projects/while_ai_web/site/assets/css/lab.css
   description: Robot-story lab on top of site.css: glass panes, chapter lines, figure captions, the CAD title block. */
:root { --pane-glass: rgb(12 12 16 / .42); --pane-hair: rgb(236 236 241 / .09); --pane-tilt: 3deg; }
.deck { perspective: 1600px; }
.pane { position: relative; padding: 26px 30px 26px; background: var(--pane-glass); border: 1px solid var(--pane-hair); border-radius: 6px;
  backdrop-filter: blur(10px) saturate(1.05); -webkit-backdrop-filter: blur(10px) saturate(1.05);
  transform: rotateY(var(--pane-tilt)); transform-origin: left center; box-shadow: 0 30px 60px -30px rgb(0 0 0 / .6); }
.chapter { display: flex; gap: 14px; align-items: baseline; font: 400 .74rem/1.4 var(--mono); color: var(--mute); letter-spacing: .03em;
  border-bottom: 1px solid var(--pane-hair); padding-bottom: 10px; margin-bottom: 16px; }
.figure { position: absolute; right: 4%; bottom: 5%; z-index: 1; font: 400 .7rem var(--mono); color: var(--mute); letter-spacing: .02em;
  border-top: 1px solid var(--pane-hair); padding-top: 6px; min-width: 300px; text-align: right; pointer-events: none; }
.say { bottom: 11%; }

/* blueprint: the parts list becomes the drawing's title block */
body[data-look=blueprint] .bom { opacity: .95; font: 400 .68rem/1.25 var(--mono); color: #9cc4e4; border-color: rgb(156 196 228 / .45); background: rgb(10 15 22 / .88);
  right: 2.5%; bottom: 4%; border-radius: 0; zoom: .9; }
body[data-look=blueprint] .bom th, body[data-look=blueprint] .bom td { border-bottom-color: rgb(156 196 228 / .16); color: #9cc4e4; font-style: normal; }
body[data-look=blueprint] .bom td:first-child { color: var(--accent); }
body[data-look=blueprint] .bom-title { font-style: normal; }
body[data-look=blueprint] .figure { display: none; }
.stage :is(.say, .figure) { display: none; }   /* no typed robot thoughts, no figure caption, on any page (lars, round 19) */

/* the painting and the drawing fill their frame: no house-light fade at the edges */
body[data-look=painting] .stage::after, body[data-look=blueprint] .stage::after, body[data-look=brushwork] .stage::after { opacity: 0; }
.stage::after { transition: opacity .8s; }
/* process: the dial is drawn in front of the stage, so the house light's edge fade must not darken it: the fade gets
   a soft hole where the dial sits (lab.js writes --dial-x, --dial-y, --dial-r on the stage) */
body[data-look=assembly] .stage::after { -webkit-mask-image: radial-gradient(circle calc(var(--dial-r, 0px) * 1.25) at var(--dial-x, 0) var(--dial-y, 0), transparent 80%, #000 100%);
  mask-image: radial-gradient(circle calc(var(--dial-r, 0px) * 1.25) at var(--dial-x, 0) var(--dial-y, 0), transparent 80%, #000 100%); }
body[data-look=painting] .pane { background: rgb(8 9 16 / .7); }
/* home: no glass and no edge, only grey behind the text that fades out toward the painting (lars, round 17); on
   desktop the pane is narrower (80%) so it keeps clear of the painting; the gradient does not repeat, or its bright
   start shows again in the border's pixel at the right edge; the text carries its own shadow */
body[data-look=brushwork] .pane { background: linear-gradient(90deg, rgb(236 236 241 / .07) 0%, rgb(236 236 241 / .05) 45%, transparent 100%) no-repeat; border-color: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
@media (min-width: 901px) { body[data-look=brushwork] .pane { width: 80%; } body[data-look=brushwork] .pane h1 { white-space: nowrap; } }   /* the headline keeps its two lines and may reach past the grey */
body[data-look=brushwork] .pane :is(p, .eyebrow, .chapter) { text-shadow: 0 1px 3px rgb(0 0 0 / .9), 0 0 24px rgb(0 0 0 / .7); }
body[data-look=brushwork] .pane h1 { filter: drop-shadow(0 1px 3px rgb(0 0 0 / .9)) drop-shadow(0 0 18px rgb(0 0 0 / .6)); }   /* the gradient words are clipped text: a filter, not a text shadow */
.pane { transition: background .8s, border-color .8s, box-shadow .8s; }
/* services and process: the whole pane a size smaller on desktop, type and tiles together, so the tiles are narrower
   and leave the stage more room (lars, round 18) */
@media (min-width: 901px) { :is(#services, #process, #about, #contact) .pane { zoom: .77; width: 81%; } }
/* a framed look (home) hangs the painting as a canvas to the right, turned a little on its upright toward the text,
   dissolving into the dark house in an upright oval (clear around the robot, its fade just running over the top and
   bottom, reaching the right edge) and dimmed a little against the page (--dim); the fade starts at --oval-in of the oval, a long ramp (round 24); the left of the house stays black
   under the text. --framed runs 0 (fills the stage) to 1 (framed);
   the lab sets it every frame and blends it with the morph, so leaving home and coming back are one movement */
.stage canvas { --framed: 0; --tilt: -11deg; --shrink: .3; --oval-w: 46%; --oval-h: 56%; --oval-at: 63% 52%; --oval-in: 20%; --dim: .65; transform-origin: right center;
  transform: perspective(1800px) rotateY(calc(var(--tilt) * var(--framed))) scale(calc(1 - var(--shrink) * var(--framed)));
  -webkit-mask-image: radial-gradient(ellipse calc(200% + (var(--oval-w) - 200%) * var(--framed)) calc(200% + (var(--oval-h) - 200%) * var(--framed)) at var(--oval-at), #000 var(--oval-in), transparent 100%);
          mask-image: radial-gradient(ellipse calc(200% + (var(--oval-w) - 200%) * var(--framed)) calc(200% + (var(--oval-h) - 200%) * var(--framed)) at var(--oval-at), #000 var(--oval-in), transparent 100%); }
.stage canvas.scene { opacity: calc(1 - var(--dim) * var(--framed)); }   /* the scene only: the parchment keeps the site's own opacity */
/* phones and tablets (the site's 900px and 520px breaks): the stage sits behind the text with the robot in a clear band
   near the top, so the picture is not turned or shrunk; the upright oval centres on that band, sized per break so it
   stays upright (plain percentages: Chromium drops a mask whose gradient size holds min()); the figure caption goes,
   like the robot's speech line */
@media (max-width: 900px) {
  .stage canvas { --tilt: 0deg; --shrink: 0; --oval-w: 30%; --oval-h: 30%; --oval-at: 50% 29%; }
  .figure { display: none; }
  /* phones squeeze the panes as the site squeezes its column: slim padding and a tight chapter line, so a short panel
     (home) still sits under the robot's band, just above the belt (lars, round 31) */
  .pane { padding: 14px 14px 16px; }
  .chapter { padding-bottom: 6px; margin-bottom: 8px; }
  /* every tab: the text floats free over the robot on load, and its ground (tint, blur, edge) darkens as the reader
     scrolls it up over the robot (page.js writes --lift, 0 to 1, from each panel's scroll; lars, 2026-11-03) */
  body .pane, body[data-look] .pane { --l: var(--lift, 0); background: rgb(8 9 16 / calc(.75 * var(--l)));
    border-color: rgb(236 236 241 / calc(.09 * var(--l))); box-shadow: none; transition: background .15s, border-color .15s;
    backdrop-filter: blur(calc(10px * var(--l))); -webkit-backdrop-filter: blur(calc(10px * var(--l))); }
  .pane :is(p, li, .eyebrow, .chapter, h2, h3) { text-shadow: 0 1px 3px rgb(0 0 0 / .9), 0 0 20px rgb(0 0 0 / .6); }
  .pane h1 { filter: drop-shadow(0 1px 3px rgb(0 0 0 / .9)) drop-shadow(0 0 18px rgb(0 0 0 / .6)); }   /* clipped gradient words: a filter */
  /* phones scroll by touch: no scroll bars anywhere (scrollbar-width for Chrome and Firefox, the zero-size bar for Safari) */
  /* home: the two buttons a size smaller, side by side on one line (lars, 2026-11-03) */
  #home .actions { flex-wrap: nowrap; gap: 8px; }
  #home .actions .btn { padding: 10px 15px; font-size: min(.9rem, 4vw); white-space: nowrap; }
  .panel:focus { outline: none; }   /* a #tab link focuses its panel (a scroll box): no frame around the screen */
  * { scrollbar-width: none; } *::-webkit-scrollbar { display: none; width: 0; height: 0; background: transparent; }
}
@media (max-width: 520px) { .stage canvas { --oval-w: 46%; --oval-h: 26%; --oval-at: 50% 26%; } }   /* the robot sits 3% lower (lab.js Lab.DROP) */
/* a dark band under the tab row, so the tabs stay legible over the painting and the drawing */
.stage::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 120px; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .8s;
  background: linear-gradient(#0a0a0d, rgb(10 10 13 / .0)); }
body[data-look=painting] .stage::before, body[data-look=blueprint] .stage::before, body[data-look=brushwork] .stage::before { opacity: 1; }
body[data-look=painting] .say, body[data-look=painting] .figure, body[data-look=brushwork] .say, body[data-look=brushwork] .figure { text-shadow: 0 0 2px #000, 0 1px 10px #000, 0 0 18px rgb(0 0 0 / .8); }

/* the text faces turn with the stage's carousel (lab.js Transit.T.slide: from .25 s for 1.2 s): the old panel out against
   the drive, the new one in from its side, both a little turned like faces of a ring; --d is the side (1 or -1) */
.panel.leaving { opacity: 1; visibility: visible; animation: face-out 1.2s .25s both cubic-bezier(.45, 0, .55, 1); pointer-events: none; }
.panel.entering { animation: face-in 1.2s .25s both cubic-bezier(.45, 0, .55, 1); }
@keyframes face-out { from { transform: none; opacity: 1; } to { transform: translateX(calc(var(--d) * -75%)) rotateY(calc(var(--d) * 32deg)); opacity: 0; } }
@keyframes face-in { from { transform: translateX(calc(var(--d) * 75%)) rotateY(calc(var(--d) * -32deg)); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .panel.leaving, .panel.entering { animation: none; } .panel.leaving { opacity: 0; visibility: hidden; } }

/* the capability belt at half the site's speed (40 s a lap there; lars, round 25) */
.marquee .track { animation-duration: 80s; }
