/* ==========================================================================
   Prismcode — стили сайта
   ========================================================================== */

:root {
  --bg: #05070d;
  --bg-2: #090d17;
  --surface: rgba(255, 255, 255, .025);
  --surface-2: rgba(255, 255, 255, .05);
  --border: rgba(255, 255, 255, .08);
  --border-2: rgba(255, 255, 255, .15);
  --text: #e8eef9;
  --muted: #8d99b0;
  --dim: #5a667d;

  --cyan: #22d3ee;
  --indigo: #818cf8;
  --violet: #a78bfa;
  --green: #34d399;
  --red: #fb7185;
  --amber: #fbbf24;

  --grad: linear-gradient(110deg, #22d3ee 0%, #818cf8 50%, #c084fc 100%);
  --glow: 0 0 0 1px rgba(34, 211, 238, .35), 0 8px 40px -8px rgba(34, 211, 238, .45);

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Unbounded', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --radius: 20px;
  --radius-sm: 12px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 72px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: rgba(34, 211, 238, .3); color: #fff; }

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

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--cyan); color: var(--bg); font-weight: 600;
  transform: translateY(-200%);
  transition: transform .2s;
}
.skip-link:focus { transform: none; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.muted { color: var(--muted); }

.link {
  color: var(--cyan);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .3s var(--ease);
}
.link:hover { background-size: 100% 1px; }

.grad-text {
  background: var(--grad);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- background ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 100%);
}

.cursor-glow {
  position: fixed; top: 0; left: 0; z-index: -1; pointer-events: none;
  width: 640px; height: 640px; margin: -320px 0 0 -320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, .07) 0%, rgba(129, 140, 248, .04) 35%, transparent 70%);
  opacity: 0;
  transition: opacity .4s;
  will-change: transform;
}
.cursor-glow.is-active { opacity: 1; }

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 26px;
  border: 1px solid transparent; border-radius: 14px;
  font-weight: 600; font-size: 15px; letter-spacing: .01em;
  white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s, border-color .25s;
}
.btn svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .25s var(--ease);
}
.btn:hover svg { transform: translateX(4px); }

.btn-primary {
  background: var(--grad);
  background-size: 150% 100%;
  color: #05070d;
  box-shadow: 0 8px 30px -10px rgba(34, 211, 238, .6);
}
.btn-primary:hover {
  transform: translateY(-2px);
  background-position: 100% 0;
  box-shadow: 0 14px 40px -10px rgba(129, 140, 248, .7);
}

.btn-ghost {
  border-color: var(--border-2);
  background: rgba(255, 255, 255, .02);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  border-color: rgba(34, 211, 238, .5);
  background: rgba(34, 211, 238, .06);
  transform: translateY(-2px);
}

.btn-sm { height: 42px; padding: 0 18px; font-size: 14px; border-radius: 12px; }

/* ---------- header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color .3s, border-color .3s, backdrop-filter .3s;
}
.header.is-scrolled {
  background: rgba(5, 7, 13, .72);
  border-bottom-color: var(--border);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}
.header-inner {
  height: 100%;
  display: flex; align-items: center; gap: 32px;
}

.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display);
  font-size: 19px; font-weight: 600; letter-spacing: -.02em;
  white-space: nowrap;
}
.logo-mark {
  flex: none;
  width: 30px; height: 30px;
  transition: transform .5s var(--ease), filter .5s;
}
.logo:hover .logo-mark {
  transform: rotate(-8deg) scale(1.06);
  filter: drop-shadow(0 0 10px rgba(129, 140, 248, .55));
}
.logo-word b {
  font-weight: 600;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav {
  display: flex; align-items: center; gap: 4px;
  margin-left: auto;
}
.nav a:not(.btn) {
  position: relative;
  padding: 8px 12px; border-radius: 10px;
  font-size: 14.5px; color: var(--muted);
  transition: color .2s, background-color .2s;
}
.nav a:not(.btn):hover { color: var(--text); background: var(--surface-2); }
.nav a.is-active { color: var(--text); }
.nav a.is-active::after {
  content: ""; position: absolute; left: 50%; bottom: 2px;
  width: 4px; height: 4px; margin-left: -2px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 8px var(--cyan);
}
.nav-cta { display: none; }

.burger {
  display: none;
  width: 44px; height: 44px; margin-left: auto;
  border: 1px solid var(--border-2); border-radius: 12px;
  background: var(--surface);
  position: relative;
}
.burger span {
  position: absolute; left: 12px; right: 12px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 25px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 20.5px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { top: 20.5px; transform: rotate(-45deg); }

/* ---------- reveal ---------- */
/* Блоки прячутся до появления только при включённом JS. Без него — и у поисковых
   роботов, которые не исполняют скрипты, — весь текст виден сразу. */
@media (scripting: enabled) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
    transition-delay: var(--d, 0s);
  }
  .reveal.is-visible { opacity: 1; transform: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 48px) 0 96px;
  overflow: hidden;
  isolation: isolate;
}
.hero-canvas {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%;
  mask-image: radial-gradient(ellipse 90% 80% at 60% 40%, #000 20%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 60% 40%, #000 20%, transparent 85%);
}
.hero-orb {
  position: absolute; z-index: -2;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .55;
  animation: float 18s ease-in-out infinite alternate;
}
.hero-orb--1 { width: 520px; height: 520px; top: -160px; right: -120px; background: radial-gradient(circle, rgba(34, 211, 238, .5), transparent 65%); }
.hero-orb--2 { width: 600px; height: 600px; bottom: -280px; left: -200px; background: radial-gradient(circle, rgba(139, 92, 246, .45), transparent 65%); animation-delay: -9s; }
@keyframes float {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-60px, 40px) scale(1.1); }
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 56px;
  align-items: center;
}

.badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 12px;
  border: 1px solid var(--border-2); border-radius: 100px;
  background: rgba(255, 255, 255, .03);
  backdrop-filter: blur(8px);
  font-family: var(--mono); font-size: 13px; color: var(--muted);
}
.pulse {
  position: relative; width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
}
.pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--green);
  animation: ping 1.8s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }

.hero-title {
  margin: 24px 0 22px;
  font-family: var(--display);
  font-size: clamp(30px, 4.6vw, 62px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.025em;
}
.lead {
  max-width: 560px;
  font-size: clamp(16px, 1.4vw, 18.5px);
  color: var(--muted);
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.hero-facts {
  display: grid; grid-template-columns: repeat(4, auto);
  justify-content: start;
  gap: 8px 36px;
  margin-top: 48px; padding-top: 28px;
  border-top: 1px solid var(--border);
}
.hero-facts li { display: flex; flex-direction: column; gap: 2px; }
.hero-facts b {
  font-family: var(--display); font-size: 22px; font-weight: 600;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-facts span { font-size: 13px; color: var(--muted); }

/* ---------- window (terminal / editor) ---------- */
.window {
  position: relative;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(17, 22, 36, .85), rgba(9, 12, 22, .9));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .4),
    0 30px 80px -20px rgba(0, 0, 0, .8),
    0 0 120px -40px rgba(34, 211, 238, .35);
  overflow: hidden;
}
.window::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  padding: 1px;
  background: linear-gradient(140deg, rgba(34, 211, 238, .5), transparent 35%, transparent 65%, rgba(167, 139, 250, .45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.window-bar {
  display: flex; align-items: center; gap: 14px;
  height: 44px; padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .02);
}
.dots { display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #2a3142; }
.dots i:nth-child(1) { background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.window-title { font-family: var(--mono); font-size: 12.5px; color: var(--dim); }

.terminal-body {
  margin: 0;
  height: 340px;
  padding: 20px 22px;
  overflow: hidden;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.75;
  color: #c9d4e8;
  white-space: pre-wrap;
  word-break: break-word;
}
.terminal-body .prompt { color: var(--green); }
.terminal-body .path { color: var(--indigo); }
.terminal-body .ok { color: var(--green); }
.terminal-body .dim { color: var(--dim); }
.terminal-body .acc { color: var(--cyan); }
.terminal-body .warn { color: var(--amber); }
.terminal-body .bar { color: var(--cyan); }
.caret {
  display: inline-block; width: 8px; height: 1.1em; margin-left: 1px;
  vertical-align: -3px;
  background: var(--cyan);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- marquee ---------- */
.marquee {
  position: relative;
  padding: 26px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .012);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex; width: max-content;
  animation: marquee 40s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee ul { display: flex; gap: 56px; padding-right: 56px; }
.marquee li {
  font-family: var(--mono); font-size: 15px; color: var(--dim);
  white-space: nowrap;
  transition: color .2s;
}
.marquee li::before { content: "▸ "; color: rgba(34, 211, 238, .45); }
.marquee li:hover { color: var(--text); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { position: relative; padding: clamp(72px, 8vw, 112px) 0; }

.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2, .legacy-text h2, .contact-info h2 {
  font-family: var(--display);
  font-size: clamp(26px, 3.4vw, 44px);
  letter-spacing: -.02em;
  line-height: 1.12;
}
.section-head p:not(.eyebrow) { margin-top: 18px; color: var(--muted); font-size: 17px; }

.eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  font-family: var(--mono); font-size: 13px; letter-spacing: .04em;
  color: var(--cyan);
  white-space: nowrap;
}

/* ---------- cards ---------- */
.card {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .01));
  overflow: hidden;
  transition: border-color .3s, transform .4s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(34, 211, 238, .09), transparent 45%);
  opacity: 0; transition: opacity .35s;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  padding: 1px;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(34, 211, 238, .7), rgba(167, 139, 250, .3) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0; transition: opacity .35s;
}
.card:hover::before, .card:hover::after { opacity: 1; }

/* ---------- services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.service {
  display: flex; flex-direction: column;
  padding: 28px 24px 24px;
  min-height: 300px;
}
.service:hover { transform: translateY(-4px); }
.service-icon {
  display: grid; place-items: center;
  width: 48px; height: 48px; margin-bottom: 24px;
  border: 1px solid var(--border-2); border-radius: 14px;
  background: linear-gradient(140deg, rgba(34, 211, 238, .14), rgba(167, 139, 250, .08));
  color: var(--cyan);
}
.service-icon svg, .bento-icon svg {
  width: 24px; height: 24px;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.service h3 { font-size: 18px; margin-bottom: 10px; letter-spacing: -.01em; }
.service p { font-size: 14.5px; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 22px; }
.tags li {
  padding: 3px 10px;
  border: 1px solid var(--border); border-radius: 8px;
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  background: rgba(255, 255, 255, .02);
}
.service--accent {
  border-color: rgba(34, 211, 238, .3);
  background: linear-gradient(180deg, rgba(34, 211, 238, .08), rgba(129, 140, 248, .03));
}
.service--accent .tags li { border-color: rgba(34, 211, 238, .25); color: #a5f3fc; }

/* ---------- legacy ---------- */
.legacy::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 60% 50% at 80% 50%, rgba(129, 140, 248, .08), transparent 70%);
}
.legacy-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 64px;
  align-items: center;
}
.legacy-text > .muted { margin-top: 18px; font-size: 17px; }

.checklist { display: grid; gap: 4px; margin-top: 36px; counter-reset: c; }
.checklist li {
  display: flex; gap: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
.checklist li:last-child { border-bottom: 1px solid var(--border); }
.checklist span {
  flex: none;
  font-family: var(--mono); font-size: 13px; color: var(--cyan);
  padding-top: 2px;
}
.checklist div { color: var(--muted); font-size: 15px; }
.checklist b { display: block; color: var(--text); font-weight: 600; font-size: 16px; margin-bottom: 2px; }

.diff-stat { margin-left: auto; font-family: var(--mono); font-size: 12px; }
.diff-stat em { font-style: normal; }
.diff-stat .add { color: var(--green); }
.diff-stat .del { color: var(--red); }

.diff-body {
  margin: 0; padding: 14px 0;
  font-family: var(--mono); font-size: 13px; line-height: 1.7;
  color: #c9d4e8;
  overflow-x: auto;
}
.diff-body code { display: flex; flex-direction: column; min-width: max-content; }
.diff-body .ln { display: block; padding: 0 20px 0 0; white-space: pre; }
.diff-body .ln i {
  display: inline-block; width: 36px; text-align: center;
  font-style: normal; color: var(--dim);
}
.diff-body .del { background: rgba(251, 113, 133, .08); }
.diff-body .del i { color: var(--red); }
.diff-body .del { color: rgba(201, 212, 232, .55); }
.diff-body .add { background: rgba(52, 211, 153, .08); }
.diff-body .add i { color: var(--green); }
.diff-body .kw { color: #c792ea; }
.diff-body .fn { color: #82aaff; }
.diff-body .str { color: #c3e88d; }
.diff-body .ty { color: #ffcb6b; }
.diff-body .del .kw, .diff-body .del .fn, .diff-body .del .str { color: inherit; }

.diff-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  font-family: var(--mono); font-size: 12px; color: var(--dim);
}
.diff-footer span:first-child { color: var(--green); display: inline-flex; align-items: center; gap: 8px; }
.ok-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }

/* ---------- process ---------- */
.process-inner {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 64px;
  align-items: start;
}
.process-aside { position: sticky; top: calc(var(--header-h) + 48px); }
.process-aside .section-head { margin-bottom: 32px; }

.timeline { position: relative; display: grid; gap: 12px; }
.timeline-progress {
  position: absolute; top: 28px; bottom: 28px; left: 27px;
  width: 2px; border-radius: 2px;
  background: var(--border);
}
.timeline-progress i {
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(var(--cyan), var(--violet));
  box-shadow: 0 0 12px rgba(34, 211, 238, .6);
  transform-origin: top;
  transform: scaleY(var(--progress, 0));
}
.step {
  position: relative;
  display: flex; gap: 24px;
  padding: 10px 0;
}
.step-num {
  position: relative; z-index: 1;
  flex: none;
  display: grid; place-items: center;
  width: 56px; height: 56px;
  border: 1px solid var(--border-2); border-radius: 16px;
  background: var(--bg-2);
  font-family: var(--mono); font-size: 15px; color: var(--muted);
  transition: color .4s, border-color .4s, box-shadow .4s, background-color .4s;
}
.step.is-passed .step-num {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, .5);
  background: #08141c;
  box-shadow: 0 0 24px -4px rgba(34, 211, 238, .5);
}
.step-body {
  flex: 1;
  padding: 20px 24px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .4s;
}
.step.is-passed .step-body { border-color: rgba(255, 255, 255, .12); }
.step h3 {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px;
  font-size: 18px; margin-bottom: 8px;
}
.step h3 em {
  font-style: normal; font-weight: 400;
  font-family: var(--mono); font-size: 12px;
  padding: 2px 8px; border-radius: 6px;
  color: var(--cyan); background: rgba(34, 211, 238, .08);
}
.step p { color: var(--muted); font-size: 15px; }

/* ---------- stack ---------- */
.stack {
  max-width: 920px; margin: 0 auto;
  padding: 10px;
  border: 1px solid var(--border); border-radius: calc(var(--radius) + 6px);
  background: var(--surface);
}
.stack-tabs {
  display: flex; gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: rgba(0, 0, 0, .3);
  overflow-x: auto;
  scrollbar-width: none;
}
.stack-tabs::-webkit-scrollbar { display: none; }
.stack-tabs button {
  flex: 1 0 auto;
  padding: 11px 18px;
  border: 0; border-radius: 12px;
  background: transparent;
  font-family: var(--mono); font-size: 13.5px; color: var(--muted);
  white-space: nowrap;
  transition: color .2s, background-color .2s, box-shadow .2s;
}
.stack-tabs button:hover { color: var(--text); }
.stack-tabs button[aria-selected="true"] {
  color: var(--bg);
  background: var(--cyan);
  box-shadow: 0 4px 20px -4px rgba(34, 211, 238, .6);
}
.stack-panel { padding: 32px 22px 26px; min-height: 180px; }
.stack-panel ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.stack-panel li {
  padding: 10px 18px;
  border: 1px solid var(--border-2); border-radius: 12px;
  background: rgba(255, 255, 255, .025);
  font-size: 15px; font-weight: 500;
  transition: border-color .2s, background-color .2s, transform .2s;
}
.stack-panel li:hover { border-color: rgba(34, 211, 238, .5); background: rgba(34, 211, 238, .06); transform: translateY(-2px); }
.stack-panel.is-animating li { animation: pop .5s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 35ms); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.96); } }

/* ---------- bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.bento-item { padding: 28px; min-height: 230px; display: flex; flex-direction: column; }
.bento-item h3 { font-size: 19px; margin-bottom: 10px; }
.bento-item p { color: var(--muted); font-size: 15px; }
.bento-item--wide {
  grid-column: span 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 28px;
  align-items: center;
}
.bento-icon {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  color: var(--violet);
  background: rgba(167, 139, 250, .1);
  border: 1px solid rgba(167, 139, 250, .2);
}
.bento-item:not(.bento-item--wide) h3 { margin-top: 32px; }

.gitlog {
  display: grid; gap: 6px;
  font-family: var(--mono); font-size: 12.5px;
}
.gitlog li {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--border); border-radius: 10px;
  background: rgba(0, 0, 0, .25);
  color: #c9d4e8;
}
.gitlog li:first-child { border-color: rgba(34, 211, 238, .3); }
.gitlog code { color: var(--amber); }
.gitlog span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gitlog em { font-style: normal; }
.gitlog .t-feat { color: var(--green); }
.gitlog .t-fix { color: var(--red); }
.gitlog .t-test { color: var(--indigo); }
.gitlog time { color: var(--dim); font-size: 11.5px; }

.uptime { padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: rgba(0, 0, 0, .25); }
.uptime-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 14px;
  font-family: var(--mono); font-size: 12px; color: var(--dim);
}
.uptime-head b { color: var(--green); font-size: 16px; font-weight: 500; }
.uptime-bars { display: flex; align-items: flex-end; gap: 3px; height: 36px; }
.uptime-bars i {
  flex: 1; border-radius: 3px;
  background: var(--green);
  opacity: .75;
  transform-origin: bottom;
}
.uptime-bars i.warn { background: var(--amber); }
.is-visible .uptime-bars i { animation: grow .6s var(--ease) backwards; animation-delay: calc(var(--i) * 18ms); }
@keyframes grow { from { transform: scaleY(0); } }

/* ---------- faq ---------- */
.faq-inner {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 64px;
  align-items: start;
}
.faq-list { display: grid; gap: 10px; }
.faq {
  border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface);
  transition: border-color .3s, background-color .3s;
}
.faq[open] { border-color: rgba(34, 211, 238, .3); background: rgba(34, 211, 238, .03); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px;
  font-weight: 600; font-size: 16.5px;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px;
  border: 1px solid var(--border-2);
  font-family: var(--mono); font-weight: 400; font-size: 18px; color: var(--cyan);
  transition: transform .3s var(--ease);
}
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { padding: 0 24px 22px; color: var(--muted); font-size: 15.5px; }

/* ---------- contact ---------- */
.contact-box {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: 56px;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--border-2);
  border-radius: 28px;
  background:
    radial-gradient(ellipse 60% 80% at 0% 0%, rgba(34, 211, 238, .1), transparent 60%),
    radial-gradient(ellipse 60% 80% at 100% 100%, rgba(167, 139, 250, .1), transparent 60%),
    var(--bg-2);
  overflow: hidden;
}
.contact-info > .muted { margin-top: 18px; font-size: 16.5px; }

.contact-links { display: grid; gap: 10px; margin-top: 36px; }
.contact-links a {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--border); border-radius: 14px;
  background: rgba(255, 255, 255, .02);
  transition: border-color .2s, background-color .2s, transform .2s;
}
.contact-links a:hover { border-color: rgba(34, 211, 238, .45); background: rgba(34, 211, 238, .05); transform: translateX(4px); }
.contact-links svg {
  flex: none; width: 22px; height: 22px;
  fill: none; stroke: var(--cyan); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.contact-links span { display: flex; flex-direction: column; font-weight: 500; line-height: 1.35; min-width: 0; overflow-wrap: anywhere; }
.contact-links small { font-family: var(--mono); font-size: 11.5px; color: var(--dim); font-weight: 400; }
.contact-note { margin-top: 16px; font-size: 14px; color: var(--dim); }

.form { display: grid; gap: 22px; align-content: start; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field > span, .field > legend {
  padding: 0; margin-bottom: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .03em; color: var(--muted);
}
.field > span { margin-bottom: 0; }
.field input, .field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-2); border-radius: 12px;
  background: rgba(0, 0, 0, .3);
  color: var(--text);
  font: inherit; font-size: 15.5px;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: rgba(34, 211, 238, .6);
  background: rgba(0, 0, 0, .45);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, .12);
}
.field input.is-invalid { border-color: var(--red); box-shadow: 0 0 0 4px rgba(251, 113, 133, .12); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block;
  padding: 9px 15px;
  border: 1px solid var(--border-2); border-radius: 100px;
  font-size: 14px; color: var(--muted);
  background: rgba(255, 255, 255, .02);
  transition: color .2s, border-color .2s, background-color .2s;
  user-select: none;
}
.chip:hover span { color: var(--text); border-color: rgba(255, 255, 255, .3); }
.chip input:checked + span {
  color: var(--text);
  border-color: rgba(34, 211, 238, .6);
  background: rgba(34, 211, 238, .12);
}
.chip input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }

.consent {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 13.5px; color: var(--muted); line-height: 1.5;
  cursor: pointer;
}
.consent input {
  flex: none;
  appearance: none; -webkit-appearance: none;
  width: 20px; height: 20px; margin: 0;
  border: 1px solid var(--border-2); border-radius: 6px;
  background: rgba(0, 0, 0, .3);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.consent input::after {
  content: ""; width: 10px; height: 6px;
  border: 2px solid var(--bg); border-top: 0; border-right: 0;
  transform: rotate(-45deg) translate(1px, -1px) scale(0);
  transition: transform .2s var(--ease);
}
.consent input:checked { background: var(--cyan); border-color: var(--cyan); }
.consent input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.consent input.is-invalid { border-color: var(--red); box-shadow: 0 0 0 4px rgba(251, 113, 133, .12); }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; }
.form-actions .btn[disabled] { opacity: .6; pointer-events: none; }
.form-status { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.form-status.is-ok { color: var(--green); }
.form-status.is-error { color: var(--red); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 56px 0 28px; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
.footer-brand p { margin-top: 14px; max-width: 320px; color: var(--muted); font-size: 14.5px; }
.footer-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; align-content: start; }
.footer-nav a { color: var(--muted); font-size: 14.5px; transition: color .2s; }
.footer-nav a:hover { color: var(--text); }
.footer-legal { font-family: var(--mono); font-size: 12.5px; color: var(--dim); line-height: 1.9; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13.5px; color: var(--dim);
}

/* ---------- legal page ---------- */
.legal-back { margin-left: auto; }
.legal {
  max-width: 820px;
  padding-top: calc(var(--header-h) + 64px);
  padding-bottom: 96px;
}
.legal h1 {
  font-family: var(--display);
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: -.02em;
}
.legal-meta { margin-top: 14px; font-family: var(--mono); font-size: 13px; color: var(--dim); }
.legal h2 { margin: 44px 0 14px; font-size: 20px; }
.legal p, .legal li { color: var(--muted); }
.legal p + p { margin-top: 12px; }
.legal ul { display: grid; gap: 6px; padding-left: 20px; list-style: disc; }
.legal li::marker { color: var(--cyan); }
.legal + .footer { padding-top: 0; }
.legal + .footer .footer-bottom { margin-top: 0; }

/* ---------- 404 ---------- */
.not-found {
  max-width: 720px;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: calc(var(--header-h) + 48px);
  padding-bottom: 64px;
}
.not-found .terminal { margin-bottom: 48px; }
.not-found-term { height: auto; }
.not-found h1 {
  font-family: var(--display);
  font-size: clamp(28px, 5vw, 48px);
  letter-spacing: -.02em;
  margin-bottom: 16px;
}
.not-found .muted { font-size: 17px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service { min-height: 0; }
  .hero-facts { grid-template-columns: repeat(2, auto); }
}

@media (max-width: 960px) {
  :root { --header-h: 64px; }

  .header-cta { display: none; }
  .burger { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 24px var(--gutter) 32px;
    background: var(--bg);
    opacity: 0; visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s, transform .25s var(--ease), visibility 0s .25s;
    overflow-y: auto;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav a:not(.btn) {
    padding: 16px 4px;
    border-bottom: 1px solid var(--border); border-radius: 0;
    font-family: var(--display); font-size: 22px; color: var(--text);
  }
  .nav a:not(.btn):hover { background: none; color: var(--cyan); }
  .nav a.is-active::after { display: none; }
  .nav-cta { display: inline-flex; margin-top: 24px; }
  body.nav-open { overflow: hidden; }
  .header.menu-open { background: var(--bg); border-bottom-color: var(--border); }

  .hero { min-height: 0; padding-bottom: 72px; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }

  .legacy-inner, .process-inner, .faq-inner, .contact-box { grid-template-columns: 1fr; gap: 40px; }
  .process-aside { position: static; }
  .faq-inner .section-head { margin-bottom: 0; }

  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento-item--wide, .bento-item--fill { grid-column: span 2; }

  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .hero { padding-top: calc(var(--header-h) + 32px); }
  .hero-cta .btn { flex: 1 1 100%; }
  .hero-facts { gap: 18px 24px; margin-top: 36px; }
  .terminal-body { height: 300px; font-size: 12px; padding: 16px; }

  .services-grid { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 40px; }
  .section-head p:not(.eyebrow) { font-size: 16px; }

  .bento { grid-template-columns: 1fr; }
  .bento-item--wide, .bento-item--fill { grid-column: auto; }
  .bento-item--wide { grid-template-columns: 1fr; }
  .bento-item { min-height: 0; padding: 24px; }

  .step { gap: 14px; }
  .step-num { width: 44px; height: 44px; border-radius: 12px; font-size: 13px; }
  .timeline-progress { left: 21px; top: 22px; bottom: 22px; }
  .step-body { padding: 16px 18px; }

  .stack-tabs { flex-wrap: wrap; }
  .stack-tabs button { flex: 1 0 30%; padding: 10px 8px; font-size: 12.5px; }
  .stack-panel { padding: 24px 8px 16px; }
  .stack-panel li { padding: 8px 14px; font-size: 14px; }

  .field-row { grid-template-columns: 1fr; }
  .form-actions .btn { width: 100%; }
  .contact-box { border-radius: 22px; }

  .faq summary { padding: 18px; font-size: 15.5px; }
  .faq p { padding: 0 18px 18px; }

  .footer-inner { grid-template-columns: 1fr; }
  .diff-body { font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .marquee-track { animation: none; }
  .reveal { opacity: 1; transform: none; }
}
