/* Tektur (variable: wdth 75-100, wght 400-900) and Tiny5, latin subsets from Google Fonts (OFL), self-hosted */
@font-face { font-family: "Tektur"; font-style: normal; font-weight: 400 900; font-stretch: 75% 100%; font-display: swap;
  src: url(../assets/fonts/tektur-latin.woff2) format("woff2"); }
@font-face { font-family: "Tiny5"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../assets/fonts/tiny5-latin.woff2) format("woff2"); }
:root {
  /* mirror of js/palette.js; keep the two in sync */
  --ink: #000000; --paper: #ffffff; --lime: #c6f24e; --cyan: #33c7e0; --orange: #f2b84e; --ash: #8c8c8c;
  --ink-rgb: 0, 0, 0; --paper-rgb: 255, 255, 255; --lime-rgb: 198, 242, 78; --cyan-rgb: 51, 199, 224; --orange-rgb: 242, 184, 78;
  --accent: var(--lime); --accent-rgb: var(--lime-rgb);
  --grad: linear-gradient(90deg, var(--cyan), var(--lime), var(--orange));
  --hud-e: clamp(16px, 2.1vw, 40px); --track-b: calc(var(--hud-e) + 10px); --rs: 64px;
  --sans: "Tektur", system-ui, sans-serif; --mono: "Tektur", ui-monospace, monospace; --pixel: "Tiny5", "Tektur", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ink); }
html { scrollbar-width: none; overscroll-behavior: none; -webkit-text-size-adjust: 100%; }
html::-webkit-scrollbar { display: none; }
html.locked { overflow: hidden; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { cursor: none; font-family: var(--sans); color: var(--paper); }

/* ---- frame ---- */
#viewport { position: fixed; inset: 0; overflow: hidden; background: var(--ink); transition: background-color .25s; }
#stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; }
#gun { position: absolute; inset: 0; width: 1920px; height: 1080px; z-index: 10; pointer-events: none; }
#stars { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .4s; }
.scene { position: absolute; inset: 0; visibility: hidden; overflow: hidden; }
.scene.on { visibility: visible; }
.scene.ink { background: var(--ink); color: var(--paper); }
.scene.lime { background: var(--lime); color: var(--ink); }
.scene.cyan { background: var(--cyan); color: var(--ink); }
.scene.orange { background: var(--orange); color: var(--ink); }
.scene.paper { background: var(--paper); color: var(--ink); }
.scene.quad { background: var(--ink); color: var(--ink); }
.scene.ink.starry { background: transparent; }
.scene * { pointer-events: none; }
.scene a, .scene .chip { pointer-events: auto; }
.abs { position: absolute; }
.iris { position: absolute; left: 50%; top: 50%; border-radius: 50%; pointer-events: none; z-index: 30; }

/* ---- type ---- */
.mega { font: 900 250px/.84 var(--sans); font-stretch: 75%; letter-spacing: -.03em; text-transform: uppercase; margin: 0; }
.big { font: 900 150px/.9 var(--sans); font-stretch: 75%; letter-spacing: -.025em; text-transform: uppercase; margin: 0; }
.mid { font: 900 84px/.95 var(--sans); font-stretch: 75%; letter-spacing: -.02em; text-transform: uppercase; margin: 0; }
.mono { font-family: var(--mono); font-weight: 600; letter-spacing: .22em; text-transform: uppercase; }
.eyebrow { font: 700 20px/1 var(--mono); letter-spacing: .34em; text-transform: uppercase; color: var(--accent);
  display: flex; align-items: center; gap: 19px; }
.lime .eyebrow, .cyan .eyebrow, .orange .eyebrow, .paper .eyebrow.ink { color: var(--ink); }
.ol { -webkit-text-fill-color: transparent; -webkit-text-stroke: 3px currentColor; }
.ol-accent { color: transparent; -webkit-text-stroke: 3px var(--accent); }
.mask { overflow: hidden; display: block; padding: .06em 0; margin: -.06em 0; }
.mask > span { display: block; }
.lime .dim, .cyan .dim, .orange .dim { color: rgba(var(--ink-rgb), .58); }
.ink .dim { color: var(--ash); }
.paper .dim { color: rgba(var(--ink-rgb), .6); }

.live { display: inline-block; width: 15px; height: 15px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 17px var(--accent); margin-right: 13px; vertical-align: 2px; }
.dot { position: absolute; z-index: 12; width: 21px; height: 21px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 27px var(--accent), 0 0 58px rgba(var(--accent-rgb), .6); transform: translate(-50%, -50%); }
.period { display: inline-block; width: .16em; height: .16em; border-radius: 50%; background: var(--ink); margin-left: .04em; }
.scanline { position: absolute; left: 33%; right: 33%; height: 4px; background: var(--accent); z-index: 7;
  box-shadow: 0 0 23px var(--accent), 0 0 58px var(--accent); }

/* ---- links ---- */
.links a, a.lnk { font: 700 20px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: inherit;
  text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 10px; white-space: nowrap; }
.lime .links a, .lime a.lnk, .cyan .links a, .cyan a.lnk, .orange .links a, .orange a.lnk { border-color: var(--ink); }

/* ---- hud, grain, cursor, cue ---- */
#hud, #grain, #cursor, #cue, #ammo, #act { position: fixed; pointer-events: none; }
#hud { inset: 0; z-index: 40; color: rgba(var(--paper-rgb), .62); transition: color .2s;
  --e: clamp(16px, 2.1vw, 40px); --l: clamp(16px, 1.5vw, 29px); }
#hud.light, #ammo.light, #act.light { color: rgba(var(--ink-rgb), .72); }
#hud i { position: absolute; width: var(--l); height: var(--l); border: 0 solid currentColor; }
#hud .tl { left: var(--e); top: var(--e); border-width: 2px 0 0 2px; }
#hud .tr { right: var(--e); top: var(--e); border-width: 2px 2px 0 0; }
#hud .bl { left: var(--e); bottom: var(--e); border-width: 0 0 2px 2px; }
#hud .br { right: var(--e); bottom: var(--e); border-width: 0 2px 2px 0; }
#hud.off, #ammo.off, #act.off { opacity: 0; }
#ammo { z-index: 41; left: calc(clamp(16px, 2.1vw, 40px) + 34px); bottom: calc(clamp(16px, 2.1vw, 40px) + 2px);
  display: flex; gap: 6px; color: rgba(var(--paper-rgb), .62); transition: opacity .3s; }
#ammo u { width: 8px; height: 20px; border: 1.5px solid currentColor; border-radius: 3px 3px 1px 1px; background: transparent; transition: all .2s; }
#ammo u.on { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 12px var(--accent); }
#ammo.light u.on { background: var(--ink); border-color: var(--ink); box-shadow: none; }
/* fixed "Powered by [GN Club]" sign-off; its box is centred on the pips / track line (hud-e + 12px) */
#act { z-index: 41; right: calc(clamp(16px, 2.1vw, 40px) + 34px); bottom: calc(clamp(16px, 2.1vw, 40px) - 1px);
  display: flex; align-items: center; gap: 10px; white-space: nowrap; transition: opacity .3s;
  font: 600 11px/1 var(--mono); letter-spacing: .26em; text-transform: uppercase; color: rgba(var(--paper-rgb), .62); }
#act img { display: block; width: auto; height: 26px; }
#grain { left: 0; top: 0; width: 300%; height: 300%; z-index: 50; opacity: .1; background-repeat: repeat;
  animation: grainJitter 1.2s steps(8) infinite; }
@keyframes grainJitter {
  0%, 100% { transform: translate(0, 0) } 10% { transform: translate(-6%, -8%) } 20% { transform: translate(-12%, -18%) }
  30% { transform: translate(-5%, -12%) } 40% { transform: translate(-15%, -20%) } 50% { transform: translate(-4%, -8%) }
  60% { transform: translate(-12%, -20%) } 70% { transform: translate(-6%, -12%) } 80% { transform: translate(-16%, -18%) }
  90% { transform: translate(-8%, -10%) }
}
#cursor { left: 0; top: 0; width: 32px; height: 32px; margin: -16px 0 0 -16px; z-index: 60; border-radius: 50%;
  border: 1.5px solid var(--accent); outline: 1px solid rgba(var(--ink-rgb), .85); animation: cursorPulse 2s cubic-bezier(.4, 0, .6, 1) infinite; }
#cursor::before { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(var(--paper-rgb), .8); }
#cursor::after { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 1px var(--ink), 0 0 0 2px rgba(var(--paper-rgb), .85), 0 0 8px var(--accent); }
@keyframes cursorPulse { 0%, 100% { opacity: .8; box-shadow: 0 0 5px var(--accent) } 50% { opacity: 1; box-shadow: 0 0 15px var(--accent) } }
@media (pointer: coarse) { #cursor { display: none; } body { cursor: auto; } #grain { width: 130%; height: 130%; } }
#cue { left: 50%; bottom: 36px; width: 1px; height: 56px; margin-left: -.5px; z-index: 45; background: rgba(var(--ink-rgb), .35);
  opacity: 0; transition: opacity .5s; overflow: hidden; }
#cue.on, #cueText.on { opacity: 1; }
#cueText { position: fixed; pointer-events: none; left: 50%; bottom: 104px; transform: translateX(-50%); z-index: 45;
  font-size: clamp(10px, .75vw, 13px); color: rgba(var(--ink-rgb), .7); white-space: nowrap; opacity: 0; transition: opacity .5s; }
#cue::after { content: ""; position: absolute; left: -2px; top: -6px; width: 5px; height: 5px; border-radius: 50%;
  background: var(--ink); animation: cue 1.6s cubic-bezier(.6, 0, .4, 1) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 0 } 20% { opacity: 1 } 100% { transform: translateY(62px); opacity: 0 } }

/* ---- kit hover panel + ring ---- */
#skills { position: fixed; left: 0; top: 0; z-index: 55; pointer-events: none; opacity: 0; visibility: hidden; width: 340px;
  background: rgba(var(--ink-rgb), .92); border: 1.5px solid rgba(var(--paper-rgb), .2); border-left: 3px solid var(--accent);
  padding: 18px 20px; display: grid; gap: 10px; }
#skills small { font: 600 12px/1 var(--mono); letter-spacing: .26em; text-transform: uppercase; color: var(--accent); }
#skills strong { font: 900 40px/1 var(--sans); letter-spacing: -.03em; text-transform: uppercase; color: var(--paper); }
#skills ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, max-content); gap: 8px 22px; }
#skills li { font: 600 13px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--paper);
  display: flex; gap: 8px; align-items: center; }
#skills li::before { content: ""; width: 5px; height: 13px; border: 1px solid rgba(var(--paper-rgb), .55); border-radius: 2px 2px 1px 1px; }
#skills li.p::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 6px var(--accent); }
#ring { position: absolute; left: 0; top: 0; width: 120px; height: 120px; margin: -60px 0 0 -60px; z-index: 14;
  border-radius: 50%; pointer-events: none; opacity: 0; border: 3px solid var(--accent);
  box-shadow: 0 0 27px rgba(var(--accent-rgb), .5), inset 0 0 27px rgba(var(--accent-rgb), .3); }
#ring::after { content: ""; position: absolute; inset: 44%; border-radius: 50%; background: var(--accent); }
#stage .chip { transition: background-color .2s, border-color .2s, color .2s; cursor: none; }
#stage .chip.on { background: var(--accent); border-color: var(--accent); color: var(--ink); box-shadow: 0 0 18px rgba(var(--accent-rgb), .55); }
#stage a:focus-visible, #stage .chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; box-shadow: 0 0 0 8px rgba(var(--ink-rgb), .85); }

/* ---- scene pieces ---- */
.card { position: absolute; border: 2px solid currentColor; padding: 28px; }
.rowlink { display: grid; align-items: center; color: inherit; text-decoration: none; }
.tag3 { position: absolute; z-index: 20; font: 700 18px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink); white-space: nowrap; }
.tag3 b { display: inline-block; background: var(--ink); color: var(--paper); padding: 8px 10px; margin-right: 12px; }
.tag3::after { content: ""; position: absolute; left: 0; top: 100%; width: 2px; height: 64px; background: var(--ink); }
.phone { position: absolute; width: 440px; height: 880px; border-radius: 64px; border: 8px solid var(--ink);
  background: var(--paper); overflow: hidden; box-shadow: 0 40px 100px rgba(var(--ink-rgb), .35); }
.ink .phone { border-color: var(--paper); background: var(--ink); }
.cert { position: absolute; width: 380px; height: 270px; border: 2px solid var(--paper); padding: 24px; display: grid;
  align-content: space-between; color: var(--paper); text-decoration: none; background: rgba(var(--ink-rgb), .85); }
.cert::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--accent); }
#about-text { position: fixed; top: 0; left: 0; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; pointer-events: none; }
.nojs { position: relative; z-index: 70; margin: 0; padding: 72px; color: var(--paper); font: 16px/1.5 system-ui, sans-serif; }

/* ---- TechRun brand pieces ---- */
.pixel { font-family: var(--pixel); font-weight: 400; letter-spacing: .02em; text-transform: uppercase; -webkit-font-smoothing: none; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.grad-bg { background: var(--grad); }
/* brand ticker band: gradient strip with repeated small wordmark (see brand guidelines) */
.band { position: absolute; left: 0; right: 0; height: 34px; background: var(--grad); color: var(--ink); overflow: hidden;
  display: flex; align-items: center; gap: 120px; padding-left: 40px; white-space: nowrap;
  font: 700 15px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.sprite { position: absolute; image-rendering: pixelated; image-rendering: crisp-edges; }
.photo { position: absolute; object-fit: cover; display: block; }
/* retro Y2K window chrome (brand "elements") */
.win { position: absolute; background: #c3c3c3; border: 2px solid; border-color: #fff #404040 #404040 #fff; padding: 4px;
  box-shadow: 1px 1px 0 #000; color: #000; }
.win > .bar { height: 30px; margin-bottom: 4px; display: flex; align-items: center; justify-content: space-between; padding: 0 6px 0 10px;
  background: linear-gradient(90deg, #0a246a, #3a6ea5); color: #fff; font: 700 15px/1 var(--mono); letter-spacing: .06em; }
.win > .bar::after { content: "✕"; width: 22px; height: 20px; display: grid; place-items: center; background: #c3c3c3; color: #000;
  border: 2px solid; border-color: #fff #404040 #404040 #fff; font-size: 12px; }
.win > .body { position: relative; overflow: hidden; background: #000; }
/* pixel runner that rides the film-progress track (built by main.js). 64px = 1:1 with the sprite's pixel grid. */
#track { position: fixed; z-index: 41; pointer-events: none; opacity: 0; transition: opacity .4s;
  left: calc(var(--hud-e) + 34px + 36px + 44px); right: calc(var(--hud-e) + 34px + var(--act-w, 170px) + 44px);
  bottom: var(--track-b); height: 2px; background: rgba(var(--paper-rgb), .16); }
#track::before, #track::after { content: ""; position: absolute; top: -3px; width: 2px; height: 8px; background: currentColor; }
#track { color: rgba(var(--paper-rgb), .45); }
#track::before { left: 0; } #track::after { right: 0; }
#track i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; transform: scaleX(0); transform-origin: 0 50%;
  background: var(--grad); box-shadow: 0 0 10px rgba(var(--lime-rgb), .45); }
#track.on { opacity: 1; }
#track.light { background: rgba(var(--ink-rgb), .16); color: rgba(var(--ink-rgb), .5); }
#track.light i { background: var(--ink); box-shadow: none; }
#runner { position: fixed; z-index: 42; left: 0; width: var(--rs); height: var(--rs); pointer-events: none; opacity: 0;
  transition: opacity .4s; bottom: calc(var(--track-b) + 2px - var(--rs) * .055); will-change: transform; }
#runner.on { opacity: 1; }
#runner img { display: none; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges;
  filter: drop-shadow(0 0 1px rgba(var(--paper-rgb), .55)) drop-shadow(0 0 8px rgba(var(--lime-rgb), .28)); }
#runner img.on { display: block; }
#runner.run img { transform: translateY(calc(var(--rs) * .043)); }
#runner.light img { filter: none; }
/* narrow / portrait: the track gets its own row above the pips and the act label */
@media (max-width: 760px) {
  :root { --track-b: calc(var(--hud-e) + 50px); }
  #track { left: calc(var(--hud-e) + 34px); right: calc(var(--hud-e) + 34px); }
  #act { gap: 8px; font-size: 10px; letter-spacing: .22em; bottom: calc(var(--hud-e) + 2px); }
  #act img { height: 20px; }
}
@media (prefers-reduced-motion: reduce) { #runner { display: none; } }

/* ---- portrait (phones): a 1080x1920 frame; scene layouts come from js/stage.js ---- */
/* portrait stage size is set by main.js from js/stage.js (width 1080, height fitted to the phone) */
/* the frame is letterboxed on phones: let iris wipes spill into the margin so the field change is seamless */
.portrait .scene { overflow: visible; }
.portrait .eyebrow { font-size: 30px; }
.portrait .links a, .portrait a.lnk { font-size: 28px; }

/* ---- waitlist dialog (hero "Join the waitlist") ---- */
#waitlist { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 0; border: 0; border-radius: 0;
  background: var(--lime); color: var(--ink); font-family: var(--sans); cursor: auto; box-shadow: 0 30px 80px rgba(var(--ink-rgb), .45); }
#waitlist::after { content: ""; position: sticky; display: block; bottom: 0; height: 8px; background: var(--grad); }
#waitlist::backdrop { background: rgba(var(--ink-rgb), .72); cursor: auto; }
#waitlist[open] { animation: wlIn .32s cubic-bezier(.2, .8, .2, 1); }
@keyframes wlIn { from { opacity: 0; transform: translateY(18px); } }
#waitlist button { cursor: pointer; font-family: inherit; }
#waitlist .wl-body { padding: clamp(28px, 6vw, 44px) clamp(20px, 6vw, 44px) clamp(28px, 5vw, 40px); }
#waitlist .wl-close-form { position: absolute; right: 8px; top: 8px; margin: 0; z-index: 1; }
#waitlist .wl-x { width: 44px; height: 44px; border: 0; background: none; color: var(--ink); font: 400 34px/1 var(--sans); }
#waitlist .wl-x:hover, #waitlist .wl-x:focus-visible { background: var(--ink); color: var(--lime); }
#waitlist .wl-eb { margin: 0 0 14px; font: 600 13px/1.4 var(--mono); letter-spacing: .24em; text-transform: uppercase; }
#waitlist .wl-h { margin: 0; font: 900 clamp(34px, 8vw, 52px)/.95 var(--sans); font-stretch: 75%; text-transform: uppercase; letter-spacing: .01em; outline: none; }
#waitlist .wl-lead { margin: 16px 0 0; font: 500 16px/1.5 var(--sans); max-width: 40ch; }
#waitlist .wl-form { display: grid; gap: 16px; margin-top: 26px; }
#waitlist .wl-f { display: grid; gap: 8px; }
#waitlist .wl-f span { font: 600 12px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; }
#waitlist .wl-f em { font-style: normal; opacity: .6; letter-spacing: .12em; }
#waitlist input { width: 100%; box-sizing: border-box; height: 54px; padding: 0 16px; border: 3px solid var(--ink); border-radius: 0;
  background: var(--paper); color: var(--ink); font: 500 17px/1 var(--sans); outline: none; }
#waitlist input:focus-visible { box-shadow: 0 0 0 3px var(--lime), 0 0 0 6px var(--ink); }
#waitlist input[aria-invalid] { border-color: #c4271b; }
#waitlist .wl-err { min-height: 1.4em; margin: -4px 0 0; font: 600 14px/1.4 var(--sans); color: #a11d12; }
#waitlist .wl-err:empty { min-height: 0; margin: 0; }
#waitlist .wl-go { position: relative; height: 64px; border: 0; background: var(--ink); color: var(--lime); font: 900 26px/1 var(--sans);
  font-stretch: 75%; letter-spacing: .03em; text-transform: uppercase; overflow: hidden; transition: color .2s; }
#waitlist .wl-go::before { content: ""; position: absolute; inset: 0; background: var(--grad); opacity: 0; transition: opacity .2s; }
#waitlist .wl-go span { position: relative; }
#waitlist .wl-go:hover:not(:disabled), #waitlist .wl-go:focus-visible { color: var(--ink); }
#waitlist .wl-go:hover:not(:disabled)::before, #waitlist .wl-go:focus-visible::before { opacity: 1; }
#waitlist .wl-go:disabled { opacity: .7; cursor: progress; }
#waitlist .wl-ok { width: 100%; margin-top: 28px; }
#waitlist .wl-fine { margin: 0; font: 500 13px/1.45 var(--sans); opacity: .7; }
@media (prefers-reduced-motion: reduce) { #waitlist[open] { animation: none; } }
/* the custom cursor sits under the dialog's top layer, so hide it while the dialog is open */
html:has(#waitlist[open]) #cursor { display: none; }
