/* a=nus — family Q "THE EQUALS GATE / PROOF RUSH" */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html,body{
  background:#fff4d6;
  color:#2a1038;
  font-family:Lexend,system-ui,sans-serif;
  font-weight:400;
  overflow-x:hidden;
}
img{display:block;max-width:100%}
button{font:inherit;color:inherit;cursor:pointer;border:0;background:none}
code{font-family:Lexend,ui-monospace,monospace}

/* ---- loader (reused spinning dashed rim, reskinned) ---- */
#loader{
  position:fixed;inset:0;z-index:99;
  background:radial-gradient(circle at 50% 40%,#ffe56a 0%,#ff8ad8 45%,#7ef0ff 100%);
  display:grid;place-items:center;
  transition:opacity .5s;
}
#loader img{
  width:132px;height:132px;object-fit:contain;border-radius:22px;
  grid-area:1/1;background:#000;
  box-shadow:0 0 40px #ff2db2, 0 0 8px #fff;
}
#loader .rim{
  grid-area:1/1;width:168px;height:168px;border-radius:50%;
  border:6px dashed #fff;
  animation:sp 1.2s linear infinite;
  filter:drop-shadow(0 0 8px #22e0ff);
}
#loader b{
  position:absolute;top:calc(50% + 104px);
  font-family:Kalam,cursive;font-weight:700;letter-spacing:.08em;
  color:#2a1038;font-size:22px;
  text-shadow:0 0 12px #fff;
}
#loader.done{opacity:0;pointer-events:none}
@keyframes sp{to{transform:rotate(360deg)}}

/* ---- first screen: proof studio ---- */
#studio{
  --px:0;--py:0;--split:0;
  position:relative;z-index:3;
  min-height:100dvh;
  display:flex;flex-direction:column;
  padding:16px 28px 14px;
  overflow:hidden;
  background:
    radial-gradient(ellipse at 80% 0%, #ffe56a 0 18%, transparent 42%),
    radial-gradient(ellipse at 10% 100%, #ff8ad8 0 16%, transparent 46%),
    radial-gradient(ellipse at 90% 80%, #7ef0ff 0 14%, transparent 40%),
    linear-gradient(180deg,#fff8e0 0%,#ffe9f4 48%,#d9fbff 100%);
}
.aurora{
  position:absolute;inset:-20%;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,45,178,.35), transparent 40%),
    radial-gradient(ellipse at 80% 30%, rgba(34,224,255,.32), transparent 42%),
    radial-gradient(ellipse at 50% 90%, rgba(184,255,42,.28), transparent 40%);
  filter:blur(24px);
  animation:aurora 10s ease-in-out infinite alternate;
  pointer-events:none;
  transform:translate(calc(var(--px)*18px), calc(var(--py)*12px));
}
@keyframes aurora{to{transform:translate(calc(var(--px)*18px + 3%), calc(var(--py)*12px - 2%)) rotate(4deg)}}
.sparkles{
  position:absolute;inset:0;pointer-events:none;
  background-image:
    radial-gradient(circle, #fff 0 1.4px, transparent 2px),
    radial-gradient(circle, #ffe56a 0 1.2px, transparent 2px),
    radial-gradient(circle, #ff2db2 0 1.2px, transparent 2px);
  background-size:140px 140px, 200px 180px, 160px 220px;
  background-position:0 0, 40px 60px, 90px 20px;
  opacity:.7;
  animation:twinkle 3.4s linear infinite;
}
@keyframes twinkle{to{background-position:140px 80px, -40px 160px, 180px -40px}}
.floor{
  position:absolute;left:-10%;right:-10%;bottom:-18%;height:42%;
  background:
    linear-gradient(180deg, transparent, rgba(255,255,255,.35) 30%, rgba(255,210,26,.25)),
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(42,16,56,.08) 46px 48px),
    repeating-linear-gradient(0deg, transparent 0 46px, rgba(42,16,56,.08) 46px 48px);
  transform:perspective(500px) rotateX(58deg) translateY(calc(var(--py)*-10px));
  pointer-events:none;
}
.cubes{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.cubes i{
  position:absolute;width:22px;height:22px;
  background:linear-gradient(145deg,#ff8ad8,#ffe56a);
  border:2px solid #fff;
  box-shadow:0 0 14px rgba(255,45,178,.55);
  animation:floaty 6s ease-in-out infinite;
  border-radius:4px;
}
.cubes i:nth-child(1){left:8%;top:18%;animation-delay:0s;background:linear-gradient(145deg,#22e0ff,#b8ff2a)}
.cubes i:nth-child(2){left:18%;top:62%;animation-delay:.8s;width:16px;height:16px}
.cubes i:nth-child(3){right:8%;top:22%;animation-delay:1.4s;background:linear-gradient(145deg,#ffe56a,#ff2db2)}
.cubes i:nth-child(4){right:16%;top:58%;animation-delay:2s;width:14px;height:14px}
.cubes i:nth-child(5){left:46%;top:10%;animation-delay:.4s;width:12px;height:12px;background:#b8ff2a}
.cubes i:nth-child(6){right:38%;top:16%;animation-delay:1.8s;width:18px;height:18px;background:#22e0ff}
@keyframes floaty{50%{transform:translateY(-16px) rotate(18deg)}}

.stage{
  position:relative;z-index:2;
  flex:1;
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);
  gap:18px;
  align-items:center;
  min-height:0;
}
.copy{min-width:0}
.kick{
  font-family:Kalam,cursive;font-size:14px;color:#7a1860;
  letter-spacing:.02em;margin-bottom:8px;
}
h1{
  font-family:Monoton,cursive;font-weight:400;
  font-size:clamp(40px,8.4vw,108px);
  line-height:.95;letter-spacing:.02em;
  color:#ff2db2;
  text-shadow:
    0 0 8px #fff,
    0 0 22px #ff8ad8,
    0 0 40px #22e0ff,
    3px 3px 0 #ffe56a;
  transform:translate(calc(var(--px)*-8px), calc(var(--py)*-6px));
}
.ticker{
  font-family:Kalam,cursive;font-weight:700;
  font-size:clamp(22px,3.2vw,40px);
  color:#2a1038;
  letter-spacing:.08em;
  margin:4px 0 10px;
  text-shadow:0 0 12px #ffe56a;
}
.tag{
  font-family:Kalam,cursive;font-weight:700;
  font-size:clamp(16px,2vw,24px);
  line-height:1.25;
  color:#2a1038;
  max-width:36em;
  margin-bottom:8px;
}
.sym{font-family:Lexend,system-ui,sans-serif;font-weight:700;letter-spacing:.04em}
.blurb{
  font-size:clamp(12px,1.15vw,15px);
  line-height:1.45;
  color:#4a2158;
  max-width:40em;
}

/* monumental equals sculpture */
.eq{
  position:relative;
  justify-self:center;
  width:min(100%,420px);
  aspect-ratio:1.15;
  display:grid;place-items:center;
  filter:drop-shadow(0 18px 30px rgba(255,45,178,.35));
  transform:translate(calc(var(--px)*16px), calc(var(--py)*10px));
}
.eq .bar{
  position:absolute;left:6%;right:6%;height:22%;
  border-radius:22px;
  background:
    linear-gradient(180deg,#fff6a8 0%,#ffd21a 35%,#ff9a00 100%);
  box-shadow:
    0 0 0 3px #fff,
    0 0 28px #ffe56a,
    0 0 60px rgba(255,45,178,.55),
    inset 0 6px 0 rgba(255,255,255,.55);
  animation:glow 2.4s ease-in-out infinite alternate;
}
.eq .bar.top{top:18%;transform:translateX(calc(var(--split)*-18%))}
.eq .bar.bot{bottom:18%;transform:translateX(calc(var(--split)*18%))}
@keyframes glow{to{box-shadow:0 0 0 3px #fff,0 0 40px #ff2db2,0 0 80px rgba(34,224,255,.6),inset 0 6px 0 rgba(255,255,255,.55)}}
.eq img{
  position:relative;z-index:2;
  width:78%;
  background:#000;
  border-radius:18px;
  border:3px dashed #fff;
  box-shadow:0 0 24px #22e0ff, 0 8px 0 rgba(42,16,56,.18);
  transition:transform .25s;
}
.eq:hover img,.eq:focus-visible img{transform:scale(1.04) rotate(-2deg)}
.eq.flash img{animation:pop .55s ease}
@keyframes pop{0%,100%{transform:scale(1)}40%{transform:scale(1.12) rotate(-4deg)}}

/* plotter-pen buttons — dashed lozenge barrels */
.tray{
  position:relative;z-index:3;
  display:flex;flex-wrap:wrap;align-items:center;gap:12px 16px;
  margin-top:8px;
}
.ca-tag{
  display:flex;align-items:center;gap:8px;
  background:#fff;
  border:3px dashed #2a1038;
  border-radius:14px;
  padding:7px 12px;
  box-shadow:4px 4px 0 #ffd21a, 0 0 16px rgba(255,210,26,.4);
}
.ca-tag small{font-family:Kalam,cursive;font-weight:700;font-size:13px;color:#7a1860}
.ca-tag code{font-size:13px;font-weight:700;letter-spacing:.04em;max-width:18ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pens{display:flex;flex-wrap:wrap;gap:8px}
.pen{
  --c:#ff2db2;
  position:relative;
  min-width:86px;
  padding:10px 16px 11px;
  border-radius:999px 999px 18px 18px;
  background:var(--c);
  color:#2a1038;
  font-family:Kalam,cursive;font-weight:700;font-size:16px;letter-spacing:.04em;
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 6px var(--c),
    0 6px 0 rgba(42,16,56,.2),
    0 0 18px color-mix(in srgb, var(--c) 70%, transparent);
  outline:2px dashed #fff;outline-offset:-7px;
  transition:transform .15s, box-shadow .15s, filter .15s;
}
.pen:hover,.pen:focus-visible{transform:translateY(-3px) rotate(-2deg);filter:brightness(1.08)}
.pen:active{transform:translateY(2px)}
.tray .pen:nth-child(1){transform:rotate(-8deg)}
.tray .pen:nth-child(2){transform:rotate(-3deg)}
.tray .pen:nth-child(3){transform:rotate(3deg)}
.tray .pen:nth-child(4){transform:rotate(8deg)}
.tray .pen:nth-child(1):hover,.tray .pen:nth-child(1):focus-visible{transform:translateY(-3px) rotate(-8deg)}
.tray .pen:nth-child(2):hover,.tray .pen:nth-child(2):focus-visible{transform:translateY(-3px) rotate(-3deg)}
.tray .pen:nth-child(3):hover,.tray .pen:nth-child(3):focus-visible{transform:translateY(-3px) rotate(3deg)}
.tray .pen:nth-child(4):hover,.tray .pen:nth-child(4):focus-visible{transform:translateY(-3px) rotate(8deg)}

.hint{
  position:relative;z-index:3;
  margin-top:8px;
  font-family:Kalam,cursive;font-size:14px;color:#7a1860;
  text-align:center;
  animation:nudge 1.8s ease-in-out infinite;
}
@keyframes nudge{50%{transform:translateY(4px);opacity:.7}}

/* ---- proof rush tunnel (fixed, scroll-driven) ---- */
#tunnel{
  position:fixed;inset:0;z-index:4;
  pointer-events:none;
  opacity:0;
  visibility:hidden;
  transition:opacity .28s, visibility .28s;
  overflow:hidden;
  perspective:1400px;
  background:
    radial-gradient(ellipse at 50% 30%, #fff6a8, transparent 50%),
    linear-gradient(180deg,#7ef0ff,#ffe9f4 40%,#ffd21a);
}
#tunnel.on{opacity:1;visibility:visible}
.void{
  position:absolute;inset:0;
  display:grid;place-items:center;
  transform-style:preserve-3d;
  perspective:1400px;
}
.sheet{
  position:absolute;
  width:min(92vw,1320px);
  transform-style:preserve-3d;
  will-change:transform,opacity;
}
.sheet figure{
  margin:0;position:relative;
  border-radius:18px;overflow:hidden;
  box-shadow:
    0 0 0 4px #fff,
    0 0 0 8px #ff2db2,
    0 0 40px rgba(255,45,178,.45),
    0 28px 60px rgba(42,16,56,.3);
}
.sheet img{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;background:#ffe9f4}
.sheet figcaption{
  position:absolute;left:0;right:0;bottom:0;
  padding:14px 18px 16px;
  background:linear-gradient(180deg,transparent,rgba(42,16,56,.82));
  color:#fff;
}
.sheet figcaption b{
  display:block;
  font-family:Kalam,cursive;font-weight:700;
  font-size:clamp(22px,3.4vw,40px);
  line-height:1;
  text-shadow:0 2px 0 #ff2db2, 0 0 16px #22e0ff;
}
.sheet figcaption p{
  font-size:clamp(13px,1.5vw,18px);
  margin-top:4px;
  opacity:.95;
}

#track{height:520vh;pointer-events:none}

/* footer */
footer{
  position:relative;z-index:5;
  padding:28px 20px 36px;
  text-align:center;
  background:linear-gradient(180deg,#ffe56a,#ff8ad8 60%,#c9f);
}
footer .pens{justify-content:center;margin-bottom:16px}
.tok,.disc{
  max-width:760px;margin:8px auto 0;
  font-size:12px;line-height:1.45;color:#2a1038;
}
.disc{opacity:.9}

/* toast */
#toast{
  position:fixed;left:50%;bottom:22px;z-index:120;
  transform:translateX(-50%) translateY(16px);
  background:#2a1038;color:#fff;
  font-family:Kalam,cursive;font-weight:700;font-size:16px;
  padding:10px 18px;border-radius:999px;
  border:2px dashed #ffe56a;
  box-shadow:0 0 20px #ff2db2;
  opacity:0;pointer-events:none;
  transition:opacity .25s, transform .25s;
  max-width:min(92vw,420px);text-align:center;
}
#toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

@media (max-width:820px){
  #studio{padding:10px 12px 10px}
  .stage{grid-template-columns:1fr;gap:6px}
  .eq{width:min(70%,280px);aspect-ratio:1.25;justify-self:center}
  h1{font-size:clamp(32px,14vw,64px)}
  .blurb{display:none}
  .kick{font-size:12px;margin-bottom:4px}
  .tag{font-size:15px;margin-bottom:0}
  .tray{margin-top:2px;gap:8px}
  .tray .pen{transform:none !important;min-width:70px;padding:8px 12px 9px;font-size:15px}
  .hint{margin-top:4px;font-size:12px}
  .sheet{width:100vw}
  .sheet figure{border-radius:0;box-shadow:0 0 0 0 #fff, 0 0 28px rgba(255,45,178,.4)}
  .sheet img{aspect-ratio:auto;width:100%;height:70dvh;object-fit:cover}
}

@media (max-width:820px) and (max-height:760px){
  h1{font-size:clamp(28px,12vw,52px)}
  .eq{width:min(56%,220px)}
  .ticker{font-size:20px;margin:0 0 4px}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none !important;transition:none !important}
}
