/* ─────────────────────────────────────────────────────────────
   braylinselvig.com · retrowave

   Motion language (keep everything on these rails):
   · rise     text/UI enters: up 28px + unblur, --dur-4, --ease-out
   · crt-on   screens power on: collapse to a line, then open vertically
   · flicker  neon script words strike on like a sign
   · static   hover on a screen = quick channel-change burst
   All timing comes from the tokens below; stagger = --stagger.
   ───────────────────────────────────────────────────────────── */
:root {
  --bg: #0a0614;
  --bg-2: #110a22;
  --panel: #140c28;
  --fg: #f6eeff;
  --muted: #b3a6d4;
  --dim: #6f6392;
  --line: rgba(196, 160, 255, 0.12);
  --line-2: rgba(196, 160, 255, 0.24);
  --accent: #ff3ea5;
  --accent-ink: #1a0010;
  --cyan: #3df2ff;
  --violet: #9b5cff;
  --sun-1: #ffe36e;
  --sun-2: #ff8a3d;
  --sun-3: #ff3ea5;
  --sunset: linear-gradient(180deg, var(--sun-1), var(--sun-2) 50%, var(--sun-3));
  --neon-line: linear-gradient(90deg, var(--accent), var(--violet) 55%, var(--cyan));
  --chrome: linear-gradient(180deg, #fdfcff 0%, #cfe9ff 24%, #74b6ff 45%, #1c1147 49.5%, #2c175e 51%, #ff7ac8 62%, #ffd9f1 82%, #ffffff 100%);
  --radius: 18px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-snap: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease: var(--ease-out);
  --dur-1: 160ms;
  --dur-2: 320ms;
  --dur-3: 640ms;
  --dur-4: 1000ms;
  --stagger: 70ms;

  --display: "Unbounded", ui-sans-serif, system-ui, sans-serif;
  --sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --osd: "VT323", ui-monospace, monospace;
  --serif: "Mr Dafoe", "Brush Script MT", cursive;
  color-scheme: dark;
}

@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.booting, body.menu-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { display: block; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
section[id] { scroll-margin-top: 70px; }

.skip {
  position: fixed; left: 12px; top: 12px; z-index: 400;
  padding: 10px 16px; border-radius: 10px; background: var(--fg); color: var(--bg);
  transform: translateY(-160%); transition: transform var(--dur-2) var(--ease-out);
}
.skip:focus { transform: none; }

.mono { font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.02em; }
.osd { font-family: var(--osd); letter-spacing: 0.06em; line-height: 1; }
.serif, .script { font-family: var(--serif); font-style: normal; font-weight: 400; letter-spacing: 0; text-transform: none; }
.dim { color: var(--dim); }
.muted { color: var(--muted); }
.mono-inline { font-family: var(--mono); font-size: 0.84em; color: var(--fg); }
.grad { background: var(--sunset); -webkit-background-clip: text; background-clip: text; color: transparent; }

.neon {
  color: #ffd1ec;
  text-shadow:
    0 0 2px #fff,
    0 0 8px var(--accent),
    0 0 18px var(--accent),
    0 0 42px rgba(255, 62, 165, 0.7);
}

.pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(255, 62, 165, 0.6);
  animation: pulse 2s infinite;
  flex: none;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 62, 165, 0.6); }
  70% { box-shadow: 0 0 0 9px rgba(255, 62, 165, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 62, 165, 0); }
}
.blink { animation: blink 1s steps(1) infinite; color: var(--accent); }
.blink-slow { animation: blink 1.6s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ───────── Screen FX ───────── */
.fx-scan, .fx-grain { position: fixed; inset: 0; pointer-events: none; z-index: 120; }
.fx-scan {
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px);
  opacity: 0.35;
  mix-blend-mode: multiply;
}
.fx-grain {
  inset: -50%;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -5%); }
  60% { transform: translate(-6%, -2%); }
  80% { transform: translate(5%, 4%); }
  100% { transform: translate(0, 0); }
}
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 130;
  background: var(--neon-line);
  box-shadow: 0 0 10px var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
}

/* ───────── Intro: VHS power-on ───────── */
.intro {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #000;
  pointer-events: none;
}
.intro.skip-intro { display: none; }
.intro-osd {
  position: absolute;
  top: 28px;
  left: var(--gutter);
  right: var(--gutter);
  display: flex;
  justify-content: space-between;
  font-size: 28px;
  color: #e8fbff;
  text-shadow: 0 0 6px rgba(61, 242, 255, 0.7);
  opacity: 0;
}
.intro-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: #fff;
  box-shadow: 0 0 20px #fff, 0 0 60px var(--cyan);
  transform: scale(0, 1);
}
.intro.run { animation: introBg 1.25s linear forwards; }
.intro.run .intro-osd { animation: osdIn 0.9s steps(1) forwards; }
.intro.run .intro-line { animation: lineOn 1.25s var(--ease-in-out) forwards; }
.intro.done { visibility: hidden; }
@keyframes introBg { 0%, 62% { background: #000; } 63%, 100% { background: transparent; } }
@keyframes osdIn { 0% { opacity: 0; } 12% { opacity: 1; } 30% { opacity: 0.4; } 36% { opacity: 1; } 99% { opacity: 1; } 100% { opacity: 0; } }
@keyframes lineOn {
  0%, 30% { transform: scale(0, 1); opacity: 1; }
  52% { transform: scale(1, 1); opacity: 1; }
  66% { transform: scale(1, 500); opacity: 0.9; }
  100% { transform: scale(1, 500); opacity: 0; }
}

/* ───────── Shared motion primitives ───────── */
.rise { opacity: 0; transform: translateY(20px); filter: blur(8px); }
.ready .rise { animation: rise var(--dur-4) var(--ease-out) forwards; animation-delay: var(--d, 0s); }
@keyframes rise { to { opacity: 1; transform: none; filter: none; } }

.reveal {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(10px);
  transition: opacity var(--dur-4) var(--ease-out), transform var(--dur-4) var(--ease-out), filter var(--dur-4) var(--ease-out);
  transition-delay: var(--rd, 0s);
}
.reveal.in { opacity: 1; transform: none; filter: none; }

.flicker { opacity: 0.08; }
.ready .hero .flicker,
.in .flicker,
.flicker.in { animation: flicker 1.4s linear forwards; animation-delay: var(--fd, 0.35s); }
@keyframes flicker {
  0% { opacity: 0.08; }
  8% { opacity: 1; }
  10% { opacity: 0.1; }
  18% { opacity: 1; }
  20% { opacity: 0.25; }
  24% { opacity: 1; }
  52% { opacity: 1; }
  54% { opacity: 0.4; }
  56%, 100% { opacity: 1; }
}

@keyframes crtOn {
  0% { transform: scale(0.6, 0.006); filter: brightness(4) saturate(0); }
  38% { transform: scale(1, 0.006); filter: brightness(4) saturate(0); }
  100% { transform: none; filter: none; }
}

/* ───────── Nav ───────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px var(--gutter);
  transition: background var(--dur-3), padding var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out);
}
.nav::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--neon-line);
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity var(--dur-3), transform var(--dur-3) var(--ease-out);
}
.nav.scrolled {
  background: rgba(10, 6, 20, 0.7);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  padding-top: 12px;
  padding-bottom: 12px;
}
.nav.scrolled::after { opacity: 0.45; transform: none; }
.nav.hide { transform: translateY(-110%); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; position: relative; z-index: 2; }
.brand-mark { width: 28px; height: 28px; filter: drop-shadow(0 0 6px rgba(255, 110, 120, 0.45)); transition: filter var(--dur-2), transform var(--dur-3) var(--ease-snap); }
.brand:hover .brand-mark { filter: drop-shadow(0 0 12px rgba(255, 110, 120, 0.9)); transform: translateY(-2px); }
.brand-name { font-family: var(--sans); }
.nav-links { position: relative; display: flex; gap: 28px; margin-left: auto; color: var(--muted); }
.nav-links a {
  position: relative;
  padding: 6px 0;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color var(--dur-2);
}
.nav-links a:hover, .nav-links a.active { color: var(--fg); }
.nav-ind {
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 1px;
  border-radius: 2px;
  background: var(--neon-line);
  box-shadow: 0 0 10px var(--accent);
  opacity: 0;
  transform-origin: 0 50%;
  transition: transform var(--dur-3) var(--ease-out), opacity var(--dur-2);
}
.nav-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}
.menu-btn {
  display: none;
  position: relative;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: rgba(20, 12, 40, 0.6);
  cursor: pointer;
}
.menu-btn span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 1.5px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform var(--dur-3) var(--ease-out), background var(--dur-2);
}
.menu-btn span:first-child { top: 16px; }
.menu-btn span:last-child { top: 24px; }
.menu-open .menu-btn span { background: var(--accent); }
.menu-open .menu-btn span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-open .menu-btn span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* Mobile menu */
.menu {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: flex;
  align-items: center;
  padding: 90px var(--gutter) 40px;
  background: radial-gradient(ellipse 120% 70% at 50% 100%, #3a0f5c 0%, #140828 55%, #0a0614 100%);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path var(--dur-3) var(--ease-in-out), visibility 0s var(--dur-3);
}
.menu.open { clip-path: inset(0); visibility: visible; transition: clip-path var(--dur-3) var(--ease-in-out), visibility 0s; }
.menu-links { position: relative; display: grid; gap: 6px; width: 100%; }
.menu-links a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(34px, 10vw, 56px);
  letter-spacing: -0.03em;
  line-height: 1;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(24px);
  filter: blur(8px);
  transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out), filter var(--dur-3) var(--ease-out), color var(--dur-2);
}
.menu-links a .osd { font-size: 20px; color: var(--accent); font-weight: 400; letter-spacing: 0.06em; }
.menu.open .menu-links a { opacity: 1; transform: none; filter: none; transition-delay: calc(200ms + var(--i) * var(--stagger)); }
.menu-links a:active { color: var(--accent); }
.menu-floor {
  position: absolute;
  left: -50%;
  right: -50%;
  bottom: 0;
  height: 40%;
  background-image:
    linear-gradient(rgba(255, 62, 165, 0.5) 1.5px, transparent 1.5px),
    linear-gradient(90deg, rgba(255, 62, 165, 0.5) 1.5px, transparent 1.5px);
  background-size: 54px 54px;
  transform: perspective(300px) rotateX(62deg);
  transform-origin: 50% 100%;
  -webkit-mask: linear-gradient(to top, #000 10%, transparent);
  mask: linear-gradient(to top, #000 10%, transparent);
  animation: floor 1.4s linear infinite paused;
}
.menu.open .menu-floor { animation-play-state: running; }
@keyframes floor { to { background-position: 0 54px; } }

/* ───────── Hero ───────── */
.hero {
  --hp: 0;
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--bg);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, var(--bg) 0%, rgba(10, 6, 20, 0.75) 14%, transparent 38%),
    radial-gradient(ellipse 120% 90% at 50% 50%, transparent 60%, rgba(10, 6, 20, 0.65) 100%);
}
.hero-osd {
  position: absolute;
  z-index: 4;
  top: 88px;
  left: var(--gutter);
  right: var(--gutter);
  display: flex;
  justify-content: space-between;
  font-size: 24px;
  color: #e8fbff;
  text-shadow: 0 0 6px rgba(61, 242, 255, 0.65);
  pointer-events: none;
  transform: translate3d(0, calc(var(--hp) * -60px), 0);
}
.hero-content {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  top: 44%;
  text-align: center;
  pointer-events: none;
  transform: translate3d(0, calc(-50% - var(--hp) * 26vh), 0) scale(calc(1 - var(--hp) * 0.08));
  opacity: calc(1 - var(--hp) * 1.6);
  padding: 0 var(--gutter);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin: 0 0 22px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(10, 6, 20, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.eyebrow .kana { color: var(--accent); letter-spacing: 0.2em; font-family: var(--sans); font-size: 12px; }
.tick { width: 22px; height: 1px; background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.hero-title { position: relative; margin: 0; line-height: 1; display: inline-block; }
.chrome {
  display: block;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(46px, 13vw, 210px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  filter: drop-shadow(0 2px 0 #3b1470) drop-shadow(0 6px 0 #1a0838) drop-shadow(0 18px 30px rgba(10, 6, 20, 0.65));
}
.chrome .ch {
  display: inline-block;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.95) 50%, transparent 58%) no-repeat, var(--chrome);
  background-size: 320% 100%, 100% 100%;
  background-position: 160% 0, 0 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
  transform: translateY(0.5em) scaleY(1.6);
  transform-origin: 50% 100%;
  filter: blur(6px);
}
.ready .chrome .ch {
  animation:
    chIn 1.1s var(--ease-out) forwards,
    sheen 5.5s var(--ease-in-out) infinite;
  animation-delay: calc(var(--i) * 55ms + 0.12s), calc(var(--i) * 70ms + 1.8s);
}
@keyframes chIn { to { opacity: 1; transform: none; filter: none; } }
@keyframes sheen { 0% { background-position: 160% 0, 0 0; } 30%, 100% { background-position: -60% 0, 0 0; } }
.hero-title .script {
  position: relative;
  display: block;
  margin: -0.42em 0 0 0.9em;
  font-size: clamp(54px, 10vw, 160px);
  line-height: 1;
  transform: rotate(-7deg);
  --fd: 0.95s;
}
.hero-foot {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: clamp(56px, 9vh, 96px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 var(--gutter);
  transform: translate3d(0, calc(var(--hp) * -12vh), 0);
  opacity: calc(1 - var(--hp) * 2.2);
}
.hero-sub { max-width: 500px; font-size: clamp(15px, 1.25vw, 17.5px); color: var(--fg); margin: 0 0 22px; text-shadow: 0 1px 12px rgba(10, 6, 20, 1), 0 0 2px rgba(10, 6, 20, 1); }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.scroll-cue {
  position: absolute;
  z-index: 4;
  right: var(--gutter);
  bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  writing-mode: vertical-rl;
}
.scroll-cue i { position: relative; width: 1px; height: 46px; background: var(--line-2); overflow: hidden; }
.scroll-cue i::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 14px;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: cue 2s var(--ease-in-out) infinite;
}
@keyframes cue { 0% { transform: translateY(-14px); } 100% { transform: translateY(46px); } }

/* ───────── Buttons ───────── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  overflow: hidden;
  isolation: isolate;
  transition: box-shadow var(--dur-2), border-color var(--dur-2), background var(--dur-2), transform var(--dur-3) var(--ease-out);
  will-change: transform;
}
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--dur-3) var(--ease-snap); }
.btn-primary {
  background: linear-gradient(90deg, var(--accent), #ff6a6a 55%, var(--sun-2));
  color: #1a0012;
  box-shadow: 0 0 0 1px rgba(255, 180, 210, 0.3) inset, 0 8px 30px -8px rgba(255, 62, 165, 0.7);
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
  transform: translateX(-110%);
  transition: transform var(--dur-3) var(--ease-out);
}
.btn-primary:hover { box-shadow: 0 0 0 1px rgba(255, 220, 235, 0.5) inset, 0 10px 44px -6px rgba(255, 62, 165, 0.95); }
.btn-primary:hover::after { transform: translateX(110%); }
.btn-primary:hover svg { transform: translateY(3px); }
.btn-ghost {
  border: 1px solid rgba(61, 242, 255, 0.45);
  color: var(--fg);
  background: rgba(10, 6, 20, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: var(--cyan); box-shadow: 0 0 22px -4px rgba(61, 242, 255, 0.7), 0 0 0 1px rgba(61, 242, 255, 0.4) inset; }

/* ───────── Channel strip ───────── */
.strip {
  position: relative;
  overflow: hidden;
  padding: 22px 0;
  background: linear-gradient(180deg, #130a28, #0c0619);
  border-top: 1px solid rgba(255, 62, 165, 0.35);
  border-bottom: 1px solid rgba(61, 242, 255, 0.25);
}
.strip-track {
  display: flex;
  align-items: center;
  width: max-content;
  white-space: nowrap;
  will-change: transform;
}
.strip-track > * { margin-right: 40px; }
.strip-track span {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(28px, 4.2vw, 58px);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.strip-track span.outline { background: none; color: transparent; -webkit-text-stroke: 1.2px var(--accent); filter: drop-shadow(0 0 6px rgba(255, 62, 165, 0.6)); }
.strip-track i { font-style: normal; font-size: clamp(14px, 1.6vw, 20px); color: var(--cyan); letter-spacing: 0.2em; text-shadow: 0 0 8px rgba(61, 242, 255, 0.7); }

/* ───────── Sections ───────── */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(90px, 12vw, 160px) var(--gutter); }
.section-head { margin-bottom: clamp(44px, 6vw, 72px); }
.label { color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em; margin: 0 0 18px; display: flex; align-items: center; gap: 10px; }
.idx { color: var(--accent); text-shadow: 0 0 8px rgba(255, 62, 165, 0.6); }
.section-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(38px, 6.2vw, 92px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}
.section-title .script { display: inline-block; font-size: 1.25em; margin-left: 0.08em; transform: rotate(-5deg) translateY(-0.04em); letter-spacing: 0; }
.section-lede { color: var(--muted); max-width: 540px; font-size: 17px; margin: 36px 0 0; }

/* ───────── Projects (TV sets) ───────── */
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.project {
  --c: var(--accent);
  --mx: 50%;
  --my: 50%;
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 12px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(34, 18, 66, 0.85), rgba(16, 9, 32, 0.95));
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
  isolation: isolate;
}
.project.in {
  transform: perspective(1200px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: opacity var(--dur-4) var(--ease-out), filter var(--dur-4) var(--ease-out), transform var(--dur-3) var(--ease-out), box-shadow var(--dur-3);
  transition-delay: 0s;
}
.project::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-3);
  background: radial-gradient(380px circle at var(--mx) var(--my), color-mix(in srgb, var(--c) 16%, transparent), transparent 60%);
}
.project::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 4;
  border-radius: inherit;
  padding: 1.5px;
  pointer-events: none;
  background: conic-gradient(from var(--ang), transparent 0 55%, var(--c) 72%, #fff 76%, var(--cyan) 82%, transparent 94%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--dur-3);
  animation: ang 3.2s linear infinite paused;
}
@keyframes ang { to { --ang: 360deg; } }
.project:hover::before, .project:hover::after { opacity: 1; }
.project:hover::after { animation-play-state: running; }
.project:hover { box-shadow: 0 40px 80px -30px color-mix(in srgb, var(--c) 45%, transparent); }
.project-link { position: absolute; inset: 0; z-index: 6; border-radius: inherit; }
.project-link:focus-visible { outline-offset: 4px; }

.ch-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px 10px;
  font-size: 20px;
  color: #e8fbff;
  text-shadow: 0 0 6px color-mix(in srgb, var(--c) 70%, transparent);
}
.ch-live { display: inline-flex; align-items: center; gap: 7px; color: var(--c); }
.ch-live.off { color: var(--dim); text-shadow: none; }
.rec { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); animation: blink 1.6s steps(1) infinite; }

.project-visual {
  position: relative;
  height: clamp(230px, 24vw, 300px);
  border-radius: 12px;
  overflow: hidden;
  background: #0b0716;
  transform: scale(0.6, 0.006);
  transform-origin: 50% 50%;
}
.project.in .project-visual { animation: crtOn 0.95s var(--ease-out) forwards; animation-delay: calc(var(--rd, 0s) + 0.22s); }
/* glass: scanlines + curvature vignette */
.project-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-radius: inherit;
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse 110% 90% at 50% 50%, transparent 62%, rgba(0, 0, 0, 0.55) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 0 40px rgba(0, 0, 0, 0.6);
}
.project-visual canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.static {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 -0.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
}
.tune .static { animation: static 0.45s steps(5) forwards; }
.tune .project-visual > :not(.static) { animation: tuneShift 0.45s steps(4); }
@keyframes static {
  0% { opacity: 0.9; background-position: 0 0; }
  25% { opacity: 0.7; background-position: -40px 20px; }
  50% { opacity: 0.5; background-position: 30px -30px; }
  75% { opacity: 0.2; background-position: -10px 40px; }
  100% { opacity: 0; background-position: 0 0; }
}
@keyframes tuneShift {
  0% { transform: translateX(-6px); filter: hue-rotate(40deg); }
  50% { transform: translateX(4px); }
  100% { transform: none; filter: none; }
}

.project-body { position: relative; padding: 22px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.project-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.project-meta > div { min-width: 0; }
.project-meta img { width: 36px; height: 36px; border-radius: 9px; }
.project-meta .img-embers { width: 30px; object-fit: contain; border-radius: 0; filter: drop-shadow(0 0 10px rgba(255, 106, 43, 0.4)); }
.project h3 { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.host { margin: 3px 0 0; color: var(--c); font-size: 11.5px; opacity: 0.9; }
.project-desc { color: var(--muted); margin: 0 0 20px; max-width: 52ch; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 22px; }
.tags li { padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; }
.visit { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--fg); font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; }
.visit .arr { display: inline-block; transition: transform var(--dur-3) var(--ease-snap); color: var(--c); }
.project:hover .visit .arr { transform: translate(4px, -4px); }

/* Ultratype visual */
.vis-ultratype {
  background: radial-gradient(ellipse at 50% 130%, rgba(61, 242, 255, 0.2), transparent 60%), #0a0b1a;
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
}
.ut-stats { display: flex; gap: 28px; }
.ut-stats > div { display: flex; flex-direction: column; }
.ut-k { color: var(--dim); font-size: 11px; text-transform: lowercase; }
.ut-v { font-family: var(--osd); color: var(--cyan); font-size: 36px; line-height: 1; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; text-shadow: 0 0 10px rgba(61, 242, 255, 0.6); }
.ut-words {
  margin-top: auto;
  font-size: clamp(14px, 1.4vw, 18px);
  line-height: 1.7;
  color: #463d6c;
  height: 3.4em;
  overflow: hidden;
  position: relative;
}
.ut-words .ok { color: #efe8ff; }
.ut-words .err { color: #ff5d8f; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.ut-caret {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  vertical-align: -0.2em;
  margin: 0 -1px;
  border-radius: 1px;
  animation: blink 1s steps(1) infinite;
}
.ut-graph { height: 46px; margin-top: 14px; }
.ut-graph svg { width: 100%; height: 100%; display: block; overflow: visible; }
.ut-graph path { fill: none; stroke: var(--cyan); stroke-width: 1.8; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 4px rgba(61, 242, 255, 0.8)); }

/* Embers visual */
.vis-embers {
  background:
    radial-gradient(ellipse at 50% 115%, rgba(255, 106, 43, 0.38), transparent 55%),
    radial-gradient(ellipse at 50% 140%, rgba(255, 40, 90, 0.3), transparent 70%),
    #120814;
}
.em-bracket { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 38px; z-index: 2; }
.em-col { display: flex; flex-direction: column; gap: 10px; position: relative; }
.em-col:first-child .em-team:nth-child(2) { margin-bottom: 14px; }
.em-final { gap: 44px; }
.em-final::before {
  content: "";
  position: absolute;
  left: -38px;
  top: 16px;
  bottom: 16px;
  width: 20px;
  border: 1px solid rgba(255, 140, 80, 0.35);
  border-left: 0;
  border-radius: 0 8px 8px 0;
}
.em-team {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: 150px;
  padding: 7px 11px;
  border-radius: 8px;
  background: rgba(24, 12, 20, 0.8);
  border: 1px solid rgba(255, 140, 80, 0.22);
  color: #f7e3dc;
  font-size: 11px;
  backdrop-filter: blur(4px);
}
.em-team b { font-weight: 700; color: #ff8a4c; }
.em-team.lose, .em-team.lose b { color: #7d6670; }
.em-team.live { border-color: rgba(255, 120, 60, 0.6); box-shadow: 0 0 24px rgba(255, 90, 30, 0.18); }
.em-live { position: absolute; top: 50%; left: 0; transform: translateY(-50%); display: flex; gap: 6px; align-items: center; font-size: 10px; letter-spacing: 0.14em; color: #ff8a4c; }
.em-live .pulse { background: #ff5a1f; animation-name: pulseEm; width: 6px; height: 6px; }
@keyframes pulseEm { 0% { box-shadow: 0 0 0 0 rgba(255, 90, 31, 0.6); } 70% { box-shadow: 0 0 0 8px rgba(255, 90, 31, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 90, 31, 0); } }
.em-bump { animation: bump 0.6s var(--ease-out); }
@keyframes bump { 30% { transform: scale(1.5); color: #fff; } }

/* Lens visual */
.vis-lens { background: radial-gradient(ellipse at 50% 50%, rgba(155, 92, 255, 0.12), transparent 70%), #0b0716; }
.lens-readout { position: absolute; left: 20px; bottom: 16px; color: var(--muted); font-size: 10.5px; z-index: 2; }

/* No signal */
.vis-next { display: flex; flex-direction: column; }
.bars, .bars-low { display: flex; }
.bars { flex: 1; }
.bars-low { height: 16%; }
.bars i, .bars-low i { flex: 1; }
.bars i:nth-child(1) { background: #c0c0c0; }
.bars i:nth-child(2) { background: #c0c000; }
.bars i:nth-child(3) { background: #00c0c0; }
.bars i:nth-child(4) { background: #00c000; }
.bars i:nth-child(5) { background: #c000c0; }
.bars i:nth-child(6) { background: #c00000; }
.bars i:nth-child(7) { background: #0000c0; }
.bars-low i:nth-child(odd) { background: #13101f; }
.bars-low i:nth-child(1) { background: #0000c0; }
.bars-low i:nth-child(3) { background: #c000c0; }
.bars-low i:nth-child(5) { background: #00c0c0; }
.bars-low i:nth-child(7) { background: #c0c0c0; }
.bars-low i:nth-child(even) { background: #0d0a17; }
.vis-next { filter: saturate(0.85) brightness(0.8); }
.vis-next::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 22%;
  z-index: 2;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.18) 40%, rgba(255, 255, 255, 0.05) 60%, transparent);
  mix-blend-mode: overlay;
  animation: tracking 3.6s linear infinite;
}
@keyframes tracking { from { top: -25%; } to { top: 105%; } }
.no-signal {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  padding: 8px 16px 6px;
  font-size: 30px;
  color: #fff;
  background: rgba(0, 0, 0, 0.75);
  transform: translate(-50%, -50%);
  animation: blink 1.4s steps(1) infinite;
}
.project-next .project-body { text-align: left; }
.next-host { color: var(--muted); margin: 0 0 8px; }
.project-next h3 { font-size: 24px; }
.project-next h3 .script { font-size: 1.5em; margin-left: 4px; font-weight: 400; }

/* ───────── About ───────── */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 90px); align-items: start; }
.big { margin: 0; font-size: clamp(26px, 3.2vw, 44px); line-height: 1.2; letter-spacing: -0.025em; font-weight: 500; }
.big .muted { display: block; margin-top: 0.8em; font-size: 0.6em; line-height: 1.55; letter-spacing: -0.005em; font-weight: 400; }
.about-side { display: grid; gap: 22px; }
.window {
  border: 1px solid var(--line-2);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(20, 12, 40, 0.8);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
.win-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 30px;
  padding: 0 10px 0 14px;
  background: var(--neon-line);
  color: #1a0526;
}
.win-bar .mono { font-size: 11.5px; font-weight: 700; }
.win-ctl { display: flex; gap: 5px; }
.win-ctl i { width: 13px; height: 13px; border: 1.5px solid rgba(26, 5, 38, 0.75); border-radius: 3px; background: rgba(255, 255, 255, 0.25); }
.win-body { padding: 22px 24px 24px; }
.process { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.process li { display: grid; grid-template-columns: 34px 1fr; gap: 8px; }
.process li > span { color: var(--accent); padding-top: 3px; }
.process b { font-weight: 600; }
.process p { margin: 2px 0 0; color: var(--muted); font-size: 14.5px; }
.window .process li, .window .chips li { opacity: 0; transform: translateY(12px); }
.window.in .process li, .window.in .chips li { animation: rise var(--dur-3) var(--ease-out) forwards; animation-delay: calc(0.3s + var(--i) * var(--stagger)); }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line-2); color: var(--fg); font-size: 11.5px; transition: border-color var(--dur-2), color var(--dur-2), background var(--dur-2), box-shadow var(--dur-2); }
.chips li:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(61, 242, 255, 0.06); box-shadow: 0 0 16px -4px rgba(61, 242, 255, 0.6); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(60px, 8vw, 100px); border-top: 1px solid var(--line); }
.stat { padding: 34px 0 0; display: flex; flex-direction: column; gap: 12px; }
.stat + .stat { padding-left: 28px; border-left: 1px solid var(--line); }
.stat-n {
  font-family: var(--display);
  font-size: clamp(56px, 8vw, 116px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 0 #2a0f55);
}
.stat-l { color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }

/* ───────── Contact ───────── */
.contact {
  position: relative;
  overflow: hidden;
  min-height: min(100vh, 900px);
  display: flex;
  align-items: flex-start;
  background: linear-gradient(180deg, var(--bg) 0%, #1a0836 55%, #3b0f52 70%, #0a0614 70.2%);
}
.contact-scene { position: absolute; inset: 0; pointer-events: none; }
.c-sun {
  position: absolute;
  left: 50%;
  top: 70%;
  width: min(52vw, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--sunset);
  transform: translate(-50%, -62%);
  box-shadow: 0 0 120px 20px rgba(255, 62, 165, 0.35);
  -webkit-mask: linear-gradient(180deg, #000 0 50%, transparent 50% 53%, #000 53% 60%, transparent 60% 64%, #000 64% 70%, transparent 70% 75.5%, #000 75.5% 80%, transparent 80% 86%, #000 86% 89%, transparent 89%);
  mask: linear-gradient(180deg, #000 0 50%, transparent 50% 53%, #000 53% 60%, transparent 60% 64%, #000 64% 70%, transparent 70% 75.5%, #000 75.5% 80%, transparent 80% 86%, #000 86% 89%, transparent 89%);
  opacity: 0.9;
  transition: transform 1.6s var(--ease-out);
}
.contact:not(.in-view) .c-sun { transform: translate(-50%, -20%); }
.c-floor {
  position: absolute;
  left: 0;
  right: 0;
  top: 70%;
  bottom: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #1a0733, #0a0614 60%);
  perspective: 280px;
  perspective-origin: 50% 0%;
}
.c-floor::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  z-index: 2;
  background: #ff9ad2;
  box-shadow: 0 0 12px var(--accent), 0 0 40px var(--accent);
}
.c-plane {
  position: absolute;
  left: -100%;
  right: -100%;
  top: 0;
  height: 300%;
  transform-origin: 50% 0;
  transform: rotateX(78deg);
  background-image:
    linear-gradient(rgba(255, 62, 165, 0.85) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255, 62, 165, 0.85) 2px, transparent 2px);
  background-size: 70px 70px;
  animation: plane 1.2s linear infinite paused;
}
.c-floor::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 6, 20, 0.7), transparent 45%); }
.contact.in-view .c-plane { animation-play-state: running; }
@keyframes plane { to { background-position: 0 70px; } }
.contact-inner { position: relative; z-index: 2; width: 100%; max-width: var(--max); margin: 0 auto; padding: clamp(90px, 12vw, 150px) var(--gutter) 40px; }
.contact-title { margin: 0 0 48px; line-height: 1; }
.contact-title .chrome-solid {
  display: block;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(44px, 9vw, 150px);
  letter-spacing: -0.035em;
  text-transform: uppercase;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 0 #2a0f55);
}
.contact-title .script { display: block; font-size: clamp(56px, 9vw, 150px); margin: -0.3em 0 0 1.2em; transform: rotate(-6deg); --fd: 0.5s; }
.contact-links { display: flex; flex-wrap: wrap; gap: 14px; }
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 18px 26px;
  border: 1px solid rgba(61, 242, 255, 0.45);
  border-radius: 999px;
  font-size: 18px;
  background: rgba(10, 6, 20, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color var(--dur-2), box-shadow var(--dur-2), transform var(--dur-3) var(--ease-out);
}
.contact-link .mono { color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
.contact-link .arr { color: var(--cyan); transition: transform var(--dur-3) var(--ease-snap); }
.contact-link:hover { border-color: var(--cyan); box-shadow: 0 0 30px -6px rgba(61, 242, 255, 0.8), 0 0 0 1px rgba(61, 242, 255, 0.4) inset; }
.contact-link:hover .arr { transform: translate(4px, -4px); }

/* ───────── Footer ───────── */
.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: space-between;
  padding: 26px var(--gutter);
  border-top: 1px solid rgba(255, 62, 165, 0.3);
  background: var(--bg);
  color: var(--dim);
  font-size: 11.5px;
}
.footer-nodes { display: flex; gap: 18px; }
.footer a { transition: color var(--dur-2), text-shadow var(--dur-2); }
.footer a:hover { color: var(--fg); text-shadow: 0 0 8px var(--accent); }

/* ───────── Responsive ───────── */
@media (max-width: 900px) {
  .projects { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-status { margin-left: auto; }
  .menu-btn { display: block; }
  .scroll-cue { display: none; }
}
@media (max-width: 640px) {
  .nav-status { display: none; }
  .menu-btn { margin-left: auto; }
  .hero-osd { top: 80px; font-size: 20px; }
  .hero-content { top: 40%; }
  .eyebrow { letter-spacing: 0.1em; font-size: 10.5px; gap: 8px; flex-wrap: wrap; justify-content: center; }
  .eyebrow .kana, .eyebrow .tick { display: none; }
  .hero-title .script { margin: -0.18em 0 0 0.6em; }
  .hero-foot { bottom: 36px; }
  .hero-sub { font-size: 15px; }
  .btn { height: 46px; padding: 0 20px; font-size: 14.5px; }
  .brand-name { font-size: 14px; }
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); margin-top: 28px; }
  .em-bracket { gap: 26px; transform: scale(0.86); }
  .em-final::before { left: -26px; width: 14px; }
  .em-team { width: 128px; }
  .project { padding: 10px; }
  .project-body { padding: 20px 10px 12px; }
  .contact-link { width: 100%; justify-content: space-between; }
  .contact-title .script { margin-left: 0.5em; }
  .footer { justify-content: flex-start; }
}
@media (max-width: 400px) {
  .brand-name .dim { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; animation-delay: 0s !important; }
  .reveal, .rise, .chrome .ch, .flicker, .window li, .menu-links a { opacity: 1 !important; transform: none !important; filter: none !important; }
  .project-visual { transform: none !important; }
  .fx-grain { animation: none; }
  html { scroll-behavior: auto; }
}
