/* EDI Studio — the folder stack.
 * Every printer is a coloured folder. Its tab carries the name, small black
 * tabs beside it carry anything that needs a look. Hover peeks, click pins. */

@font-face { font-family: "Instrument Serif"; src: url("/type/instrument-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/type/instrument-serif-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/type/geist-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/type/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #1b1b1b;
  --paper: #fbf3e6;
  --ink: #161616;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --T: 58px;   /* tab height */
  --R: 76px;   /* closed folder height */
  --S: 46px;   /* width of a tab's curved shoulder */
  --gut: 22px; /* page side gutter */
  --ease: cubic-bezier(0.2, 0.9, 0.25, 1);
  --spring: cubic-bezier(0.25, 1.35, 0.4, 1);
  /* real springs are written into these by edi.js; these are fallbacks */
  --bounce: cubic-bezier(0.3, 1.45, 0.45, 1);
  --settle: cubic-bezier(0.2, 0.9, 0.25, 1);
  --pop: cubic-bezier(0.3, 1.7, 0.45, 1);
  --soft: cubic-bezier(0.2, 1.2, 0.4, 1);
  --glide: cubic-bezier(0.2, 0.9, 0.25, 1);
  --red: #ff4a3d;
  --amber: #ffb21e;
  --green: #45d483;
  --grey: #8d8a84;
  --sky: #6fb6ff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--paper);
  font: 15px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-anchor: none; /* folders resize a lot; never let the browser scroll for us */
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 4px; }

/* ------------------------------------------------------------ top line */
.topline {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 calc(var(--gut) + 18px);
  font: 11px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8f8a80;
}
.topline .sep { opacity: 0.4; }
.topline #access { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: -8px; border-radius: 50%; }
.topline #access:hover { color: var(--paper); background: #2a2a2a; }
.topline #access.on { width: auto; padding: 0 10px; border-radius: 15px; background: #2a2a2a; color: var(--paper); text-decoration: none; }

/* ------------------------------------------------------------ the stack */
#stack { padding: 0 var(--gut) 0; position: relative; }

.folder {
  position: relative;
  --c: #333;
  --k: var(--paper); /* text colour on this folder */
  color: var(--k);
}
.folder + .folder { margin-top: calc(var(--T) * -1); }

/* tab row */
.tabs {
  position: relative;
  height: var(--T);
  display: flex;
  align-items: flex-end;
  padding-left: calc(var(--S) + 34px);
  gap: calc(var(--S) * 1.15);
  pointer-events: none;
}
.tab {
  pointer-events: auto;
  position: relative;
  height: var(--T);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 26px 0;
  background: var(--tc, var(--c));
  color: var(--tk, var(--k));
  white-space: nowrap;
  z-index: 2;
}
.tab::before,
.tab::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: var(--S);
  height: 100%;
  background: inherit;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 58' preserveAspectRatio='none'%3E%3Cpath d='M0 58C25 58 19 0 46 0V58Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 58' preserveAspectRatio='none'%3E%3Cpath d='M0 58C25 58 19 0 46 0V58Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}
.tab::before { left: calc(var(--S) * -1 + 0.5px); }
.tab::after { right: calc(var(--S) * -1 + 0.5px); transform: scaleX(-1); }

.tab.name { font: 400 clamp(30px, 3.1vw, 40px)/1 var(--serif); letter-spacing: -0.01em; }
.tab.name small { font: 500 10.5px/1 var(--mono); letter-spacing: 0.1em; opacity: 0.6; transform: translateY(-9px); }

/* black tabs beside the name: anything that needs a look */
.tab.flag {
  --tc: #111;
  --tk: var(--paper);
  height: calc(var(--T) * 0.66);
  padding: 2px 16px 0;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 1;
}
.tab.flag { z-index: 0; animation: flagIn 0.75s var(--pop) both; }
.tab.flag.hi { animation: flagIn 0.75s var(--pop) both, wiggle 0.6s 0.7s ease-in-out 2; }
.tab.flag.bye { animation: flagOut 0.4s ease forwards; }
@keyframes flagIn { from { transform: translateY(105%); } }
@keyframes flagOut { to { transform: translateY(105%); } }
@keyframes wiggle { 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }
.line .pct { display: inline-block; }
.pct.bump { animation: bump 0.6s var(--pop); }
@keyframes bump { from { transform: translateY(-5px) scale(1.18); } }
.tab.flag i { width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--red)); box-shadow: 0 0 0 0 var(--dot, var(--red)); }
.tab.flag.red i { animation: beat 1.4s ease-out infinite; }
.tab.flag.red { --dot: var(--red); }
.tab.flag.amber { --dot: var(--amber); }
.tab.flag.green { --dot: var(--green); }
.tab.flag.grey { --dot: var(--grey); }
.tab.flag.sky { --dot: var(--sky); }
@keyframes beat { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--dot) 70%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }

/* the folder body. Closing settles, opening bounces; the folders below ride along. */
.body {
  position: relative;
  height: var(--R);
  transition: height 0.62s var(--settle);
}
.sheet {
  position: absolute;
  inset: 0 0 auto 0;
  min-height: var(--R);
  background: var(--c);
  transition: background-color 0.5s ease;
}
.folder.pr .body { overflow: clip; }
.folder.pr.open .body { height: var(--H, 420px); transition: height 0.78s var(--bounce); }
.folder.pr.handoff .body { transition: height 0.72s var(--glide, var(--settle)) !important; }
.folder.pr { transition: transform 0.7s var(--pop); }
.folder.pr.open { transform: translateY(-5px); }
.folder.pr .tab.name { transition: transform 0.5s var(--pop), padding 0.5s var(--pop); }
.folder.pr:hover .tab.name { padding-left: 32px; padding-right: 32px; }
.tab:active { transform: scale(0.97); }

/* closed-folder label, right side */
.line {
  position: absolute;
  right: 34px;
  top: 0;
  height: var(--R);
  display: flex;
  align-items: center;
  gap: 14px;
  font: 500 11.5px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.line .pct { font: 400 30px/1 var(--serif); letter-spacing: 0; text-transform: none; }
.mini {
  width: 118px;
  height: 12px;
  border-radius: 6px;
  background: #0c0c0c;
  padding: 3px 4px;
  display: block;
}
.mini canvas { width: 100%; height: 100%; display: block; border-radius: 3px; }
.pinx {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid currentColor;
  opacity: 0;
  transform: scale(0.6) rotate(-45deg);
  transition: opacity 0.2s, transform 0.3s var(--spring);
}
.folder.open .pinx { opacity: 0.5; transform: rotate(0deg) scale(0.9); }
.folder.pin .pinx { opacity: 0.9; transform: rotate(45deg); }

/* ------------------------------------------------------------ open printer */
.inside {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(300px, 1.45fr) 190px;
  gap: 26px;
  padding: calc(var(--R) + 6px) 34px calc(var(--T) + 30px) calc(var(--S) + 60px);
}
/* what is inside a folder slides in one piece at a time */
.inside > *, .say > * { opacity: 0; transform: translateY(26px) scale(0.98); transition: opacity 0.2s ease, transform 0.3s ease; }
.folder.open .inside > *, .folder.open .say > * { opacity: 1; transform: none; transition: opacity 0.35s ease, transform 0.8s var(--soft); transition-delay: calc(var(--n, 0) * 60ms + 90ms); }
.inside > :nth-child(2) { --n: 2; } .inside > :nth-child(3) { --n: 3; }
.say > :nth-child(2) { --n: 1; } .say > :nth-child(3) { --n: 2; } .say > :nth-child(4) { --n: 3; }
.lamp canvas { clip-path: inset(0 0 100% 0); transition: clip-path 0.2s ease; }
.folder.open .lamp canvas { clip-path: inset(0 0 -20px 0); transition: clip-path 1.1s cubic-bezier(0.3, 0.7, 0.2, 1) 0.35s; }
.hot .letters, .hot .halo { filter: drop-shadow(0 0 2px var(--glow, #ff3b2f)); }
.say { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.say h3 { margin: 0; font: 400 clamp(54px, 5.6vw, 84px)/0.86 var(--serif); letter-spacing: -0.02em; }
.say h3 em { font-style: italic; }
.say p { margin: 0; font: 400 21px/1.25 var(--serif); max-width: 30ch; opacity: 0.92; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 7px 18px; font: 500 11.5px/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; margin: 4px 0 0; }
.facts dt { opacity: 0.6; }
.facts dd { margin: 0; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.pill {
  height: 34px; padding: 0 14px; border-radius: 17px;
  border: 1.5px solid currentColor;
  font: 500 11px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.pill:hover { background: var(--k); color: var(--c); }
.pill.solid { background: var(--k); color: var(--c); }
.pill.solid:hover { opacity: 0.85; }

.cam {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: #0b0b0b;
  align-self: start;
}
.cam img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.9) contrast(1.05); }
.cam canvas.static { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: screen; opacity: 0.16; }
.cam.none canvas.static { opacity: 0.75; mix-blend-mode: normal; }
.cam .cap {
  position: absolute; left: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 8px;
  height: 26px; padding: 0 11px; border-radius: 13px;
  background: rgba(10, 10, 10, 0.72); color: var(--paper);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font: 500 10.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
}
.cam .cap i { width: 7px; height: 7px; border-radius: 50%; background: var(--grey); }
.cam .cap.live i { background: var(--red); animation: beat 1.4s infinite; --dot: var(--red); }
.cam.none .nosig { position: absolute; inset: 0; display: grid; place-items: center; font: 400 italic 34px/1 var(--serif); color: var(--paper); text-shadow: 0 2px 20px #000; }

.lamp {
  position: relative;
  border-radius: 14px;
  background: #0b0b0b;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 0 34px;
  align-self: stretch;
  min-height: 240px;
  overflow: hidden;
}
.lamp .hot { width: 74px; height: auto; display: block; position: relative; z-index: 1; }
.lamp canvas { flex: 1; width: 100%; min-height: 120px; margin-top: -66px; display: block; } /* starts behind the hotend so the glow fades out under it */
.lamp .n { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; z-index: 2; font: 500 10px/1 var(--mono); letter-spacing: 0.1em; color: #8f8a80; text-transform: uppercase; }

/* ------------------------------------------------------------ hero */
.folder.top .body { overflow: clip; background: var(--c); transition: height 0.8s var(--bounce), background-color 0.5s ease; }
.folder.top .sheet { overflow: hidden; }
.hero .sheet { height: 100%; }
#topsheet > * { transition: opacity 0.17s ease, transform 0.17s ease; }
#topsheet.out > * { opacity: 0; transform: translateY(14px); }
#topsheet.enter > * { animation: enterUp 0.8s var(--soft) both; }
#topsheet.enter > :nth-child(2) { animation-delay: 50ms; } #topsheet.enter > :nth-child(3) { animation-delay: 90ms; }
@keyframes enterUp { from { opacity: 0; transform: translateY(30px); } }
.tab.pop { animation: tabPop 0.7s var(--pop); }
@keyframes tabPop { from { transform: translateY(16px); } }
#toptabs .tab { transition: filter 0.3s ease, transform 0.5s var(--pop); }
#toptabs .tab.off:hover { transform: translateY(-4px); }
.feeds {
  position: absolute; inset: -40px;
  display: grid; grid-template-columns: repeat(7, 1fr);
  filter: blur(18px) saturate(1.2);
  opacity: 0.62;
  mix-blend-mode: luminosity;
  animation: drift 26s ease-in-out infinite alternate;
}
.feeds div { background: #000 center / cover no-repeat; }
@keyframes drift { from { transform: scale(1.08) translateX(-1.5%); } to { transform: scale(1.14) translateX(1.5%); } }
.hero canvas.static { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.22; mix-blend-mode: overlay; transition: opacity 1.4s ease; }
.hero .scan { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,0.16) 0 1px, transparent 1px 3px); pointer-events: none; }
.hero .vig { position: absolute; inset: 0; background: radial-gradient(120% 90% at 30% 40%, transparent 40%, rgba(0,0,0,0.35)); pointer-events: none; }
.hero h1 {
  position: absolute;
  left: calc(var(--S) + 22px);
  bottom: calc(var(--T) + 6px);
  margin: 0;
  font: 400 clamp(84px, 15.5vw, 300px)/0.78 var(--serif);
  letter-spacing: -0.035em;
  color: var(--paper);
  white-space: nowrap;
}
.hero h1 em { font-style: italic; letter-spacing: -0.02em; }
.hero h1 .cl { position: absolute; left: 0; top: 0; opacity: 0; pointer-events: none; }
.hero.glitch h1 { transform: translateX(3px) skewX(-2deg); }
.hero.glitch h1 .cl:nth-child(2) { opacity: 0.9; color: #ff3b6b; clip-path: inset(18% 0 52% 0); transform: translateX(-14px); }
.hero.glitch h1 .cl:nth-child(3) { opacity: 0.9; color: #33e1ff; clip-path: inset(62% 0 8% 0); transform: translateX(16px); }
.hero.glitch canvas.static { opacity: 0.7 !important; }
.hero .meta {
  position: absolute;
  right: 34px;
  top: 26px;
  text-align: right;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.hero .count { font: 400 clamp(22px, 2.2vw, 32px)/1.1 var(--serif); max-width: 22ch; }
.hero .count b { font-weight: 400; font-style: italic; }
.hero .next { font: 400 italic clamp(17px, 1.5vw, 21px)/1.2 var(--serif); opacity: 0.9; }
.hero .next:empty { display: none; }
.hero .next b { font-style: normal; font-weight: 400; }
.hero .note { font: 500 10.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.7; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--red); --dot: var(--red); animation: beat 1.6s infinite; margin-right: 2px; }
.tab .live-dot { width: 10px; height: 10px; }
.tab.off { filter: brightness(0.82); }
.tab.off:hover { filter: none; }
.tab.off .live-dot { display: none; }



/* ------------------------------------------------------------ parts */
.partsv { padding: 34px 34px calc(var(--T) + 34px) calc(var(--S) + 60px); color: var(--ink); }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 22px; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.seg button { height: 34px; padding: 0 16px; border-radius: 17px; font: 500 11px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.partsv h2 { font: 400 clamp(48px, 5vw, 78px)/0.9 var(--serif); margin: 22px 0 18px; letter-spacing: -0.02em; }
.partsv h2 em { font-style: italic; }
.pgrid { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.search { display: flex; align-items: center; gap: 12px; border-bottom: 2px solid var(--ink); padding: 6px 0; }
.search input { flex: 1; border: 0; background: none; font: 400 28px/1.2 var(--serif); color: var(--ink); outline: none; min-width: 0; }
.search input::placeholder { color: color-mix(in srgb, var(--ink) 40%, transparent); }
.cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; }
.cats button { height: 30px; padding: 0 12px; border-radius: 15px; border: 1.5px solid color-mix(in srgb, var(--ink) 25%, transparent); font: 500 10.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.cats button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.plist { max-height: 56vh; overflow: auto; border-top: 1.5px solid var(--ink); }
.prow { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: baseline; padding: 13px 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 15%, transparent); }
.prow .id { font: 500 11px/1 var(--mono); letter-spacing: 0.06em; }
.prow h4 { margin: 0; font: 400 21px/1.15 var(--serif); }
.prow p { margin: 3px 0 0; font: 500 10.5px/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.55; }
.prow .where { text-align: right; font: 500 11px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.prow .where b { display: block; font: 400 22px/1 var(--serif); letter-spacing: 0; text-transform: none; }
.prow .acts { margin-top: 8px; justify-content: flex-end; }
.rack { display: grid; grid-template-columns: repeat(var(--cols, 6), 1fr); gap: 5px; }
.rack .bin { aspect-ratio: 1; border-radius: 6px; display: grid; place-items: center; font: 500 10px/1 var(--mono); background: color-mix(in srgb, var(--ink) 7%, transparent); color: color-mix(in srgb, var(--ink) 50%, transparent); transition: background 0.2s, transform 0.3s var(--spring); }
.rack .bin.full { background: color-mix(in srgb, var(--ink) 16%, transparent); color: var(--ink); }
.rack .bin.hit { background: var(--ink); color: var(--paper); transform: scale(1.08); }
.small { font: 500 10.5px/1.5 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.65; margin: 12px 0 0; }
.botv { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: center; max-width: 900px; margin-top: 18px; }
.botv p { font: 400 23px/1.3 var(--serif); margin: 0 0 18px; }
.face { width: 220px; aspect-ratio: 1; border-radius: 46% 54% 50% 50%; background: var(--ink); position: relative; }
.face::before, .face::after { content: ""; position: absolute; top: 40%; width: 16%; height: 22%; border-radius: 50%; background: var(--paper); animation: blink 5s infinite; }
.face::before { left: 28%; } .face::after { right: 28%; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
.frame { width: 100%; height: 72vh; border: 0; border-radius: 14px; background: #fff; display: block; margin-top: 18px; }

/* ------------------------------------------------------------ controls (operator) */
.ctlv { padding: 34px 34px calc(var(--T) + 34px) calc(var(--S) + 60px); color: var(--ink); }
.ctlv .frame { height: 76vh; }
table { width: 100%; border-collapse: collapse; font: 500 11.5px/1.4 var(--mono); }
th, td { text-align: left; padding: 9px 10px 9px 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 15%, transparent); white-space: nowrap; }
th { font-weight: 500; opacity: 0.55; text-transform: uppercase; letter-spacing: 0.08em; font-size: 10px; }
.twrap { overflow: auto; margin-top: 18px; }
pre.raw { margin: 18px 0 0; max-height: 64vh; overflow: auto; padding: 18px; border-radius: 12px; background: var(--ink); color: #d9f5d0; font: 12px/1.5 var(--mono); }

/* ------------------------------------------------------------ lights (last folder) */
.lights .body { height: auto; min-height: calc(100vh - var(--T) - 44px); }
.lights .sheet { position: relative; clip-path: none; min-height: calc(100vh - var(--T) - 44px); }
.lightsv { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, 1fr); gap: 46px; padding: 40px 34px 60px calc(var(--S) + 60px); }
.wall { position: relative; border-radius: 18px; background: #050505; min-height: 470px; overflow: hidden; }
.wall canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.wall .labels { position: absolute; left: 0; right: 0; bottom: 14px; display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font: 500 10px/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: #8f8a80; }
.wall .labels span { padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.play h2 { margin: 0 0 10px; font: 400 clamp(46px, 4.6vw, 72px)/0.9 var(--serif); letter-spacing: -0.02em; }
.play h2 em { font-style: italic; }
.play > p { font: 400 20px/1.3 var(--serif); margin: 0 0 22px; opacity: 0.85; max-width: 34ch; }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.theme { text-align: left; padding: 8px; border-radius: 12px; border: 1.5px solid transparent; transition: border-color 0.2s, transform 0.3s var(--spring); }
.theme:hover { transform: translateY(-3px) rotate(-1deg); }
.theme:active { transform: scale(0.94); }
.theme i { transition: transform 0.5s var(--pop); }
.theme[aria-pressed="true"] i { transform: scaleY(1.12); }
.theme[aria-pressed="true"] { border-color: currentColor; }
.theme i { display: block; height: 30px; border-radius: 8px; margin-bottom: 7px; }
.theme span { font: 500 10.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.play .seg { margin: 20px 0 0; background: #1d1d1d; }
.play .seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); }
.prev { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; min-height: 34px; }
.prev .tagp { font: 500 10.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; padding: 9px 12px; border-radius: 16px; background: var(--amber); color: var(--ink); }

.wait { margin: 18vh calc(var(--S) + 34px); font: 400 italic 44px/1 var(--serif); color: #8f8a80; }
.wait small { display: block; margin-top: 14px; font: 500 11px/1 var(--mono); font-style: normal; letter-spacing: 0.1em; text-transform: uppercase; }

/* ------------------------------------------------------------ toast */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; padding: 12px 18px; border-radius: 22px; background: var(--paper); color: var(--ink); font: 500 12px/1.3 var(--mono); letter-spacing: 0.04em; box-shadow: 0 20px 40px rgba(0,0,0,0.4); }

/* ------------------------------------------------------------ intro */
/* edi.js moves the folders with spring physics; this only hides them until it starts */
body.intro .folder { transform: translate3d(0, 130vh, 0); }
.folder.flying { will-change: transform; transform-origin: 20% 0; }
body.intro .folder .tab, body.intro .folder .body { transition: none; }
/* while the stack puffs, a folder's colour shows in the gap it opens */
body.intro .folder.pr .body { overflow: visible; }

/* "EDI Studio" rises one letter at a time out of a line just under it */
.hero h1 .word { display: inline-block; clip-path: inset(-40% -8% -3% -8%); }
.hero h1 .ch { display: inline-block; transform: translate3d(0, 108%, 0) rotate(7deg); transform-origin: 0 100%; }
.hero h1.on .ch { transform: none; transition: transform 1s var(--pop) calc(var(--j) * 48ms); }
.hero .meta { opacity: 0; transform: translateY(-14px); }
.hero .meta.on { opacity: 1; transform: none; transition: opacity 0.6s ease, transform 0.9s var(--soft); }

/* full-strength static during the opening, on its own layer so it can fade smoothly */
.hero canvas.loudc { mix-blend-mode: normal; opacity: 0; transition: opacity 1.1s cubic-bezier(0.3, 0.1, 0.2, 1); }
.hero.loud canvas.loudc { opacity: 0.92; transition: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  body.intro .folder { transform: none; }
  .hero h1 .ch, .hero .meta { transform: none; opacity: 1; }
}

/* ------------------------------------------------------------ phone */
@media (max-width: 860px) {
  .inside { grid-template-columns: 1fr 150px; }
  .inside .cam { grid-column: 1 / -1; grid-row: 2; }
  .pgrid { grid-template-columns: 1fr; }
  .lightsv { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --T: 46px; --R: 78px; --S: 30px; --gut: 0px; }
  .topline { padding: 0 16px; }
  .tabs { padding-left: calc(var(--S) + 6px); gap: calc(var(--S) * 0.9); }
  .tab { padding: 2px 14px 0; }
  .tab.name { font-size: 27px; }
  .tab.name small { display: none; }
  .tab.flag { padding: 2px 8px 0; font-size: 9.5px; letter-spacing: 0.06em; gap: 6px; }
  .tab.flag i { width: 7px; height: 7px; }
  .line { right: 16px; gap: 10px; font-size: 10px; height: calc(var(--R) - var(--T)); }
  .line .pct { font-size: 22px; }
  .line .word { display: none; }
  .mini { width: 64px; }
  .pinx { display: none; }
  .inside { grid-template-columns: 1fr 112px; gap: 14px; padding: calc(var(--R) + 4px) 16px calc(var(--T) + 22px) 16px; }
  .say h3 { font-size: 50px; }
  .say p { font-size: 18px; }
  .lamp { min-height: 210px; }
  .lamp .hot { width: 58px; }
  .hero h1 { left: 16px; font-size: 25vw; bottom: calc(var(--T) + 10px); }
  .hero .meta { left: 16px; right: 16px; top: 18px; align-items: flex-start; text-align: left; }
  .partsv, .ctlv { padding: 24px 16px calc(var(--T) + 24px); }
  .prow { grid-template-columns: 1fr auto; }
  .prow .id { display: none; }
  .botv { grid-template-columns: 1fr; }
  .face { width: 120px; }
  .lightsv { padding: 26px 16px 40px; gap: 26px; }
  .wall { min-height: 360px; }
}
