/* =========================================================
   Ahsan Tariq portfolio
   Palette: dusk blue (trust, calm) + neon orange (energy, action)
   Type: Unbounded (display), Instrument Sans (text), JetBrains Mono (code)
   ========================================================= */

@font-face {
  font-family: "Unbounded";
  src: url("/assets/fonts/unbounded.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  /* Base: a dusk blue, between dark and light */
  --bg-1: #2e4b77;
  --bg-2: #37598a;
  --bg-deep: #284470;
  --panel: rgba(255, 255, 255, 0.065);
  --panel-2: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.28);

  --ink: #f5f8fc;
  --ink-2: #d3def0;
  --ink-3: #aec0dc;

  /* Neon */
  --orange: #ff8a1f;
  --orange-hot: #ffb067;
  --orange-core: #ffe7cc;
  --on-orange: #1a2a47;
  --cyan: #67e4ff;
  --mint: #5ef0b2;
  --red: #ff7a7a;

  --glow-orange: 0 0 6px rgba(255, 138, 31, 0.85), 0 0 18px rgba(255, 138, 31, 0.5), 0 0 42px rgba(255, 138, 31, 0.28);
  --glow-orange-soft: 0 0 0 1px rgba(255, 138, 31, 0.55), 0 0 24px rgba(255, 138, 31, 0.28);
  --shadow-deep: 0 24px 60px -24px rgba(10, 20, 45, 0.65);

  --font-display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --font-text: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;

  --container: 1200px;
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px + env(safe-area-inset-top, 0px));
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.62;
  color: var(--ink);
  background: var(--bg-1);
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

:focus-visible {
  outline: 2px solid var(--orange-hot);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--orange); color: var(--on-orange);
  padding: 10px 16px; border-radius: var(--radius-s); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: min(var(--container), 100% - 2 * clamp(18px, 4vw, 40px));
  margin-inline: auto;
}

/* ---------- Ambient layers ---------- */
html { background: var(--bg-1); }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(255, 138, 31, 0.16), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(103, 228, 255, 0.1), transparent 60%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 55%, #33548a 100%);
}
.grid-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 85%);
}
.spotlight {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -20%), rgba(255, 138, 31, 0.1), transparent 70%);
  transition: opacity 0.4s;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}
.site-header.is-scrolled {
  background: rgba(40, 68, 112, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--line), 0 10px 30px -20px rgba(0, 0, 0, 0.5);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.02em;
  color: var(--orange-core);
  border: 1.5px solid var(--orange);
  box-shadow: var(--glow-orange-soft), inset 0 0 12px rgba(255, 138, 31, 0.35);
  text-shadow: 0 0 8px rgba(255, 138, 31, 0.9);
}
.brand-name { font-family: var(--font-display); font-weight: 500; font-size: 0.95rem; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  text-decoration: none; font-weight: 500; font-size: 0.96rem;
  padding: 8px 14px; border-radius: 999px; color: var(--ink-2);
  transition: color 0.2s, background 0.2s;
}
.main-nav a:hover { color: var(--ink); background: var(--panel); }
.main-nav a.is-current { color: var(--ink); background: var(--panel-2); }
.main-nav .nav-cta {
  margin-left: 8px; color: var(--on-orange); background: var(--orange); font-weight: 700;
  box-shadow: 0 0 18px rgba(255, 138, 31, 0.45);
}
.main-nav .nav-cta:hover { color: var(--on-orange); background: var(--orange-hot); }

.menu-toggle {
  display: none; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--panel);
  position: relative; cursor: pointer;
}
.menu-toggle span {
  position: absolute; left: 12px; right: 12px; height: 2px; background: var(--ink);
  border-radius: 2px; transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}
.menu-toggle span:first-child { top: 17px; }
.menu-toggle span:last-child { top: 25px; }
.menu-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

.scroll-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; }
.scroll-progress span {
  display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--orange), var(--orange-hot));
  box-shadow: 0 0 10px rgba(255, 138, 31, 0.8);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s, border-color 0.25s;
}
.btn-primary {
  background: var(--orange); color: var(--on-orange);
  box-shadow: 0 0 0 0 rgba(255, 138, 31, 0), 0 0 22px rgba(255, 138, 31, 0.45);
}
.btn-primary:hover { transform: translateY(-2px); background: var(--orange-hot); box-shadow: 0 0 34px rgba(255, 138, 31, 0.7); }
.btn-ghost { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.04); color: var(--ink); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--orange); box-shadow: var(--glow-orange-soft); }
.btn-small { min-height: 42px; padding: 9px 18px; font-size: 0.95rem; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.text-link {
  display: inline-block; margin-top: 22px; font-weight: 700; color: var(--orange-hot);
  text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px;
}
.text-link:hover { text-shadow: 0 0 12px rgba(255, 138, 31, 0.7); }

.pill {
  display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px;
  font-size: 0.85rem; font-weight: 600; color: var(--cyan);
  border: 1px solid rgba(103, 228, 255, 0.45); background: rgba(103, 228, 255, 0.08);
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(76px, 10vw, 132px); position: relative; }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2,
.why-head h2,
.method-head h2,
.code-copy h2,
.calc-intro h2,
.contact-copy h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.75rem, 3.4vw, 2.75rem); letter-spacing: -0.015em;
}
.section-lead { margin-top: 16px; font-size: 1.12rem; color: var(--ink-2); max-width: 64ch; }
.kicker {
  font-weight: 600; font-size: 0.95rem; color: var(--orange-hot); margin-bottom: 12px;
  display: inline-flex; align-items: center; gap: 10px;
}
.kicker::before {
  content: ""; width: 28px; height: 2px; background: var(--orange); border-radius: 2px;
  box-shadow: 0 0 10px rgba(255, 138, 31, 0.9);
}
.head-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 22px; }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero {
  padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + clamp(36px, 6vw, 80px));
  padding-bottom: clamp(40px, 6vw, 72px);
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 5vw, 72px); align-items: center;
}

.status-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px; border-radius: 999px; font-size: 0.92rem; font-weight: 500; color: var(--ink-2);
  background: var(--panel); border: 1px solid var(--line);
}
.live-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--mint); flex: none;
  box-shadow: 0 0 0 0 rgba(94, 240, 178, 0.7);
  animation: livePulse 2.2s infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(94, 240, 178, 0.65); }
  70% { box-shadow: 0 0 0 9px rgba(94, 240, 178, 0); }
  100% { box-shadow: 0 0 0 0 rgba(94, 240, 178, 0); }
}

/* The neon sign: the single loud element on the page */
.neon-sign {
  margin-top: 26px;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.5rem, 6.2vw, 4.9rem); line-height: 1.02; letter-spacing: -0.02em;
  color: var(--orange-core);
  text-shadow:
    0 0 4px rgba(255, 231, 204, 0.9),
    0 0 12px rgba(255, 138, 31, 0.95),
    0 0 28px rgba(255, 138, 31, 0.7),
    0 0 60px rgba(255, 138, 31, 0.45),
    0 0 110px rgba(255, 138, 31, 0.25);
  animation: neonOn 2.4s steps(1, end) 0.2s both, neonBreath 5s ease-in-out 3s infinite;
}
@keyframes neonOn {
  0% { opacity: 0.08; text-shadow: none; }
  8% { opacity: 1; }
  10% { opacity: 0.2; text-shadow: none; }
  16% { opacity: 1; }
  19% { opacity: 0.35; text-shadow: none; }
  24% { opacity: 1; }
  100% { opacity: 1; }
}
@keyframes neonBreath {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.12); }
}

.hero-role {
  margin-top: 18px; font-family: var(--font-display); font-weight: 400;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem); color: var(--cyan); letter-spacing: 0.01em;
  text-shadow: 0 0 14px rgba(103, 228, 255, 0.45);
}
.hero-lead {
  margin-top: 26px; font-size: clamp(1.45rem, 2.6vw, 2rem); font-weight: 600; line-height: 1.25;
  max-width: 24ch;
}
.neon-sign { white-space: nowrap; }
.hero-sub { margin-top: 16px; color: var(--ink-2); max-width: 58ch; font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.hero-proof {
  list-style: none; margin-top: 40px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--line);
}
.hero-proof li { padding: 18px 18px 0 0; }
.hero-proof li + li { padding-left: 18px; border-left: 1px solid var(--line); }
.hero-proof strong {
  display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem;
  color: var(--orange-hot); white-space: nowrap;
}
.hero-proof span:not(.count) { display: block; margin-top: 6px; font-size: 0.9rem; color: var(--ink-3); line-height: 1.45; }

/* Portrait */
.hero-visual { position: relative; display: grid; place-items: center; }
.circuit { position: absolute; inset: -6% -10%; width: 120%; height: 112%; z-index: 0; overflow: visible; }
.circuit-lines path { fill: none; stroke: rgba(255, 255, 255, 0.16); stroke-width: 1.5; }
.circuit-pulses path {
  fill: none; stroke: var(--orange); stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 26 400; stroke-dashoffset: 0;
  filter: drop-shadow(0 0 6px rgba(255, 138, 31, 0.9));
  animation: tracePulse 3.6s linear infinite;
}
.circuit-pulses path:nth-child(2) { animation-delay: -1.1s; stroke: var(--cyan); filter: drop-shadow(0 0 6px rgba(103, 228, 255, 0.9)); }
.circuit-pulses path:nth-child(3) { animation-delay: -2.2s; }
.circuit-pulses path:nth-child(4) { animation-delay: -0.6s; stroke: var(--cyan); filter: drop-shadow(0 0 6px rgba(103, 228, 255, 0.9)); }
@keyframes tracePulse { to { stroke-dashoffset: -426; } }
.circuit-nodes circle { fill: var(--bg-1); stroke: var(--orange); stroke-width: 2; filter: drop-shadow(0 0 5px rgba(255, 138, 31, 0.8)); }

.portrait { position: relative; z-index: 1; margin: 0; width: min(400px, 100%); }
.portrait-frame {
  position: relative; border-radius: 28px; padding: 3px;
  background: conic-gradient(from var(--angle, 0deg), var(--orange), rgba(255, 138, 31, 0.1) 25%, var(--cyan) 50%, rgba(103, 228, 255, 0.1) 75%, var(--orange));
  box-shadow: 0 0 40px rgba(255, 138, 31, 0.35), var(--shadow-deep);
  animation: spinBorder 8s linear infinite;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.4s var(--ease);
}
@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spinBorder { to { --angle: 360deg; } }
.portrait-frame img {
  border-radius: 25px; aspect-ratio: 4 / 5; width: 100%; object-fit: cover; object-position: 55% 40%;
}
.float-chip {
  position: absolute; display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 14px; font-size: 0.88rem; font-weight: 600; white-space: nowrap;
  background: rgba(38, 64, 106, 0.82); border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.55);
  animation: floaty 6s ease-in-out infinite;
}
.chip-icon {
  display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 8px;
  font-size: 0.72rem; font-weight: 800; color: var(--on-orange); background: var(--orange);
  box-shadow: 0 0 12px rgba(255, 138, 31, 0.7);
}
.chip-a { top: 7%; left: -18%; }
.chip-b { bottom: 24%; right: -16%; animation-delay: -2s; }
.chip-c { bottom: 7%; left: -12%; animation-delay: -4s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Ticker */
.ticker {
  margin-top: clamp(48px, 7vw, 80px); overflow: hidden; position: relative;
  border-block: 1px solid var(--line); padding-block: 14px;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.ticker-track { display: flex; gap: 40px; width: max-content; animation: tickerMove 46s linear infinite; }
.ticker-track span { font-weight: 600; color: var(--ink-3); white-space: nowrap; display: inline-flex; align-items: center; gap: 40px; }
.ticker-track span::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 8px var(--orange); }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes tickerMove { to { transform: translateX(-50%); } }

/* ---------- Why me ---------- */
.why { background: linear-gradient(180deg, transparent, rgba(38, 64, 106, 0.55) 18%, rgba(38, 64, 106, 0.55) 82%, transparent); }
.why-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.sticky-head { position: sticky; top: calc(var(--header-h) + 40px); }
.promise-list { list-style: none; display: grid; gap: 14px; }
.promise {
  display: grid; grid-template-columns: 56px 1fr; gap: 20px;
  padding: 26px 26px 24px; border-radius: var(--radius-l);
  border: 1px solid transparent; transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.promise:hover { border-color: rgba(255, 138, 31, 0.5); background: var(--panel); box-shadow: 0 0 30px -10px rgba(255, 138, 31, 0.4); }
.promise-icon {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
  border: 1.5px solid rgba(255, 138, 31, 0.7); background: rgba(255, 138, 31, 0.08);
  box-shadow: inset 0 0 14px rgba(255, 138, 31, 0.25);
}
.promise-icon svg { width: 28px; height: 28px; fill: none; stroke: var(--orange-hot); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px rgba(255, 138, 31, 0.8)); }
.promise h3 { font-size: 1.3rem; font-weight: 700; }
.promise p { margin-top: 10px; color: var(--ink-2); }
.promise .proof {
  margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-s);
  background: rgba(20, 36, 64, 0.35); border-left: 3px solid var(--orange); color: var(--ink);
  font-size: 0.98rem;
}
.proof span { display: block; font-weight: 700; color: var(--orange-hot); font-size: 0.85rem; margin-bottom: 2px; }

/* ---------- Calculator ---------- */
.calc-section { padding-block: clamp(40px, 6vw, 80px); }
.calc {
  display: grid; grid-template-columns: 1fr; gap: clamp(28px, 4vw, 56px);
  padding: clamp(26px, 4vw, 48px); border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-deep), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  position: relative; overflow: hidden;
}
.calc::before {
  content: ""; position: absolute; inset: auto -20% -60% 40%; height: 320px;
  background: radial-gradient(closest-side, rgba(255, 138, 31, 0.35), transparent);
  pointer-events: none;
}
.calc-intro { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(24px, 4vw, 56px); align-items: start; }
.calc-intro h2 { grid-row: span 2; }
.calc-intro p { color: var(--ink-2); }
.calc-intro p + p { margin-top: 14px; }
.calc-intro .calc-basis { font-size: 0.95rem; color: var(--ink-3); padding-top: 14px; border-top: 1px dashed var(--line-strong); }
.calc-body { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(24px, 4vw, 56px); position: relative; align-items: start; }
.calc-intro h2 { font-size: clamp(1.5rem, 2.5vw, 2.1rem); }
.calc-inputs { display: grid; gap: 22px; align-content: start; }
.slider { display: grid; gap: 10px; }
.slider-label { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; font-size: 0.96rem; }
.slider output { font-family: var(--font-display); color: var(--orange-hot); font-weight: 600; min-width: 2.5ch; text-align: right; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; cursor: pointer;
  --fill: 40%;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 6px;
  background: linear-gradient(90deg, var(--orange) var(--fill), rgba(255, 255, 255, 0.18) var(--fill));
  box-shadow: 0 0 10px rgba(255, 138, 31, 0.35);
}
input[type="range"]::-moz-range-track { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.18); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--orange); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%;
  background: var(--orange-core); border: 3px solid var(--orange); box-shadow: 0 0 14px rgba(255, 138, 31, 0.9);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: var(--orange-core);
  border: 3px solid var(--orange); box-shadow: 0 0 14px rgba(255, 138, 31, 0.9);
}
.calc-results {
  padding: 24px; border-radius: var(--radius-l);
  background: rgba(24, 42, 74, 0.55); border: 1px solid rgba(255, 138, 31, 0.45);
  box-shadow: inset 0 0 30px rgba(255, 138, 31, 0.1);
}
.calc-big { display: grid; }
.calc-num {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(2.6rem, 5vw, 3.6rem); line-height: 1;
  color: var(--orange-core); text-shadow: var(--glow-orange);
}
.calc-unit { margin-top: 6px; font-weight: 600; color: var(--ink-2); }
.calc-small { list-style: none; margin: 18px 0 20px; display: grid; gap: 8px; color: var(--ink-2); font-size: 0.96rem; }
.calc-small strong { color: var(--ink); font-family: var(--font-display); font-weight: 600; margin-right: 4px; }

/* ---------- Work: story + facts ---------- */
.work-alt { background: linear-gradient(180deg, transparent, rgba(38, 64, 106, 0.5) 12%, rgba(38, 64, 106, 0.5) 88%, transparent); }
.story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); }
.story h3, .dd-copy h3 { font-size: 1.15rem; font-weight: 700; color: var(--orange-hot); margin-bottom: 10px; }
.story p + p { margin-top: 12px; }
.story p { color: var(--ink-2); }

.fact-row {
  list-style: none; margin-top: clamp(32px, 4vw, 48px);
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}
.fact-row li { padding: 24px 22px; }
.fact-row li + li { border-left: 1px solid var(--line); }
.fact-row strong {
  display: block; font-family: var(--font-display); font-weight: 700; font-size: 2.1rem; line-height: 1;
  color: var(--orange-core); text-shadow: 0 0 14px rgba(255, 138, 31, 0.8), 0 0 34px rgba(255, 138, 31, 0.35);
}
.fact-row span { display: block; margin-top: 12px; font-size: 0.93rem; color: var(--ink-2); line-height: 1.5; }

/* ---------- 3-way match demo ---------- */
.match-demo {
  margin-top: clamp(40px, 5vw, 64px); padding: clamp(22px, 3.5vw, 36px); border-radius: 26px;
  background: rgba(22, 40, 72, 0.5); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-deep);
}
.demo-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; align-items: end; }
.demo-head h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; }
.demo-head p { margin-top: 8px; color: var(--ink-2); }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); }
.seg-btn {
  border: 0; background: transparent; padding: 9px 16px; border-radius: 999px; cursor: pointer;
  font-weight: 600; font-size: 0.92rem; color: var(--ink-2); transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.seg-btn.is-active { background: var(--orange); color: var(--on-orange); box-shadow: 0 0 16px rgba(255, 138, 31, 0.55); }

.doc-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.doc {
  display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--radius-m);
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.doc::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1.5px var(--cyan), 0 0 0 0 transparent; opacity: 0; transition: opacity 0.3s;
}
.doc.is-scanning::after { opacity: 1; animation: docScan 0.9s ease-in-out infinite; }
@keyframes docScan { 50% { box-shadow: inset 0 0 0 1.5px var(--cyan), 0 0 18px rgba(103, 228, 255, 0.5); } }
.doc-type { font-size: 0.82rem; color: var(--ink-3); font-weight: 600; }
.doc strong { font-family: var(--font-mono); font-size: 1rem; font-weight: 600; }
.doc span:last-child { font-size: 0.88rem; color: var(--ink-2); }

.demo-body { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: 24px; margin-top: 22px; align-items: start; }
.demo-steps { list-style: none; display: grid; gap: 8px; align-content: start; counter-reset: ds; }
.demo-steps li {
  counter-increment: ds; position: relative; padding: 10px 12px 10px 44px; border-radius: 10px;
  font-size: 0.93rem; color: var(--ink-3); border: 1px solid transparent;
  transition: color 0.3s, background 0.3s, border-color 0.3s;
}
.demo-steps li::before {
  content: counter(ds); position: absolute; left: 10px; top: 9px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.78rem; font-weight: 700;
  border: 1.5px solid var(--line-strong); color: var(--ink-3);
}
.demo-steps li.is-active { color: var(--ink); background: rgba(103, 228, 255, 0.08); border-color: rgba(103, 228, 255, 0.4); }
.demo-steps li.is-active::before { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 10px rgba(103, 228, 255, 0.7); }
.demo-steps li.is-done { color: var(--ink-2); }
.demo-steps li.is-done::before { content: "\2713"; background: var(--mint); border-color: var(--mint); color: #12324a; }

.demo-table-wrap { overflow-x: auto; border-radius: var(--radius-m); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); }
.demo-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 560px; }
.demo-table th, .demo-table td { padding: 11px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.demo-table th:first-child, .demo-table td:first-child { text-align: left; white-space: normal; }
.demo-table thead th { font-size: 0.8rem; font-weight: 600; color: var(--ink-3); background: rgba(255, 255, 255, 0.04); }
.demo-table td { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.demo-table td small { display: block; color: var(--ink-3); font-size: 0.78rem; }
.demo-table tbody tr { opacity: 0.45; transition: opacity 0.4s, background 0.4s; }
.demo-table tbody tr.is-checked { opacity: 1; }
.demo-table tbody tr.is-bad { background: rgba(255, 122, 122, 0.1); }
.demo-table tbody tr.is-bad td.price-inv { color: var(--red); font-weight: 700; text-shadow: 0 0 10px rgba(255, 122, 122, 0.6); }
.demo-table tfoot td { font-weight: 700; color: var(--ink); border-bottom: 0; }
.demo-table tfoot tr:first-child td { border-top: 1px solid var(--line-strong); }
.status-tag { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.status-tag.ok { color: #0f3a2b; background: var(--mint); box-shadow: 0 0 10px rgba(94, 240, 178, 0.6); }
.status-tag.bad { color: #4a0f0f; background: var(--red); box-shadow: 0 0 10px rgba(255, 122, 122, 0.6); }
.status-tag.wait { color: var(--ink-3); background: rgba(255, 255, 255, 0.08); }

.demo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 22px; }
.demo-note { font-size: 0.88rem; color: var(--ink-3); }

.verdict {
  margin-top: 22px; padding: 22px; border-radius: var(--radius-l);
  border: 1px solid; animation: verdictIn 0.5s var(--ease);
}
@keyframes verdictIn { from { opacity: 0; transform: translateY(10px); } }
.verdict.is-ok { border-color: rgba(94, 240, 178, 0.6); background: rgba(94, 240, 178, 0.08); }
.verdict.is-bad { border-color: rgba(255, 122, 122, 0.6); background: rgba(255, 122, 122, 0.07); }
.verdict h4 { margin: 0; font-size: 1.1rem; }
.verdict p { margin-top: 8px; color: var(--ink-2); }
.verdict .email-draft {
  margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-m);
  background: rgba(255, 255, 255, 0.92); color: #1f2d45; font-size: 0.93rem; line-height: 1.55;
  box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.6);
}
.email-draft .ed-head { font-size: 0.82rem; color: #56637a; border-bottom: 1px solid #dfe5ef; padding-bottom: 8px; margin-bottom: 8px; }
.verdict-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; align-items: center; }
.verdict-actions .hint { font-size: 0.88rem; color: var(--ink-3); }
.verdict .logged { margin-top: 14px; font-weight: 600; color: var(--mint); }

/* ---------- Architecture ---------- */
.arch { margin-top: clamp(40px, 5vw, 64px); }
.arch-head { max-width: 640px; }
.arch-head h3, .gallery-head h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; }
.arch-head p { margin-top: 8px; color: var(--ink-2); }
.arch-scroll { overflow-x: auto; margin-top: 20px; padding: 18px; border-radius: 22px; background: rgba(20, 36, 64, 0.35); border: 1px solid var(--line); }
.arch-svg { width: 100%; min-width: 820px; height: auto; display: block; }
.arch-links path { fill: none; stroke: rgba(255, 255, 255, 0.25); stroke-width: 2; }
.arch-links path.dash-only { stroke-dasharray: 4 6; stroke: rgba(103, 228, 255, 0.45); }
.arch-flow path {
  fill: none; stroke: var(--orange); stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 14 220; animation: archFlow 2.8s linear infinite;
  filter: drop-shadow(0 0 5px rgba(255, 138, 31, 0.95));
}
.arch-flow path:nth-child(2n) { animation-delay: -1.4s; }
@keyframes archFlow { to { stroke-dashoffset: -234; } }
.arch-node rect { fill: rgba(255, 255, 255, 0.08); stroke: rgba(255, 255, 255, 0.35); stroke-width: 1.5; }
.arch-node text { fill: var(--ink); font-family: var(--font-text); font-size: 15px; font-weight: 700; text-anchor: middle; }
.arch-node text.sub { fill: var(--ink-3); font-size: 12.5px; font-weight: 500; }
.arch-node.engine rect { stroke: var(--orange); fill: rgba(255, 138, 31, 0.1); filter: drop-shadow(0 0 6px rgba(255, 138, 31, 0.45)); }
.arch-node.human rect { stroke: var(--mint); fill: rgba(94, 240, 178, 0.1); filter: drop-shadow(0 0 8px rgba(94, 240, 178, 0.5)); }
.arch-node.data rect { stroke: var(--cyan); fill: rgba(103, 228, 255, 0.08); }

/* ---------- Galleries ---------- */
.gallery-block { margin-top: clamp(40px, 5vw, 64px); }
.gallery-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.tabs { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.tab, .filter {
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.04); cursor: pointer;
  padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 0.92rem; color: var(--ink-2);
  transition: all 0.25s;
}
.tab:hover, .filter:hover { color: var(--ink); border-color: var(--orange); }
.tab.is-active, .filter.is-active {
  color: var(--on-orange); background: var(--orange); border-color: var(--orange);
  box-shadow: 0 0 16px rgba(255, 138, 31, 0.55);
}
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.shots .shot:first-child { grid-column: span 2; grid-row: span 2; }
.shot {
  position: relative; margin: 0; border: 0; padding: 0; cursor: zoom-in; text-align: left;
  border-radius: var(--radius-m); overflow: hidden; background: #e9eef6;
  box-shadow: 0 0 0 1px var(--line-strong), var(--shadow-deep);
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
  animation: shotIn 0.5s var(--ease) both;
}
@keyframes shotIn { from { opacity: 0; transform: scale(0.98); } }
.shot:hover { transform: translateY(-4px); box-shadow: 0 0 0 1.5px var(--orange), 0 0 30px rgba(255, 138, 31, 0.45), var(--shadow-deep); }
.shot img { width: 100%; height: 100%; aspect-ratio: 1.96; object-fit: cover; object-position: top center; }
.shot figcaption, .shot .shot-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px;
  font-size: 0.86rem; font-weight: 600; color: #fff; line-height: 1.4;
  background: linear-gradient(transparent, rgba(16, 28, 52, 0.92));
}
.shot .zoom-hint {
  position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; background: rgba(26, 42, 71, 0.8); color: #fff; opacity: 0; transition: opacity 0.25s;
}
.shot:hover .zoom-hint, .shot:focus-visible .zoom-hint { opacity: 1; }

/* ---------- DenialDesk ---------- */
.dd-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.dd-copy h3 + p { color: var(--ink-2); }
.dd-copy h3:not(:first-child) { margin-top: 28px; }
.flow-list { list-style: none; display: grid; gap: 10px; }
.flow-list li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; color: var(--ink-2); }
.flow-list li span {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 0.85rem;
  color: var(--orange-core); border: 1.5px solid var(--orange); box-shadow: 0 0 10px rgba(255, 138, 31, 0.5);
}
.mini-facts { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.mini-facts li { padding: 18px; border-radius: var(--radius-m); background: var(--panel); border: 1px solid var(--line); }
.mini-facts strong { display: block; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--orange-core); text-shadow: 0 0 14px rgba(255, 138, 31, 0.7); }
.mini-facts span { display: block; margin-top: 8px; font-size: 0.92rem; color: var(--ink-2); }

.packet-label { font-weight: 600; color: var(--ink-3); margin-bottom: 16px; }
.packet-stack { position: relative; height: 520px; }
.packet-page {
  position: absolute; top: 0; width: 62%; border: 0; padding: 0; cursor: zoom-in; border-radius: 6px; overflow: hidden;
  background: #fff; box-shadow: 0 30px 50px -20px rgba(8, 18, 40, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.4);
  transition: transform 0.5s var(--ease), box-shadow 0.4s, z-index 0s;
}
.packet-page img { width: 100%; height: auto; }
.packet-page:nth-child(1) { left: 0; transform: rotate(-6deg) translateY(30px); z-index: 1; }
.packet-page:nth-child(2) { left: 19%; transform: rotate(0deg) translateY(10px); z-index: 2; }
.packet-page:nth-child(3) { left: 38%; transform: rotate(6deg) translateY(36px); z-index: 1; }
.packet-page:hover, .packet-page:focus-visible {
  z-index: 5; transform: rotate(0deg) translateY(-10px) scale(1.04);
  box-shadow: 0 0 0 2px var(--orange), 0 0 40px rgba(255, 138, 31, 0.5), 0 30px 50px -20px rgba(8, 18, 40, 0.75);
}

/* ---------- Systems ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.system-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.sys-card {
  display: flex; flex-direction: column; text-align: left; cursor: pointer; padding: 0; border: 0;
  border-radius: var(--radius-l); overflow: hidden; color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  box-shadow: 0 0 0 1px var(--line), var(--shadow-deep);
  transition: transform 0.35s var(--ease), box-shadow 0.35s, opacity 0.35s;
}
.sys-card:hover, .sys-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 0 0 1.5px var(--orange), 0 0 36px rgba(255, 138, 31, 0.4), var(--shadow-deep);
}
.sys-card.is-hidden { display: none; }
.sys-thumb { position: relative; background: #e9eef6; aspect-ratio: 1.96; overflow: hidden; }
.sys-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform 0.6s var(--ease); }
.sys-card:hover .sys-thumb img { transform: scale(1.06); }
.sys-count {
  position: absolute; top: 10px; right: 10px; padding: 4px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700;
  background: rgba(26, 42, 71, 0.85); color: #fff;
}
.sys-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.sys-tag { font-size: 0.84rem; font-weight: 600; color: var(--cyan); }
.sys-title { display: block; font-size: 1.2rem; font-weight: 700; line-height: 1.25; }
.sys-desc { display: block; color: var(--ink-2); font-size: 0.97rem; }
.sys-metric { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sys-metric strong { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--orange-core); text-shadow: 0 0 12px rgba(255, 138, 31, 0.75); }
.sys-metric span { font-size: 0.9rem; color: var(--ink-3); }
.sys-open { margin-top: 12px; font-weight: 700; font-size: 0.92rem; color: var(--orange-hot); }

.belief {
  margin-top: clamp(40px, 6vw, 64px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  padding: clamp(22px, 3vw, 32px); border-radius: var(--radius-l);
  border: 1.5px solid rgba(255, 138, 31, 0.55); background: rgba(255, 138, 31, 0.07);
  box-shadow: 0 0 40px -12px rgba(255, 138, 31, 0.45);
}
.belief p { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 600; max-width: 60ch; line-height: 1.45; }

/* ---------- Case modal ---------- */
.case-modal {
  width: min(980px, calc(100% - 24px)); max-height: calc(100% - 32px); padding: 0; border: 0; border-radius: 26px;
  background: linear-gradient(180deg, #34558a, #2c4a78); color: var(--ink);
  box-shadow: 0 0 0 1px var(--line-strong), 0 0 60px rgba(255, 138, 31, 0.25), 0 40px 80px -30px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}
.case-modal[open] { animation: modalIn 0.45s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(0.98); } }
.case-modal::backdrop { background: rgba(14, 26, 50, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.case-inner { max-height: calc(100dvh - 32px); overflow-y: auto; padding: clamp(22px, 4vw, 40px); }
.case-top { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.case-top h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.4rem, 3vw, 2rem); }
.case-close {
  flex: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--panel); cursor: pointer; font-size: 1.5rem; line-height: 1;
}
.case-close:hover { border-color: var(--orange); box-shadow: var(--glow-orange-soft); }
.case-tag { margin-top: 8px; color: var(--cyan); font-weight: 600; }
.case-results { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 24px; }
.case-results li { padding: 16px; border-radius: var(--radius-m); background: rgba(20, 36, 64, 0.4); border: 1px solid var(--line); }
.case-results strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: var(--orange-core); text-shadow: 0 0 14px rgba(255, 138, 31, 0.75); }
.case-results span { display: block; margin-top: 6px; font-size: 0.9rem; color: var(--ink-2); }
.case-cols { display: grid; grid-template-columns: 1fr 1.2fr; gap: 28px; margin-top: 28px; }
.case-cols h3 { font-size: 1.05rem; font-weight: 700; color: var(--orange-hot); margin-bottom: 10px; }
.case-cols p { color: var(--ink-2); }
.case-steps { list-style: none; display: grid; gap: 10px; counter-reset: cs; }
.case-steps li { counter-increment: cs; position: relative; padding-left: 38px; color: var(--ink-2); }
.case-steps li::before {
  content: counter(cs); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; color: var(--orange-core);
  border: 1.5px solid var(--orange); box-shadow: 0 0 8px rgba(255, 138, 31, 0.5);
}
.case-reuse { margin-top: 18px; padding: 12px 14px; border-radius: var(--radius-s); background: rgba(103, 228, 255, 0.08); border-left: 3px solid var(--cyan); }
.case-tools { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.case-tools li { padding: 5px 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; background: var(--panel-2); border: 1px solid var(--line); }
.case-shots { margin-top: 28px; display: grid; gap: 14px; }
.case-shots .shot:first-child { grid-column: auto; grid-row: auto; }
.case-shots .shot img { aspect-ratio: auto; object-fit: contain; }
.case-shots .shot figcaption { position: static; background: rgba(20, 36, 64, 0.9); padding: 10px 14px; }

/* ---------- Code ---------- */
.code-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.code-notes { list-style: none; display: grid; gap: 10px; margin-top: 26px; }
.code-notes li {
  padding: 12px 14px; border-radius: var(--radius-m); color: var(--ink-3); border: 1px solid transparent;
  transition: all 0.3s;
}
.code-notes li strong { display: block; color: var(--ink-2); }
.code-notes li.is-active { color: var(--ink-2); background: var(--panel); border-color: rgba(255, 138, 31, 0.5); }
.code-notes li.is-active strong { color: var(--orange-hot); }

.code-window {
  border-radius: 18px; overflow: hidden; background: #1f3357;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 0 50px -10px rgba(255, 138, 31, 0.3), var(--shadow-deep);
}
.code-tabs { display: flex; overflow-x: auto; background: #1a2c4d; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.code-tab {
  border: 0; background: transparent; padding: 12px 16px; cursor: pointer; white-space: nowrap;
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-3); border-bottom: 2px solid transparent;
}
.code-tab:hover { color: var(--ink); }
.code-tab.is-active { color: var(--orange-core); border-bottom-color: var(--orange); background: #1f3357; text-shadow: 0 0 10px rgba(255, 138, 31, 0.6); }
.code-body { position: relative; }
.code-body pre {
  margin: 0; padding: 22px 22px 26px; overflow: auto; max-height: 520px;
  font-family: var(--font-mono); font-size: 0.84rem; line-height: 1.7; color: #dbe6f7; tab-size: 2;
}
.code-body code { font-family: inherit; }
.copy-code {
  position: absolute; top: 12px; right: 12px; z-index: 2; padding: 6px 12px; border-radius: 8px; cursor: pointer;
  font-size: 0.8rem; font-weight: 600; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.2);
}
.copy-code:hover { border-color: var(--orange); }
.tok-c { color: #8ea3c4; font-style: italic; }
.tok-s { color: #9cf0c7; }
.tok-n { color: #ffc27a; }
.tok-k { color: #ff9a45; font-weight: 600; }
.tok-p { color: #7fdcff; }
.tok-f { color: #b9c8ff; }
.code-line { display: block; animation: lineIn 0.35s var(--ease) both; }
@keyframes lineIn { from { opacity: 0; transform: translateX(-6px); } }

/* ---------- Method ---------- */
.method { background: linear-gradient(180deg, transparent, rgba(38, 64, 106, 0.55) 15%, rgba(38, 64, 106, 0.55) 85%, transparent); }
.method-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.method-aside { margin-top: 22px; padding: 14px 16px; border-radius: var(--radius-m); background: rgba(255, 138, 31, 0.08); border-left: 3px solid var(--orange); }
.steps { list-style: none; position: relative; display: grid; gap: 6px; --progress: 0; }
.steps::before, .steps::after {
  content: ""; position: absolute; left: 23px; top: 24px; bottom: 24px; width: 2px; border-radius: 2px;
}
.steps::before { background: rgba(255, 255, 255, 0.16); }
.steps::after {
  background: linear-gradient(var(--orange), var(--orange-hot)); box-shadow: 0 0 12px rgba(255, 138, 31, 0.9);
  transform-origin: top; transform: scaleY(var(--progress));
}
.step { position: relative; display: grid; grid-template-columns: 48px 1fr; gap: 20px; padding: 14px 0 18px; }
.step-num {
  position: relative; z-index: 1; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; color: var(--ink-3);
  background: var(--bg-deep); border: 2px solid rgba(255, 255, 255, 0.22);
  transition: all 0.4s var(--ease);
}
.step.is-lit .step-num { color: var(--on-orange); background: var(--orange); border-color: var(--orange); box-shadow: 0 0 20px rgba(255, 138, 31, 0.8); }
.step h3 { font-size: 1.2rem; font-weight: 700; padding-top: 10px; }
.step p { margin-top: 6px; color: var(--ink-2); }
.step .you-get { color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.step .you-get::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); margin-right: 8px; box-shadow: 0 0 8px var(--mint); vertical-align: 1px; }

/* ---------- Journey ---------- */
.mv-panel {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: center;
  padding: clamp(24px, 4vw, 44px); border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 138, 31, 0.14), rgba(255, 255, 255, 0.05) 55%);
  border: 1.5px solid rgba(255, 138, 31, 0.45); box-shadow: 0 0 50px -16px rgba(255, 138, 31, 0.45);
}
.mv-copy h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; }
.mv-copy p { margin-top: 12px; color: var(--ink-2); }
.mv-stats { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mv-stats li { padding: 18px; border-radius: var(--radius-m); background: rgba(20, 36, 64, 0.4); border: 1px solid var(--line); }
.mv-stats strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.8rem; line-height: 1; color: var(--orange-core); text-shadow: 0 0 14px rgba(255, 138, 31, 0.75); }
.mv-stats span:not(.count) { display: block; margin-top: 8px; font-size: 0.9rem; color: var(--ink-2); }

.timeline { list-style: none; margin-top: clamp(40px, 5vw, 64px); position: relative; display: grid; gap: 4px; max-width: 860px; }
.timeline::before { content: ""; position: absolute; left: 86px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--line-strong), var(--orange)); }
.tl-item { display: grid; grid-template-columns: 70px 1fr; gap: 40px; padding: 14px 0; position: relative; }
.tl-item::after {
  content: ""; position: absolute; left: 81px; top: 22px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg-1); border: 2px solid var(--ink-3);
}
.tl-item.is-award::after { border-color: var(--orange); background: var(--orange); box-shadow: 0 0 12px var(--orange); }
.tl-item.is-now::after { border-color: var(--mint); background: var(--mint); box-shadow: 0 0 14px var(--mint); }
.tl-year { font-family: var(--font-display); font-weight: 600; color: var(--orange-hot); padding-top: 2px; }
.tl-item h3 { font-size: 1.1rem; font-weight: 700; }
.tl-item p { margin-top: 4px; color: var(--ink-2); }

/* ---------- Toolkit ---------- */
.tk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.tk-group { padding: 22px; border-radius: var(--radius-l); background: var(--panel); border: 1px solid var(--line); }
.tk-group h3 { font-size: 1.02rem; font-weight: 700; color: var(--orange-hot); }
.tk-group ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tk-group li { padding: 6px 12px; border-radius: 999px; font-size: 0.9rem; font-weight: 500; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line); }
.tk-eng { background: rgba(103, 228, 255, 0.05); border-color: rgba(103, 228, 255, 0.3); }
.tk-eng h3 { color: var(--cyan); }
.certs { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.certs h3 { font-size: 1rem; font-weight: 700; }
.certs ul { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.certs li { padding: 8px 14px; border-radius: var(--radius-s); border: 1.5px solid rgba(255, 138, 31, 0.6); font-weight: 600; font-size: 0.92rem; box-shadow: 0 0 14px -4px rgba(255, 138, 31, 0.5); }

/* ---------- Contact ---------- */
.contact-card {
  display: grid; grid-template-columns: 1.25fr 0.75fr; gap: clamp(28px, 5vw, 56px);
  padding: clamp(28px, 5vw, 56px); border-radius: 32px;
  background:
    radial-gradient(600px 300px at 0% 0%, rgba(255, 138, 31, 0.22), transparent 70%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.04));
  border: 1.5px solid rgba(255, 138, 31, 0.5);
  box-shadow: 0 0 60px -14px rgba(255, 138, 31, 0.5), var(--shadow-deep);
}
.contact-copy p { margin-top: 16px; color: var(--ink-2); max-width: 56ch; font-size: 1.08rem; }
.contact-copy .contact-meta { font-size: 0.98rem; color: var(--ink-3); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.contact-links { list-style: none; display: grid; gap: 10px; }
.contact-links a {
  display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: var(--radius-m);
  text-decoration: none; background: rgba(20, 36, 64, 0.35); border: 1px solid var(--line); font-weight: 700;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.contact-links a:hover { border-color: var(--orange); box-shadow: var(--glow-orange-soft); }
.cl-handle { font-weight: 500; color: var(--ink-3); font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; }
.lsi-card {
  display: grid; gap: 12px; margin-top: 16px; padding: 16px; border-radius: var(--radius-m); text-decoration: none;
  background: rgba(255, 255, 255, 0.94); color: #1f2d45; font-size: 0.9rem; font-weight: 600;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.lsi-card:hover { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--orange), 0 0 30px rgba(255, 138, 31, 0.5); }
.lsi-card img { width: 78%; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 32px calc(32px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; color: var(--ink-3); font-size: 0.92rem; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { color: var(--orange-hot); }

/* ---------- Lightbox ---------- */
html:has(dialog[open]) { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 300; display: grid;
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0; color: var(--ink); grid-template-columns: 64px 1fr 64px; align-items: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) 8px max(16px, env(safe-area-inset-bottom, 0px));
  background: rgba(14, 26, 50, 0.9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}
.lightbox:not([open]) { display: none; }
.lightbox::backdrop { background: transparent; }
@keyframes fadeIn { from { opacity: 0; } }
.lb-figure { margin: 0; display: grid; gap: 12px; justify-items: center; max-height: 100%; }
.lb-figure img {
  max-height: calc(100dvh - 120px); width: auto; max-width: 100%; border-radius: 10px; background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3), 0 0 60px rgba(255, 138, 31, 0.25);
}
.lb-figure figcaption { color: var(--ink-2); text-align: center; font-weight: 600; max-width: 80ch; }
.lb-nav, .lb-close {
  width: 52px; height: 52px; border-radius: 14px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.08);
  font-size: 2rem; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.lb-nav:hover, .lb-close:hover { border-color: var(--orange); box-shadow: var(--glow-orange-soft); }
.lb-close { position: absolute; top: max(14px, env(safe-area-inset-top, 0px)); right: 14px; width: 46px; height: 46px; font-size: 1.7rem; z-index: 2; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 400;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 12px 18px; border-radius: 12px; font-weight: 600; background: #1f3357; color: var(--ink);
  border: 1px solid var(--orange); box-shadow: 0 0 24px rgba(255, 138, 31, 0.5);
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .chip-a { left: -6%; }
  .chip-b { right: -6%; }
  .chip-c { left: -4%; }
  .system-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  :root { --header-h: 62px; }
  .menu-toggle { display: block; }
  .main-nav {
    position: fixed; top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px; padding: 16px clamp(18px, 4vw, 40px) 24px;
    background: rgba(40, 68, 112, 0.97); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: transform 0.3s var(--ease), opacity 0.3s, visibility 0.3s;
  }
  .main-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .main-nav a { padding: 14px 16px; font-size: 1.05rem; }
  .main-nav .nav-cta { margin: 8px 0 0; text-align: center; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 340px; margin-inline: auto; }
  .chip-b { display: none; }
  .why-grid, .method-grid, .code-grid, .dd-grid, .story, .mv-panel, .contact-card { grid-template-columns: 1fr; }
  .mv-panel { grid-template-columns: minmax(0, 1fr); }
  .mv-panel > *, .mv-stats li, .mini-facts li { min-width: 0; }
  .sticky-head { position: static; }
  .fact-row { grid-template-columns: 1fr 1fr; }
  .fact-row li:nth-child(3) { border-left: 0; }
  .fact-row li:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .demo-body { grid-template-columns: 1fr; }
  .calc-intro { grid-template-columns: 1fr; }
  .calc-intro h2 { grid-row: auto; margin-bottom: 14px; }
  .tk-grid { grid-template-columns: 1fr 1fr; }
  .packet-stack { height: auto; aspect-ratio: 1 / 0.95; max-width: 520px; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .neon-sign { white-space: normal; }
  .brand-name { display: none; }
  .hero-proof { grid-template-columns: 1fr; }
  .hero-proof li, .hero-proof li + li { padding: 14px 0; border-left: 0; }
  .hero-proof li + li { border-top: 1px solid var(--line); }
  .hero { padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 20px); }
  .hero-visual { max-width: 250px; }
  .neon-sign { margin-top: 20px; }
  .doc-strip { gap: 8px; }
  .doc { grid-template-columns: auto 1fr; column-gap: 12px; align-items: baseline; padding: 10px 14px; }
  .doc span:last-child { grid-column: 1 / -1; }
  .chip-a { left: -14%; top: 4%; }
  .chip-c { left: auto; right: -14%; bottom: 5%; }
  .float-chip { font-size: 0.8rem; padding: 8px 12px; }
  .calc-body { grid-template-columns: 1fr; }
  .doc-strip { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr 1fr; gap: 10px; }
  .shots .shot:first-child { grid-column: span 2; grid-row: auto; }
  .shot { display: flex; flex-direction: column; }
  .shot img { height: auto; aspect-ratio: 1.96; flex: none; }
  .shot .shot-cap {
    position: static;
    padding: 8px 10px 10px;
    font-size: 0.75rem;
    line-height: 1.35;
    background: rgba(16, 28, 52, 0.95);
    flex: 1;
  }
  .system-grid { grid-template-columns: 1fr; }
  .tk-grid { grid-template-columns: 1fr; }
  .mini-facts, .mv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mv-stats li, .mini-facts li { padding: 14px; }
  .mv-stats strong, .mini-facts strong { font-size: 1.35rem; overflow-wrap: anywhere; }
  .case-cols { grid-template-columns: 1fr; }
  .timeline::before { left: 62px; }
  .tl-item { grid-template-columns: 50px 1fr; gap: 30px; }
  .tl-item::after { left: 57px; }
  .lightbox { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .lb-prev, .lb-next { position: absolute; bottom: max(16px, env(safe-area-inset-bottom, 0px)); }
  .lb-prev { left: 16px; }
  .lb-next { right: 16px; }
  .lb-figure { padding-bottom: 70px; }
  .contact-actions .btn { width: 100%; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
  .circuit-pulses, .arch-flow { display: none; }
  .ticker-track { animation: none; flex-wrap: wrap; width: auto; }
  .spotlight { display: none; }
}
