/* Layout: left-aligned editorial column on a cool sage "paper"; the incident console in the hero is the one loud object,
   everything else is quiet type, rules and lists. */
:root {
  --paper: #edf0ea;
  --paper-2: #f7f9f5;
  --ink: #12201b;
  --ink-2: #4a5953;
  --rule: #cfd8cf;
  --accent: #2340d6;
  --accent-ink: #ffffff;
  --accent-soft: #dfe4fb;
  --ok: #1f8a57;
  /* Service tones: one hue per kind of work, reused in services, cases, prices and skills */
  --c-ops: #1f8a57;
  --c-ai: #6a4fd6;
  --c-web: #9a6412;
  --c-sec: #c2452d;
  --c-launch: #0e7f8c;
  --band: #e5e9e2;
  --alert: #c2452d;
  --console: #15221e;
  --console-2: #1d2c27;
  --console-ink: #dbe6df;
  --console-dim: #8fa39a;
  --console-rule: #2a3a34;

  --f-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --f-body: "Onest", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.35rem, 1.1rem + 0.9vw, 1.7rem);
  --step-3: clamp(1.7rem, 1.25rem + 1.8vw, 2.5rem);
  --step-4: clamp(1.95rem, 1.2rem + 3.2vw, 3.55rem);

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1714;
    --paper-2: #16201c;
    --ink: #e4ece6;
    --ink-2: #9cada5;
    --rule: #26332e;
    --accent: #93a6ff;
    --accent-ink: #0f1714;
    --accent-soft: #1d2645;
    --ok: #4cc38a;
    --c-ops: #4cc38a;
    --c-ai: #b29dff;
    --c-web: #f0b45b;
    --c-sec: #f07a60;
    --c-launch: #4fc4d3;
    --band: #16231e;
    --alert: #f07a60;
    --console: #18241f;
    --console-2: #1f2e28;
    --console-ink: #dbe6df;
    --console-dim: #8fa39a;
    --console-rule: #2c3d36;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1714;
  --paper-2: #16201c;
  --ink: #e4ece6;
  --ink-2: #9cada5;
  --rule: #26332e;
  --accent: #93a6ff;
  --accent-ink: #0f1714;
  --accent-soft: #1d2645;
  --ok: #4cc38a;
  --c-ops: #4cc38a;
  --c-ai: #b29dff;
  --c-web: #f0b45b;
  --c-sec: #f07a60;
  --c-launch: #4fc4d3;
  --band: #16231e;
  --alert: #f07a60;
  --console: #18241f;
  --console-2: #1f2e28;
  --console-ink: #dbe6df;
  --console-dim: #8fa39a;
  --console-rule: #2c3d36;
  color-scheme: dark;
}

/* Language switch: both languages live in the markup, the inactive one is hidden. */
:root:not([data-lang="en"]) body [lang="en"],
:root[data-lang="en"] body [lang="uk"] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
.nw { white-space: nowrap; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
@supports (overflow-x: clip) { body { overflow-x: clip; } }
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }

h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; text-wrap: balance; margin: 0; hyphens: manual; overflow-wrap: break-word; }
h1 { font-size: clamp(1.85rem, 1.1rem + 2.8vw, 3.1rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-weight: 600; line-height: 1.25; }
p { margin: 0; }

.wrap {
  width: 100%; max-width: var(--wrap); margin-inline: auto;
  /* iPhone landscape: keep content clear of the notch */
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid var(--accent); border-radius: 999px;
  font: 600 var(--step-0)/1 var(--f-body); text-decoration: none; cursor: pointer;
  -webkit-appearance: none; appearance: none; touch-action: manipulation; text-align: center;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
@media (hover: hover) { .btn:hover { transform: translateY(-1px); } }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
@media (hover: hover) { .btn--ghost:hover { border-color: var(--ink); } }
.btn--small { min-height: 40px; padding: 0 16px; font-size: var(--step--1); }

/* Header */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.top__row { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 1.15rem/1 var(--f-display); letter-spacing: -0.02em; }
.brand__ops { color: var(--ok); }
/* The mark is the app icon (assets/img/apple-touch-icon.png): a dark tile with a softly breathing green dot */
.brand__mark { flex: none; width: 30px; height: 30px; border-radius: 9px; background: #12201b; display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.brand__dot { width: 11px; height: 11px; border-radius: 50%; background: #4cc38a; animation: breathe 2.8s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { transform: scale(.88); box-shadow: 0 0 0 3px rgba(76, 195, 138, .16), 0 0 6px rgba(76, 195, 138, .25); }
  50% { transform: scale(1); box-shadow: 0 0 0 7px rgba(76, 195, 138, .07), 0 0 14px rgba(76, 195, 138, .55); }
}
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 0.98rem; font-weight: 500; }
.nav a:hover { color: var(--ink); }
.top__actions { display: flex; align-items: center; gap: 12px; }
.lang {
  display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 3px; background: transparent; cursor: pointer;
  font: 600 0.78rem/1 var(--f-body); color: var(--ink-2);
}
.lang span { padding: 7px 9px; border-radius: 999px; }
:root:not([data-lang="en"]) .lang [data-l="uk"],
:root[data-lang="en"] .lang [data-l="en"] { background: var(--ink); color: var(--paper); }
.menu-btn { display: none; }

@media (max-width: 1020px) {
  .nav { display: none; }
  .top__actions { margin-left: auto; }
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
    border: 1px solid var(--rule); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer;
  }
  .nav.is-open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: 8px var(--gutter) 16px;
  }
  .nav.is-open a { padding: 12px 0; font-size: var(--step-0); border-bottom: 1px solid var(--rule); }
  .nav.is-open a:last-child { border-bottom: 0; }
}
@media (max-width: 480px) { .top__actions .btn--small { display: none; } }

/* Hero */
.hero { padding-block: clamp(40px, 7vw, 88px) clamp(48px, 7vw, 96px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__copy { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.lead { font-size: var(--step-1); line-height: 1.55; color: var(--ink-2); max-width: 36em; }
.lead b { color: var(--ink); font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.facts { list-style: none; margin: 8px 0 0; padding: 20px 0 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.facts li { font-size: var(--step--1); color: var(--ink-2); line-height: 1.45; }
.facts b { display: block; font: 700 var(--step-2)/1.1 var(--f-display); color: var(--ink); margin-bottom: 6px; font-variant-numeric: tabular-nums; }

@media (max-width: 960px) { .hero__grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .facts { grid-template-columns: minmax(0, 1fr); gap: 14px; } .facts b { display: inline; margin-right: 6px; } }

/* Hero example card (scenes in tabs) */
.console { margin: 0; min-width: 0; background: var(--console); color: var(--console-ink); border-radius: 20px; border: 1px solid var(--console-rule); box-shadow: 0 30px 60px -30px rgba(10, 30, 22, .55); overflow: hidden; }
.console__bar { display: flex; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--console-rule); }

/* Scene tabs: auto-rotate (main.js) with a progress line under the active tab until the visitor picks one */
.scene-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.scene-tabs::-webkit-scrollbar { display: none; }
/* Each tab has its own hue (the card is dark in both themes, so the dark-theme tones are used as is) */
#tab-release { --t: #6aa8ff; }
#tab-bot { --t: #b29dff; }
#tab-costs { --t: #ffcd57; }
#tab-incident { --t: #f07a60; }
.scene-tab { position: relative; flex: none; display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: #b4c3bc; font: 600 0.88rem/1 var(--f-body); padding: 10px 14px; border-radius: 10px; cursor: pointer; touch-action: manipulation; transition: background-color .2s ease, color .2s ease; }
.scene-tab::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--t); opacity: .8; }
.scene-tab[aria-selected="true"] { background: rgba(255, 255, 255, .06); background: color-mix(in srgb, var(--t) 16%, transparent); color: var(--t); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 45%, transparent); }
.scene-tab[aria-selected="true"]::before { opacity: 1; box-shadow: 0 0 0 3px color-mix(in srgb, var(--t) 28%, transparent); }
@media (hover: hover) { .scene-tab:hover { color: var(--t); } }
@media (max-width: 420px) { .scene-tab { padding: 9px 10px; gap: 6px; font-size: 0.84rem; } }
.console.is-auto .scene-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--t); transform-origin: left; animation: tab-progress var(--scene-ms, 9000ms) linear forwards; }
@keyframes tab-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* All scenes share one grid cell, so the card keeps the height of the tallest and never jumps */
.scenes { display: grid; }
.scene { grid-area: 1 / 1; display: flex; flex-direction: column; min-width: 0; visibility: hidden; opacity: 0; transition: opacity .35s ease, visibility 0s linear .35s; }
.scene.is-active { visibility: visible; opacity: 1; transition: opacity .35s ease; }

/* Release scene */
.pipe, .costs { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.pipe__head { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; font: 500 0.8rem/1.4 var(--f-mono); color: var(--console-dim); }
.pipe__head b { color: var(--console-ink); }
.pipe__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.step { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--console-2); font-size: 0.92rem; }
.step__ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(76, 195, 138, .18); color: #6fdca6; }
.step__meta { font: 500 0.76rem/1.3 var(--f-mono); color: var(--console-dim); text-align: right; }
.step--gate { box-shadow: inset 0 0 0 1px rgba(76, 195, 138, .45); }
.pipe__sum { margin: 2px 0 0; font-size: 0.86rem; color: var(--console-dim); }

/* Bot scene: a Telegram-like chat */
.tg { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 86%; padding: 8px 12px 6px; border-radius: 14px; font-size: 0.9rem; line-height: 1.45; display: flex; flex-direction: column; gap: 4px; }
.bubble time { align-self: flex-end; font-size: 0.7rem; color: var(--console-dim); }
.bubble--me { align-self: flex-end; background: #2b5245; border-bottom-right-radius: 4px; }
.bubble--bot { align-self: flex-start; background: var(--console-2); border-bottom-left-radius: 4px; }
.bubble__name { font-size: 0.78rem; color: #93a6ff; }
.attach { display: flex; align-items: center; gap: 10px; padding: 4px 0 2px; }
.attach__ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); }
.attach b { display: block; font-size: 0.85rem; }
.attach small { font-size: 0.72rem; color: var(--console-dim); }

/* Costs scene */
.bars, .finds { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bars li { display: grid; grid-template-columns: 74px minmax(0, 1fr) 60px; gap: 10px; align-items: center; font-size: 0.84rem; color: var(--console-dim); }
.bars b { font: 600 0.8rem/1 var(--f-mono); color: var(--console-ink); text-align: right; }
.bar { height: 10px; border-radius: 5px; background: var(--console-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 5px; background: #6b7f78; }
.bars .is-after .bar i { background: #4cc38a; }
.bars .is-after { color: var(--console-ink); }
.finds { padding-top: 12px; border-top: 1px solid var(--console-rule); }
.finds li { display: flex; justify-content: space-between; gap: 12px; font-size: 0.88rem; }
.finds b { font: 600 0.82rem/1.4 var(--f-mono); color: #6fdca6; white-space: nowrap; }
.finds__total { padding-top: 8px; border-top: 1px dashed var(--console-rule); font-weight: 600; }
.console__feed { list-style: none; margin: 0; padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.msg { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; }
/* Every scene is fully visible at rest; main.js adds .is-playing to the shown scene to replay it line by line
   (it also sets each line's animation-delay). */
.scene.is-playing .msg, .scene.is-playing .anim { animation: msg-in .4s cubic-bezier(.2,.7,.2,1) backwards; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } }
.msg__av { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font: 700 0.68rem/1 var(--f-mono); color: #fff; }
.msg__av--am { background: #b2452f; }
.msg__av--ai { background: #3550d8; }
.msg__av--human { background: #2f7d55; }
.choices { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.choice { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--console-rule); color: var(--console-dim); font-size: 0.8rem; font-weight: 500; }
.choice code { font-family: var(--f-mono); font-size: 0.9em; }
.choice--picked { border-color: rgba(76, 195, 138, .5); background: rgba(76, 195, 138, .12); color: #6fdca6; }
.choice--picked::before { content: "✓"; font-weight: 700; }
.msg__head { display: flex; align-items: baseline; gap: 8px; font-size: 0.8rem; color: var(--console-dim); margin-bottom: 3px; }
.msg__head b { color: var(--console-ink); font-weight: 600; font-size: 0.86rem; }
.msg__text { font-size: 0.93rem; line-height: 1.5; overflow-wrap: anywhere; }
.msg__text code { font-family: var(--f-mono); font-size: 0.84em; background: var(--console-2); padding: 1px 6px; border-radius: 5px; }
.state { display: inline-block; font: 700 0.7rem/1 var(--f-mono); letter-spacing: .04em; padding: 4px 7px; border-radius: 5px; margin-right: 6px; vertical-align: 1px; }
.state--fire { background: rgba(240, 122, 96, .18); color: #ff9c86; }
.state--ok { background: rgba(76, 195, 138, .18); color: #6fdca6; }
.spark { display: block; margin-top: 10px; background: var(--console-2); border-radius: 10px; padding: 8px 10px 6px; }
.spark svg { display: block; width: 100%; height: auto; }
.console__cap { margin: auto 0 0; padding: 12px 18px 16px; border-top: 1px solid var(--console-rule); font-size: 0.8rem; color: var(--console-dim); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scene .msg, .scene .anim, .brand__dot, .scene-tab::after { animation: none !important; }
  .scene { transition: none; }
  .btn { transition: none; }
}

/* Sections */
.section { padding-block: clamp(56px, 8vw, 104px); border-top: 1px solid var(--rule); }
.section__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 48px; align-items: end; margin-bottom: clamp(32px, 4vw, 52px); }
.section__head p { color: var(--ink-2); max-width: 34em; }
@media (max-width: 820px) { .section__head { grid-template-columns: minmax(0, 1fr); } }

/* Before / after ledger */
.ledger { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.ledger__labels, .ledger__row { display: grid; grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); gap: 16px; align-items: center; }
.ledger__labels { padding-block: 14px; font-size: var(--step--1); font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--rule); }
.ledger__row { padding-block: 22px; border-bottom: 1px solid var(--rule); }
.ledger__was { color: var(--ink-2); display: flex; gap: 12px; align-items: baseline; }
.ledger__now { font-weight: 600; display: flex; gap: 12px; align-items: baseline; font-size: var(--step-1); line-height: 1.4; }
.dot { flex: none; width: 9px; height: 9px; border-radius: 50%; transform: translateY(-1px); }
.dot--alert { background: var(--alert); }
.dot--ok { background: var(--ok); }
.ledger__arrow { color: var(--ink-2); justify-self: center; }
@media (max-width: 700px) {
  .ledger__labels { display: none; }
  .ledger__row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ledger__arrow { display: none; }
}

/* Services */
.tracks { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 32px); }
.track { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 22px; padding: clamp(24px, 3vw, 36px); display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.track__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.track__lead { color: var(--ink-2); }
.svc { list-style: none; margin: 0; padding: 0; display: grid; }
.svc li { padding-block: 14px; border-top: 1px solid var(--rule); display: grid; gap: 2px; }
.svc b { font-weight: 600; }
.svc span { color: var(--ink-2); font-size: var(--step--1); line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: auto 0 0; padding: 0; }
.chips li { font-size: 0.8rem; font-weight: 500; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-2); }
@media (max-width: 860px) { .tracks { grid-template-columns: minmax(0, 1fr); } }

.audit { margin-top: clamp(20px, 3vw, 32px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 40px; align-items: center; padding: clamp(24px, 3vw, 36px); border-radius: 22px; background: var(--accent); color: var(--accent-ink); }
.audit h3 { font-size: var(--step-2); }
.audit p { opacity: .88; margin-top: 8px; max-width: 46em; }
.audit .btn { background: var(--accent-ink); color: var(--accent); border-color: var(--accent-ink); }
@media (max-width: 760px) { .audit { grid-template-columns: minmax(0, 1fr); } .audit .btn { justify-self: start; } }

/* Cases: grouped; the first card of a three-card group spans the row */
.case-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(28px, 4vw, 44px); }
.case-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-size: var(--step--1); font-weight: 500; background: var(--paper-2); }
@media (hover: hover) { .case-nav a:hover { border-color: var(--ink); } }
.cgroup { padding-block: clamp(24px, 3vw, 36px); border-top: 1px solid var(--rule); scroll-margin-top: 84px; }
.cgroup__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 48px; align-items: baseline; margin-bottom: 22px; }
.cgroup__head h3 { font-size: var(--step-2); }
.cgroup__head p { color: var(--ink-2); }
.cgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 20px); }
.ccard { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: clamp(20px, 2.6vw, 28px); border: 1px solid var(--rule); border-radius: 20px; background: var(--paper); }
.ccard--wide { grid-column: 1 / -1; }
.ccard--wide h4 { font-size: var(--step-2); }
.ccard--wide > p:not(.ccard__tags):not(.ccard__win) { max-width: 62em; }
.ccard__tags { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.8rem; color: var(--ink-2); }
.ccard__tags span { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--rule); background: var(--paper); }
.ccard__tags .is-ai { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 600; }
.ccard h4 { margin: 0; font: 600 var(--step-1)/1.25 var(--f-display); letter-spacing: -0.01em; text-wrap: balance; overflow-wrap: break-word; }
.ccard > p:not(.ccard__tags):not(.ccard__win) { color: var(--ink-2); }
.ccard__win { margin-top: auto; display: flex; gap: 10px; align-items: flex-start; padding-top: 14px; border-top: 1px solid var(--rule); font-weight: 600; line-height: 1.45; }
.ccard__win svg { flex: none; color: var(--ok); margin-top: 3px; }
@media (max-width: 820px) {
  .cgroup__head { grid-template-columns: minmax(0, 1fr); }
  .cgrid { grid-template-columns: minmax(0, 1fr); }
}

/* Websites */
.web { margin-top: clamp(20px, 3vw, 32px); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px 28px; align-items: start; padding: clamp(24px, 3vw, 36px); border: 1px solid var(--rule); border-radius: 22px; background: var(--paper-2); }
.web__body { display: grid; gap: 12px; min-width: 0; }
.web__body > p { color: var(--ink-2); max-width: 60em; }
.web .btn { align-self: center; }
@media (max-width: 820px) { .web { grid-template-columns: minmax(0, 1fr); } .web .btn { justify-self: start; } }

/* Process */
.process { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px; padding-block: 22px; border-top: 1px solid var(--rule); }
.steps li::before { content: counter(step); font: 700 var(--step-3)/1 var(--f-display); color: var(--accent); }
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--ink-2); }
.promise { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 22px; padding: clamp(24px, 3vw, 32px); display: grid; gap: 18px; }
.promise h3 { font-size: var(--step-2); }
.promise ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.promise li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; }
.promise li svg { color: var(--ok); margin-top: 3px; }
.promise li b { display: block; }
.promise li span { color: var(--ink-2); font-size: var(--step--1); }
@media (max-width: 900px) { .process { grid-template-columns: minmax(0, 1fr); } }

/* Pricing */
.pricing { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.pricelist { display: grid; gap: 16px; min-width: 0; }
.pricelist > h3 { margin-top: 12px; }
.pricelist > h3:first-child { margin-top: 0; }
.prices { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.prices li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: baseline; padding-block: 16px; border-bottom: 1px solid var(--rule); }
.prices b { display: block; font-weight: 600; }
.prices span { display: block; color: var(--ink-2); font-size: var(--step--1); line-height: 1.5; margin-top: 2px; }
.price { font: 700 var(--step-1)/1.1 var(--f-display); white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
.price small { font: 500 var(--step--1)/1 var(--f-body); color: var(--ink-2); margin-right: 4px; }
@media (max-width: 520px) { .prices li { grid-template-columns: minmax(0, 1fr); } .price { text-align: left; } }

.rates { display: grid; gap: 16px; min-width: 0; }
.rate { border: 1px solid var(--rule); border-radius: 22px; padding: clamp(22px, 3vw, 28px); display: grid; gap: 12px; background: var(--paper-2); }
.rate p { color: var(--ink-2); font-size: var(--step--1); }
.rate .rate__num { font: 700 var(--step-4)/1 var(--f-display); color: inherit; letter-spacing: -0.02em; }
.rate__num small { font: 500 var(--step-0)/1 var(--f-body); color: var(--ink-2); margin-left: 4px; letter-spacing: 0; }
.rate--dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.rate--dark p { color: var(--paper); opacity: .8; }
.rate--dark .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); justify-self: start; }
.tiers { list-style: none; margin: 0; padding: 0; display: grid; }
.tiers li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-block: 10px; border-top: 1px solid rgba(128, 140, 134, .35); }
.tiers b { font: 700 var(--step-1)/1 var(--f-display); font-variant-numeric: tabular-nums; }
.terms { margin: 0; padding: 4px 0 0 18px; display: grid; gap: 8px; color: var(--ink-2); font-size: var(--step--1); }
@media (max-width: 900px) { .pricing { grid-template-columns: minmax(0, 1fr); } }

/* Experience */
.exp { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 18px; padding-block: 16px; border-top: 1px solid var(--rule); }
.timeline time { font-size: var(--step--1); font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; padding-top: 2px; }
.timeline b { display: block; font-weight: 600; }
.timeline span { color: var(--ink-2); font-size: var(--step--1); }
.timeline li.is-now time { color: var(--ok); }
.edu { margin-top: 28px; display: grid; gap: 8px; color: var(--ink-2); font-size: var(--step--1); }
.edu b { color: var(--ink); font-weight: 600; }
.stack { display: grid; gap: 18px; }
.stack h3 { font-size: var(--step-1); }
.stack dl { margin: 0; display: grid; gap: 14px; }
.stack dt { font-size: var(--step--1); font-weight: 600; margin-bottom: 6px; }
.stack dd { margin: 0; }
@media (max-width: 900px) { .exp { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 460px) { .timeline li { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

/* FAQ */
.faq { display: grid; border-top: 1px solid var(--rule); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; padding-block: 20px; display: flex; justify-content: space-between; gap: 20px; font-weight: 600; font-size: var(--step-1); line-height: 1.35; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font: 400 1.6rem/1 var(--f-body); color: var(--accent); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 22px; color: var(--ink-2); max-width: 44em; }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.contact__intro { display: flex; flex-direction: column; gap: 22px; }
.contact__intro > p { color: var(--ink-2); font-size: var(--step-1); }
.direct { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.direct li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-block: 14px; border-bottom: 1px solid var(--rule); }
.direct .k { width: 84px; font-size: var(--step--1); color: var(--ink-2); }
.direct .v { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.direct a.v { color: var(--ink); text-decoration-color: var(--rule); }
.copy { margin-left: auto; border: 1px solid var(--rule); background: transparent; color: var(--ink-2); border-radius: 999px; padding: 6px 12px; font: 500 0.8rem/1 var(--f-body); cursor: pointer; }
.copy:hover { color: var(--ink); border-color: var(--ink); }

.form { background: var(--paper-2); border: 1px solid var(--rule); border-radius: 22px; padding: clamp(22px, 3vw, 34px); display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label, .field legend { font-size: var(--step--1); font-weight: 600; }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); color: var(--ink);
  font: 400 var(--step-0)/1.5 var(--f-body); padding: 12px 14px;
  -webkit-appearance: none; appearance: none; /* no iOS inner shadow; 17px text keeps iOS from zooming on focus */
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
fieldset.field { border: 0; margin: 0; padding: 0; }
.radio { display: flex; flex-wrap: wrap; gap: 8px; }
.radio label { position: relative; cursor: pointer; }
.radio input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.radio label > span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--rule); font-size: var(--step--1); font-weight: 500; background: var(--paper); }
.radio input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.radio input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.form__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.form__foot { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.form__hint { font-size: var(--step--1); color: var(--ink-2); flex: 1 1 220px; }
.form__status { font-size: var(--step--1); padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); }
@media (max-width: 900px) { .contact { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .form__row { grid-template-columns: minmax(0, 1fr); } }

/* Footer */
.foot { border-top: 1px solid var(--rule); padding-block: 28px 36px; color: var(--ink-2); font-size: var(--step--1); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.foot a { color: var(--ink-2); }

/* Touch devices (iOS, Android): bigger tap targets */
@media (pointer: coarse) {
  .lang span { padding: 10px 12px; }
  .copy { min-height: 40px; padding: 0 14px; }
  .radio label > span { min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; }
  .faq summary { padding-block: 22px; }
  .nav.is-open a { padding: 15px 0; }
}

/* Phones */
@media (max-width: 480px) {
  .steps li { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
  .hero { padding-top: 28px; }
  .cta-row .btn { flex: 1 1 100%; }
  .console__feed { padding: 14px; }
  .msg { grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
  .msg__av { width: 30px; height: 30px; }
}

/* Bottom action bar on phones, shown by main.js once the hero buttons scroll away */
.mbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px;
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: var(--paper); border-top: 1px solid var(--rule);
  box-shadow: 0 -10px 30px -18px rgba(10, 30, 22, .35);
}
@media (min-width: 761px) { .mbar { display: none !important; } }
@media (max-width: 760px) { .foot { padding-bottom: calc(36px + 72px + env(safe-area-inset-bottom, 0px)); } }

/* Contact: Telegram is the main channel */
.btn--tg { align-self: flex-start; }
.form__title { font: 600 var(--step-1)/1.3 var(--f-display); }

/* Tones and section bands */
.tone-ops { --tone: var(--c-ops); }
.tone-ai { --tone: var(--c-ai); }
.tone-web { --tone: var(--c-web); }
.tone-sec { --tone: var(--c-sec); }
.tone-launch { --tone: var(--c-launch); }

#cases, #pricing, #faq { background: var(--band); }
#contact {
  background: var(--paper);
  background: radial-gradient(55% 70% at 88% 0%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%), var(--paper);
}

/* Services: each track tinted by its tone */
.track[class*="tone-"], .web[class*="tone-"] {
  border-color: color-mix(in srgb, var(--tone) 28%, var(--rule));
  background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 9%, var(--paper-2)), var(--paper-2) 260px);
}
.track[class*="tone-"] .track__icon, .web[class*="tone-"] .track__icon { background: color-mix(in srgb, var(--tone) 16%, transparent); color: var(--tone); }
.track[class*="tone-"] .chips li, .web[class*="tone-"] .chips li { border-color: color-mix(in srgb, var(--tone) 35%, var(--rule)); }

/* A colour dot names the tone of case groups, price groups and skill groups */
.case-nav a[class*="tone-"]::before, .cgroup__head h3::before, .pricelist > h3[class*="tone-"]::before, .stack dl > div[class*="tone-"] dt::before {
  content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--tone);
}
.case-nav a { gap: 8px; }
.cgroup__head h3, .pricelist > h3[class*="tone-"], .stack dl > div[class*="tone-"] dt { display: flex; align-items: center; gap: 10px; }
.cgroup__head h3 { align-items: flex-start; }
.cgroup__head h3::before { margin-top: .42em; }

/* Cases: tinted lead card, coloured first tag and check */
.cgroup .ccard__tags span:first-child { background: color-mix(in srgb, var(--tone) 15%, transparent); color: var(--tone); border-color: transparent; font-weight: 600; }
.cgroup .ccard__win svg { color: var(--tone); }
.cgroup .ccard--wide {
  border-color: color-mix(in srgb, var(--tone) 32%, var(--rule));
  background: linear-gradient(135deg, color-mix(in srgb, var(--tone) 10%, var(--paper)), var(--paper) 65%);
}

/* Hourly rate card picks up the accent */
.rate:not(.rate--dark) {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--rule));
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 10%, var(--paper-2)), var(--paper-2) 70%);
}

/* The website block's button is a filled button in the block's own tone */
.web[class*="tone-"] .btn--ghost { background: var(--tone); border-color: var(--tone); color: var(--paper); }
@media (hover: hover) { .web[class*="tone-"] .btn--ghost:hover { border-color: var(--tone); filter: brightness(1.08); } }

/* Scenes take the hue of their tab so the rows stand out from the dark card (rgba lines are fallbacks) */
#scene-release { --t: #6aa8ff; }
#scene-bot { --t: #b29dff; }
#scene-costs { --t: #ffcd57; }
.step { background: #22352d; background: color-mix(in srgb, var(--t) 12%, #1f2e28); box-shadow: inset 0 0 0 1px rgba(76, 195, 138, .25); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 26%, transparent); color: #eef5f0; }
.step__meta { color: #b9c8c1; }
.step__ic { background: color-mix(in srgb, var(--t) 28%, transparent); }
.step--gate { background: color-mix(in srgb, var(--t) 22%, #1f2e28); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 70%, transparent); }
.step--gate .step__meta { color: var(--t); }

.bubble--bot { background: #2a2b45; background: color-mix(in srgb, var(--t) 17%, #1f2e28); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 30%, transparent); }
.bubble--bot .bubble__name { color: var(--t); }
.bubble--me { background: #2f6150; box-shadow: inset 0 0 0 1px rgba(76, 195, 138, .35); }
.bubble time { color: #a9b8b1; }

.costs .bars, .costs .finds { padding: 14px; border-radius: 12px; background: #2a2a20; background: color-mix(in srgb, var(--t) 9%, #1f2e28); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 24%, transparent); }
.costs .finds { border-top: 0; }
.costs .bars li { color: #c3d0ca; }
.costs .bar { background: rgba(0, 0, 0, .28); }
.costs .bar i { background: #9aa9a2; }
.costs .finds__total { border-top-color: color-mix(in srgb, var(--t) 35%, transparent); color: #eef5f0; }

/* Release scene as a pipeline: steps on a vertical line, timings as chips, production as the highlighted gate.
   Tints mix with a neutral slate (#1c2230), not the greenish card colour, so blue and gold stay clean. */
#scene-release .pipe__steps { position: relative; gap: 6px; }
#scene-release .pipe__steps::before { content: ""; position: absolute; left: 24px; top: 22px; bottom: 30px; width: 2px; border-radius: 2px; background: linear-gradient(var(--t), color-mix(in srgb, var(--t) 35%, transparent)); }
#scene-release .step { position: relative; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 14px; padding: 9px 12px; background: transparent; box-shadow: none; }
#scene-release .step__ic { width: 26px; height: 26px; background: var(--t); color: #0f1a2b; box-shadow: 0 0 0 4px var(--console); }
#scene-release .step__meta { padding: 4px 8px; border-radius: 6px; background: rgba(255, 255, 255, .06); color: #c9d6e6; background: color-mix(in srgb, var(--t) 14%, #1c2230); }
#scene-release .step--gate { margin-top: 6px; background: color-mix(in srgb, var(--t) 18%, #1c2230); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 65%, transparent), 0 12px 30px -18px var(--t); }
#scene-release .step--gate .step__meta { background: var(--t); color: #0f1a2b; font-weight: 700; }
#scene-release .pipe__head b { color: var(--t); }

/* Costs scene in clean gold on slate */
#scene-costs .bars, #scene-costs .finds { background: color-mix(in srgb, var(--t) 8%, #1c2230); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 28%, transparent); }
#scene-costs .bars .is-after .bar i { background: var(--t); }
#scene-costs .finds b, #scene-costs .bars .is-after b { color: var(--t); }
#scene-costs .finds__total { border-top-color: color-mix(in srgb, var(--t) 40%, transparent); }
#scene-release .step--gate .step__ic { box-shadow: none; }

/* Costs: make it read as savings, not spending */
#scene-costs .bars li { grid-template-columns: 96px minmax(0, 1fr) 64px; }
#scene-costs .bars li > span:first-child small { display: block; font-size: 0.7rem; color: var(--t); }
#scene-costs .pipe__head { align-items: center; }
#scene-costs .saving { margin-left: auto; font-style: normal; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: rgba(76, 195, 138, .18); color: #6fdca6; }
#scene-costs .finds b { color: #6fdca6; }
#scene-costs .finds__head { font: 600 0.74rem/1.3 var(--f-mono); text-transform: none; color: var(--t); padding-bottom: 4px; }
#scene-costs .finds__head span:last-child, #scene-costs .finds__head span[lang]:nth-child(n+3) { color: #a9b8b1; font-weight: 500; }
#scene-costs .finds__total b { padding: 3px 8px; border-radius: 6px; background: rgba(76, 195, 138, .18); color: #6fdca6; }

/* Contact: booking button sits next to Telegram; the honeypot field is off-screen for people, visible to bots */
.contact__intro .btn--book { align-self: flex-start; }
.contact__intro .btn--tg + .btn--book { margin-top: -10px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form { position: relative; }
.form__status.is-ok { background: rgba(76, 195, 138, .16); }
.form__status.is-error { background: rgba(240, 122, 96, .16); }
