/* Layout: multi-page studio site; deep ink + one warm accent; data-flow diagrams as the signature detail */
:root {
  --bg: #f4f5f9;
  --surface: #ffffff;
  --surface-2: #e9ecf4;
  --ink: #0f1830;
  --muted: #545e78;
  --line: #d9deea;
  --accent: #c24e14;
  --accent-soft: rgba(194, 78, 20, 0.1);
  --accent-2: #e8873f;
  --on-accent: #ffffff;
  --good: #11795a;
  --good-soft: rgba(17, 121, 90, 0.12);
  --warn: #a86400;
  --glow: rgba(255, 138, 76, 0.22);
  --grid-line: rgba(15, 24, 48, 0.06);
  --header-bg: rgba(244, 245, 249, 0.82);
  --code-bg: #0d1428;
  --code-bar: #151f3a;
  --code-fg: #d6def0;
  --code-muted: #6c7ca0;
  --code-k: #7fd6ff;
  --code-s: #ffc27a;
  --code-n: #ff8f8f;
  --code-g: #6fe0b0;
  --band-bg: #0f1830;
  --band-fg: #b9c3da;
  --band-head: #ffffff;
  --band-accent: #ff9d66;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  --radius: 16px;
  --shadow: 0 18px 40px rgba(15, 24, 48, 0.08);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #080d1b;
    --surface: #0f162b;
    --surface-2: #161f3a;
    --ink: #edf0f8;
    --muted: #98a2bb;
    --line: #222c4a;
    --accent: #ff8a4c;
    --accent-soft: rgba(255, 138, 76, 0.14);
    --accent-2: #ffc08a;
    --on-accent: #1b0c03;
    --good: #4fd1a5;
    --good-soft: rgba(79, 209, 165, 0.14);
    --warn: #ffc46b;
    --glow: rgba(255, 138, 76, 0.18);
    --grid-line: rgba(237, 240, 248, 0.05);
    --header-bg: rgba(8, 13, 27, 0.8);
    --band-bg: #0f162b;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #080d1b;
  --surface: #0f162b;
  --surface-2: #161f3a;
  --ink: #edf0f8;
  --muted: #98a2bb;
  --line: #222c4a;
  --accent: #ff8a4c;
  --accent-soft: rgba(255, 138, 76, 0.14);
  --accent-2: #ffc08a;
  --on-accent: #1b0c03;
  --good: #4fd1a5;
  --good-soft: rgba(79, 209, 165, 0.14);
  --warn: #ffc46b;
  --glow: rgba(255, 138, 76, 0.18);
  --grid-line: rgba(237, 240, 248, 0.05);
  --header-bg: rgba(8, 13, 27, 0.8);
  --band-bg: #0f162b;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

/* ===== Base ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
}
h1, h2, h3, .logo { font-family: var(--font-display); line-height: 1.1; color: var(--ink); text-wrap: balance; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--on-accent); }

.container { width: min(1160px, 100% - 32px); margin-inline: auto; }
.section { padding-block: 104px; }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.section.tight { padding-block: 72px; }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--muted); }
h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; }

.eyebrow {
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: ""; display: inline-block; width: 22px; height: 1.5px; background: currentColor;
  vertical-align: middle; margin-right: 10px; margin-top: -2px;
}
.mono { font-family: var(--font-mono); }

/* ===== Buttons ===== */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent);
  color: var(--on-accent);
  padding: 14px 26px;
  border-radius: 999px;
  border: 1.5px solid var(--accent);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 0.7s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px var(--glow); }
.btn:hover::before { transform: translateX(120%); }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost::before { display: none; }
.btn-ghost:hover { border-color: var(--ink); box-shadow: none; }
.btn-sm { padding: 9px 18px; font-size: 0.92rem; }
.link-arrow { font-weight: 700; color: var(--accent); display: inline-flex; gap: 6px; align-items: center; }
.link-arrow::after { content: "→"; transition: transform 0.2s; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ===== Header ===== */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 101;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform-origin: 0 50%; transform: scaleX(0);
}
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.header.scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 30px rgba(8, 13, 27, 0.06); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 72px; transition: height 0.3s ease; }
.header.scrolled .nav { height: 62px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; flex-shrink: 0; }
.logo span { color: var(--accent); }
.logo-mark { width: 26px; height: 26px; }
.logo-mark path { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.logo-mark circle { fill: var(--accent); }
.logo-mark .hub { fill: var(--bg); stroke: var(--accent); stroke-width: 3; transition: transform 0.4s ease; transform-origin: 16px 16px; }
.logo:hover .logo-mark .hub { transform: scale(1.25); }

/* Platforms strip */
.platforms { padding-block: 34px; border-bottom: 1px solid var(--line); overflow: hidden; }
.platforms p { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); text-align: center; margin-bottom: 18px; }
.marquee { display: flex; width: max-content; gap: 56px; padding-right: 56px; animation: marquee 36s linear infinite; }
.marquee span { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--muted); opacity: 0.75; white-space: nowrap; }
.platforms:hover .marquee { animation-play-state: paused; }
.platforms-mask { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* 404 */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding-block: 140px 80px; }
.notfound .code { font-family: var(--font-mono); color: var(--accent); margin-bottom: 12px; }
.notfound .hero-cta { justify-content: center; margin: 28px 0 0; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { font-weight: 600; font-size: 0.94rem; color: var(--muted); transition: color 0.2s; }
.nav-links a:not(.btn) { position: relative; }
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.25s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a:not(.btn):hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.btn-sm { color: var(--on-accent); }
.menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: 0.3s; }

/* ===== Home hero ===== */
.hero { position: relative; isolation: isolate; padding: 150px 0 72px; overflow: hidden; }
.hero::before, .page-hero::before {
  content: ""; position: absolute; z-index: -1;
  width: 720px; height: 720px; right: -200px; top: -240px;
  background: radial-gradient(circle, var(--glow), transparent 62%);
  pointer-events: none;
  animation: drift 16s ease-in-out infinite alternate;
}
.hero::after, .page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 70% 30%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 65% at 70% 30%, #000 25%, transparent 78%);
}
@keyframes drift { to { transform: translate(-120px, 80px) scale(1.15); } }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: center; }
.hero-text { min-width: 0; }
.hero h1, .page-hero h1 {
  font-size: clamp(2.6rem, 5.6vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin-bottom: 24px;
}
.hero h1 em, .page-hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: 1.14rem; color: var(--muted); margin-bottom: 34px; max-width: 36em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 48px; }
.hero-stats { list-style: none; display: flex; gap: 36px; flex-wrap: wrap; }
.hero-stats li { border-left: 2px solid var(--accent); padding-left: 14px; }
.hero-stats strong { font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-stats span { display: block; font-size: 0.85rem; color: var(--muted); margin-top: 4px; }

.hero-card { position: relative; min-width: 0; }
.code-window {
  background: var(--code-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  box-shadow: 0 40px 80px rgba(8, 13, 27, 0.35), 0 0 0 1px var(--line);
  overflow: hidden;
  transform: perspective(1200px) rotateY(-6deg) rotateX(3deg);
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1);
}
.code-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: var(--code-bar); }
.code-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.code-bar i:nth-child(2) { background: #febc2e; }
.code-bar i:nth-child(3) { background: #28c840; }
.code-bar span { margin-left: 10px; color: var(--code-muted); font-family: var(--font-mono); font-size: 0.78rem; }
.code-window pre { padding: 20px 22px; overflow-x: auto; }
.code-window code { font-family: var(--font-mono); font-size: 0.8rem; color: var(--code-fg); line-height: 1.65; }
.code-window .c { color: var(--code-muted); }
.code-window .k { color: var(--code-k); }
.code-window .s { color: var(--code-s); }
.code-window .n { color: var(--code-n); }
.status-chip {
  position: absolute; left: -18px; bottom: -20px;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 16px; font-family: var(--font-mono); font-size: 0.78rem;
  box-shadow: var(--shadow);
  animation: float 5s ease-in-out infinite;
}
.status-chip b { width: 9px; height: 9px; border-radius: 50%; background: var(--good); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--good-soft); }
  100% { box-shadow: 0 0 0 10px rgba(79, 209, 165, 0); }
}
@keyframes float { 50% { transform: translateY(-6px); } }

/* Order-to-cash strip */
.flow-caption { margin-top: 84px; margin-bottom: 12px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
.flow {
  list-style: none;
  display: grid; grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.flow li {
  padding: 18px 20px;
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted);
  border-right: 1px solid var(--line);
}
.flow li:last-child { border-right: 0; }
.flow li::before {
  content: ""; display: block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--line); margin-bottom: 10px; transition: background 0.3s;
}
.flow li.on { color: var(--ink); }
.flow li.on::before { background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }

/* ===== Inner page hero ===== */
.page-hero { position: relative; isolation: isolate; overflow: hidden; padding: 150px 0 72px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.4rem, 5vw, 4rem); max-width: 16em; }
.page-hero .lead { margin-bottom: 0; }
.page-hero .hero-cta { margin: 30px 0 0; }
.crumbs { display: flex; gap: 8px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a:hover { color: var(--accent); }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.jump a {
  font-family: var(--font-mono); font-size: 0.8rem; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); transition: 0.2s;
}
.jump a:hover { color: var(--ink); border-color: var(--accent); }

/* ===== Signs ===== */
.signs { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.signs li { display: grid; gap: 8px; align-content: start; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform 0.25s, border-color 0.25s; }
.signs li:hover { transform: translateY(-3px); border-color: var(--accent); }
.signs b { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.2; }
.signs span { color: var(--muted); font-size: 0.94rem; }
.signs b a { color: inherit; text-decoration: none; }
.signs b a:hover { color: var(--accent); }

/* ===== Explore tiles (home) ===== */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tile {
  display: flex; flex-direction: column; gap: 12px;
  padding: 30px; border-radius: 20px; background: var(--bg); border: 1px solid var(--line);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.tile:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--accent); }
.tile.wide { grid-column: span 2; }
.tile .card-tag { align-self: flex-start; margin-bottom: 6px; }
.tile h3 { font-size: 1.45rem; }
.tile p { color: var(--muted); }
.tile .link-arrow { margin-top: auto; padding-top: 8px; }

/* ===== Band (stats / CTA) ===== */
.band { background: var(--band-bg); color: var(--band-fg); position: relative; overflow: hidden; isolation: isolate; }
.band::before {
  content: ""; position: absolute; z-index: -1; width: 600px; height: 600px; left: -220px; bottom: -320px;
  background: radial-gradient(circle, rgba(255, 138, 76, 0.22), transparent 65%); pointer-events: none;
}
.band h2, .band h3 { color: var(--band-head); }
.band .eyebrow { color: var(--band-accent); }
.band-stats { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.band-stats li { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 18px; }
.band-stats strong { display: block; font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 800; color: var(--band-head); line-height: 1; font-variant-numeric: tabular-nums; }
.band-stats span { font-size: 0.92rem; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-row h2 { margin: 0; max-width: 18em; }
.cta-row p { margin-top: 10px; max-width: 34em; }
.band .btn-ghost { color: var(--band-head); border-color: rgba(255, 255, 255, 0.25); }
.band .btn-ghost:hover { border-color: var(--band-head); }

/* ===== Tabs ===== */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 36px; }
.tab {
  font: inherit; font-weight: 700; font-size: 0.95rem; cursor: pointer;
  padding: 10px 22px; border-radius: 999px; border: 0; background: transparent; color: var(--muted); transition: 0.2s;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.tab-intro { max-width: 46em; color: var(--muted); margin-bottom: 28px; }
.tab-intro b { color: var(--ink); }

/* ===== Service cards ===== */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.card { display: flex; flex-direction: column; background: var(--surface); padding: 30px 26px 30px; transition: background 0.25s; }
.card:hover { background: var(--bg); }
.card-tag {
  display: inline-block; align-self: flex-start; font-family: var(--font-mono); font-size: 0.74rem;
  color: var(--accent); background: var(--accent-soft);
  padding: 4px 10px; border-radius: 6px; margin-bottom: 20px;
}
.card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.94rem; }
.card .plain { margin-top: auto; padding-top: 16px; color: var(--ink); font-size: 0.9rem; }
.card .plain b, .deliver b { color: var(--accent); }

/* ===== Process ===== */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.steps li { padding-top: 22px; border-top: 2px solid var(--line); position: relative; }
.steps li::before { content: ""; position: absolute; top: -2px; left: 0; width: 48px; height: 2px; background: var(--accent); transition: width 0.4s ease; }
.steps li:hover::before { width: 100%; }
.step-num { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent); }
.steps h3 { margin: 10px 0 8px; font-size: 1.35rem; }
.steps p { color: var(--muted); font-size: 0.95rem; }
.deliver { margin-top: 14px; font-size: 0.9rem; color: var(--ink) !important; }

/* ===== Projects ===== */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 30px; }
.filter {
  font: inherit; font-weight: 600; font-size: 0.9rem; padding: 8px 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--muted); transition: 0.2s;
}
.filter:hover { color: var(--ink); border-color: var(--ink); }
.filter.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  transition: transform 0.25s, box-shadow 0.25s;
}
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.project.hide { display: none; }
.tag { align-self: flex-start; font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); margin-bottom: 16px; }
.project h3 { font-size: 1.25rem; margin-bottom: 10px; }
.project p { color: var(--muted); font-size: 0.94rem; }
.project .result {
  margin-top: auto; padding-top: 18px; color: var(--ink); font-weight: 700;
  display: flex; gap: 8px; align-items: baseline;
}
.project .result::before { content: "→"; color: var(--accent); }
.story { display: grid; gap: 4px; margin-bottom: 4px; }
.story dt { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-top: 8px; }
.story dd { color: var(--muted); font-size: 0.94rem; }

/* ===== Integrations ===== */
.int-block { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.int-block.flip .int-copy { order: 2; }
.int-copy { min-width: 0; }
.int-copy > p { color: var(--muted); margin-bottom: 18px; max-width: 34em; }
.int-logo {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px;
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted);
}
.int-logo b { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--ink); color: var(--bg); font-family: var(--font-display); font-size: 1.1rem; }
.ticks { list-style: none; display: grid; gap: 10px; margin: 6px 0 22px; }
.ticks li { padding-left: 30px; position: relative; color: var(--muted); }
.ticks li b { color: var(--ink); }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 0.45em;
  width: 13px; height: 7px; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.chips li { font-family: var(--font-mono); font-size: 0.76rem; padding: 5px 11px; border-radius: 8px; background: var(--surface-2); color: var(--ink); }

/* Pipeline diagram */
.pipe {
  position: relative; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px;
  box-shadow: var(--shadow);
}
.pipe-title { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; display: flex; justify-content: space-between; gap: 12px; }
.pipe-title .live { color: var(--good); display: inline-flex; align-items: center; gap: 6px; }
.pipe-title .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); animation: pulse 2s infinite; }
.pipe-row { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 10px; }
.node {
  display: grid; gap: 4px; justify-items: center; text-align: center;
  padding: 16px 10px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); min-width: 0;
}
.node b { font-family: var(--font-display); font-size: 1rem; }
.node small { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); }
.node.core { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.wire { position: relative; width: 44px; height: 2px; background: var(--line); overflow: hidden; border-radius: 2px; }
.wire::after {
  content: ""; position: absolute; top: 0; left: -40%; width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: travel 1.6s linear infinite;
}
.wire.slow::after { animation-duration: 2.4s; }
@keyframes travel { to { left: 100%; } }
.pipe-log {
  margin-top: 20px; padding: 14px 16px; border-radius: 12px; background: var(--code-bg); color: var(--code-fg);
  font-family: var(--font-mono); font-size: 0.74rem; line-height: 1.8; overflow-x: auto; white-space: nowrap;
}
.pipe-log .ok { color: var(--code-g); }
.pipe-log .k { color: var(--code-k); }
.pipe-log .s { color: var(--code-s); }
.pipe-log .n { color: var(--code-n); }

/* ===== Demo simulator ===== */
.sim { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
.sim-pick { display: grid; gap: 10px; }
.scenario {
  font: inherit; text-align: left; cursor: pointer;
  display: grid; gap: 4px; padding: 18px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); transition: 0.2s;
}
.scenario b { font-family: var(--font-display); font-size: 1.05rem; }
.scenario span { font-size: 0.86rem; color: var(--muted); }
.scenario:hover { border-color: var(--ink); }
.scenario[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.sim-stage { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 26px; min-width: 0; box-shadow: var(--shadow); }
.sim-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 22px; }
.sim-head h3 { font-size: 1.35rem; }
.sim-head p { color: var(--muted); font-size: 0.9rem; }
.sim-track { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.sim-track li {
  position: relative; padding: 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line);
  display: grid; gap: 4px; transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.sim-track li b { font-size: 0.92rem; }
.sim-track li small { font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted); }
.sim-track li .st { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); }
.sim-track li.run { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); transform: translateY(-3px); }
.sim-track li.run .st { color: var(--accent); }
.sim-track li.done { border-color: var(--good); }
.sim-track li.done .st { color: var(--good); }
.console {
  height: 210px; overflow-y: auto; padding: 14px 16px; border-radius: 14px;
  background: var(--code-bg); color: var(--code-fg); font-family: var(--font-mono); font-size: 0.76rem; line-height: 1.75;
}
.console p { white-space: pre-wrap; word-break: break-word; animation: rise 0.3s ease both; }
.console .t { color: var(--code-muted); }
.console .ok { color: var(--code-g); }
.console .k { color: var(--code-k); }
.console .w { color: var(--code-s); }
.sim-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.kpi { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); }
.kpi small { display: block; font-size: 0.78rem; color: var(--muted); }
.kpi b { font-family: var(--font-display); font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.kpi .was { font-size: 0.78rem; color: var(--muted); text-decoration: line-through; margin-left: 6px; }
.sim-note { margin-top: 12px; font-size: 0.8rem; color: var(--muted); }

/* ===== Forms ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.contact-copy { min-width: 0; }
.contact-copy > p { color: var(--muted); }
.contact-info { list-style: none; margin-top: 28px; display: grid; gap: 14px; }
.contact-info li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; overflow-wrap: anywhere; }
.contact-info strong { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; padding-top: 3px; color: var(--accent); }
.contact-form { background: var(--surface); color: var(--ink); padding: 32px; border-radius: 22px; display: grid; gap: 16px; min-width: 0; border: 1px solid var(--line); box-shadow: var(--shadow); }
.contact-form h3 { font-size: 1.35rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form label, .contact-form legend { display: grid; gap: 6px; font-weight: 600; font-size: 0.9rem; }
.contact-form fieldset { border: 0; display: grid; gap: 8px; }
.contact-form input, .contact-form select, .contact-form textarea {
  font: inherit; color: var(--ink); padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); width: 100%;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.check-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.check-chips label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; font-size: 0.86rem; cursor: pointer; transition: 0.2s; }
.check-chips input { width: auto; accent-color: var(--accent); padding: 0; }
.check-chips label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.form-status { font-size: 0.9rem; min-height: 1.2em; }
.form-status.ok { color: var(--good); }
.form-status.err { color: var(--accent); }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 72px; align-items: center; }
.about-copy { min-width: 0; }
.about-copy > p { color: var(--muted); margin-bottom: 16px; max-width: 36em; }
.about-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 30px; box-shadow: var(--shadow); }
.panel-label { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.about-panel blockquote { font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; line-height: 1.45; letter-spacing: -0.01em; }
.about-panel blockquote em { font-style: normal; color: var(--accent); }
.sign { margin-top: 20px; font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); }
.mini-head { font-size: 1.15rem; margin: 28px 0 14px; }
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.skill-group h3 { font-size: 1.15rem; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.pills { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.pills li { font-size: 0.86rem; padding: 6px 14px; border-radius: 999px; background: var(--surface-2); color: var(--ink); font-weight: 600; }

/* ===== Plans ===== */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.plan { position: relative; display: grid; gap: 10px; padding: 30px; border-radius: 20px; background: var(--bg); border: 1px solid var(--line); transition: transform 0.25s; }
.plan:hover { transform: translateY(-4px); }
.plan.featured {
  border: 2px solid transparent;
  background: linear-gradient(var(--bg), var(--bg)) padding-box, linear-gradient(135deg, var(--accent), var(--accent-2)) border-box;
  box-shadow: 0 20px 40px var(--glow);
}
.plan h3 { font-size: 1.4rem; }
.plan-for { color: var(--muted); font-size: 0.94rem; }
.plan ul { list-style: none; display: grid; gap: 10px; margin-top: 8px; padding-top: 16px; border-top: 1px dashed var(--line); }
.plan li { padding-left: 22px; position: relative; font-size: 0.94rem; }
.plan li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }
.plan-badge {
  position: absolute; top: -12px; left: 28px;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--font-mono); font-size: 0.72rem; padding: 3px 10px; border-radius: 999px;
}

/* ===== FAQ ===== */
.faq-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: start; }
.faq-grid .section-head { margin-bottom: 0; }
.faq { display: grid; gap: 10px; min-width: 0; }
.faq details { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 4px 20px; }
.section:not(.alt) .faq details { background: var(--surface); }
.faq summary { cursor: pointer; list-style: none; padding: 14px 0; font-weight: 700; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-family: var(--font-mono); font-size: 1.1rem; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 16px; }

/* ===== Footer ===== */
.footer { background: var(--surface); color: var(--muted); padding-block: 64px 28px; font-size: 0.92rem; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; margin-bottom: 44px; }
.footer-grid p { max-width: 28em; margin-top: 12px; }
.footer h4 { font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); margin-bottom: 14px; }
.footer ul { list-style: none; display: grid; gap: 8px; }
.footer ul a:hover { color: var(--accent); }
.footer-row { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-top: 22px; border-top: 1px solid var(--line); font-size: 0.84rem; }

/* ===== Effects ===== */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero-text > *, .page-hero .container > * { animation: rise 0.7s ease both; }
.hero-text > *:nth-child(2), .page-hero .container > *:nth-child(2) { animation-delay: 0.08s; }
.hero-text > *:nth-child(3), .page-hero .container > *:nth-child(3) { animation-delay: 0.16s; }
.hero-text > *:nth-child(4), .page-hero .container > *:nth-child(4) { animation-delay: 0.24s; }
.hero-text > *:nth-child(5), .page-hero .container > *:nth-child(5) { animation-delay: 0.32s; }
.hero-card { animation: rise 0.9s 0.2s ease both; }

.spot { position: relative; }
.spot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), var(--glow), transparent 65%);
  opacity: 0; transition: opacity 0.3s ease;
}
.spot:hover::after { opacity: 1; }

.js-reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--d, 0s);
}
.js-reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ===== Responsive ===== */
@media (max-width: 1080px) {
  .menu-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg);
    border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height 0.3s;
  }
  .nav-links.open { max-height: 560px; }
  .nav-links a { padding: 13px 20px; width: 100%; text-align: center; }
  .nav-links a:not(.btn)::after { display: none; }
  .nav-links a.active { color: var(--accent); }
  .nav-links .btn-sm { width: auto; margin: 10px 0 18px; }
  .menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle.open span:nth-child(2) { opacity: 0; }
  .menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .header.scrolled .nav { height: 72px; }
}
@media (max-width: 1000px) {
  .hero-grid, .about-grid, .contact-grid, .int-block, .faq-grid, .sim { grid-template-columns: 1fr; }
  .int-block.flip .int-copy { order: 0; }
  .cards, .cards.three { grid-template-columns: repeat(2, 1fr); }
  .projects, .signs, .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile.wide { grid-column: span 2; }
  .steps, .band-stats { grid-template-columns: repeat(2, 1fr); }
  .skills-grid, .plans { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .code-window { transform: none; }
  .status-chip { left: 12px; }
  .sim-pick { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .hero, .page-hero { padding-top: 120px; }
  .section { padding-block: 76px; }
  .cards, .cards.three, .projects, .steps, .signs, .tiles, .sim-pick, .form-row, .footer-grid { grid-template-columns: 1fr; }
  .tile.wide { grid-column: auto; }
  .flow { grid-template-columns: 1fr; }
  .flow-caption { margin-top: 64px; }
  .flow li { border-right: 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
  .flow li:last-child { border-bottom: 0; }
  .flow li::before { margin-bottom: 0; }
  .pipe-row { grid-template-columns: 1fr; justify-items: stretch; }
  .wire { width: 2px; height: 22px; justify-self: center; }
  .wire::after { left: 0; top: -40%; width: 100%; height: 40%; background: linear-gradient(180deg, transparent, var(--accent), transparent); animation-name: travel-v; }
  .sim-track { grid-template-columns: repeat(2, 1fr); }
  .sim-kpis { grid-template-columns: 1fr; }
  .contact-form { padding: 22px; }
  .contact-info li { grid-template-columns: 1fr; gap: 2px; }
  .band-stats { grid-template-columns: 1fr 1fr; }
}
@keyframes travel-v { to { top: 100%; } }
