/* Pixel Neon Lab : the city outside, our lab inside, the apps, a few games (Mel & Ada, 05/12/2026) */
:root {
  --night: #0B0820;
  --night-2: #151034;
  --cyan: #48E5FF;
  --pink: #FF5FB8;
  --violet: #B58CFF;
  --text: #F2EDFF;
  --dim: #B4A9D8;
  --line: rgba(242, 237, 255, .09);
  --pixel: "Silkscreen", monospace;
  --read: "Atkinson Hyperlegible", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 60px; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--read);
  overflow-x: hidden;
}
img { max-width: 100%; }
a { color: var(--cyan); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; border-radius: 6px; }
.c { color: var(--cyan); text-shadow: 0 0 12px rgba(72, 229, 255, .55); }
.p { color: var(--pink); text-shadow: 0 0 12px rgba(255, 95, 184, .55); }

/* The neon cable that fills up as you scroll */
.cable { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 30; }
.cable span {
  display: block; height: 100%;
  transform-origin: left; transform: scaleX(var(--progress, 0));
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  box-shadow: 0 0 10px var(--pink), 0 0 20px var(--cyan);
}

/* ---------- Top bar ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem clamp(1rem, 4vw, 2.5rem);
  transition: background .4s, box-shadow .4s;
}
.top.solid { background: rgba(11, 8, 32, .78); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; font: 700 1rem var(--pixel); }
.brand img { border-radius: 9px; box-shadow: 0 0 0 1px var(--pink), 0 0 14px rgba(255, 95, 184, .5); }
.links { display: flex; gap: clamp(.8rem, 3vw, 2rem); }
.links a { font: 400 .9rem var(--pixel); color: var(--text); text-decoration: none; opacity: .85; position: relative; padding: .3rem 0; }
.links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--pink); box-shadow: 0 0 8px var(--pink);
  transform: scaleX(0); transition: transform .25s ease-out;
}
.links a:hover { opacity: 1; }
.links a:hover::after { transform: scaleX(1); }

/* ---------- Outside : the city, still and calm ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 92svh; display: grid; place-items: center;
  padding: 6rem 1.5rem 5rem; text-align: center;
}
.city { position: absolute; inset: 0; z-index: -3; }
.city img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 60%;
  animation: wake 2.6s cubic-bezier(.2, .8, .2, 1) both;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 50% 46%, rgba(11, 8, 32, .6), rgba(11, 8, 32, .15) 70%, transparent),
    linear-gradient(180deg, rgba(11, 8, 32, .5) 0%, transparent 22%, transparent 70%, var(--night) 100%);
}
#rain { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.scan {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .22;
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, .55) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}
.hero-inner { display: grid; justify-items: center; gap: 1.4rem; pointer-events: none; }
.hero-inner a { pointer-events: auto; }

/* The lab's window on the roof : the way in */
.portal {
  position: absolute; z-index: 2; left: var(--l, 0); top: var(--t, 0); width: var(--pw, 0); height: var(--ph, 0);
  border-radius: 4px; display: block;
  box-shadow: 0 0 0 1px rgba(255, 95, 184, .0);
  transition: box-shadow .3s, background .3s;
  animation: beacon 2.4s 3.4s ease-in-out infinite;
}
.portal:hover { background: rgba(72, 229, 255, .12); box-shadow: 0 0 0 2px var(--cyan), 0 0 30px var(--cyan), inset 0 0 30px rgba(72, 229, 255, .35); animation: none; }
.portal-tip {
  position: absolute; left: 50%; bottom: calc(100% + 10px); translate: -50% 0; white-space: nowrap;
  font: 700 .8rem var(--pixel); color: var(--night); background: var(--cyan); padding: .35rem .6rem; border-radius: 6px;
  box-shadow: 0 0 16px var(--cyan); opacity: 0; transition: opacity .25s, translate .25s;
}
.portal:hover .portal-tip, .portal:focus-visible .portal-tip { opacity: 1; translate: -50% -4px; }

.sign {
  margin: 0; display: grid; justify-items: center; gap: .05em;
  font: 700 clamp(3rem, 10.5vw, 8.6rem)/.95 var(--pixel); letter-spacing: .02em;
}
.sign .line { white-space: nowrap; }
.sign .line + .line { font-size: 1.18em; }
.word { color: rgba(60, 50, 110, .75); }
.word.on.cyan { color: #E2FBFF; text-shadow: 0 0 3px #fff, 0 0 12px var(--cyan), 0 0 30px var(--cyan), 0 0 64px var(--cyan), 0 0 110px rgba(72, 229, 255, .6); }
.word.on.pink { color: #FFE0F1; text-shadow: 0 0 3px #fff, 0 0 12px var(--pink), 0 0 30px var(--pink), 0 0 64px var(--pink), 0 0 110px rgba(255, 95, 184, .6); }
.word.buzz { animation: buzz 7s 4s infinite; }
.tagline {
  margin: 0; max-width: 36ch; color: #E4DCFF; font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  text-shadow: 0 2px 12px rgba(0, 0, 0, .8);
  opacity: 0; animation: arrive .9s 2.3s ease-out forwards;
}
.cta { display: flex; flex-wrap: wrap; gap: .9rem; justify-content: center; opacity: 0; animation: arrive .9s 2.6s ease-out forwards; }

.button {
  --tone: var(--cyan);
  display: inline-block; border: 0; cursor: pointer;
  font: 700 .95rem var(--pixel); text-decoration: none;
  color: var(--night); background: var(--tone);
  padding: .8rem 1.35rem; border-radius: 8px;
  box-shadow: 0 0 0 1px var(--tone), 0 0 20px color-mix(in srgb, var(--tone) 55%, transparent);
  transition: box-shadow .2s, transform .2s;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--tone), 0 0 36px var(--tone); }
.button.ghost { --tone: var(--pink); background: rgba(11, 8, 32, .5); color: var(--pink); }
.button.soon { background: transparent; color: var(--tone); cursor: default; }
.button.soon:hover { transform: none; }
.button.small-btn { font-size: .78rem; padding: .5rem .8rem; }

/* ---------- Section heads ---------- */
.head { text-align: center; margin: 0 auto clamp(1.4rem, 3vw, 2.2rem); max-width: 60ch; padding: 0 1rem; }
.head h2 { font: 700 clamp(1.8rem, 4vw, 3rem)/1.1 var(--pixel); margin: 0 0 .6rem; }
.head p { margin: 0; color: var(--dim); }

/* ---------- Inside : the lab you can click ---------- */
.lab { padding: clamp(3rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem); }
.scene { position: relative; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.scene::-webkit-scrollbar { display: none; }
.scene-inner {
  /* the whole room fits on one screen once you're inside */
  position: relative; width: min(100%, calc((100svh - 140px) * 4096 / 2336)); aspect-ratio: 4096 / 2336; margin: 0 auto;
  overflow: hidden;
}
.js .scene:not(.on) .scene-inner { opacity: 0; }
.scene.on .scene-inner { animation: tune .9s cubic-bezier(.2, .9, .2, 1) both; }
.room { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transition: filter 1s; }
.scene-inner::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, var(--night), transparent 7%, transparent 93%, var(--night));
}
.scene-inner.shake { animation: shake .45s steps(6) both; }

/* Life in the room : rain on the window, flickering tubes, the coffee steaming */
.window-rain, .flash {
  position: absolute; left: 23.5%; top: 2%; width: 53%; height: 32%; pointer-events: none;
}
.window-rain {
  opacity: .35; mix-blend-mode: screen;
  background-image: repeating-linear-gradient(100deg, transparent 0 22px, rgba(140, 200, 255, .35) 22px 23px, transparent 23px 46px);
  background-size: 120px 120px; animation: rainfall .5s linear infinite;
}
.flash { background: #dff6ff; opacity: 0; mix-blend-mode: screen; }
.flash.go { animation: lightning 1.1s ease-out both; }
.tube { position: absolute; pointer-events: none; mix-blend-mode: screen; border-radius: 4px; }
.tube-pink { left: 19.6%; top: 2%; width: 1%; height: 43%; background: radial-gradient(closest-side, rgba(255, 95, 184, .45), transparent); animation: tube 6s infinite; }
.tube-blue { left: 90.3%; top: 0; width: 1.4%; height: 52%; background: radial-gradient(closest-side, rgba(72, 229, 255, .45), transparent); animation: tube 9s 2s infinite; }
.steam { position: absolute; left: 69.6%; top: 43.5%; width: 2%; height: 6%; pointer-events: none; }
.steam i { position: absolute; bottom: 0; width: 4px; height: 4px; background: rgba(220, 235, 255, .7); animation: steam 2.6s linear infinite; }
.steam i:nth-child(2) { left: 40%; animation-delay: .9s; }
.steam i:nth-child(3) { left: 75%; animation-delay: 1.7s; }
.steam.hot i { animation-duration: .9s; background: rgba(255, 220, 240, .9); }

.spot {
  position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%);
  width: calc(var(--w) * 1%); height: calc(var(--h) * 1%);
  background: transparent; border: 0; padding: 0; cursor: pointer; border-radius: 6px;
  transition: box-shadow .25s, background .25s;
}
/* A small blinking dot tells you something lives here */
.spot::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; translate: -50% -50%;
  border-radius: 2px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan), 0 0 16px var(--cyan);
  animation: ping 2.4s ease-in-out infinite; opacity: .85;
}
.spot.game::after { background: var(--pink); box-shadow: 0 0 8px var(--pink), 0 0 16px var(--pink); }
.spot:hover, .spot:focus-visible { background: rgba(72, 229, 255, .08); box-shadow: 0 0 0 2px var(--cyan), 0 0 24px rgba(72, 229, 255, .6); outline: none; }
.spot.game:hover, .spot.game:focus-visible { background: rgba(255, 95, 184, .08); box-shadow: 0 0 0 2px var(--pink), 0 0 24px rgba(255, 95, 184, .6); }
.spot:hover::after { opacity: 0; }
.tip {
  position: absolute; left: 50%; bottom: calc(100% + 8px); translate: -50% 4px; white-space: nowrap; pointer-events: none;
  font: 700 .74rem var(--pixel); color: var(--night); background: var(--cyan); padding: .3rem .55rem; border-radius: 6px;
  box-shadow: 0 0 14px var(--cyan); opacity: 0; transition: opacity .2s, translate .2s; z-index: 3;
}
.spot.game .tip { background: var(--pink); box-shadow: 0 0 14px var(--pink); }
.spot:hover .tip, .spot:focus-visible .tip { opacity: 1; translate: -50% 0; }

/* ---------- The apps, side by side ---------- */
.apps { padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 2.5rem) clamp(3rem, 6vw, 5rem); }
.cards { max-width: 1380px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.6rem); }
.card {
  --tone: var(--cyan);
  position: relative; display: flex; flex-direction: column; gap: .9rem;
  padding: 1.1rem; border-radius: 16px;
  background: linear-gradient(180deg, rgba(21, 16, 52, .9), rgba(13, 9, 34, .9));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--tone) 40%, transparent), 0 18px 50px rgba(0, 0, 0, .45);
  transition: box-shadow .3s, transform .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--tone), 0 0 34px color-mix(in srgb, var(--tone) 30%, transparent), 0 24px 60px rgba(0, 0, 0, .5); }
.card[data-tone="pink"] { --tone: var(--pink); }
.card[data-tone="violet"] { --tone: var(--violet); }
.card.called { animation: called 1.4s ease-out; }
.card-top { display: flex; align-items: center; gap: .7rem; }
.card-top img { width: 40px; height: 40px; border-radius: 10px; }
.card h3 { margin: 0; font: 700 1.05rem/1.2 var(--pixel); color: var(--tone); text-shadow: 0 0 14px color-mix(in srgb, var(--tone) 55%, transparent); }

.screen-wrap { display: grid; justify-items: center; }
.screen {
  position: relative; width: 100%; height: var(--sh, 250px); padding: 6px; border: 0; cursor: zoom-in;
  border-radius: 10px; background: rgba(0, 0, 0, .4); display: grid; place-items: center;
  box-shadow: 0 0 0 1.5px var(--frame, var(--tone)), 0 0 20px color-mix(in srgb, var(--frame, var(--tone)) 40%, transparent);
  transition: box-shadow .5s;
}
.screen .shot { display: block; max-width: 100%; max-height: calc(var(--sh, 250px) - 12px); width: auto; height: auto; border-radius: 5px; }
.screen .next { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: contain; opacity: 0; pointer-events: none; }
.screen .next.in { animation: channel .55s steps(1, end) forwards, fadein .55s ease-out forwards; }

.panel:not(.lit) .shot { opacity: 0; }
.panel.lit .screen .shot { animation: crt .9s cubic-bezier(.2, .9, .2, 1) both; }
.panel.lit.ready .screen .shot { animation: none; }

.switcher { display: flex; flex-wrap: wrap; gap: .4rem .7rem; justify-content: center; margin-top: .7rem; }
.chips { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; }
.chip {
  font: 400 .66rem var(--pixel); color: var(--dim); cursor: pointer;
  background: rgba(0, 0, 0, .3); border: 1px solid rgba(242, 237, 255, .14); border-radius: 6px; padding: .28rem .42rem;
  transition: color .2s, border-color .2s, box-shadow .2s, background .2s;
}
.chip:hover { color: var(--text); border-color: var(--accent, var(--tone)); }
.chip[aria-pressed="true"] { color: var(--night); background: var(--accent, var(--tone)); border-color: var(--accent, var(--tone)); box-shadow: 0 0 12px color-mix(in srgb, var(--accent, var(--tone)) 60%, transparent); }
.chip .dot { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: .3rem; background: var(--c); vertical-align: middle; }
.about { display: flex; flex-direction: column; flex: 1; }
.about p { margin: 0 0 .6rem; font-size: .98rem; }
.about .button { --tone: inherit; align-self: flex-start; margin-top: auto; }
.small { color: var(--dim); font-size: .88rem; }

/* ---------- Footer ---------- */
.foot { text-align: center; padding: 2.6rem 1.5rem 3rem; border-top: 1px solid var(--line); }
.made { font: 700 1.15rem var(--pixel); margin: 0 0 .8rem; }
.morse { display: inline-flex; align-items: center; gap: .8rem; margin: 0 0 1rem; color: var(--dim); font: 400 .95rem var(--pixel); letter-spacing: .12em; }
.led { width: 11px; height: 11px; border-radius: 50%; background: #2c2552; transition: background .05s, box-shadow .05s; }
.led.on { background: var(--pink); box-shadow: 0 0 6px var(--pink), 0 0 18px var(--pink); }
.foot .small { margin: 0; }

/* ---------- The teleport between outside and inside ---------- */
#tp { position: fixed; inset: 0; z-index: 100; pointer-events: none; visibility: hidden; }
#tp canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; opacity: 0; }
.tp-slices { position: absolute; inset: 0; }
.tp-slices i { position: absolute; left: 0; right: 0; mix-blend-mode: screen; }
.tp-text {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; margin: 0;
  font: 700 clamp(1.2rem, 3vw, 2rem) var(--pixel); letter-spacing: .3em; color: #fff;
  text-shadow: -3px 0 var(--pink), 3px 0 var(--cyan), 0 0 24px var(--cyan); opacity: 0;
}
#tp.go { visibility: visible; pointer-events: auto; }
#tp.go canvas { animation: tp-noise .9s steps(1) both; }
#tp.go .tp-text { animation: tp-text .9s steps(1) both; }
body.tp-out .hero, body.tp-out .lab, body.tp-out .apps { animation: tp-out .45s steps(5) both; }
body.tp-in .scene-inner, body.tp-in .apps .cards { animation: tune .8s cubic-bezier(.2, .9, .2, 1) both; }

/* ---------- Glitch : a click makes things stutter ---------- */
.glitching { animation: glitch .38s steps(1) both !important; }
body.meltdown > *:not(dialog):not(#tp):not(.toast) { animation: glitch .38s steps(1) 3 both; }

/* ---------- The CRT box : games and big pictures ---------- */
.crt {
  border: 0; padding: 0; color: var(--text); background: #07051a;
  width: min(92vw, 760px); max-height: 92vh; border-radius: 18px;
  box-shadow: 0 0 0 2px var(--pink), 0 0 0 6px #1a1440, 0 0 0 7px var(--cyan), 0 0 60px rgba(255, 95, 184, .45), 0 0 120px rgba(72, 229, 255, .25);
  overflow: hidden;
}
.crt.big { width: min(96vw, 1400px); }
.crt[open] { animation: crt-open .5s cubic-bezier(.2, .9, .2, 1) both; }
.crt::backdrop { background: rgba(5, 3, 16, .78); backdrop-filter: blur(4px); }
.crt::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, .35) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, .55));
}
.crt-head { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.crt-title { font: 700 1rem var(--pixel); color: var(--pink); text-shadow: 0 0 12px var(--pink); }
.crt-close { background: none; border: 1px solid rgba(242, 237, 255, .2); border-radius: 6px; color: var(--text); cursor: pointer; padding: .2rem .55rem; position: relative; z-index: 2; }
.crt-close:hover { border-color: var(--pink); color: var(--pink); }
.crt-body { padding: 1rem; display: grid; justify-items: center; gap: .8rem; text-align: center; position: relative; z-index: 1; }
.crt-body .big-shot { max-height: 78vh; width: auto; border-radius: 6px; }
.game-canvas { width: 100%; max-width: 640px; aspect-ratio: 3 / 2; image-rendering: pixelated; border-radius: 6px; background: #0B0820; touch-action: none; }
.score { font: 700 .95rem var(--pixel); display: flex; gap: 1.6rem; justify-content: center; }
.score b { color: var(--cyan); }
.hint { margin: 0; color: var(--dim); font-size: .9rem; }
.pad-btns { display: none; gap: .4rem; grid-template-columns: repeat(3, 52px); }
.pad-btns button { height: 46px; border-radius: 8px; background: rgba(72, 229, 255, .12); border: 1px solid rgba(72, 229, 255, .5); color: var(--cyan); font: 700 1rem var(--pixel); }
.pad-btns .u { grid-column: 2; } .pad-btns .l { grid-column: 1; grid-row: 2; } .pad-btns .d { grid-column: 2; grid-row: 2; } .pad-btns .r { grid-column: 3; grid-row: 2; }
@media (pointer: coarse) { .pad-btns { display: grid; } }
.big-led { width: 70px; height: 70px; border-radius: 50%; background: #241d4a; transition: background .04s, box-shadow .04s; }
.big-led.on { background: var(--pink); box-shadow: 0 0 20px var(--pink), 0 0 60px var(--pink), 0 0 120px rgba(255, 95, 184, .6); }
.choices { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.choices button { font: 700 1.6rem var(--pixel); width: 64px; height: 64px; border-radius: 10px; background: rgba(72, 229, 255, .08); border: 1px solid rgba(72, 229, 255, .5); color: var(--cyan); cursor: pointer; }
.choices button:hover { background: rgba(72, 229, 255, .2); box-shadow: 0 0 16px rgba(72, 229, 255, .5); }
.choices button.good { background: var(--cyan); color: var(--night); }
.choices button.bad { background: var(--pink); color: var(--night); }
.code-line { font: 400 1.2rem var(--pixel); letter-spacing: .2em; min-height: 1.6em; color: var(--pink); margin: 0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.4rem; z-index: 90; translate: -50% 20px; opacity: 0; pointer-events: none;
  font: 700 .85rem/1.4 var(--pixel); color: var(--text); text-align: center; max-width: min(90vw, 520px);
  padding: .7rem 1rem; border-radius: 10px; background: rgba(11, 8, 32, .92);
  box-shadow: 0 0 0 1px var(--cyan), 0 0 24px rgba(72, 229, 255, .45);
  transition: opacity .3s, translate .3s;
}
.toast.show { opacity: 1; translate: -50% 0; }

/* Hearts for the cat and for secrets */
.heart { position: absolute; z-index: 4; pointer-events: none; font-size: 1.4rem; animation: float-up 1.6s ease-out forwards; }

/* ---------- Keyframes ---------- */
@keyframes wake { from { opacity: 0; filter: brightness(.2) saturate(.3) blur(6px); } to { opacity: 1; filter: none; } }
@keyframes arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes beacon { 0%, 100% { box-shadow: 0 0 0 1px rgba(72, 229, 255, .0); } 50% { box-shadow: 0 0 0 2px rgba(72, 229, 255, .75), 0 0 26px rgba(72, 229, 255, .6); } }
@keyframes crt {
  0% { opacity: 1; transform: scaleY(.006); filter: brightness(3) saturate(0); }
  45% { transform: scaleY(1.02); filter: brightness(1.6) saturate(.6); }
  70% { transform: scaleY(.99); }
  100% { opacity: 1; transform: scaleY(1); filter: none; }
}
@keyframes tune {
  0% { opacity: 0; transform: scaleY(.01); filter: brightness(4) saturate(0); }
  35% { opacity: 1; transform: scaleY(1.03); filter: brightness(1.8) hue-rotate(40deg); }
  55% { transform: scaleY(.98) translateX(-1%); filter: brightness(1.2) hue-rotate(-30deg); }
  70% { transform: none; filter: none; }
  80% { transform: translateX(.6%); }
  100% { opacity: 1; transform: none; filter: none; }
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes channel {
  0% { clip-path: inset(0 0 72% 0); transform: translateX(-3%); filter: brightness(2) hue-rotate(40deg); }
  15% { clip-path: inset(30% 0 40% 0); transform: translateX(4%); }
  30% { clip-path: inset(10% 0 20% 0); transform: translateX(-2%); filter: brightness(1.6); }
  45% { clip-path: inset(0 0 0 0); transform: translateX(1%); filter: brightness(1.2) saturate(1.4); }
  60%, 100% { clip-path: inset(0); transform: none; filter: none; }
}
@keyframes glitch { /* only moves and colors : never cuts the element, so clicks always land */
  0% { transform: translate(-4px, 1px); filter: drop-shadow(4px 0 var(--pink)) drop-shadow(-4px 0 var(--cyan)); }
  20% { transform: translate(5px, -2px); filter: drop-shadow(-5px 0 var(--pink)) drop-shadow(5px 0 var(--cyan)) hue-rotate(60deg); }
  40% { transform: translate(-2px, 2px); filter: brightness(1.6) drop-shadow(2px 0 var(--cyan)); }
  60% { transform: translate(3px, 0); filter: drop-shadow(3px 0 var(--pink)) drop-shadow(-3px 0 var(--cyan)); }
  80% { transform: translate(-1px, 0); filter: none; }
  100% { transform: none; filter: none; }
}
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translate(-6px, 2px); } 40% { transform: translate(5px, -3px); } 60% { transform: translate(-4px, 1px); } 80% { transform: translate(3px, 2px); } }
@keyframes lightning { 0% { opacity: 0; } 6% { opacity: .9; } 12% { opacity: .1; } 18% { opacity: .75; } 40% { opacity: .15; } 100% { opacity: 0; } }
@keyframes rainfall { to { background-position: 22px 120px; } }
@keyframes tube { 0%, 88%, 100% { opacity: 1; } 89% { opacity: .2; } 90% { opacity: 1; } 92% { opacity: .4; } 93% { opacity: 1; } }
@keyframes steam { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: .8; } 100% { transform: translateY(-260%) translateX(30%); opacity: 0; } }
@keyframes ping { 0%, 100% { opacity: .25; scale: .8; } 50% { opacity: .95; scale: 1.15; } }
@keyframes called { 0%, 100% { box-shadow: 0 0 0 1px color-mix(in srgb, var(--tone) 40%, transparent); } 30%, 60% { box-shadow: 0 0 0 2px var(--tone), 0 0 50px var(--tone); } }
@keyframes tp-noise { 0% { opacity: 0; } 10% { opacity: .9; } 85% { opacity: .9; } 100% { opacity: 0; } }
@keyframes tp-text { 0%, 15% { opacity: 0; } 20%, 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes tp-out { 0% { filter: none; transform: none; } 40% { filter: brightness(2) hue-rotate(80deg); transform: scaleY(1.04) translateX(-1%); } 100% { filter: brightness(3) saturate(0); transform: scaleY(.02); } }
@keyframes crt-open { 0% { transform: scaleY(.01) scaleX(.6); filter: brightness(4); } 50% { transform: scaleY(1.03); filter: brightness(1.5); } 100% { transform: none; filter: none; } }
@keyframes float-up { from { opacity: 1; transform: translateY(0) scale(.8); } to { opacity: 0; transform: translateY(-80px) scale(1.3); } }
/* One tired tube in the sign, like every real neon sign */
@keyframes buzz { 0%, 92%, 100% { opacity: 1; } 93% { opacity: .35; } 94% { opacity: 1; } 95% { opacity: .5; } 96.5% { opacity: 1; } }

/* ---------- Smaller screens ---------- */
@media (max-width: 1100px) {
  .cards { grid-template-columns: 1fr; max-width: 640px; }
  .screen { --sh: 300px; }
}
@media (max-width: 760px) {
  /* The lab gets taller and you slide through it */
  .scene-inner { width: calc(62svh * 4096 / 2336); max-width: none; height: 62svh; aspect-ratio: auto; }
  .head p::after { content: " Slide sideways to look around."; }
  .tip { opacity: 1; translate: -50% 0; font-size: .6rem; padding: .2rem .35rem; }
}
@media (max-width: 640px) {
  .brand span { display: none; }
  .sign { font-size: clamp(2.6rem, 15vw, 4.2rem); }
  .sign .line + .line { font-size: 1em; }
  .sign .line { display: grid; justify-items: center; }
  .hero { min-height: 86svh; }
  .screen { --sh: 240px; }
}

/* ---------- Calm for people who asked for it ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .tagline, .cta { opacity: 1; }
  .word { color: var(--text); }
  .panel .shot { opacity: 1 !important; }
}

/* The window sits at the top of the room : its label goes under it */
.spot.below .tip { bottom: auto; top: calc(100% + 8px); }

/* One app, big, in the CRT box */
.crt-body .big-shot { max-height: 62vh; max-width: 100%; }
.crt-body .switcher { margin-top: 0; }
.app-text { max-width: 62ch; }
.app-text p { margin: 0 0 .5rem; }
.app-text .button { --tone: var(--cyan); margin-top: .4rem; }
.head .back { margin-top: .9rem; }

/* The apps explained : a pitch, four points, and the full story in the CRT box */
.pitch { font-weight: 700; font-size: 1.02rem; color: var(--text); }
.feats { margin: 0 0 .7rem; padding: 0; list-style: none; display: grid; gap: .3rem; }
.feats li { position: relative; padding-left: 1.1rem; font-size: .95rem; line-height: 1.45; }
.feats li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 7px; height: 7px; border-radius: 2px;
  background: var(--tone, var(--cyan)); box-shadow: 0 0 8px var(--tone, var(--cyan));
}
.card-btns { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: auto; }
.card-btns .more-btn { --tone: inherit; }
.about .card-btns .button { margin-top: 0; }
.app-text { text-align: left; }
.app-text h4 { font: 700 .95rem var(--pixel); color: var(--tone, var(--cyan)); margin: 1rem 0 .4rem; text-shadow: 0 0 10px color-mix(in srgb, var(--tone, var(--cyan)) 50%, transparent); }
.app-text h4:first-child { margin-top: 0; }
.app-text .feats li { font-size: .98rem; }
.app-text code { font: 400 .9em var(--pixel); color: var(--pink); }
.crt.big .crt-body { max-height: calc(92vh - 56px); overflow-y: auto; }

/* Morse Signal : the rules, and the codes on the buttons */
.howto { max-width: 52ch; text-align: left; display: grid; gap: .7rem; }
.howto-title { margin: 0; font: 700 1.1rem var(--pixel); color: var(--cyan); text-align: center; }
.howto ol { margin: 0; padding-left: 1.3rem; display: grid; gap: .45rem; }
.howto b { color: var(--pink); }
.howto .hard { color: var(--dim); font-size: .92rem; display: flex; gap: .5rem; align-items: center; cursor: pointer; }
.howto .start { justify-self: center; }
.choices button { width: auto; min-width: 84px; height: auto; padding: .5rem .7rem; display: grid; gap: .2rem; justify-items: center; }
.choices button .l { font: 700 1.6rem var(--pixel); }
.choices button .m { font: 700 .95rem var(--read); letter-spacing: .05em; color: var(--pink); }
.choices button.good .m, .choices button.bad .m { color: var(--night); }
.choices.hard button .m { visibility: hidden; }
.code-line { font-family: var(--read); font-weight: 700; }

/* Neon Blocks : a tall well, and big buttons on a phone */
.blocks-canvas { height: min(64vh, 500px); width: auto; max-width: 100%; aspect-ratio: 420 / 500; border-radius: 6px; background: #0B0820; }
.touch-row { display: none; gap: .4rem; }
.touch-row button { width: 54px; height: 48px; border-radius: 8px; background: rgba(72, 229, 255, .12); border: 1px solid rgba(72, 229, 255, .5); color: var(--cyan); font: 700 1.1rem var(--pixel); }
@media (pointer: coarse) { .touch-row { display: flex; } }
.hint b { color: var(--pink); }

/* Arkaneon : a tall court, and the capsule colors in the rules */
.ark-canvas { height: min(66vh, 560px); width: auto; max-width: 100%; aspect-ratio: 480 / 560; border-radius: 6px; background: #0B0820; cursor: none; touch-action: none; }
.howto .cap-w { color: #48E5FF; } .howto .cap-m { color: #FF5FB8; } .howto .cap-l { color: #FF4D6D; }
.howto .cap-s { color: #3FA9FF; } .howto .cap-c { color: #B58CFF; } .howto .cap-h { color: #FFB8E6; }

/* Ways out : the menu shows where you are, and the apps have their own exits */
.links a.here { opacity: 1; color: var(--cyan); }
.links a.here::after { transform: scaleX(1); background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.exits { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; margin-top: 1rem; }
@media (max-width: 420px) { .links { gap: .6rem; } .links a { font-size: .78rem; } }
.howto .pad-hint { margin: -.3rem 0 0; text-align: center; color: var(--dim); font-size: .85rem; }
