/* ==========================================================================
   Emre Melik Nameli (ROXSMB) — portfolio stylesheet
   Static, dependency-free, self-hosted fonts.
   ========================================================================== */

/* ---------- fonts ---------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-var.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --bg: #0a0907;
  --bg-2: #0d0b08;
  --panel: #13100c;
  --line: rgba(236, 228, 214, 0.10);
  --line-2: rgba(236, 228, 214, 0.19);
  --accent: #f0a75e;
  --accent-soft: rgba(240, 167, 94, 0.12);
  --accent-dim: #8a5a2c;
  --text: #efe6d8;
  --text-2: #c9bda9;
  --muted: #948a78;
  --display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --maxw: 1320px;
  --gutter: clamp(1.25rem, 4vw, 2.75rem);
  --nav-h: 72px;
}

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

html {
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: #24302e var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18.5px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv05";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
figure, figcaption { margin: 0; }
code { font-family: var(--mono); font-size: 0.9em; color: var(--text); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
::selection { background: var(--accent); color: #1a1208; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

/* ---------- helpers ---------- */
.wrap {
  width: min(var(--maxw), 100% - 2 * var(--gutter));
  margin-inline: auto;
}
.mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.label {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.label::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  flex: none;
}
.label .num { color: var(--accent); }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  background: var(--accent);
  color: #1a1208;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: translateY(-160%);
  transition: transform 0.25s var(--ease);
}
.skip:focus { transform: none; }

/* ---------- ambience ---------- */
.ambience {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.ambience::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 90vh;
  background:
    radial-gradient(38% 42% at 68% 18%, rgba(240, 167, 94, 0.13), transparent 70%),
    radial-gradient(40% 36% at 24% 6%, rgba(138, 90, 44, 0.18), transparent 72%);
  filter: blur(20px);
  animation: drift 26s var(--ease) infinite alternate;
}
.ambience::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(233, 244, 238, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(233, 244, 238, 0.035) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 10%, transparent 75%);
  opacity: 0.6;
}
@keyframes drift {
  from { transform: translate3d(-2%, 0, 0) scale(1); }
  to { transform: translate3d(3%, 2%, 0) scale(1.08); }
}

/* ---------- lower city (scrolls in with depth) ---------- */
.alley {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  will-change: opacity;
}
.alley-glow {
  position: absolute;
  inset: auto 0 0;
  height: 62vh;
  background:
    radial-gradient(30% 78% at 6% 100%, rgba(111, 195, 201, 0.14), transparent 70%),
    radial-gradient(26% 66% at 96% 100%, rgba(226, 100, 79, 0.11), transparent 72%),
    radial-gradient(44% 62% at 58% 100%, rgba(240, 167, 94, 0.12), transparent 74%),
    radial-gradient(60% 44% at 50% 104%, rgba(240, 167, 94, 0.06), transparent 76%);
  filter: blur(16px);
}
.alley-street {
  position: absolute;
  inset: auto 0 0;
  height: 13vh;
  background-image:
    repeating-linear-gradient(90deg, rgba(79, 216, 255, 0.22) 0 1px, transparent 1px 27px),
    repeating-linear-gradient(90deg, rgba(255, 95, 158, 0.16) 0 2px, transparent 2px 63px),
    repeating-linear-gradient(90deg, rgba(255, 168, 94, 0.14) 0 1px, transparent 1px 41px),
    linear-gradient(180deg, transparent, rgba(4, 8, 10, 0.86) 78%);
  filter: blur(7px);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 62%);
  mask-image: linear-gradient(180deg, transparent, #000 62%);
  opacity: 0.75;
}
.alley-horizon {
  position: absolute;
  inset: auto 0 13vh;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79, 216, 255, 0.28) 18%, rgba(255, 168, 94, 0.22) 62%, transparent);
  filter: blur(1px);
  opacity: 0.7;
}
.neon {
  position: absolute;
  border-radius: 3px;
  mix-blend-mode: screen;
  animation: neon-flicker 11s infinite;
}
.neon::after {
  content: "";
  position: absolute;
  inset: -14px -10px;
  border-radius: 12px;
  background: inherit;
  filter: blur(14px);
  opacity: 0.55;
}
.neon--1 {
  left: 20px;
  bottom: 26vh;
  width: 4px;
  height: clamp(76px, 10vh, 124px);
  background: linear-gradient(180deg, #d9f2ec, #6fc3c9 55%, #2b6b72);
  box-shadow: 0 0 9px rgba(111, 195, 201, 0.75), 0 0 40px rgba(111, 195, 201, 0.34);
  opacity: clamp(0, calc((var(--p, 0) - 0.3) * 9), 0.9);
}
.neon--2 {
  left: 42px;
  bottom: 11vh;
  width: 3px;
  height: clamp(48px, 6vh, 78px);
  background: linear-gradient(180deg, #ffe3c2, #f0a75e 58%, #7d4415);
  box-shadow: 0 0 8px rgba(240, 167, 94, 0.8), 0 0 32px rgba(240, 167, 94, 0.38);
  opacity: clamp(0, calc((var(--p, 0) - 0.44) * 9), 0.85);
  animation-delay: -4.5s;
}
.neon--3 {
  right: 22px;
  bottom: 30vh;
  width: 5px;
  height: clamp(64px, 9vh, 108px);
  background: linear-gradient(180deg, #ffd9c9, #e2644f 58%, #7d2a1e);
  box-shadow: 0 0 10px rgba(226, 100, 79, 0.7), 0 0 40px rgba(226, 100, 79, 0.32);
  opacity: clamp(0, calc((var(--p, 0) - 0.38) * 9), 0.85);
  animation-delay: -7s;
}
.neon--4 {
  right: 46px;
  bottom: 15vh;
  width: 4px;
  height: clamp(52px, 7vh, 88px);
  background: linear-gradient(180deg, #d2fff1, #f0a75e 58%, #1b6b49);
  box-shadow: 0 0 9px rgba(240, 167, 94, 0.75), 0 0 34px rgba(240, 167, 94, 0.32);
  opacity: clamp(0, calc((var(--p, 0) - 0.52) * 9), 0.8);
  animation-delay: -2.5s;
}
.alley-scan {
  position: absolute;
  inset: auto 0 0;
  height: 30vh;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 4px);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 80%);
  mask-image: linear-gradient(180deg, transparent, #000 80%);
  opacity: 0.35;
}
@keyframes neon-flicker {
  0%, 90%, 96%, 100% { filter: brightness(1); }
  91% { filter: brightness(0.28); }
  92% { filter: brightness(1); }
  93% { filter: brightness(0.55); }
  94% { filter: brightness(1); }
}

/* ---------- cable ceiling ---------- */
.cables {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: calc(0.14 + var(--p, 0) * 0.7);
}
.cables path {
  fill: none;
  stroke: rgba(233, 244, 238, 0.075);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
}
.cable-sway {
  transform-box: fill-box;
  transform-origin: 50% 0;
  animation: sway 19s ease-in-out infinite alternate;
}
.cable-sway--b { animation-duration: 23s; animation-delay: -7s; }
.cable-sway--c { animation-duration: 27s; animation-delay: -13s; opacity: 0.55; }
@keyframes sway {
  from { transform: rotate(-0.35deg); }
  to { transform: rotate(0.35deg); }
}
.cable-charge {
  opacity: calc(var(--p, 0) * 0.85);
}
.cable-charge path {
  stroke: rgba(240, 167, 94, 0.5);
  stroke-width: 1.3;
  stroke-dasharray: 26 820;
  animation: cable-travel 8s linear infinite;
}
.cable-charge path:nth-child(2) { animation-delay: -1.6s; animation-duration: 9.5s; }
.cable-charge path:nth-child(3) { animation-delay: -3.2s; animation-duration: 10.5s; }
.cable-charge path:nth-child(4) { animation-delay: -4.8s; animation-duration: 9s; }
.cable-charge path:nth-child(5) { animation-delay: -6.4s; animation-duration: 11.5s; }
.cable-charge path:nth-child(6) { animation-delay: -8s; animation-duration: 10s; }
@keyframes cable-travel {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -846; }
}

/* ---------- panel feeds (plug in on scroll) ---------- */
.label--feed { position: relative; }
.feed {
  position: absolute;
  left: 3px;
  bottom: calc(100% - 8px);
  width: 1px;
  height: clamp(46px, 7.5vh, 84px);
  pointer-events: none;
}
.feed b {
  position: absolute;
  left: -6px;
  bottom: 9px;
  width: 1px;
  height: 66%;
  background: linear-gradient(180deg, transparent, rgba(233, 244, 238, 0.09));
  border-radius: 1px;
}
.feed::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(233, 244, 238, 0.16) 44%, rgba(240, 167, 94, 0.55));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.6s var(--ease);
}
.feed i {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 13px;
  height: 9px;
  margin-left: -6.5px;
  border: 1px solid rgba(240, 167, 94, 0.4);
  border-radius: 1px;
  background-color: #0d1613;
  background-image:
    repeating-linear-gradient(90deg, rgba(233, 244, 238, 0.07) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, #1a231f, #0a1310 58%, #050b08);
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.55);
  opacity: 0.32;
  transform: translateY(-13px);
  transition:
    transform 0.42s cubic-bezier(0.2, 1.5, 0.4, 1) 0.5s,
    opacity 0.3s 0.35s,
    border-color 0.4s 0.5s,
    box-shadow 0.4s 0.5s;
}
.feed i::before,
.feed i::after {
  content: "";
  position: absolute;
  bottom: -5px;
  width: 2px;
  height: 5px;
  background: linear-gradient(180deg, #7d8f84, #4b5a52);
  transition: background 0.4s 0.5s;
}
.feed i::before { left: 2px; }
.feed i::after { right: 2px; }
.feed.is-on::before { transform: scaleY(1); }
.feed.is-on i {
  opacity: 1;
  transform: translateY(0);
  border-color: rgba(240, 167, 94, 0.95);
  box-shadow: 0 0 14px rgba(240, 167, 94, 0.55), 0 0 34px rgba(240, 167, 94, 0.25);
}
.feed.is-on i::before,
.feed.is-on i::after { background: var(--accent); }
.feed--frame { left: 30px; bottom: calc(100% + 4px); height: 46px; }
.label--feed.is-powered::before {
  animation: socket-pop 0.9s ease-out 1s both;
}
@keyframes socket-pop {
  0% { transform: scale(1); }
  25% { transform: scale(1.55); }
  55% { transform: scale(0.95); }
  100% { transform: scale(1); }
}
.section::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(240, 167, 94, 0.85), rgba(240, 167, 94, 0.12) 38%, transparent 68%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.4s var(--ease) 0.85s;
  pointer-events: none;
}
.section.is-lit::after { transform: scaleX(1); }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 59;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(36, 22, 10, 0.07), transparent 34%),
    radial-gradient(124% 104% at 50% 44%, transparent 48%, rgba(2, 4, 5, 0.62) 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  background-image:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.5) 0 1px, transparent 1px 3px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: auto, 140px 140px;
}

/* ---------- nav ---------- */
.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s;
}
.site-nav.is-stuck {
  background: rgba(6, 9, 10, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav-inner {
  width: min(var(--maxw), 100% - 2 * var(--gutter));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
}
.brand-mark {
  width: 18px;
  height: 18px;
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  flex: none;
}
.brand-mark::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(240, 167, 94, 0.8);
}
.brand small { color: var(--muted); letter-spacing: 0.16em; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2rem);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.nav-links a {
  position: relative;
  color: var(--text-2);
  padding-block: 0.35rem;
  transition: color 0.25s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav-links a:hover,
.nav-links a[aria-current="true"] { color: var(--text); }
.nav-links a:hover::after,
.nav-links a[aria-current="true"]::after { transform: scaleX(1); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), color 0.3s;
}
.nav-cta::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.6s ease-in-out infinite;
}
.nav-cta:hover { border-color: var(--accent-dim); background: var(--accent-soft); }

.progress {
  position: absolute;
  left: 0; bottom: -1px;
  height: 1px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0.85;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(240, 167, 94, 0.5); }
  50% { opacity: 0.55; box-shadow: 0 0 0 5px rgba(240, 167, 94, 0); }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--nav-h) + clamp(2.5rem, 7vh, 5rem));
  padding-bottom: clamp(2.5rem, 6vh, 4rem);
  min-height: 100svh;
  display: flex;
  align-items: center;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero-eyebrow { margin-bottom: 1.6rem; }
.hero h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.85rem, 7.4vw, 5.4rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
}
.line { display: block; overflow: hidden; padding-block: 0.06em; }
.line > span {
  display: block;
  transform: translateY(112%);
  transition: transform 1s var(--ease-out);
}
.loaded .line > span { transform: none; }
.line:nth-child(2) > span { transition-delay: 0.09s; }
.line:nth-child(3) > span { transition-delay: 0.18s; }

.h1-alias {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  color: var(--accent);
  margin-top: 1.35rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.8s var(--ease) 0.45s, transform 0.8s var(--ease) 0.45s;
}
.loaded .h1-alias { opacity: 1; transform: none; }

.hero-lead {
  max-width: 46ch;
  margin-top: 1.5rem;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  color: var(--text-2);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.9s var(--ease) 0.55s, transform 0.9s var(--ease) 0.55s;
}
.loaded .hero-lead { opacity: 1; transform: none; }
.hero-lead strong { color: var(--text); font-weight: 500; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.9s var(--ease) 0.68s, transform 0.9s var(--ease) 0.68s;
}
.loaded .hero-actions { opacity: 1; transform: none; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.3rem;
  border: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  overflow: hidden;
  transition: border-color 0.35s var(--ease), color 0.35s var(--ease), background 0.35s var(--ease);
}
.btn .arrow { transition: transform 0.35s var(--ease); }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn:hover .arrow { transform: translateX(3px); }
.btn--solid {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a1208;
  font-weight: 500;
}
.btn--solid:hover { background: #ffc384; border-color: #ffc384; color: #1a1208; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  margin-top: 2.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  opacity: 0;
  transition: opacity 1s var(--ease) 0.85s;
}
.loaded .hero-meta { opacity: 1; }
.hero-meta div { display: grid; gap: 0.2rem; }
.hero-meta dt {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-meta dd { margin: 0; font-size: 0.9rem; color: var(--text-2); }

/* terminal */
.terminal {
  position: relative;
  isolation: isolate;
  padding: 11px 11px 0;
  border: 0;
  border-radius: 10px;
  background-color: #b0a387;
  background-image:
    radial-gradient(circle at 12px 12px, #4a4131 0 1.6px, #877c62 1.6px 2.8px, transparent 2.8px),
    radial-gradient(circle at calc(100% - 12px) 12px, #4a4131 0 1.6px, #877c62 1.6px 2.8px, transparent 2.8px),
    radial-gradient(circle at 12px calc(100% - 40px), #4a4131 0 1.6px, #877c62 1.6px 2.8px, transparent 2.8px),
    radial-gradient(circle at calc(100% - 12px) calc(100% - 40px), #4a4131 0 1.6px, #877c62 1.6px 2.8px, transparent 2.8px),
    radial-gradient(140% 100% at 18% -20%, rgba(255, 255, 255, 0.48), transparent 56%),
    radial-gradient(90% 120% at 100% 108%, rgba(58, 44, 22, 0.3), transparent 62%),
    linear-gradient(180deg, #cdc0a4, #b9ac90 48%, #9c8f76);
  box-shadow:
    0 0 0 1px rgba(30, 24, 12, 0.72),
    0 44px 80px -52px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -3px 8px rgba(48, 36, 16, 0.3);
  opacity: 0;
  transform: translateY(16px) scale(0.99);
  transition: opacity 1s var(--ease) 0.3s, transform 1s var(--ease-out) 0.3s;
}
.loaded .terminal { opacity: 1; transform: none; }
.terminal::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.13;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes scan {
  from { background-position: 0 -120%; }
  to { background-position: 0 120%; }
}
.terminal-grip {
  position: relative;
  z-index: 2;
  display: block;
  height: 22px;
  margin: 0 -11px;
  border-radius: 0 0 10px 10px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 7px),
    linear-gradient(180deg, #35322b, #1a1813 68%, #0e0d0a);
  box-shadow:
    inset 0 2px 3px rgba(0, 0, 0, 0.7),
    inset 0 -1px 0 rgba(255, 255, 255, 0.07),
    0 -1px 0 rgba(48, 36, 16, 0.5);
}
.terminal-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.1rem 0.35rem 0.62rem;
  border-bottom: 0;
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #5b4e37;
}
.terminal-head b { color: #9c3418; font-weight: 500; text-shadow: 0 0 7px rgba(190, 72, 34, 0.45); }
.terminal-body {
  position: relative;
  z-index: 1;
  padding: 1.2rem 1.25rem 1.3rem;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: clamp(0.68rem, 1vw, 0.8rem);
  line-height: 1.95;
  min-height: 11.5rem;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.05) 0%, transparent 30%),
    radial-gradient(130% 100% at 50% 0%, #131d17 0%, #080d09 56%, #040604 100%);
  box-shadow:
    0 0 0 1px #070604,
    0 0 0 6px #1a1611,
    0 0 0 7px rgba(0, 0, 0, 0.55),
    inset 0 0 46px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.terminal-body::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(240, 167, 94, 0.06) 48%, transparent 55%);
  background-size: 100% 240%;
  animation: scan 8s linear infinite;
}
.terminal-body::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.5) 0 1px, transparent 1px 3px);
  opacity: 0.26;
}
.term-line {
  display: flex;
  gap: 0.65rem;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.term-line.on { opacity: 1; transform: none; }
.term-line .ok { color: var(--accent); flex: none; }
.term-line .k { color: var(--muted); }
.term-line .v { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; }
.term-line.cmd .v { color: var(--text); }
.caret {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  margin-left: 0.1em;
  background: var(--accent);
  vertical-align: -0.16em;
  animation: blink 1.15s steps(1) infinite;
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* ---------- ignition panel ---------- */
.terminal-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 -2px;
  padding: 1.05rem 0.4rem 0.95rem;
  border-top: 0;
  background: transparent;
}
.terminal-foot::before {
  content: "";
  position: absolute;
  left: 0.4rem;
  right: 0.4rem;
  top: 0.1rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(50, 38, 18, 0.45) 10%, rgba(50, 38, 18, 0.45) 90%, transparent);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}
.foot-note {
  font-family: var(--mono);
  font-size: 0.44rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(148, 138, 120, 0.6);
  padding-bottom: 2px;
}
.ignition {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ignition-plate {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 202px;
  height: 100px;
  padding: 12px 14px;
  border-radius: 4px;
  background-color: #8d8269;
  background-image:
    radial-gradient(circle at 7px 7px, #3d3527 0 1.7px, #6f6551 1.7px 3px, transparent 3px),
    radial-gradient(circle at calc(100% - 7px) 7px, #3d3527 0 1.7px, #6f6551 1.7px 3px, transparent 3px),
    radial-gradient(circle at 7px calc(100% - 7px), #3d3527 0 1.7px, #6f6551 1.7px 3px, transparent 3px),
    radial-gradient(circle at calc(100% - 7px) calc(100% - 7px), #3d3527 0 1.7px, #6f6551 1.7px 3px, transparent 3px),
    linear-gradient(180deg, #9b9077, #8a7f67 48%, #776d57);
  border: 1px solid rgba(40, 31, 16, 0.55);
  box-shadow:
    inset 0 2px 7px rgba(0, 0, 0, 0.5),
    inset 0 -1px 0 rgba(255, 255, 255, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.45);
}
.ignition-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 58px;
}
.ignition-tag {
  font-family: var(--mono);
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #e3d7bd;
  transition: color 0.4s var(--ease);
}
.ignition-leds { display: flex; gap: 4px; }
.ignition-leds i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #5c5342;
  box-shadow: inset 0 0 0 1px rgba(30, 24, 12, 0.6);
  transition: background 0.35s var(--ease), box-shadow 0.5s var(--ease);
}
.ignition-serial {
  font-family: var(--mono);
  font-size: 0.42rem;
  letter-spacing: 0.1em;
  color: #b0a487;
}
.ignition-knob {
  position: relative;
  flex: none;
  width: 68px;
  height: 68px;
  margin-left: auto;
  border-radius: 50%;
  cursor: grab;
  touch-action: none;
  transform: rotate(-42deg);
  transition: transform 0.55s cubic-bezier(0.2, 1.3, 0.35, 1), box-shadow 0.5s var(--ease);
  background: radial-gradient(circle at 36% 26%, #d25a4c 0%, #ab3428 46%, #611913 100%);
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.32),
    inset 0 -8px 15px rgba(0, 0, 0, 0.62),
    0 7px 14px rgba(0, 0, 0, 0.68),
    0 0 0 3px #2a2119,
    0 0 0 4px rgba(0, 0, 0, 0.5),
    0 0 0 8px #9a8f76,
    0 0 0 9px rgba(40, 31, 16, 0.45);
}
.ignition-knob::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(0, 0, 0, 0.4) 0deg 3deg, rgba(255, 255, 255, 0.07) 3deg 6deg);
  -webkit-mask-image: radial-gradient(circle, transparent 62%, #000 64%);
  mask-image: radial-gradient(circle, transparent 62%, #000 64%);
  opacity: 0.6;
}
.ignition-knob:hover { filter: brightness(1.08); }
.ignition-knob.is-turning { transition: none; cursor: grabbing; }
.ignition-knob:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 50%; }
.knob-grip {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 28%, rgba(255, 255, 255, 0.2), transparent 62%);
}
.knob-pointer {
  position: absolute;
  left: 50%;
  top: 6px;
  width: 2px;
  height: 14px;
  margin-left: -1px;
  border-radius: 1px;
  background: #f6ead6;
  box-shadow: 0 0 6px rgba(255, 226, 188, 0.45);
}
.ignition-hint {
  font-family: var(--mono);
  font-size: 0.52rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #5d5138;
  white-space: nowrap;
  transition: color 0.4s var(--ease);
}
.ignited .ignition-knob {
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.32),
    inset 0 -8px 15px rgba(0, 0, 0, 0.62),
    0 7px 14px rgba(0, 0, 0, 0.68),
    0 0 0 3px #2a2119,
    0 0 0 4px rgba(0, 0, 0, 0.5),
    0 0 0 8px #9a8f76,
    0 0 0 9px rgba(40, 31, 16, 0.45),
    0 0 26px rgba(226, 100, 79, 0.45);
}
.ignited .ignition-leds i { background: #2f7a3d; box-shadow: 0 0 8px rgba(51, 255, 119, 0.75), 0 0 16px rgba(51, 255, 119, 0.35); }
.ignited .ignition-leds i:nth-child(2) { transition-delay: 0.12s; }
.ignited .ignition-leds i:nth-child(3) { transition-delay: 0.24s; }
.ignited .ignition-tag { color: #ffcf9a; }
.ignited .ignition-hint { color: #7d3a10; }
.surge {
  position: fixed;
  inset: 0;
  z-index: 58;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(240, 167, 94, 0.16) 50%, transparent 80%);
}
.ignited .surge { animation: surge 1.15s var(--ease) 0.05s; }
@keyframes surge {
  0% { opacity: 0; transform: scaleY(0.6); }
  18% { opacity: 1; transform: scaleY(1); }
  100% { opacity: 0; transform: scaleY(1); }
}
.ignited .cable-charge { opacity: 0.95; transition: opacity 0.6s var(--ease); }

/* ---------- sections ---------- */
.section {
  position: relative;
  z-index: 1;
  padding-block: clamp(4rem, 9vh, 7rem);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: var(--nav-h);
}
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 1.5rem 3rem;
  align-items: end;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}
.section-head h2 {
  font-family: var(--display);
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-top: 1rem;
}
.section-head p { color: var(--muted); max-width: 42ch; font-size: 1.02rem; line-height: 1.55; }
.section-head .head-aside { justify-self: end; text-align: right; }

/* ---------- work ---------- */
.rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1rem;
}
.rail-hint {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  /* brighter than --muted: this line sits on the floor of the dark room */
  color: #b3a892;
}
.rail-nav { display: flex; gap: 0.4rem; flex: none; }
.rail-nav button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--text-2);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), opacity 0.3s;
}
.rail-nav button:hover:not(:disabled) { border-color: var(--accent-dim); color: var(--accent); }
.rail-nav button:disabled { opacity: 0.3; cursor: default; }
.rail {
  display: flex;
  gap: clamp(0.75rem, 1.5vw, 1.15rem);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 2px 2px 1.1rem;
  margin-inline: -2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.rail-track {
  position: relative;
  height: 1px;
  background: var(--line);
  overflow: hidden;
  margin-top: 0.3rem;
}
.rail-track span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 28%;
  background: var(--accent);
  transform: translateX(0);
  transition: transform 0.2s linear;
}
.card {
  position: relative;
  flex: 0 0 min(560px, 100%);
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.014);
  transition: border-color 0.5s var(--ease), background 0.5s var(--ease), transform 0.5s var(--ease);
  cursor: pointer;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease);
  z-index: 2;
}
.card:hover {
  border-color: rgba(240, 167, 94, 0.32);
  background: rgba(240, 167, 94, 0.028);
  transform: translateY(-4px);
  box-shadow: 0 30px 70px -50px rgba(0, 0, 0, 0.95);
}
.card:hover::before { transform: scaleX(1); }
.card-media {
  position: relative;
  overflow: hidden;
  background: #0d0b08;
  aspect-ratio: 4 / 3;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 1.1s var(--ease-out), filter 0.6s var(--ease);
  filter: saturate(0.92) contrast(1.02);
}
.card:hover .card-media img { transform: scale(1.05); filter: saturate(1.02) contrast(1.04); }
.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(6, 9, 10, 0.72));
  pointer-events: none;
}
.card-index {
  position: absolute;
  top: 0.85rem;
  left: 0.9rem;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  color: var(--text-2);
  background: rgba(6, 9, 10, 0.72);
  border: 1px solid var(--line);
  padding: 0.2rem 0.45rem;
  backdrop-filter: blur(6px);
}
.card-body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.05rem 1.15rem 1.2rem;
  border-top: 1px solid var(--line);
}
.card h3 {
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}
.card p { font-size: 0.86rem; color: var(--muted); max-width: 42ch; }
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  margin-top: 0.65rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-dim);
}
.card-tags span { color: var(--muted); }
.card-go {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.card:hover .card-go { color: var(--accent); border-color: var(--accent-dim); transform: translate(2px, -2px); }

/* ---------- lightbox ---------- */
dialog.lightbox {
  width: min(1180px, 94vw);
  max-height: 92vh;
  padding: 0;
  border: 1px solid var(--line-2);
  background: #060a0b;
  color: var(--text);
  overflow: hidden;
}
dialog.lightbox::backdrop {
  background: rgba(3, 5, 6, 0.9);
  backdrop-filter: blur(10px);
}
.lb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.lb-bar b { color: var(--text); font-weight: 500; }
.lb-close {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--text-2);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.lb-close:hover { color: var(--accent); border-color: var(--accent-dim); }
.lb-stage {
  position: relative;
  display: grid;
  place-items: center;
  background: #030607;
  min-height: 30vh;
}
.lb-stage img {
  max-height: 72vh;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 54px;
  display: grid;
  place-items: center;
  background: rgba(6, 10, 11, 0.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  color: var(--text-2);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s;
}
.lb-nav:hover { color: var(--accent); border-color: var(--accent-dim); }
.lb-nav.prev { left: 0.75rem; }
.lb-nav.next { right: 0.75rem; }
.lb-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.lb-foot a { color: var(--accent-dim); }
.lb-foot a:hover { color: var(--accent); }

/* ---------- tailref ---------- */
.product {
  display: block;
}
.product-side {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) minmax(0, 300px);
  grid-template-areas:
    "chip specs cta"
    "chip specs note";
  align-items: start;
  gap: 0.9rem 2.2rem;
  margin-top: 1.8rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.product-side .chip { grid-area: chip; justify-self: start; }
.product-side .specs { grid-area: specs; }
.product-side .btn { grid-area: cta; justify-self: stretch; text-align: center; }
.product-side .side-note { grid-area: note; }
.app-frame {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #0b1112, #070b0c);
  box-shadow:
    0 60px 130px -70px rgba(240, 167, 94, 0.4),
    0 40px 90px -60px rgba(0, 0, 0, 0.95);
}
.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.app-dots { display: flex; gap: 0.3rem; }
.app-dots i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #1e2a28;
}
.app-dots i:first-child { background: var(--accent-dim); }
.app-title { color: var(--text-2); }
.app-ver { color: var(--accent-dim); display: inline-flex; align-items: center; gap: 0.45rem; }
.app-led {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(240, 167, 94, 0.18);
  transition: background 0.4s var(--ease), box-shadow 0.6s var(--ease);
}
.app-frame.is-powered .app-led { background: var(--accent); box-shadow: 0 0 10px var(--accent), 0 0 22px rgba(240, 167, 94, 0.5); }
.app-frame.is-powered { box-shadow: 0 60px 130px -70px rgba(240, 167, 94, 0.55), 0 40px 90px -60px rgba(0, 0, 0, 0.95); }
.app-body { position: relative; line-height: 0; }
.app-body img { width: 100%; height: auto; }
.app-body::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.app-foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.85rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.specs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 1.8rem;
  border-top: 0;
  margin: 0;
}
.specs div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.68rem 0;
  border-bottom: 1px solid var(--line);
}
.specs dt {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.specs dd { margin: 0; font-size: 0.92rem; color: var(--text); }
.side-note { font-size: 0.8rem; line-height: 1.7; color: var(--muted); }
/* ---------- notes ---------- */
.notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--line);
  border: 1px solid var(--line);
}
.notes li {
  background: var(--bg);
  padding: 1.25rem 1.3rem 1.4rem;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
}
.notes .n {
  display: block;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  color: var(--accent-dim);
  margin-bottom: 0.55rem;
}
.notes code { color: var(--text-2); }

/* ---------- panels ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.panel {
  position: relative;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.014);
  overflow: hidden;
}
.panel img { width: 100%; height: auto; opacity: 0.95; }
.panel-caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.9rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.feature-list { border-top: 1px solid var(--line); margin-top: 1.5rem; }
.feature-list li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--line);
}
.feature-list .n {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--accent-dim);
  padding-top: 0.2rem;
}
.feature-list h3 {
  font-family: var(--display);
  font-size: 1rem;
  margin-bottom: 0.2rem;
}
.feature-list p { font-size: 0.87rem; color: var(--muted); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--accent-dim);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.chip::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.6s ease-in-out infinite;
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
}
.prose p { color: var(--text-2); margin-bottom: 1.15rem; max-width: 54ch; font-size: 1.1rem; line-height: 1.68; }
.prose p strong { color: var(--text); font-weight: 500; }
.facts {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}
.facts div {
  display: grid;
  grid-template-columns: 10.5rem minmax(0, 1fr);
  gap: 1.2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.facts dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.18rem;
}
.facts dd { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--text); }

/* about: one centred column, no side card */
#about .section-head {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  text-align: center;
}
#about .prose { max-width: 68ch; text-align: center; }
#about .prose p { margin-inline: auto; }
#about .facts {
  width: 100%;
  max-width: 620px;
  margin: 2.25rem auto 0;
  text-align: left;
}

/* ---------- contact ---------- */
.contact {
  border-bottom: 0;
  padding-bottom: clamp(3rem, 6vh, 5rem);
}
.contact h2 {
  font-family: var(--display);
  font-size: clamp(2.1rem, 6vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  max-width: 18ch;
  margin-top: 1.2rem;
}
.contact h2 em { font-style: normal; color: var(--accent); }
.contact p { color: var(--muted); max-width: 52ch; margin-top: 1.2rem; }

/* contact opener is centred, the link index below stays full width */
.contact .label { justify-content: center; text-align: center; }
.contact h2 { margin-inline: auto; text-align: center; }
.contact > .wrap > p { margin-inline: auto; text-align: center; }
/* ---------- footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding-block: 1.6rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer a { color: var(--text-2); }
.footer a:hover { color: var(--accent); }

/* ---------- reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 85ms);
}
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2.75rem; }
  .terminal { max-width: 560px; }
  .section-head { grid-template-columns: minmax(0, 1fr); }
  .section-head .head-aside { justify-self: start; text-align: left; }
  .about-grid, .split, .product { grid-template-columns: minmax(0, 1fr); }
  .dossier { position: static; order: -1; }
  .product-side {
    max-width: none;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "chip"
      "specs"
      "cta"
      "note";
    gap: 1.15rem;
    margin-top: 1.4rem;
  }
  .product-side .btn { justify-self: start; padding-inline: 1.5rem; }
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --nav-h: 60px; }
  .nav-inner { gap: 0.75rem; }
  .brand { font-size: 0.64rem; letter-spacing: 0.14em; }
  .brand small { display: none; }
  .nav-cta { display: none; }
  .nav-links {
    display: flex;
    gap: 0.85rem;
    margin-left: auto;
    padding-block: 0.15rem;
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { padding-block: 0.55rem; }
  .card { flex: 0 0 min(560px, 100%); }
  .rail-hint { display: none; }
  .card-media { aspect-ratio: 16 / 10; }
  body::after { opacity: 0.05; }
}
@media (max-width: 620px) {
  html, body { overflow-x: clip; }
  .ship { overflow: hidden; }
  body { font-size: 16px; }
  .nav-links { gap: 0.7rem; font-size: 0.6rem; letter-spacing: 0.08em; }
  .nav-links a { padding-block: 0.75rem; }
  .section { padding-block: 3.4rem; }
  .hero { padding-top: calc(var(--nav-h) + 2rem); padding-bottom: 2.6rem; min-height: 0; }
  .hero-grid { gap: 2.1rem; }
  .hero-eyebrow { margin-bottom: 1.1rem; font-size: 0.64rem; letter-spacing: 0.14em; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; margin-top: 1.7rem; }
  .hero-actions .btn {
    justify-content: center;
    padding: 0.8rem 0.5rem;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    white-space: nowrap;
  }
  .hero-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.4rem;
    margin-top: 1.9rem;
  }
  .hero-meta div:first-child { grid-column: 1 / -1; }
  .terminal { padding: 9px 9px 0; }
  .terminal-body { min-height: 0; padding: 1rem 0.9rem 1.1rem; font-size: 0.66rem; line-height: 1.85; overflow: hidden; }
  .screen-spill { display: none; }
  .terminal-foot { flex-wrap: wrap; justify-content: center; gap: 0.9rem; padding: 0.9rem 0.2rem 0.8rem; }
  dialog.lightbox { width: 100vw; max-height: 100vh; }
  .specs { grid-template-columns: minmax(0, 1fr); }
  .lb-nav { width: 32px; height: 46px; }
  .notes { grid-template-columns: minmax(0, 1fr); }
  .facts div { grid-template-columns: 1fr; gap: 0.2rem; }
  .ignition-plate { width: 152px; height: 74px; padding: 9px 11px; gap: 10px; }
  .ignition-knob { width: 48px; height: 48px; }
  .knob-pointer { top: 5px; height: 11px; }
  .ignition-meta { min-width: 46px; gap: 4px; }
  .ignition-hint { font-size: 0.46rem; letter-spacing: 0.14em; }
  .foot-note { display: none; }
  .term-line { white-space: normal; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- motion preferences ---------- */
/* ---------- the disc drive ---------- */
.terminal-deck {
  --cd: 198px;
  --slot-y: 58px;
  position: relative;
  width: 258px;
  height: 96px;
  flex: none;
  margin-bottom: 4px;
  border-radius: 5px;
  box-shadow: 0 8px 18px -14px rgba(0, 0, 0, 0.9);
}

/* the dark throat behind the slot */
.deck-well {
  position: absolute;
  left: 2px;
  right: 2px;
  top: calc(var(--slot-y) - 1px);
  height: 13px;
  z-index: 1;
  border-radius: 2px;
  background: linear-gradient(180deg, #12130d, #040503 72%);
  box-shadow:
    inset 0 3px 5px rgba(0, 0, 0, 0.95),
    inset 0 -2px 4px rgba(0, 0, 0, 0.8);
}

.deck-face {
  position: absolute;
  left: 0;
  right: 0;
  background-color: #8d8269;
  background-image:
    radial-gradient(circle at 7px 7px, #3d3527 0 1.4px, #6a614e 1.4px 2.7px, transparent 2.7px),
    radial-gradient(circle at calc(100% - 7px) 7px, #3d3527 0 1.4px, #6a614e 1.4px 2.7px, transparent 2.7px),
    radial-gradient(120% 100% at 20% -30%, rgba(255, 255, 255, 0.34), transparent 58%),
    linear-gradient(180deg, #9d9278, #8f846b 46%, #7c725b);
  border: 1px solid rgba(40, 31, 16, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.deck-face--top {
  top: 0;
  height: calc(var(--slot-y) - 1px);
  border-radius: 5px 5px 0 0;
  z-index: 2;
}
.deck-face--bot {
  top: calc(var(--slot-y) + 12px);
  bottom: 0;
  border-top: 0;
  border-radius: 0 0 5px 5px;
  z-index: 4;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -3px 8px rgba(48, 36, 16, 0.22);
}
.deck-face--bot::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(50, 38, 18, 0.4) 12%, rgba(50, 38, 18, 0.4) 88%, transparent);
}

/* the chrome lips of the slot */
.deck-slot {
  position: absolute;
  left: 6px;
  right: 6px;
  top: calc(var(--slot-y) - 1px);
  height: 13px;
  z-index: 7;
  border-radius: 2px;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(255, 252, 236, 0.4) 0,
    rgba(255, 252, 236, 0.06) 2px,
    rgba(0, 0, 0, 0) 4px,
    rgba(0, 0, 0, 0) 10px,
    rgba(30, 24, 12, 0.45) 11px,
    rgba(255, 252, 236, 0.16) 12px);
}

/* the disc hangs out of the deck slot, on its way down */
.cd-stage {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--slot-y) + 2px);
  height: calc(var(--cd) * 0.52);
  overflow: hidden;
  pointer-events: none;
  /* the disc hangs in front of the drive plate: the eject key and the LEDs
     are painted on the plate, so they stay under it */
  z-index: 6;
}

/* ------------------------------------------------ the disc */
.cd-disc {
  position: relative;
  display: block;
  width: var(--cd);
  height: var(--cd);
  border-radius: 50%;
}
.cd-stage > .cd-disc {
  position: absolute;
  left: 50%;
  top: calc(var(--cd) * -0.48);
  margin-left: calc(var(--cd) / -2);
  z-index: 3;
  transform: none;
  filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.62));
}
/* the hand-over between the parked disc and the flying one is pixel exact,
   so it must be instant: a fade would read as a blink */
.cd-disc.is-taken { opacity: 0; }

.cd-silver {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    conic-gradient(from 208deg,
      #cdc7b8 0%, #b6b0a1 7%, #e8e2d4 19%, #ada697 32%,
      #dcd6c7 46%, #a49d8e 60%, #e4ddcd 74%, #b2ab9c 88%, #cdc7b8 100%);
  box-shadow:
    inset 0 0 0 1px rgba(74, 68, 54, 0.4),
    inset 0 0 7px rgba(0, 0, 0, 0.35);
}

/* the paper label somebody stuck on and wrote */
.cd-paper {
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  overflow: hidden;
  transform: rotate(2.4deg);
  background:
    radial-gradient(70% 70% at 34% 22%, rgba(255, 255, 255, 0.5), transparent 66%),
    linear-gradient(168deg, #f2e9d2 0%, #ebe1c8 52%, #ded2b5 100%);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.4),
    inset 0 0 9px rgba(126, 106, 68, 0.22);
}
.cd-paper::after {
  content: "";
  position: absolute;
  left: 66%;
  right: 8%;
  top: 12%;
  bottom: 12%;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, rgba(150, 128, 88, 0.12));
}

.cd-write {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  font-family: var(--mono);
  font-size: 0.66rem;
  line-height: 1;
  letter-spacing: 0.02em;
  text-align: center;
  color: #313c63;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}
.cd-write--a { top: 56%; transform: rotate(-2.4deg); }
.cd-write--b { top: 67%; transform: rotate(-1.4deg); }
.cd-write--c {
  top: 78%;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  transform: rotate(-1.6deg);
  opacity: 0.94;
}
.cd-write--c::after {
  content: "";
  position: absolute;
  left: 27%;
  right: 27%;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
  transform: rotate(-1.6deg);
}

.cd-hole {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 44%, #1d1a12 0 58%, #4a4335 100%);
  box-shadow:
    inset 0 0 0 5px #cfc8b7,
    inset 0 0 0 6.5px rgba(90, 84, 70, 0.5),
    0 0 0 1px rgba(80, 74, 60, 0.35);
}

/* printed marks on the drive face */
.deck-print {
  position: absolute;
  left: 10px;
  top: 8px;
  z-index: 5;
  font-family: var(--mono);
  font-size: 0.38rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(52, 43, 26, 0.62);
}
.deck-led {
  position: absolute;
  right: 10px;
  top: 9px;
  z-index: 5;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffcf96;
  box-shadow:
    0 0 5px 1.5px rgba(255, 150, 64, 0.55),
    0 0 12px 4px rgba(255, 128, 40, 0.2);
  animation: io-pulse 5.5s ease-in-out infinite;
}
@keyframes io-pulse {
  0%, 100% { opacity: 0.55; }
  46% { opacity: 1; }
}
.deck-count {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 5;
  font-family: var(--mono);
  font-size: 0.42rem;
  letter-spacing: 0.12em;
  color: #453a25;
}
.deck-count b { color: #23201a; font-weight: 500; }
.deck-eject {
  position: absolute;
  left: 9px;
  bottom: 7px;
  z-index: 5;
  width: 32px;
  height: 11px;
  border-radius: 2px;
  background: linear-gradient(180deg, #6e6451, #564d3d 62%, #443c2e);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -1px 2px rgba(0, 0, 0, 0.5);
}
.deck-eject i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 5px;
  margin-left: -3.5px;
  border-bottom: 4px solid #ded4b8;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  transform: translateY(-3px);
}
.deck-eject i::after {
  content: "";
  position: absolute;
  left: -3.5px;
  right: -3.5px;
  bottom: -7px;
  height: 1px;
  background: #ded4b8;
  opacity: 0.85;
}

/* the disc in flight */
.cd-fly {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 90;
  width: var(--cd, 84px);
  height: var(--cd, 84px);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  will-change: transform, clip-path;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.6));
}
.cd-fly.is-live { opacity: 1; visibility: visible; }
.cd-fly .cd-disc {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

@media (max-width: 1080px) {
  .terminal-deck { --cd: 168px; width: 228px; height: 88px; --slot-y: 54px; }
}
@media (max-width: 620px) {
  .terminal-deck { --cd: 132px; width: 100%; max-width: 212px; height: 80px; --slot-y: 50px; }
  .deck-print { font-size: 0.34rem; letter-spacing: 0.16em; }
  .cd-write { font-size: 0.46rem; }
  .cd-write--c { font-size: 0.52rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .line > span, .hero-lead, .hero-actions, .hero-meta, .h1-alias, .terminal { opacity: 1 !important; transform: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .ambience::before, .terminal::after { display: none; }
}

/* ---------- print ---------- */
@media print {
  .site-nav, .ambience, .marquee, .footer, .hero-actions { display: none !important; }
  body { background: #fff; color: #111; }
  .card, .panel, .terminal { border-color: #ccc; }
}
