/*
 * The hero reel, "Mess to made". A world of 3200 by 1800 design units holds
 * the mess and the four finished things; a camera moves through it and a
 * WebGL canvas above draws the slime. Everything is positioned from one clock.
 */
.reel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  height: 100svh;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}
.reel .world {
  position: absolute;
  left: 0;
  top: 0;
  width: 3200px;
  height: 1800px;
  transform-origin: 0 0;
}
.reel canvas.slime {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  display: block;
}
/* The reel shows only while it plays. Its pieces are built as soon as the
   script runs, but it starts only once the fonts are in; until then, and
   after it ends, nothing of it may show. */
.hero:not(.is-playing) .reel { visibility: hidden; }

.reel .scrap, .reel .made {
  position: absolute;
  left: 0;
  top: 0;
}

/* ---------------- the mess ---------------- */

.scrap { filter: brightness(0.8) saturate(0.85); }

.note {
  width: 176px;
  height: 176px;
  padding: 22px 18px 16px;
  background: var(--paper, #d8d09a);
  color: #242424;
  font: 600 31px/1.02 'Caveat', 'Comic Sans MS', cursive;
  border-radius: 2px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55), inset 0 -14px 22px rgba(0, 0, 0, 0.07);
}
.note::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -11px;
  width: 74px;
  height: 24px;
  margin-left: -37px;
  background: rgba(236, 234, 222, 0.42);
  transform: rotate(-4deg);
}

.cells {
  background: #e6e6e6;
  border: 1px solid #b9b9b9;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55);
  font: 500 20px/1 'Geist Mono', monospace;
  color: #1d1d1d;
}
.cells table { border-collapse: collapse; }
.cells td { border: 1px solid #c4c4c4; padding: 10px 16px; min-width: 76px; }
.cells tr:first-child td { background: #d5d5d5; font-weight: 600; }
.cells .err { color: #c62828; font-weight: 600; }
.cells.formula { display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: #f1f1f1; }
.cells.formula b { font-style: italic; color: #6b6b6b; font-weight: 600; }

.email {
  width: 540px;
  filter: brightness(0.92);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #f4f4f5;
  border-radius: 12px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55);
  font-family: 'Geist', sans-serif;
  color: #18181b;
}
.email .av {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 650;
  font-size: 17px;
  background: var(--av, #c7d2fe);
  color: #1e1b4b;
}
.email .from { display: block; font-size: 16px; font-weight: 650; }
.email .subj { display: block; font-size: 19px; color: #3f3f46; white-space: nowrap; }
.email .unread { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #2563eb; margin-left: auto; }

.wires svg { display: block; overflow: visible; }
.wires path { fill: none; stroke-linecap: round; stroke-linejoin: round; }

.paper {
  width: 330px;
  height: 250px;
  background: #ebe7da;
  border-radius: 2px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55);
}
.paper svg { display: block; width: 100%; height: 100%; }
.paper .ink { fill: none; stroke: #2e4c93; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.paper .ink-text { font: 700 36px 'Caveat', cursive; fill: #2e4c93; }

/* ---------------- the made things ---------------- */

.made { opacity: 0; font-family: 'Geist', sans-serif; color: #fafafa; transform-origin: 50% 50%; }
.panel {
  width: 1240px;
  height: 700px;
  border-radius: 28px;
  background: #101012;
  border: 1px solid #26262b;
  box-shadow: 0 50px 140px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
.panel-head {
  position: absolute;
  left: 44px;
  right: 44px;
  top: 38px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.panel-title { font-size: 32px; font-weight: 620; letter-spacing: -0.03em; }
.panel-meta { font: 500 17px 'Geist Mono', monospace; color: #71717a; }

/* board */
.board .col {
  position: absolute;
  top: 112px;
  width: 370px;
  height: 548px;
  border-radius: 18px;
  background: #0b0b0d;
  border: 1px solid #1f1f24;
}
.board .col h4 {
  position: absolute;
  left: 20px;
  top: 18px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  color: #d4d4d8;
}
.board .col h4 i { font: normal 500 15px 'Geist Mono', monospace; color: #71717a; }
.board .card {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  width: 338px;
  height: 94px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #18181b;
  border: 1px solid #2a2a30;
}
.board .card .t { font-size: 19px; font-weight: 580; letter-spacing: -0.01em; line-height: 1.2; }
.board .card .m {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font: 500 14px 'Geist Mono', monospace;
  color: #a1a1aa;
}
.board .dot { width: 9px; height: 9px; border-radius: 50%; background: #71717a; }
.board .dot.prog { background: #60a5fa; }
.board .dot.done { background: #4ade80; }
.board .av {
  margin-left: auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #27272a;
  color: #d4d4d8;
  font: 600 11px 'Geist', sans-serif;
}
.board .check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #4ade80;
  color: #052e16;
}
.board .check svg { width: 11px; height: 11px; }
.board .card.lifted { box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55); border-color: #3f3f46; }

/* dashboard */
.dash .kpi {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  width: 370px;
  height: 128px;
  padding: 20px 22px;
  border-radius: 18px;
  background: #0b0b0d;
  border: 1px solid #1f1f24;
}
.dash .kpi p { margin: 0; font-size: 17px; color: #a1a1aa; }
.dash .kpi b {
  display: block;
  margin-top: 12px;
  font-size: 48px;
  font-weight: 620;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.dash .kpi b small { font-size: 20px; font-weight: 500; letter-spacing: 0; color: #a1a1aa; margin-left: 6px; }
.dash .chart { position: absolute; left: 0; top: 0; width: 1152px; height: 392px; transform-origin: 0 0; }
.dash .chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.dash .grid line { stroke: #1f1f24; stroke-width: 1.5; }
.dash .axis text { font: 500 15px 'Geist Mono', monospace; fill: #71717a; }
.dash .line { fill: none; stroke: #c8f22e; stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.dash .area { fill: url(#dash-area); }
.dash .end { fill: #c8f22e; }
.dash .end-ring { fill: none; stroke: #c8f22e; stroke-width: 2; }

/* hardware */
.hw { width: 1240px; height: 700px; }
.hw .traces { position: absolute; inset: 0; overflow: visible; }
.hw .traces path { fill: none; stroke: #9be012; stroke-width: 5; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(200, 242, 46, 0.45)); }
.hw .traces path.fade { stroke: url(#trace-fade); }
.hw .traces circle { fill: #0b0b0d; stroke: #9be012; stroke-width: 4; }
.hw .port {
  position: absolute;
  width: 48px;
  height: 24px;
  border-radius: 7px;
  background: #0b0b0d;
  border: 2px solid #3a3a42;
  z-index: 2;
}
.hw .port i {
  position: absolute;
  inset: -2px;
  border-radius: 7px;
  border: 2px solid #c8f22e;
  box-shadow: 0 0 16px rgba(200, 242, 46, 0.7);
  opacity: 0;
}
.hw .kbd-glow {
  position: absolute;
  left: 60px;
  top: 360px;
  width: 900px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(200, 242, 46, 0.55), rgba(155, 224, 18, 0.18) 55%, transparent);
  filter: blur(40px);
  opacity: 0;
}
.hw .kbd {
  position: absolute;
  left: 80px;
  top: 330px;
  width: 860px;
  height: 330px;
  padding: 22px;
  border-radius: 26px;
  background: linear-gradient(#18181b, #111113);
  border: 1px solid #2a2a30;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6);
}
.hw .key {
  position: absolute;
  height: 50px;
  border-radius: 9px;
  background: linear-gradient(#1f1f23, #17171a);
  border: 1px solid #2c2c32;
  box-shadow: 0 3px 0 #0b0b0d;
  font: 500 12px 'Geist', sans-serif;
  color: #8a8a93;
  padding: 7px 9px;
}
.hw .key i {
  position: absolute;
  inset: -1px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px rgba(200, 242, 46, 0.9), 0 0 18px rgba(200, 242, 46, 0.55), inset 0 -10px 18px rgba(200, 242, 46, 0.25);
  opacity: 0;
}
.hw .lcd {
  position: absolute;
  left: 700px;
  top: 40px;
  width: 480px;
  height: 204px;
  padding: 16px;
  border-radius: 20px;
  background: #151517;
  border: 1px solid #2a2a30;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}
.hw .lcd canvas {
  display: block;
  width: 448px;
  height: 172px;
  border-radius: 8px;
  background: #081102;
  box-shadow: inset 0 0 0 2px #1a2708, inset 0 0 40px rgba(0, 0, 0, 0.8);
}

/* brand */
.brand-made { width: 1240px; height: 700px; }
.brand-made svg { position: absolute; inset: 0; width: 1240px; height: 700px; overflow: visible; }
.brand-made .construct circle, .brand-made .construct line { fill: none; stroke: #3a3a42; stroke-width: 1.5; }
.brand-made .outline { fill: none; stroke: #c8f22e; stroke-width: 0.9; stroke-linejoin: round; stroke-linecap: round; }
.brand-made .fam-name { font: 600 26px 'Geist', sans-serif; fill: #fafafa; letter-spacing: -0.02em; text-anchor: middle; }
.brand-made .sub { font: 500 15px 'Geist Mono', monospace; fill: #71717a; text-anchor: middle; letter-spacing: 0.06em; }

/* until the reel decides to play or rest, keep the headline and the body hidden */
/* ...and the body only until then: while the reel plays, it stays alive under the reel's veil */
.js .hero:not(.at-rest) .hero-copy > *, .js .hero:not(.at-rest):not(.is-playing) .orb-stage { opacity: 0; }
/* storyboard captures: the reel alone, no page chrome */
html[data-capture] .nav, html[data-capture] .reel-controls { display: none; }
