/* ui.css - the quiet chrome around a showcase piece. Neutral by default; a piece sets its own look by
   overriding the --sc-* variables (guard-exempt: names the palette to avoid; never a former employer's palette, no purple gradients, no glow). */
:root {
  --sc-ground: #f2efe9; --sc-ink: #1d1c1a; --sc-ink-2: #5d5a54; --sc-accent: #2f5a4a;
  --sc-glass: rgb(250 248 244 / .72); --sc-glass-edge: rgb(29 28 26 / .10);
  --sc-font: "Archivo", "Inter", system-ui, sans-serif;
  --sc-serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sc-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --sc-ease: cubic-bezier(0.22, 1, 0.36, 1);
}
.sc-dark { --sc-ground: #121314; --sc-ink: #ebe7df; --sc-ink-2: #9b978f; --sc-glass: rgb(24 25 27 / .66); --sc-glass-edge: rgb(255 255 255 / .09); }
html, body { margin: 0; background: var(--sc-ground); color: var(--sc-ink); font-family: var(--sc-font); -webkit-font-smoothing: antialiased; }
.sc-full { position: fixed; inset: 0; overflow: hidden; }
.sc-full .sc-canvas { position: absolute; inset: 0; display: block; touch-action: none; }

/* one-line instruction, top left: what this scene is and the one thing to do */
.sc-howto { position: fixed; top: 20px; left: 24px; max-width: 30rem; z-index: 10; pointer-events: none; }
.sc-howto h1 { font: 500 1.125rem/1.2 var(--sc-serif); margin: 0 0 4px; letter-spacing: -0.005em; }
.sc-howto p { font: 400 0.8125rem/1.45 var(--sc-font); margin: 0; color: var(--sc-ink-2); }

/* floating pill controls */
.sc-pill { font: 500 0.8125rem/1 var(--sc-font); color: var(--sc-ink); background: var(--sc-glass); border: 1px solid var(--sc-glass-edge);
  border-radius: 999px; padding: 0 16px; min-height: 36px; backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; transition: transform .15s var(--sc-ease), background .2s; }
button.sc-pill:hover { transform: translateY(-1px); }
button.sc-pill:active { transform: translateY(0) scale(.98); }
.sc-pill:focus-visible, .sc-tl-track:focus-visible { outline: 2px solid var(--sc-accent); outline-offset: 2px; }
.sc-sound { position: fixed; left: 24px; bottom: 20px; z-index: 10; }
.sc-corner { position: fixed; right: 24px; top: 20px; z-index: 10; display: flex; gap: 8px; }
.sc-hud { position: fixed; right: 24px; bottom: 20px; z-index: 10; font: 400 0.75rem/1 var(--sc-mono); color: var(--sc-ink-2); }
.sc-pill[aria-pressed="true"], .sc-pill.is-on { background: var(--sc-ink); color: var(--sc-ground); }

/* timeline */
.sc-timeline { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); width: min(720px, calc(100vw - 48px)); height: 52px; padding: 0 18px 0 8px; z-index: 10; cursor: default; }
.sc-tl-play { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--sc-ink); flex: none; cursor: pointer; position: relative; }
.sc-tl-play span { position: absolute; left: 14px; top: 11px; border-left: 11px solid var(--sc-ground); border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.sc-tl-play.is-playing span { left: 12px; top: 12px; width: 4px; height: 12px; border: 0; background: var(--sc-ground); box-shadow: 7px 0 0 var(--sc-ground); }
.sc-tl-track { position: relative; flex: 1; height: 36px; margin: 0 12px; cursor: pointer; touch-action: none; }
.sc-tl-track::before { content: ""; position: absolute; left: 0; right: 0; top: 17px; height: 2px; background: var(--sc-glass-edge); border-radius: 2px; }
.sc-tl-fill { position: absolute; left: 0; top: 17px; height: 2px; background: var(--sc-accent); border-radius: 2px; }
.sc-tl-head { position: absolute; top: 11px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--sc-ground); border: 2px solid var(--sc-accent); }
.sc-tl-tick { position: absolute; top: 14px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; border: 0; padding: 0; background: var(--sc-ink-2); cursor: pointer; }
.sc-tl-tick.is-past { background: var(--sc-accent); }
.sc-tl-tick span { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); white-space: nowrap; font: 500 0.6875rem/1 var(--sc-font); color: var(--sc-ink-2); opacity: 0; transition: opacity .2s; }
.sc-tl-tick:hover span, .sc-tl-tick:focus-visible span { opacity: 1; }
.sc-tl-label { flex: none; min-width: 7.5rem; text-align: right; font: 500 0.8125rem/1 var(--sc-font); }

/* callout card that follows a 3D anchor (projected each frame by the piece) */
.sc-callout { position: fixed; z-index: 9; pointer-events: none; transform: translate(14px, -50%); background: var(--sc-glass); border: 1px solid var(--sc-glass-edge);
  backdrop-filter: blur(14px); border-radius: 12px; padding: 10px 12px; max-width: 16rem; opacity: 0; transition: opacity .25s var(--sc-ease); }
.sc-callout.is-on { opacity: 1; }
.sc-callout b { display: block; font: 600 0.8125rem/1.3 var(--sc-font); }
.sc-callout span { display: block; font: 400 0.75rem/1.45 var(--sc-font); color: var(--sc-ink-2); margin-top: 2px; }
.sc-callout em { font: 400 0.6875rem/1 var(--sc-mono); font-style: normal; color: var(--sc-accent); }

/* landing-page shell */
.sc-shell-canvas { position: fixed; inset: 0; z-index: 0; }
.sc-shell-canvas .sc-canvas { display: block; }
.sc-shell > section { position: relative; z-index: 1; min-height: 100vh; display: grid; align-items: center; padding: 0 clamp(20px, 6vw, 96px); pointer-events: none; }
.sc-shell > section * { pointer-events: auto; }
.sc-shell-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 18px clamp(20px, 4vw, 48px); }
.sc-reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--sc-ease), transform .9s var(--sc-ease); }
.sc-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .sc-reveal { transition: none; opacity: 1; transform: none; } }
@media (max-width: 640px) { .sc-howto { left: 16px; right: 16px; top: 14px; } .sc-sound { left: 16px; bottom: 14px; } .sc-timeline { bottom: 64px; } }

/* anchored callouts (anchored-callouts.js): a dot on the part, a hairline leader, a small label */
.sc-co-layer { position: fixed; inset: 0; z-index: 8; pointer-events: none; }
.sc-co-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sc-co-svg g { opacity: 0; transition: opacity .3s var(--sc-ease); }
.sc-co-svg g.is-on { opacity: 1; }
.sc-co-svg polyline { fill: none; stroke: var(--sc-ink); stroke-opacity: .42; stroke-width: 1; }
.sc-co-svg .dot { fill: var(--sc-accent); }
.sc-co-svg .ring { fill: none; stroke: var(--sc-accent); stroke-opacity: .35; stroke-width: 1; }
.sc-co { position: absolute; left: 0; top: 0; opacity: 0; transition: opacity .3s var(--sc-ease); padding: 6px 10px 7px; border-radius: 8px;
  background: var(--sc-glass); border: 1px solid var(--sc-glass-edge); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); white-space: nowrap; max-width: 15rem; }
.sc-co.is-on { opacity: 1; }
.sc-co b { display: block; font: 600 0.75rem/1.25 var(--sc-font); letter-spacing: 0.01em; }
.sc-co span { display: block; font: 400 0.6875rem/1.35 var(--sc-mono); color: var(--sc-ink-2); white-space: normal; }
.sc-co.is-left { text-align: right; }
@media (prefers-reduced-motion: reduce) { .sc-co, .sc-co-svg g { transition: none; } }
