:root {
  --bg: #ffffff;
  --bg-tint: #fff8f2;
  --ink: #17120f;
  --ink-2: #4a423c;
  --muted: #716760;
  --line: #f0e4da;
  --red: #ff2d55;
  --orange: #ff6a1a;
  --yellow: #ffc21a;
  --accent: #d9301c;          /* solid accent for small text on white */
  --soft: #fff0e6;
  --grad: linear-gradient(120deg, #ff2d55 0%, #ff6a1a 50%, #ffc21a 100%);
  --grad-btn: linear-gradient(120deg, #e0123f 0%, #d63a12 60%, #c2410c 100%);
  --grad-text: linear-gradient(120deg, #e8173f 0%, #f04e12 55%, #d97706 100%);
  --radius: 18px;
  --display: "Martian Mono", ui-monospace, monospace;
  --body: "Geologica", system-ui, sans-serif;
  --mono: "Martian Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  /* surfaces (light theme) */
  --surface: #ffffff;        /* cards, inputs, figures */
  --surface-2: #fffaf6;      /* subtle warm surface */
  --panel: #17120f;          /* dark panels: CTA, code, terminal, featured cards */
  --panel-border: transparent;
  --nav-bg: rgba(255, 255, 255, .75);
  --grey: #cfc5bd;           /* neutral bars / inactive icons */
  --ok-bg: #f0fbf3;
  --tag-ink: #9a2a12;
  --grid-opacity: .8;
  color-scheme: light;
}

/* dark theme: explicit choice, or system preference when nothing is chosen */
:root[data-theme="dark"] {
  --bg: #0e0b09;
  --bg-tint: #15110e;
  --ink: #f6eee7;
  --ink-2: #c8bcb2;
  --muted: #8e8279;
  --line: #2c241f;
  --soft: #2a1a12;
  --accent: #ff8152;
  --surface: #17120f;
  --surface-2: #1d1713;
  --panel: #1f1814;
  --panel-border: #33291f;
  --nav-bg: rgba(14, 11, 9, .72);
  --grey: #4b403a;
  --ok-bg: #102117;
  --tag-ink: #ffb08c;
  --grid-opacity: .45;
  --grad-text: var(--grad);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0b09; --bg-tint: #15110e; --ink: #f6eee7; --ink-2: #c8bcb2; --muted: #8e8279; --line: #2c241f;
    --soft: #2a1a12; --accent: #ff8152; --surface: #17120f; --surface-2: #1d1713; --panel: #1f1814; --panel-border: #33291f;
    --nav-bg: rgba(14, 11, 9, .72); --grey: #4b403a; --ok-bg: #102117; --tag-ink: #ffb08c; --grid-opacity: .45; --grad-text: var(--grad);
    color-scheme: dark;
  }
}
/* dark panels need an edge when the page itself is dark */
.cta-inner, .code-card, .quote-card, .service-dark, .post-featured, .lang a.on { box-shadow: inset 0 0 0 1px var(--panel-border); }
.terminal { border-top-color: var(--panel-border); }

/* price generator: € 48,317 → XX,XXX → CUSTOM */
.price-gen { display: flex; align-items: baseline; gap: 10px; margin: 16px 0 6px; min-height: 1.2em; font-family: var(--display); font-variation-settings: "wdth" 80; font-weight: 700; letter-spacing: -.02em; font-size: clamp(34px, 3.6vw, 46px); line-height: 1.1; }
.pg-cur { color: rgba(255,255,255,.45); transition: opacity .4s, width .4s; }
.price-gen.done .pg-cur { opacity: 0; width: 0; overflow: hidden; margin-right: -10px; }
.pg-val { font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-gen.rolling .pg-val { -webkit-text-fill-color: rgba(255,255,255,.88); }
.price-gen.masked .pg-val { -webkit-text-fill-color: rgba(255,255,255,.55); letter-spacing: .02em; }
.price-gen.done .pg-val { animation: pgPop .5s var(--ease); }
@keyframes pgPop { 0% { transform: scale(.92); filter: blur(2px); } 100% { transform: none; filter: none; } }
.price-card { padding: 38px; }
.price-card .pg-note { font-size: 12px; color: rgba(255,255,255,.5) !important; margin-top: 4px !important; }
.price-card .btn { margin-top: 24px; }
.quote-card .price-gen { cursor: pointer; }

/* theme toggle */
.theme-toggle { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: border-color .2s, transform .3s var(--ease); }
.theme-toggle:hover { border-color: var(--orange); transform: rotate(-15deg); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--orange); color: #fff; }

.container { width: min(1180px, 100% - 40px); margin-inline: auto; }
.narrow { max-width: 820px; }
.mono { font-family: var(--mono); font-variation-settings: "wdth" 85; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.accent, .grad-text {
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Background ---------- */
.grid-bg {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  opacity: var(--grid-opacity);
}
.spotlight {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(520px circle at var(--mx, 75%) var(--my, 15%), rgba(255, 106, 26, .09), transparent 60%);
}

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--display); font-variation-settings: "wdth" 80;
  font-weight: 700; letter-spacing: -.04em; line-height: 1.08;
}
h1, h2, h3 { overflow-wrap: break-word; }
@media (max-width: 760px) { h1, h2, h3 { hyphens: auto; -webkit-hyphenate-limit-before: 4; -webkit-hyphenate-limit-after: 4; hyphenate-limit-chars: 10 4 4; } }
/* let grid children shrink below their content width so long words/visuals never overflow on phones */
.grid-2 > *, .grid-3 > *, .grid-4 > *, .split > *, .page-hero-split > *, .case > *, .roi > *, .hero-inner > *, .contact-grid > * { min-width: 0; }
h1 { font-size: clamp(36px, 5.2vw, 64px); }
h2 { font-size: clamp(30px, 4.2vw, 50px); }
h3 { font-size: 21px; letter-spacing: -.03em; line-height: 1.2; }
.lead { font-size: 19px; color: var(--ink-2); max-width: 620px; margin-top: 18px; }
.eyebrow { display: inline-block; font-size: 13px; color: var(--accent); margin-bottom: 18px; text-transform: lowercase; }
.eyebrow.light { color: var(--yellow); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 26px; border-radius: 999px; border: 0; cursor: pointer;
  font-family: var(--body); font-weight: 500; font-size: 16px; white-space: nowrap;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background-position .5s var(--ease), color .2s, border-color .2s;
  will-change: transform;
}
.btn-sm { padding: 11px 20px; font-size: 15px; }
.btn-primary {
  background: var(--grad-btn); background-size: 160% 100%; background-position: 0 0; color: #fff;
  box-shadow: 0 12px 30px -12px rgba(255, 45, 85, .65);
}
.btn-primary:hover { background-position: 100% 0; box-shadow: 0 18px 40px -14px rgba(255, 90, 31, .75); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--orange); color: var(--accent); }
.btn-outline-light { color: #fff; border: 1px solid rgba(255,255,255,.3); background: transparent; }
.btn-outline-light:hover { border-color: var(--yellow); color: var(--yellow); }
.arr { transition: transform .3s var(--ease); }
.btn:hover .arr, .link-arrow:hover .arr { transform: translateX(4px); }
.link-arrow { display: inline-flex; gap: 8px; font-weight: 500; color: var(--accent); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  width: min(1180px, 100% - 28px); z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 10px 10px 10px 22px; border-radius: 999px;
  background: var(--nav-bg); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
.nav.scrolled { border-color: var(--line); box-shadow: 0 10px 40px -20px rgba(23,18,15,.25); }
.logo { font-family: var(--mono); font-weight: 700; font-size: 19px; letter-spacing: -.04em; font-variation-settings: "wdth" 80; display: inline-flex; align-items: center; }
.logo-bracket, .logo-slash { color: var(--orange); }
.logo-slash { margin: 0 1px; }
.caret { width: 9px; height: 18px; background: var(--grad); margin-left: 4px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 15px; color: var(--ink-2); }
.nav-links > a, .dd-toggle { position: relative; transition: color .2s; }
.nav-links > a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 1.5px; width: 100%;
  background: var(--grad); transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease);
}
.nav-links > a:hover, .nav-links > a.active { color: var(--ink); }
.nav-links > a:hover::after, .nav-links > a.active::after { transform: scaleX(1); transform-origin: left; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.lang { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; font-family: var(--mono); font-size: 12px; font-variation-settings: "wdth" 85; }
.lang a { padding: 6px 10px; border-radius: 999px; color: var(--muted); transition: color .2s, background .2s; }
.lang a:hover { color: var(--ink); }
.lang a.on { background: var(--panel); color: #fff; }

/* dropdown */
.dd { position: relative; }
.dd-toggle { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; cursor: pointer; color: var(--ink-2); font-size: 15px; padding: 0; }
.dd-toggle:hover, .dd.active .dd-toggle { color: var(--ink); }
.dd-toggle svg { width: 10px; transition: transform .3s var(--ease); }
.dd:hover .dd-toggle svg, .dd.open .dd-toggle svg { transform: rotate(180deg); }
.dd-menu {
  position: absolute; top: calc(100% + 18px); left: 50%; transform: translate(-50%, 8px);
  width: 360px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 30px 60px -25px rgba(23,18,15,.3);
  opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .25s, transform .3s var(--ease), visibility 0s .3s;
}
.dd-menu::before { content: ""; position: absolute; inset: -20px 0 auto; height: 20px; }
@media (hover: hover) { .dd:hover .dd-menu { opacity: 1; pointer-events: auto; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; } }
.dd.open .dd-menu, .dd:focus-within .dd-menu { opacity: 1; pointer-events: auto; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
.dd-menu a { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; transition: background .2s; }
.dd-menu a:hover { background: var(--bg-tint); }
.dd-menu .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--soft); font-family: var(--mono); font-size: 12px; color: var(--accent); }
.dd-menu b { display: block; font-weight: 500; color: var(--ink); font-size: 15px; }
.dd-menu small { color: var(--muted); font-size: 13px; line-height: 1.35; display: block; }
.dd-menu .dd-all { display: block; text-align: center; margin-top: 4px; padding: 10px; font-size: 14px; color: var(--accent); border-top: 1px dashed var(--line); border-radius: 0 0 12px 12px; }

.burger { display: none; background: none; border: 0; width: 42px; height: 42px; cursor: pointer; position: relative; }
.burger span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--ink); transition: transform .3s var(--ease); }
.burger span:first-child { top: 16px; }
.burger span:last-child { top: 24px; }
.nav.open .burger span:first-child { transform: translateY(4px) rotate(45deg); }
.nav.open .burger span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: 150px 0 70px; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.tag { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px; font-size: 14px; background: var(--soft); color: var(--tag-ink); margin-bottom: 26px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; position: relative; }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #22c55e; animation: ping 1.6s var(--ease) infinite; }
@keyframes ping { to { transform: scale(2.6); opacity: 0; } }
.typed { border-right: 3px solid var(--orange); padding-right: 4px; animation: caretBlink .9s steps(1) infinite; }
@keyframes caretBlink { 50% { border-color: transparent; } }
.hero-sub { font-size: 19px; color: var(--ink-2); margin-top: 24px; max-width: 540px; }
.hero-cta { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.hero-points { margin-top: 40px; display: grid; gap: 10px; font-size: 15px; color: var(--ink-2); }
.hero-points .mono { color: var(--accent); font-size: 12px; margin-right: 10px; }

/* window + flow */
.window {
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(23,18,15,.35), 0 0 0 8px rgba(255,106,26,.05);
  transform: perspective(1400px) rotateY(-6deg) rotateX(3deg); transition: transform .8s var(--ease);
}
.hero-visual:hover .window { transform: none; }
.window-bar { display: flex; align-items: center; gap: 7px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.window-bar > span { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.window-bar > span:nth-child(1) { background: var(--red); }
.window-bar > span:nth-child(2) { background: var(--orange); }
.window-bar > span:nth-child(3) { background: var(--yellow); }
.window-title { margin-left: 12px; font-size: 12px; color: var(--muted); }
.flow { position: relative; aspect-ratio: 420 / 300; }
.flow-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.flow-line { fill: none; stroke: url(#lineGrad); stroke-width: 2; stroke-dasharray: 5 6; animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -22; } }
.flow-svg .dot { fill: var(--orange); filter: drop-shadow(0 0 6px rgba(255,106,26,.9)); }
.node {
  position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 7px 12px; border-radius: 12px; font-size: 12.5px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 20px -12px rgba(23,18,15,.3);
  animation: float 5s ease-in-out infinite;
}
.node i { font-style: normal; color: var(--orange); }
.n-in1 { left: 16.6%; top: 20%; }
.n-in2 { left: 16.6%; top: 50%; animation-delay: -1.5s; }
.n-in3 { left: 16.6%; top: 80%; animation-delay: -3s; }
.n-out1 { left: 83.3%; top: 26.6%; animation-delay: -2s; }
.n-out2 { left: 83.3%; top: 73.3%; animation-delay: -4s; }
.n-ai {
  left: 50%; top: 50%; flex-direction: column; gap: 0; padding: 16px 18px; border-radius: 18px;
  background: var(--grad); color: #fff; border: 0; animation: none;
  box-shadow: 0 0 0 8px rgba(255,106,26,.12), 0 20px 40px -12px rgba(255,45,85,.6);
}
.n-ai b { font-family: var(--display); font-size: 20px; letter-spacing: -.04em; text-shadow: 0 1px 8px rgba(160,30,0,.35); }
.n-ai small { font-size: 10px; opacity: .9; }
.ai-core { position: absolute; inset: -8px; border-radius: 22px; border: 1.5px solid var(--orange); opacity: .5; animation: ring 2.2s var(--ease) infinite; }
@keyframes ring { to { transform: scale(1.5); opacity: 0; } }
@keyframes float { 50% { transform: translate(-50%, calc(-50% - 6px)); } }
.terminal { border-top: 1px solid var(--line); background: var(--panel); color: #f3e3d6; padding: 14px 18px; font-size: 12px; height: 116px; overflow: hidden; line-height: 1.75; }
.terminal .t-ok { color: #8ef0b0; }
.terminal .t-b { color: var(--yellow); }

/* ---------- Marquee ---------- */
.marquee-wrap { padding: 30px 0 20px; }
.marquee-label { text-align: center; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--mono); font-variation-settings: "wdth" 85; font-size: 15px; font-weight: 500;
  padding: 12px 22px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); background: var(--surface); transition: color .2s, border-color .2s;
}
.marquee-track span:hover { color: var(--accent); border-color: var(--orange); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: 110px 0; position: relative; }
.section-sm { padding: 70px 0; }
.section-tint { background: var(--bg-tint); }
.section-head { margin-bottom: 56px; }
.section-head.center { text-align: center; }
.section-head.center .lead { margin-inline: auto; }
.section-foot { margin-top: 40px; text-align: center; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; transition: border-color .3s, box-shadow .4s var(--ease), transform .4s var(--ease); }
.card:hover { border-color: rgba(255,106,26,.45); box-shadow: 0 30px 60px -30px rgba(255,90,31,.35); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.pain-icon { font-size: 13px; color: var(--accent); background: var(--soft); display: inline-block; padding: 6px 10px; border-radius: 8px; margin-bottom: 22px; }
.pain h3 { margin-bottom: 10px; }
.pain p, .feature p { color: var(--ink-2); font-size: 16px; }

/* services */
.service { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px; min-height: 320px; }
.service::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(400px circle at var(--cx, 50%) var(--cy, 50%), rgba(255,106,26,.09), transparent 50%);
  opacity: 0; transition: opacity .3s;
}
.service:hover::before { opacity: 1; }
.service-top { display: flex; justify-content: space-between; align-items: center; }
.service-num { font-size: 13px; color: var(--accent); }
.service-cat { font-size: 11px; color: var(--muted); }
.service p { color: var(--ink-2); font-size: 16px; flex: 1; }
.service .link-arrow { margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-family: var(--mono); font-variation-settings: "wdth" 85; font-size: 12px; padding: 5px 10px; border-radius: 8px; background: var(--bg-tint); color: var(--ink-2); border: 1px solid var(--line); }
.services-2 { grid-template-columns: repeat(2, 1fr); }
.service-dark { background: var(--panel); color: #fff; border-color: var(--panel); }
.service-dark p { color: rgba(255,255,255,.7); }
.service-dark .service-num { color: var(--yellow); }
.service-dark .link-arrow { color: var(--yellow); }
.service-dark .chips li { background: rgba(255,255,255,.06); color: rgba(255,255,255,.75); border-color: rgba(255,255,255,.1); }

/* ---------- Case blocks ---------- */
.case { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 50px 0; }
.case + .case { border-top: 1px solid var(--line); }
.case-reverse .case-info { order: 2; }
.case-tag { font-size: 13px; color: var(--accent); }
.case h3 { font-size: clamp(24px, 2.6vw, 32px); margin: 14px 0 16px; }
.case-info > p { color: var(--ink-2); }
.case-meta { margin: 28px 0; display: grid; gap: 14px; }
.case-meta div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.case-meta dt { font-size: 12px; color: var(--muted); padding-top: 3px; }
.case-meta dd { font-size: 15.5px; }

.case-visual { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 26px; box-shadow: 0 30px 60px -40px rgba(23,18,15,.3); min-height: 320px; }
.chat { display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 82%; padding: 12px 16px; border-radius: 16px; font-size: 15px; opacity: 0; transform: translateY(10px); }
.msg-user { align-self: flex-end; background: var(--grad-btn); color: #fff; border-bottom-right-radius: 4px; }
.msg-bot { align-self: flex-start; background: var(--bg-tint); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg-bot .msg-text { display: none; }
.msg-bot.typed-done .typing { display: none; }
.msg-bot.typed-done .msg-text { display: inline; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); opacity: .4; animation: bounce 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 50% { transform: translateY(-4px); opacity: 1; } }
.msg.show { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .5s var(--ease); }

.crm { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.crm-col { background: var(--bg-tint); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.crm-h { font-size: 11px; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: 4px; }
.crm-h b { color: var(--accent); }
.crm-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 13px; box-shadow: 0 4px 10px -8px rgba(23,18,15,.3); }
.crm-card.done { color: var(--muted); }
.crm-moving { border-color: var(--orange); box-shadow: 0 10px 24px -10px rgba(255,90,31,.55); }
.in .crm-moving, .crm.in .crm-moving { animation: moveCard 5s var(--ease) 1s infinite; }
@keyframes moveCard {
  0%, 15% { transform: translate(0, 0) rotate(0); }
  35%, 55% { transform: translate(calc(100% + 36px), -50px) rotate(-3deg); }
  75%, 100% { transform: translate(calc(200% + 72px), -40px) rotate(0); opacity: 0; }
}

.code-visual { background: var(--panel); color: #f3e3d6; font-size: 13.5px; line-height: 1.9; }
.code-visual pre { font-family: inherit; white-space: pre-wrap; }
.c-k { color: var(--orange); } .c-v { color: #fff; } .c-s { color: #8ef0b0; } .c-c { color: #8a8079; } .c-f { color: var(--yellow); }

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 22px; left: 0; right: 0; height: 2px; background: var(--grad);
  transform: scaleX(var(--progress, 0)); transform-origin: left; transition: transform 1.4s var(--ease);
}
.step { padding-top: 60px; position: relative; }
.step-n { position: absolute; top: 0; left: 0; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 13px; color: var(--accent); background: var(--surface); border: 1px solid var(--line); transition: background .3s, color .3s; }
.step:hover .step-n { background: var(--grad); color: #fff; border-color: transparent; }
.step h3 { margin-bottom: 10px; }
.step p { color: var(--ink-2); font-size: 16px; }

/* ---------- ROI ---------- */
.roi { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.roi-card { padding: 34px; display: grid; gap: 26px; }
.field { display: grid; gap: 12px; font-size: 15px; color: var(--ink-2); }
.field > span { display: flex; justify-content: space-between; gap: 10px; }
.field b { color: var(--ink); font-size: 15px; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--orange) var(--fill, 20%), var(--line) var(--fill, 20%)); outline: none; cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 2px solid var(--orange); box-shadow: 0 4px 10px rgba(255,90,31,.35); transition: transform .2s; }
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 2px solid var(--orange); }
.roi-result { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-top: 22px; border-top: 1px dashed var(--line); }
.roi-result small { font-size: 12px; color: var(--muted); display: block; }
.roi-result strong { font-family: var(--display); font-variation-settings: "wdth" 80; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.04em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.roi-note { font-size: 13px; color: var(--muted); }

/* ---------- About ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split p:not(.lead) { color: var(--ink-2); margin-top: 16px; max-width: 560px; }
.code-card { background: var(--panel); color: #f3e3d6; border-radius: 22px; padding: 30px; font-size: 14px; overflow-x: auto; box-shadow: 0 40px 80px -40px rgba(23,18,15,.6); position: relative; }
.code-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--grad); border-radius: 22px 22px 0 0; }
.code-card pre { font-family: inherit; line-height: 1.9; }

.values .card h3 { margin: 14px 0 10px; }
.values .card p { color: var(--ink-2); font-size: 16px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 26px; transition: border-color .3s; }
.faq details[open] { border-color: rgba(255,106,26,.5); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 0; font-weight: 500; font-size: 17px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--orange); font-size: 22px; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); padding-bottom: 22px; font-size: 16px; }

/* ---------- CTA ---------- */
.cta { padding: 40px 0 100px; }
.cta-inner { position: relative; overflow: hidden; text-align: center; background: var(--panel); color: #fff; border-radius: 32px; padding: 90px 30px; isolation: isolate; }
.cta-inner::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 40px 40px; mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
}
.cta-glow { position: absolute; width: 520px; height: 520px; border-radius: 50%; background: var(--grad); filter: blur(110px); opacity: .45; z-index: -1; left: 50%; top: 110%; transform: translate(-50%, -50%); animation: glow 8s ease-in-out infinite alternate; }
@keyframes glow { to { transform: translate(-35%, -60%) scale(1.15); } }
.cta h2 { font-size: clamp(30px, 4.4vw, 54px); }
.cta p { margin: 22px auto 0; max-width: 560px; color: rgba(255,255,255,.75); font-size: 18px; }
.cta-buttons { display: flex; justify-content: center; gap: 12px; margin-top: 36px; flex-wrap: wrap; }
.cta-note { font-size: 13px; color: rgba(255,255,255,.5) !important; margin-top: 22px !important; }

/* ---------- Sub-page hero ---------- */
.page-hero { padding: 160px 0 70px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 26px; }
.crumbs a:hover { color: var(--accent); }
.crumbs span { opacity: .5; }
.page-hero .lead { font-size: 20px; }
.page-hero .tagline { font-size: clamp(20px, 2.2vw, 26px); color: var(--ink); margin-top: 18px; font-weight: 500; max-width: 720px; }
.ticks { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; font-size: 14px; color: var(--ink-2); }
.ticks li::before { content: "✓"; margin-right: 8px; color: var(--orange); font-weight: 700; }
.page-hero-split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }

/* features */
.feature .f-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; font-family: var(--mono); font-size: 14px; margin-bottom: 20px; }
.feature h3 { margin-bottom: 10px; }

/* included */
.included { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.check-list { display: grid; gap: 12px; margin-top: 18px; }
.check-list li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: var(--ink-2); font-size: 16px; }
.check-list li::before { content: "✓"; color: var(--orange); font-weight: 700; }
.x-list li::before { content: "×"; color: var(--muted); }
.quote-card { background: var(--panel); color: #fff; }
.quote-card h3 { color: #fff; }
.quote-card p { color: rgba(255,255,255,.7); margin-top: 14px; }
.quote-card .btn { margin-top: 26px; }
.price-tag { font-family: var(--display); font-variation-settings: "wdth" 80; font-size: 40px; letter-spacing: -.04em; margin-top: 14px; }

/* integrations */
.logos { display: flex; flex-wrap: wrap; gap: 10px; }
.logos span { font-family: var(--mono); font-variation-settings: "wdth" 85; font-size: 14px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink-2); transition: border-color .2s, color .2s, transform .3s var(--ease); }
.logos span:hover { border-color: var(--orange); color: var(--accent); transform: translateY(-2px); }

/* fit */
.fit .card h3 { display: flex; align-items: center; gap: 10px; }

/* related */
.related-card { display: flex; flex-direction: column; gap: 10px; }
.related-card p { color: var(--ink-2); font-size: 15.5px; flex: 1; }

/* case page */
.case-hero-visual { min-height: 0; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 50px; }
.facts div { background: var(--surface); padding: 22px 24px; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { font-weight: 500; margin-top: 6px; }
.prose h2 { font-size: clamp(26px, 3vw, 36px); margin: 70px 0 18px; }
.prose > h2:first-child, .prose > div:first-child > h2:first-child { margin-top: 0; }
.prose p { color: var(--ink-2); margin-top: 14px; font-size: 18px; }
.prose .check-list li { font-size: 17px; }
.timeline { display: grid; gap: 0; margin-top: 26px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 28px 30px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 0 4px var(--bg); }
.timeline b { font-family: var(--display); font-variation-settings: "wdth" 80; letter-spacing: -.03em; display: block; font-size: 18px; }
.timeline p { margin-top: 6px !important; font-size: 16px !important; }
.results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 26px; }
.results .card { padding: 24px; }
.results .card b { display: block; font-family: var(--display); font-variation-settings: "wdth" 80; letter-spacing: -.03em; font-size: 18px; margin-bottom: 8px; }
.results .card p { margin: 0; font-size: 15px; }
.nda-note { font-size: 13px; color: var(--muted); margin-top: 18px; }

/* case cards (index) */
.case-card { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 0; overflow: hidden; }
.case-card .case-card-body { padding: 40px; display: flex; flex-direction: column; gap: 14px; }
.case-card .case-card-body p { color: var(--ink-2); flex: 1; }
.case-card .case-card-visual { background: var(--bg-tint); padding: 30px; display: grid; align-items: center; border-left: 1px solid var(--line); }
.case-card .case-visual { box-shadow: none; min-height: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; align-items: start; }
.form { display: grid; gap: 18px; padding: 36px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.form input, .form select, .form textarea {
  width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255,106,26,.12); }
.form .btn { justify-self: start; }
.form-status { font-size: 14px; color: var(--accent); min-height: 1.4em; }
.contact-side { display: grid; gap: 16px; }
.contact-side .card { padding: 26px; }
.contact-side small { font-size: 12px; color: var(--muted); display: block; }
.contact-side a.card { display: block; }
.contact-side b { font-size: 18px; font-weight: 500; }
.next-steps { counter-reset: n; display: grid; gap: 14px; margin-top: 14px; }
.next-steps li { counter-increment: n; display: grid; grid-template-columns: 30px 1fr; gap: 8px; color: var(--ink-2); font-size: 15px; }
.next-steps li::before { content: "0" counter(n); font-family: var(--mono); font-size: 12px; color: var(--accent); padding-top: 3px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 60px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.1fr 1fr; gap: 30px; }
.footer p { color: var(--ink-2); font-size: 15px; margin-top: 14px; max-width: 300px; }
.footer h4 { font-family: var(--mono); font-variation-settings: "wdth" 85; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 14px; text-transform: lowercase; }
.footer ul { display: grid; gap: 8px; font-size: 15px; }
.footer ul a { color: var(--ink-2); transition: color .2s; }
.footer ul a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 50px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* ---------- 404 ---------- */
.notfound { min-height: 80vh; display: grid; place-items: center; text-align: center; padding: 140px 0 60px; }
.notfound h1 { font-size: clamp(80px, 16vw, 180px); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 60px; }
.stats div { background: var(--surface); padding: 26px 26px 24px; }
.stats dt { font-family: var(--display); font-variation-settings: "wdth" 80; font-weight: 700; letter-spacing: -.04em; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.05; }
.stats dd { color: var(--ink-2); font-size: 15px; margin-top: 8px; }
.stats-case { margin-top: 50px; }
.mini-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0 6px; }
.mini-metrics dt { font-family: var(--display); font-variation-settings: "wdth" 80; font-weight: 700; letter-spacing: -.04em; font-size: 22px; line-height: 1.1; }
.mini-metrics dd { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.35; }

/* services grid with odd count */
.service-span { grid-column: 1 / -1; min-height: 0; }

/* engagement */
.engagement .card h3 { margin: 16px 0 6px; }
.eng-meta { font-size: 12px; color: var(--accent); }
.engagement .card p { color: var(--ink-2); font-size: 16px; margin-top: 14px; }

/* factory visual */
.factory { display: flex; flex-direction: column; gap: 16px; }
.factory-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.live { display: inline-flex; align-items: center; gap: 6px; color: #16a34a; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; animation: blink 1.2s steps(1) infinite; }
.bar-label { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }
.bar-label b { font-size: 15px; }
.bar { height: 12px; border-radius: 99px; background: var(--bg-tint); border: 1px solid var(--line); overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; border-radius: 99px; transition: width 1.6s var(--ease) .3s; }
.bar-saas { background: var(--grey); }
.bar-ours { background: var(--grad); }
.factory.in .bar-saas { width: 100%; }
.factory.in .bar-ours { width: 3%; min-width: 10px; }
.saving { font-size: 13px; color: var(--muted); text-align: right; }
.saving span { font-family: var(--display); font-size: 30px; font-weight: 700; letter-spacing: -.04em; margin-right: 6px; }
.render-queue { display: grid; gap: 8px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 12px; }
.render-queue li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--bg-tint); }
.rq-status em { font-style: normal; }
.rq-run { color: var(--accent); display: inline-flex; gap: 6px; align-items: center; }
.rq-run i { width: 40px; height: 4px; border-radius: 99px; background: linear-gradient(90deg, var(--orange) 40%, var(--line) 40%); background-size: 200% 100%; animation: load 1.2s linear infinite; }
@keyframes load { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.rq-done { display: none; color: #16a34a; }
.render-queue li { transition: background .4s; }
.render-queue li.done { background: var(--ok-bg); }
.render-queue li.done .rq-run { display: none; }
.render-queue li.done .rq-done { display: inline; }

/* private visual */
.private { display: flex; flex-direction: column; gap: 18px; }
.vault { position: relative; border: 1.5px dashed var(--orange); border-radius: 18px; padding: 34px 18px 18px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.vault-label { position: absolute; top: -10px; left: 16px; background: var(--surface); padding: 0 8px; font-size: 12px; color: var(--accent); }
.vault-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 90px; }
.v-node { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 500; box-shadow: 0 6px 16px -12px rgba(23,18,15,.3); }
.v-node i { font-style: normal; color: var(--orange); }
.vault-core { position: absolute; left: 50%; top: calc(50% + 8px); transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--grad); color: #fff; font-family: var(--display); font-weight: 700; font-size: 18px; box-shadow: 0 0 0 8px rgba(255,106,26,.12); }
.egress { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.egress-line { flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 12px); }
.egress-cloud { text-decoration: line-through; }
.egress-x { color: var(--red); font-weight: 600; }
.private-note { font-size: 12px; color: var(--muted); }
.private-note .c-s { color: #15803d; }
:root[data-theme="dark"] .private-note .c-s { color: #8ef0b0; }

/* founder */
.founder { display: flex; flex-direction: column; gap: 6px; padding: 34px; }
.founder-photo { width: 168px; height: 168px; border-radius: 28px; overflow: hidden; background: var(--grad); display: grid; place-items: center; margin-bottom: 20px; box-shadow: 0 18px 40px -18px rgba(255,45,85,.6); position: relative; }
.founder-photo img { width: 100%; height: 100%; object-fit: cover; }
.pixel-avatar { border: 0; padding: 0; cursor: pointer; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.pixel-avatar:hover { transform: translateY(-3px) rotate(-1.5deg); box-shadow: 0 26px 50px -18px rgba(255,45,85,.7); }
.pixel-avatar:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
.pixel-avatar canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.pixel-avatar img, .pixel-avatar canvas { grid-area: 1 / 1; }
.pixel-hint {
  position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 4px 6px; border-radius: 8px;
  font-size: 10px; text-align: center; color: #fff; background: rgba(23,18,15,.55); backdrop-filter: blur(4px);
  opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s var(--ease); pointer-events: none;
}
.pixel-avatar:hover .pixel-hint, .pixel-avatar:focus-visible .pixel-hint { opacity: 1; transform: none; }
.pixel-avatar[aria-pressed="true"] .pixel-hint { opacity: 0; }
.founder-photo span { color: #fff; font-family: var(--display); font-size: 42px; font-weight: 700; }
.founder .eyebrow { margin-bottom: 4px; }
.founder h3 { font-size: 28px; }
.founder-role { font-size: 13px; color: var(--muted); }
.founder p:not(.founder-role) { color: var(--ink-2); margin: 10px 0 14px; }

/* calculators */
.calcs { align-items: start; }
.calc-title { font-size: 20px; margin-bottom: 16px; }
.roi-result-3 { grid-template-columns: 1fr 1fr; }
.roi-result-3 .saved { grid-column: 1 / -1; padding-top: 14px; border-top: 1px dashed var(--line); }
.roi-result-3 .saved strong { font-size: clamp(32px, 4vw, 48px); }
.strike { -webkit-text-fill-color: var(--muted); background: none !important; text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: rgba(255,45,85,.6); }

/* blog */
.post-card { display: flex; flex-direction: column; gap: 12px; }
.post-card h3 { font-size: 22px; }
.post-card p { color: var(--ink-2); font-size: 16px; flex: 1; }
.post-top { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); }
.post-tag { color: var(--accent); }
.posts { margin-top: 20px; }
.post-featured { padding: 44px; margin-bottom: 0; background: var(--panel); border-color: var(--panel); color: #fff; position: relative; overflow: hidden; isolation: isolate; }
.post-featured::after { content: ""; position: absolute; width: 380px; height: 380px; right: -120px; top: -160px; border-radius: 50%; background: var(--grad); filter: blur(90px); opacity: .45; z-index: -1; }
.post-featured h3 { font-size: clamp(24px, 3vw, 36px); max-width: 760px; }
.post-featured p { color: rgba(255,255,255,.72); max-width: 680px; }
.post-featured .post-tag { color: var(--yellow); }
.soon { font-size: 12px; color: var(--muted); }
.post-featured .soon { color: rgba(255,255,255,.5); }
.article-title { font-size: clamp(32px, 4.4vw, 54px); }
.byline { display: flex; align-items: center; gap: 12px; margin-top: 22px; font-size: 15px; color: var(--ink-2); }
.byline img { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; }
.tldr { margin-top: 30px; padding: 22px 24px; border-radius: var(--radius); background: var(--bg-tint); border: 1px solid var(--line); border-left: 4px solid var(--orange); }
.tldr .mono { font-size: 12px; color: var(--accent); }
.tldr p { margin-top: 6px; font-size: 17px; }
.article-body h2 { scroll-margin-top: 100px; }
.article-body h3 { margin-top: 34px; font-size: 22px; }
.article-body table { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 15px; }
.article-body th, .article-body td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.article-body ul, .article-body ol { margin-top: 14px; padding-left: 22px; list-style: disc; color: var(--ink-2); }
.article-body ol { list-style: decimal; }

/* ---------- Pixel figures in articles ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.viz { margin: 40px 0; padding: 30px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 30px 60px -45px rgba(23,18,15,.35); position: relative; overflow: hidden; }
.viz::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 14px 14px; opacity: .35; }
.viz > * { position: relative; }
.viz figcaption { margin-top: 22px; font-size: 12px; color: var(--muted); }
.px-bitmap { display: inline-grid; grid-template-columns: repeat(var(--w), var(--px, 4px)); gap: 1px; vertical-align: middle; }
.px-bitmap i { width: var(--px, 4px); height: var(--px, 4px); border-radius: 1px; }
.px-bitmap i.on { opacity: 0; transform: scale(.4); transition: opacity .25s, transform .3s var(--ease); transition-delay: calc(var(--i) * 6ms); }
.reveal.in .px-bitmap i.on, .no-anim .px-bitmap i.on { opacity: 1; transform: none; }
.px-icon { --px: 4px; }
.px-icon.tiny { --px: 2px; }
.muted-icon i.on { background: var(--grey) !important; }

.viz-number { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 10px 0; }
.px-text { display: inline-flex; gap: calc(var(--px) * 1.4); --px: clamp(9px, 2.2vw, 16px); flex-wrap: wrap; justify-content: center; }
.px-text .px-bitmap { gap: 2px; }
.viz-number-label { font-size: 13px; color: var(--ink-2); text-align: center; }

.viz-waffle { display: grid; grid-template-columns: auto 1fr; gap: 30px; align-items: center; }
.waffle { display: grid; grid-template-columns: repeat(10, 18px); gap: 4px; }
.waffle i { width: 18px; height: 18px; border-radius: 3px; background: var(--line); }
.waffle i.on { opacity: .15; transform: scale(.6); transition: opacity .3s, transform .35s var(--ease); transition-delay: calc(var(--i) * 12ms); }
.reveal.in .waffle i.on { opacity: 1; transform: none; }
.waffle-legend { display: grid; gap: 14px; font-size: 16px; color: var(--ink-2); }
.waffle-legend b { font-family: var(--display); font-size: 28px; letter-spacing: -.04em; margin-right: 6px; color: var(--ink); }
.waffle-legend .dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--line); margin-right: 8px; }
.waffle-legend .dot.on { background: var(--grad); }

.viz-bars { display: grid; gap: 22px; }
.pxbar-label { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; margin-bottom: 8px; }
.pxbar { display: grid; grid-template-columns: repeat(var(--cells), 1fr); gap: 3px; }
.pxbar i { aspect-ratio: 1; border-radius: 2px; background: var(--bg-tint); border: 1px solid var(--line); }
.pxbar i.on { border-color: transparent; opacity: 0; transition: opacity .2s; transition-delay: calc(var(--i) * 25ms); }
.reveal.in .pxbar i.on { opacity: 1; }

.viz-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 14px; list-style: none !important; padding: 0 !important; margin: 0 !important; }
.viz-flow li { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 10px; border-radius: 14px; background: var(--bg-tint); border: 1px solid var(--line); font-size: 14px; font-weight: 500; color: var(--ink); text-align: center; position: relative; }
.viz-flow li:not(:last-child)::after { content: ""; position: absolute; right: -10px; top: 50%; width: 8px; height: 8px; background: var(--orange); box-shadow: -4px -4px 0 -1px var(--orange), -4px 4px 0 -1px var(--orange); transform: translateY(-50%); z-index: 1; }
.viz-flow .px-icon { --px: 5px; }
.reveal.in .viz-flow li { animation: tilePulse 3.2s ease-in-out calc(var(--k) * .4s) infinite; }
@keyframes tilePulse { 0%, 70%, 100% { border-color: var(--line); } 15% { border-color: var(--orange); box-shadow: 0 10px 24px -14px rgba(255,90,31,.6); } }

.viz-vault { display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: center; }
.vault-box { border: 2px dashed var(--orange); border-radius: 16px; padding: 26px 16px 16px; position: relative; background: var(--surface-2); }
.vault-tag { position: absolute; top: -10px; left: 14px; background: var(--surface); padding: 0 8px; font-size: 12px; color: var(--accent); }
.vault-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; }
.vault-items div { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: 13px; font-weight: 500; text-align: center; }
.vault-wall { display: grid; gap: 3px; }
.vault-wall i { width: 10px; height: 10px; background: var(--red); border-radius: 2px; opacity: .2; }
.reveal.in .vault-wall i { animation: wall 1.6s steps(2) calc(var(--i) * .1s) infinite; }
@keyframes wall { 50% { opacity: 1; } }
.vault-out { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); text-align: center; max-width: 130px; }
.vault-out span { text-decoration: line-through; }
.vault-out b { color: var(--red); font-size: 11px; font-weight: 600; }

.viz-matrix-wrap { overflow-x: auto; }
.viz-matrix { width: 100%; border-collapse: collapse; font-size: 15px; margin: 0 !important; }
.viz-matrix th, .viz-matrix td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.viz-matrix thead th { font-size: 13px; color: var(--accent); }
.viz-matrix tbody th { font-weight: 500; color: var(--ink); }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 11px; height: 11px; border-radius: 2px; background: var(--line); }

.viz-checklist { list-style: none !important; padding: 0 !important; margin: 0 !important; display: grid; gap: 10px; }
.viz-checklist li { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--bg-tint); border: 1px solid var(--line); color: var(--ink) !important; font-size: 16px; }
.viz-checklist .px-icon { flex: none; --px: 2px; }

.toc { margin-top: 26px; padding: 20px 24px; border: 1px dashed var(--line); border-radius: var(--radius); }
.toc .mono { font-size: 12px; color: var(--muted); }
.toc ol { list-style: none; margin-top: 10px; display: grid; gap: 6px; counter-reset: toc; }
.toc li { counter-increment: toc; font-size: 15px; }
.toc li::before { content: counter(toc, decimal-leading-zero) " "; font-family: var(--mono); font-size: 11px; color: var(--accent); margin-right: 6px; }
.toc a { color: var(--ink-2); transition: color .2s; }
.toc a:hover { color: var(--accent); }
.article-body > p:first-child { font-size: 19px; color: var(--ink); }
.article-body blockquote { margin: 26px 0; padding: 18px 22px; border-left: 4px solid var(--orange); background: var(--bg-tint); border-radius: 0 14px 14px 0; font-size: 17px; color: var(--ink); }

@media (max-width: 760px) {
  .viz { padding: 20px 16px; }
  .viz-waffle { grid-template-columns: 1fr; justify-items: center; }
  .waffle { grid-template-columns: repeat(10, 22px); }
  .waffle i { width: 22px; height: 22px; }
  .viz-vault { grid-template-columns: 1fr; }
  .vault-wall { grid-auto-flow: column; justify-content: center; }
  .vault-out { max-width: none; }
  .viz-flow li:not(:last-child)::after { display: none; }
  .pxbar { gap: 2px; }
}

.case-featured { border-color: rgba(255,106,26,.45); box-shadow: 0 30px 60px -36px rgba(255,90,31,.45); }
.nav-mobile-only { display: none; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.card.reveal { transition: opacity .9s var(--ease), transform .9s var(--ease), border-color .3s, box-shadow .4s var(--ease); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav-links { gap: 20px; }
}
@media (max-width: 980px) {
  .hero-inner, .case, .roi, .split, .page-hero-split, .contact-grid, .case-card { grid-template-columns: 1fr; gap: 40px; }
  .case-card { gap: 0; }
  .case-card .case-card-visual { border-left: 0; border-top: 1px solid var(--line); }
  .case-reverse .case-info { order: 0; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .steps::before { display: none; }
  .window { transform: none; }
  .facts { grid-template-columns: 1fr 1fr; }
  .results { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav-links {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 10px; max-height: calc(100vh - 110px); overflow-y: auto;
    opacity: 0; pointer-events: none; visibility: hidden; transform: translateY(-8px); transition: opacity .25s, transform .25s var(--ease), visibility 0s .25s;
  }
  .nav-links > a, .dd-toggle { padding: 12px 14px; width: 100%; text-align: left; justify-content: space-between; }
  .nav-links > a::after { display: none; }
  .nav.open .nav-links { opacity: 1; pointer-events: auto; visibility: visible; transform: none; transition-delay: 0s; }
  .dd-menu { position: static; transform: none; width: auto; box-shadow: none; border: 0; padding: 0 0 6px 8px; display: none; opacity: 1; pointer-events: auto; }
  .dd.open .dd-menu { display: block; transform: none; }
  .dd:hover .dd-menu { transform: none; }
  .nav-cta { display: none; }
  .nav-links > .nav-mobile-only { display: block; }
  .burger { display: block; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .container { width: calc(100% - 32px); }
  .hero, .page-hero { padding-top: 120px; }
  .grid-3, .grid-2, .grid-4, .steps, .included, .services-2, .form-row { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
  .node { font-size: 10.5px; padding: 5px 8px; }
  .n-ai { padding: 10px 12px; }
  .case-meta div { grid-template-columns: 1fr; gap: 4px; }
  .crm { gap: 6px; }
  .crm-col { padding: 8px; }
  .crm-card { font-size: 11px; padding: 8px 6px; }
  .cta-inner { padding: 64px 22px; border-radius: 24px; }
  .btn { white-space: normal; }
  .case-card .case-card-body { padding: 28px; }
  .mini-metrics { grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
  .mini-metrics dt { font-size: 18px; }
  .stats { grid-template-columns: 1fr 1fr; margin-top: 40px; }
  .stats div { padding: 20px 18px; }
  .vault-grid { gap: 10px 70px; }
  .form { padding: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .msg { opacity: 1; transform: none; }
  .msg-bot .msg-text { display: inline; }
  .msg-bot .typing { display: none; }
  html { scroll-behavior: auto; }
}
.booking-card small { color: var(--yellow) !important; }
.booking-card b { color: #fff; }
.booking-card:hover { transform: translateY(-3px); }
.factory-note { font-size: 11px; color: var(--muted); margin-top: -6px; line-height: 1.5; }

/* ---------- Accessibility ---------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(255,106,26,.35); }
input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 5px rgba(255,106,26,.35); }
.form input:focus-visible, .form select:focus-visible, .form textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--panel); color: #fff; font-weight: 500; transition: top .2s; }
.skip-link:focus { top: 12px; }
.footer-h { font-family: var(--mono); font-variation-settings: "wdth" 85; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 14px; text-transform: lowercase; }

/* article tables scroll sideways on small screens instead of being clipped */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 20px; }
.table-wrap table { margin-top: 0 !important; min-width: 520px; }

/* hero typing: reserve the width/height of the longest word so the layout never jumps */
.typed-wrap { display: inline-grid; vertical-align: top; }
.typed-wrap > * { grid-area: 1 / 1; }
.typed-sizer { visibility: hidden; }
/* on dark panels the bright brand gradient reads best in both themes */
.quote-card .grad-text, .cta .grad-text, .post-featured .grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; }

/* compact header on small phones (theme toggle + language + burger must fit) */
@media (max-width: 480px) {
  .nav { padding-left: 16px; gap: 8px; }
  .logo { font-size: 17px; }
  .nav .caret { display: none; }
  .nav-right { gap: 6px; }
  .theme-toggle { width: 34px; height: 34px; }
  .lang a { padding: 5px 8px; }
  .burger { width: 36px; }
}

/* ---------- Pixel — the chat cat ---------- */
.cat .c-o, .cat .c-e, .cat .c-m { fill: #17120f; }
.cat .c-f { fill: var(--fur); }
.cat .c-l { fill: #ffd98a; }
.cat .c-p { fill: #ff7aa8; }
.cat .c-w { fill: #fff; }
.cat.blink .c-e.lid { fill: var(--fur); }
.cat.blink .c-w { fill: #17120f; }

.pxchat { position: fixed; right: 22px; bottom: 22px; z-index: 60; font-family: var(--body); }
.pxchat-fab {
  width: 70px; height: 70px; border-radius: 22px; border: 2px solid var(--ink); background: var(--surface); cursor: pointer;
  display: grid; place-items: center; padding: 0; box-shadow: 5px 5px 0 0 var(--orange);
  animation: catBob 2.6s ease-in-out infinite; transition: box-shadow .2s, transform .2s;
}
.pxchat-fab .cat { width: 50px; height: 50px; image-rendering: pixelated; }
.pxchat-fab:hover { animation-play-state: paused; box-shadow: 7px 7px 0 0 var(--red); }
.pxchat-fab:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 0 var(--orange); }
.pxchat.open .pxchat-fab { animation: none; }
@keyframes catBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.pxchat-teaser {
  position: absolute; right: 84px; bottom: 26px; white-space: nowrap; padding: 10px 14px; border-radius: 12px 12px 2px 12px;
  background: var(--panel); color: #fff; font-size: 14px; box-shadow: 4px 4px 0 0 var(--orange), inset 0 0 0 1px var(--panel-border);
  animation: teaserIn .4s var(--ease);
}
@keyframes teaserIn { from { opacity: 0; transform: translateX(10px); } }

.pxchat-panel {
  position: absolute; right: 0; bottom: 88px; width: 380px; height: min(580px, calc(100vh - 130px)); display: flex; flex-direction: column;
  background: var(--surface); border: 2px solid var(--ink); border-radius: 18px; overflow: hidden;
  box-shadow: 8px 8px 0 0 var(--orange), 0 30px 80px -30px rgba(0,0,0,.45); transform-origin: bottom right; animation: panelIn .28s var(--ease);
}
.pxchat-panel[hidden] { display: none; }
@keyframes panelIn { from { opacity: 0; transform: scale(.92) translateY(10px); } }
.pxchat-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: var(--panel); color: #fff; }
.pxchat-avatar { width: 40px; height: 40px; border-radius: 12px; background: #fff3e6; display: grid; place-items: center; flex: none; }
.pxchat-avatar .cat { width: 30px; height: 30px; }
.pxchat-title { flex: 1; display: grid; line-height: 1.25; }
.pxchat-title b { font-family: var(--display); font-variation-settings: "wdth" 80; letter-spacing: -.03em; font-size: 17px; }
.pxchat-title small { font-size: 11px; color: rgba(255,255,255,.6); display: flex; align-items: center; gap: 6px; }
.pxchat-title small i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.pxchat-reset { font-size: 11px; color: rgba(255,255,255,.65); background: none; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; padding: 5px 8px; cursor: pointer; }
.pxchat-reset:hover { color: #fff; border-color: var(--yellow); }
.pxchat-close { width: 32px; height: 32px; border-radius: 9px; border: 0; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; font-size: 14px; }
.pxchat-close:hover { background: rgba(255,255,255,.16); }

.pxchat-log { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 10px; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 16px 16px; background-color: var(--bg-tint); }
.pxmsg { max-width: 86%; padding: 10px 13px; font-size: 14.5px; line-height: 1.5; border: 2px solid var(--ink); word-wrap: break-word; }
.pxmsg a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.pxmsg-bot { align-self: flex-start; background: var(--surface); color: var(--ink); border-radius: 4px 14px 14px 14px; box-shadow: 3px 3px 0 0 var(--line); }
.pxmsg-user { align-self: flex-end; background: var(--grad-btn); color: #fff; border-color: transparent; border-radius: 14px 4px 14px 14px; }
.pxmsg-user a { color: #fff; }
.pxmsg .dots-typing { display: inline-flex; gap: 4px; }
.pxmsg .dots-typing i { width: 6px; height: 6px; background: var(--orange); animation: bounce 1s infinite; }
.pxmsg .dots-typing i:nth-child(2) { animation-delay: .15s; }
.pxmsg .dots-typing i:nth-child(3) { animation-delay: .3s; }

.pxchat-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px 0; background: var(--bg-tint); }
.pxchat-chips:empty { display: none; }
.pxchat-chips button { font: inherit; font-size: 12.5px; padding: 6px 10px; border-radius: 10px; border: 1.5px solid var(--ink); background: var(--surface); color: var(--ink); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.pxchat-chips button:hover { transform: translate(-1px, -1px); box-shadow: 2px 2px 0 0 var(--orange); }

.pxchat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 2px solid var(--ink); background: var(--surface); }
.pxchat-form textarea { flex: 1; resize: none; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 14.5px; background: var(--surface-2); color: var(--ink); max-height: 120px; }
.pxchat-form textarea:focus { outline: none; border-color: var(--orange); }
.pxchat-send { width: 44px; border-radius: 12px; border: 0; background: var(--grad-btn); color: #fff; font-size: 16px; cursor: pointer; }
.pxchat-send:disabled { opacity: .5; cursor: default; }
.pxchat-foot { display: flex; gap: 8px; padding: 0 12px 6px; background: var(--surface); }
.pxchat-foot a { flex: 1; text-align: center; font-size: 12px; padding: 7px; border-radius: 10px; border: 1.5px solid var(--line); color: var(--ink-2); transition: border-color .2s, color .2s; }
.pxchat-foot a:hover { border-color: var(--orange); color: var(--accent); }
.pxchat-note { font-size: 10.5px; color: var(--muted); padding: 0 12px 10px; background: var(--surface); line-height: 1.4; }

@media (max-width: 520px) {
  .pxchat { right: 14px; bottom: 14px; }
  .pxchat-fab { width: 60px; height: 60px; border-radius: 18px; }
  .pxchat-fab .cat { width: 42px; height: 42px; }
  .pxchat-panel { position: fixed; left: 8px; right: 8px; bottom: 84px; width: auto; height: min(560px, calc(100dvh - 100px)); }
  .pxchat-teaser { right: 72px; bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) { .pxchat-fab { animation: none; } }
/* the cat always sits on a light tile so its dark outline reads in both themes */
.pxchat-fab { background: #fff7ee; }
