/* ==========================================================================
   PakaiTech — Workflow Automation
   Design tokens, base styles, layout, components
   ========================================================================== */

:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #eef1f7;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;

  --brand: #4f46e5;
  --brand-600: #4338ca;
  --brand-100: #e0e7ff;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-md: 0 10px 30px -10px rgba(15, 23, 42, .18);
  --shadow-lg: 0 30px 60px -20px rgba(79, 70, 229, .25);

  --container: 1160px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.2rem; }
p { margin: 0; }
.muted { color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--ink-2); }
.center { text-align: center; }

.container { width: min(var(--container), calc(100% - 2.5rem)); margin-inline: auto; }
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-head { max-width: 720px; margin: 0 auto 3rem; text-align: center; }
.section-head p { margin-top: 1rem; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand); margin-bottom: .8rem;
}
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.35rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -8px rgba(79, 70, 229, .6); }
.btn-primary:hover { background: var(--brand-600); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: #cbd5e1; }
.btn-ghost { color: var(--ink-2); padding-inline: .9rem; }
.btn-ghost:hover { color: var(--brand); transform: none; }
.btn-lg { padding: 1rem 1.7rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 248, 251, .85); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 2rem; position: relative; }
.logo { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff;
}
.logo-mark svg { width: 34px; height: 34px; }
.logo-word span { background: linear-gradient(90deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; align-items: center; gap: 1.8rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-weight: 500; color: var(--ink-2); font-size: .95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--brand); }
.nav-actions { display: flex; align-items: center; gap: .6rem; }
.nav-toggle {
  display: none; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); align-items: center; justify-content: center;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; }
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink); transition: transform .2s;
}
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(4rem, 9vw, 7.5rem) 0 clamp(3rem, 6vw, 5rem); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto -20%; height: 120%;
  background:
    radial-gradient(600px 300px at 20% 30%, rgba(79, 70, 229, .18), transparent 70%),
    radial-gradient(500px 300px at 80% 20%, rgba(6, 182, 212, .16), transparent 70%);
  pointer-events: none; z-index: -1;
}
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3.5rem; align-items: center; }
.hero h1 { margin: 1rem 0 1.25rem; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { max-width: 560px; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 2rem; }
.hero-note { margin-top: 1rem; font-size: .9rem; color: var(--muted); }
.pill {
  display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .8rem .35rem .45rem;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .85rem; font-weight: 500; color: var(--ink-2);
}
.pill .dot { width: 20px; height: 20px; border-radius: 999px; background: var(--brand-100); color: var(--brand); display: grid; place-items: center; font-size: .7rem; font-weight: 800; }

/* Workflow canvas illustration */
.canvas {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow-lg); padding: 1.25rem; min-height: 420px;
  background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 18px 18px;
}
.canvas-bar { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.canvas-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.canvas-bar i:nth-child(1) { background: #fca5a5; } .canvas-bar i:nth-child(2) { background: #fcd34d; } .canvas-bar i:nth-child(3) { background: #86efac; }
.canvas-title { margin-left: auto; font-size: .78rem; color: var(--muted); font-family: var(--mono); }
.node {
  position: absolute; width: 190px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: .7rem .8rem; box-shadow: var(--shadow-sm); font-size: .82rem; animation: float 6s ease-in-out infinite;
}
.node .n-head { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.node .n-icon { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; color: #fff; font-size: .7rem; font-weight: 800; }
.node .n-sub { color: var(--muted); font-size: .75rem; margin-top: .25rem; }
.node .n-status { margin-top: .5rem; font-size: .7rem; font-weight: 600; color: var(--success); display: flex; align-items: center; gap: .35rem; }
.node .n-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.n1 { top: 60px; left: 24px; animation-delay: 0s; }
.n2 { top: 170px; left: 50%; transform: translateX(-50%); animation-delay: .8s; }
.n3 { top: 290px; left: 24px; animation-delay: 1.6s; }
.n4 { top: 290px; right: 24px; animation-delay: 2.4s; }
.n5 { top: 60px; right: 24px; animation-delay: 1.2s; }
.wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.wires path { fill: none; stroke: var(--brand); stroke-width: 2; stroke-dasharray: 6 6; opacity: .55; animation: dash 1.6s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -24; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }

/* ---------- Logos ---------- */
.logos { padding: 2.5rem 0 1rem; }
.logos p { text-align: center; font-size: .85rem; color: var(--muted); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 1.5rem; }
.logo-row { display: flex; justify-content: center; gap: 2.5rem 3.5rem; flex-wrap: wrap; opacity: .7; }
.logo-row span { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; color: var(--ink-2); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #cbd5e1; }
.card h3 { margin: 1rem 0 .5rem; }
.card p { color: var(--muted); font-size: .95rem; }
.icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-100); color: var(--brand);
}
.icon svg { width: 22px; height: 22px; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 4rem; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0; font-weight: 800; font-size: 1.6rem; color: var(--brand); font-family: var(--mono); letter-spacing: -0.05em;
}
.step h3 { margin-bottom: .4rem; }
.step p { color: var(--muted); }

/* ---------- Stats ---------- */
.stats { background: var(--ink); color: #fff; border-radius: 24px; padding: 3rem; }
.stats .grid-4 > div { text-align: center; }
.stat-num { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.04em; background: linear-gradient(90deg, #a5b4fc, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { color: #94a3b8; font-size: .9rem; margin-top: .25rem; }

/* ---------- Integrations ---------- */
.int-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.int {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem .75rem;
  text-align: center; font-weight: 600; font-size: .88rem; color: var(--ink-2); transition: transform .15s, border-color .15s;
}
.int:hover { transform: translateY(-2px); border-color: var(--brand); color: var(--brand); }
.int i { display: block; width: 30px; height: 30px; margin: 0 auto .5rem; border-radius: 8px; background: var(--surface-2); }

/* ---------- Testimonials ---------- */
.quote { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; display: flex; flex-direction: column; gap: 1.25rem; }
.quote blockquote { margin: 0; font-size: 1.02rem; color: var(--ink-2); }
.quote .who { display: flex; align-items: center; gap: .8rem; margin-top: auto; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--brand), var(--accent)); font-size: .9rem; }
.who strong { display: block; font-size: .95rem; }
.who span { color: var(--muted); font-size: .85rem; }
.stars { color: var(--warning); letter-spacing: .1em; font-size: .9rem; }

/* ---------- Pricing ---------- */
.billing-toggle { display: inline-flex; align-items: center; gap: .3rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .35rem; margin-bottom: 2.5rem; }
.billing-toggle button { border: 0; background: transparent; padding: .5rem 1.1rem; border-radius: 999px; font-weight: 600; color: var(--muted); }
.billing-toggle button.active { background: var(--ink); color: #fff; }
.billing-toggle .save { font-size: .75rem; color: var(--success); font-weight: 700; margin-left: .3rem; }
.billing-toggle button.active .save { color: #6ee7b7; }
.plan { position: relative; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--brand); box-shadow: var(--shadow-lg); }
.plan .badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: .72rem; font-weight: 700; padding: .25rem .8rem; border-radius: 999px; letter-spacing: .05em; text-transform: uppercase; }
.plan h3 { margin: 0 0 .25rem; }
.price { display: flex; align-items: baseline; gap: .25rem; margin: 1.25rem 0 .25rem; }
.price .amt { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.04em; }
.price .per { color: var(--muted); font-size: .9rem; }
.plan ul { list-style: none; padding: 0; margin: 1.5rem 0 2rem; display: grid; gap: .65rem; color: var(--ink-2); font-size: .95rem; }
.plan li { padding-left: 1.6rem; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 800; }
.plan .btn { margin-top: auto; }
.compare { width: 100%; border-collapse: collapse; font-size: .93rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.compare th, .compare td { padding: .9rem 1rem; text-align: left; border-bottom: 1px solid var(--line); }
.compare th { background: var(--surface-2); font-weight: 700; }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; }
.compare tr:last-child td { border-bottom: 0; }
.compare .yes { color: var(--success); font-weight: 800; } .compare .no { color: #cbd5e1; }
.table-wrap { overflow-x: auto; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.25rem; margin-bottom: .75rem; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--muted); transition: transform .2s; flex-shrink: 0; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: .75rem; color: var(--muted); }

/* ---------- CTA ---------- */
.cta { background: linear-gradient(135deg, var(--brand), #6d28d9 60%, var(--accent)); color: #fff; border-radius: 24px; padding: clamp(2.5rem, 6vw, 4.5rem); text-align: center; position: relative; overflow: hidden; }
.cta::after { content: ""; position: absolute; inset: 0; background: radial-gradient(400px 200px at 80% 20%, rgba(255,255,255,.18), transparent 70%); pointer-events: none; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.85); margin: 1rem auto 2rem; max-width: 560px; }
.cta .hero-actions { justify-content: center; margin-top: 0; position: relative; z-index: 1; }
.cta .btn-primary { background: #fff; color: var(--brand); box-shadow: none; }
.cta .btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }

/* ---------- Page header ---------- */
.page-head { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem); text-align: center; }
.page-head h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); margin: .75rem 0 1rem; }
.page-head .lead { max-width: 640px; margin: 0 auto; }

/* ---------- Solutions ---------- */
.tabs { display: flex; justify-content: center; gap: .5rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.tab { border: 1px solid var(--line); background: var(--surface); padding: .55rem 1.1rem; border-radius: 999px; font-weight: 600; color: var(--ink-2); font-size: .92rem; }
.tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.tab-panel { display: none; } .tab-panel.active { display: block; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
.feature-split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.feature-split.reverse > :first-child { order: 2; }
.feature-split ul { padding-left: 1.2rem; color: var(--ink-2); margin: 1.25rem 0; display: grid; gap: .5rem; }
.mock { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-md); padding: 1.25rem; }
.mock-head { font-size: .78rem; color: var(--muted); font-family: var(--mono); margin-bottom: .8rem; }
.mock-row { display: flex; align-items: center; gap: .8rem; padding: .75rem; border-radius: 10px; border: 1px solid var(--line); margin-bottom: .6rem; font-size: .88rem; }
.mock-row .n-icon { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-size: .7rem; font-weight: 800; flex-shrink: 0; }
.mock-row .tag { margin-left: auto; font-size: .72rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; }
.tag.ok { background: #d1fae5; color: #065f46; } .tag.run { background: var(--brand-100); color: var(--brand-600); } .tag.wait { background: #fef3c7; color: #92400e; }

/* ---------- About ---------- */
.values .card p { color: var(--ink-2); }
.team-card { text-align: center; }
.team-card .avatar { width: 72px; height: 72px; margin: 0 auto 1rem; font-size: 1.3rem; }
.team-card h3 { margin: 0 0 .2rem; font-size: 1.05rem; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1.75rem 1.75rem; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: .35rem; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-100); }
.timeline .yr { font-family: var(--mono); font-size: .8rem; color: var(--brand); font-weight: 700; }
.timeline strong { display: block; margin: .15rem 0 .25rem; }
.timeline p { color: var(--muted); font-size: .95rem; }

/* ---------- Contact / Forms ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: start; }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-sm); }
.field { display: grid; gap: .4rem; margin-bottom: 1.1rem; }
.field label { font-weight: 600; font-size: .9rem; }
.field input, .field select, .field textarea {
  font: inherit; width: 100%; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); background: #fff; }
.field textarea { min-height: 130px; resize: vertical; }
.field .err { font-size: .8rem; color: #dc2626; display: none; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #dc2626; }
.field.invalid .err { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-success { display: none; text-align: center; padding: 2rem 1rem; }
.form-success .icon { width: 56px; height: 56px; margin: 0 auto 1rem; background: #d1fae5; color: var(--success); border-radius: 50%; }
.form-success h3 { margin-bottom: .5rem; }
.contact-info { display: grid; gap: 1.25rem; }
.info-card { display: flex; gap: 1rem; align-items: flex-start; }
.info-card .icon { flex-shrink: 0; }
.info-card strong { display: block; margin-bottom: .2rem; }
.info-card p, .info-card a { color: var(--muted); font-size: .95rem; }
.info-card a:hover { color: var(--brand); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 3.5rem 0 2rem; margin-top: 2rem; background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 2rem; }
.footer-grid h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin-bottom: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.footer-grid a { color: var(--muted); font-size: .93rem; } .footer-grid a:hover { color: var(--brand); }
.footer-brand p { color: var(--muted); font-size: .93rem; margin-top: .9rem; max-width: 300px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.socials { display: flex; gap: .6rem; }
.socials a { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); }
.socials a:hover { border-color: var(--brand); color: var(--brand); }
.socials svg { width: 16px; height: 16px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .node, .wires path, .tab-panel.active { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .int-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .hero-inner, .feature-split, .contact-grid { grid-template-columns: 1fr; }
  .feature-split.reverse > :first-child { order: 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .nav { gap: 1rem; }
  .nav-links, .nav-actions .btn-ghost { display: none; }
  .nav-toggle { display: inline-flex; flex-shrink: 0; }
  .nav-actions .btn-primary { padding: .6rem 1rem; font-size: .88rem; }
  .nav-links.open {
    display: grid; position: absolute; top: 72px; left: -1.25rem; right: -1.25rem; background: var(--surface);
    border-bottom: 1px solid var(--line); padding: 1rem 1.25rem 1.5rem; gap: 1rem; box-shadow: var(--shadow-md);
  }
  .nav-toggle[aria-expanded="true"] span { background: transparent; }
  .nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
  .canvas { min-height: 380px; }
  .node { width: 160px; }
  .stats { padding: 2rem 1.5rem; }
}
@media (max-width: 600px) {
  .grid-2, .grid-4, .form-row { grid-template-columns: 1fr; }
  .int-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { width: 100%; }
  .n4, .n5 { display: none; }
  .logo { font-size: 1.05rem; }
  .logo-mark { width: 30px; height: 30px; }
  .nav-actions { gap: .4rem; }
  .nav-actions .btn-primary { padding: .55rem .85rem; font-size: .82rem; }
}

/* ==========================================================================
   v2 — research-driven components
   ========================================================================== */

/* ---------- Eyebrow chip / category label ---------- */
.chip {
  display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .8rem;
  border-radius: 999px; background: var(--brand-100); color: var(--brand-600);
  font-size: .78rem; font-weight: 700; letter-spacing: .02em;
}
.chip.subtle { background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }

/* ---------- Trust bar ---------- */
.trustbar { padding: 2.25rem 0; border-block: 1px solid var(--line); background: var(--surface); }
.trustbar .lede { text-align: center; font-size: .82rem; color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 1.4rem; }
.badge-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.badge {
  display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .9rem; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line); font-size: .85rem; font-weight: 600; color: var(--ink-2);
}
.badge svg { width: 16px; height: 16px; color: var(--brand); }
.badge .soon { font-size: .68rem; font-weight: 700; color: var(--warning); background: #fef3c7; padding: .05rem .4rem; border-radius: 999px; }

/* ---------- Capability blocks (verb-noun) ---------- */
.cap-card { position: relative; overflow: hidden; }
.cap-card .kicker { font-family: var(--mono); font-size: .78rem; color: var(--brand); font-weight: 700; }
.cap-card h3 { margin: .5rem 0 .6rem; font-size: 1.35rem; }
.cap-card .proof { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line); font-size: .85rem; color: var(--ink-2); }
.cap-card .proof strong { color: var(--brand-600); }

/* ---------- Code + visual duo ---------- */
.codecard { background: #0b1020; border: 1px solid #1e293b; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-md); }
.codecard .bar { display: flex; align-items: center; gap: .5rem; padding: .7rem 1rem; border-bottom: 1px solid #1e293b; }
.codecard .bar i { width: 10px; height: 10px; border-radius: 50%; background: #334155; }
.codecard .bar i:nth-child(1){background:#fca5a5}.codecard .bar i:nth-child(2){background:#fcd34d}.codecard .bar i:nth-child(3){background:#86efac}
.codecard .bar span { margin-left: auto; font-family: var(--mono); font-size: .75rem; color: #64748b; }
.codecard pre { margin: 0; padding: 1.1rem 1.2rem; overflow-x: auto; font-family: var(--mono); font-size: .82rem; line-height: 1.7; color: #e2e8f0; }
.codecard .k { color: #c4b5fd; } .codecard .s { color: #6ee7b7; } .codecard .c { color: #64748b; } .codecard .f { color: #67e8f9; }

/* ---------- Dark governance / security band ---------- */
.section-dark { background: var(--ink); color: #fff; }
.section-dark .eyebrow { color: #a5b4fc; }
.section-dark h2 { color: #fff; }
.section-dark .lead { color: #cbd5e1; }
.gov-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2.5rem; }
.gov {
  background: #131a2e; border: 1px solid #24304d; border-radius: 12px; padding: 1.25rem;
  display: flex; gap: .85rem; align-items: flex-start;
}
.gov .icon { background: rgba(165,180,252,.14); color: #a5b4fc; flex-shrink: 0; width: 40px; height: 40px; }
.gov strong { display: block; font-size: .98rem; margin-bottom: .2rem; }
.gov p { color: #94a3b8; font-size: .86rem; }

/* ---------- Callout ---------- */
.callout {
  display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem 1.4rem; border-radius: 12px;
  background: var(--brand-100); border: 1px solid #c7d2fe; color: var(--ink-2);
}
.callout .icon { background: #fff; color: var(--brand); flex-shrink: 0; }
.callout strong { color: var(--ink); }

/* ---------- Pricing: run slider + explainer ---------- */
.slider-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.75rem; max-width: 720px; margin: 0 auto 2.5rem; box-shadow: var(--shadow-sm); }
.slider-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.slider-top .runs { font-weight: 700; font-size: 1.05rem; }
.slider-top .runs b { color: var(--brand); font-size: 1.5rem; }
.slider-top .plan-hint { font-size: .9rem; color: var(--muted); }
.slider-top .plan-hint b { color: var(--ink); }
input[type="range"].runs-range { width: 100%; accent-color: var(--brand); height: 6px; }
.slider-scale { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); font-family: var(--mono); margin-top: .5rem; }

.explainer { max-width: 720px; margin: 0 auto; }
.explainer details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.25rem; }
.explainer summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.explainer summary::-webkit-details-marker { display: none; }
.explainer summary::after { content: "+"; font-size: 1.3rem; color: var(--muted); }
.explainer details[open] summary::after { content: "\2212"; }
.explainer ul { margin: 1rem 0 0; padding-left: 1.1rem; color: var(--ink-2); display: grid; gap: .5rem; font-size: .93rem; }
.explainer .no { color: var(--muted); }

/* ---------- Illustrative testimonial labelling ---------- */
.illustrative-note { text-align: center; font-size: .8rem; color: var(--muted); margin-top: 1.25rem; }
.quote .tagline-ex { font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); padding: .2rem .5rem; border-radius: 999px; align-self: flex-start; }

/* ---------- Persona cards (home) ---------- */
.persona-card { display: flex; flex-direction: column; }
.persona-card .role { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--brand); }
.persona-card h3 { margin: .35rem 0 .5rem; }
.persona-card ul { list-style: none; padding: 0; margin: .75rem 0 1.25rem; display: grid; gap: .45rem; }
.persona-card li { padding-left: 1.3rem; position: relative; font-size: .9rem; color: var(--ink-2); }
.persona-card li::before { content: "\2192"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }
.persona-card .more { margin-top: auto; font-weight: 600; color: var(--brand); font-size: .9rem; }

/* ---------- Contact route cards ---------- */
.routes { display: grid; gap: .9rem; }
.route { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color .15s; }
.route:hover { border-color: var(--brand); }
.route .icon { width: 38px; height: 38px; flex-shrink: 0; }
.route strong { display: block; font-size: .95rem; }
.route p, .route a { font-size: .88rem; color: var(--muted); }

@media (max-width: 860px) {
  .gov-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   v3 — services agency components
   ========================================================================== */

/* The lead-to-delivery spine */
.spine { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-top: 2.5rem; }
.spine .stage { position: relative; text-align: center; padding: 0 .75rem; }
.spine .stage:not(:last-child)::after { content: ""; position: absolute; top: 27px; right: -50%; width: 100%; height: 2px; background: linear-gradient(90deg, var(--brand), var(--accent)); opacity: .35; z-index: 0; }
.spine .dot { position: relative; z-index: 1; width: 56px; height: 56px; margin: 0 auto .8rem; border-radius: 50%; display: grid; place-items: center; background: var(--brand-100); color: var(--brand); box-shadow: 0 0 0 6px var(--bg); }
.spine .dot svg { width: 24px; height: 24px; }
.spine h4 { font-size: 1rem; margin-bottom: .25rem; }
.spine p { font-size: .84rem; color: var(--muted); }

/* Result metrics (case studies) */
.metric { text-align: center; }
.metric .big { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; letter-spacing: -.03em; color: var(--brand); line-height: 1.05; }
.metric .ba { font-family: var(--mono); font-size: .78rem; color: var(--muted); margin-top: .35rem; }
.metric .lbl { margin-top: .45rem; color: var(--ink-2); font-size: .92rem; }

/* Value levers */
.lever .icon { margin-bottom: 1rem; }
.lever h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.lever p { color: var(--muted); font-size: .93rem; }

/* Opportunity-report callout */
.report-box { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.report-box .doc { flex-shrink: 0; width: 58px; height: 72px; border-radius: 8px; background: linear-gradient(135deg, var(--brand), var(--accent)); position: relative; box-shadow: var(--shadow-md); }
.report-box .doc::before { content: ""; position: absolute; top: 12px; left: 11px; right: 11px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.85); box-shadow: 0 11px 0 rgba(255,255,255,.6), 0 22px 0 rgba(255,255,255,.4), 0 33px 0 rgba(255,255,255,.25); }

/* "What happens next" numbered steps (contact) */
.next-steps { display: grid; gap: 1.1rem; }
.next-step { display: flex; gap: 1rem; align-items: flex-start; }
.next-step .num { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: .95rem; }
.next-step strong { display: block; margin-bottom: .15rem; }
.next-step p { color: var(--muted); font-size: .9rem; }

@media (max-width: 860px) { .spine { grid-template-columns: 1fr 1fr; gap: 1.5rem 1rem; } .spine .stage::after { display: none; } }
@media (max-width: 600px) { .spine { grid-template-columns: 1fr; } }

/* ==========================================================================
   v4 — case-study card grid (10+ cases)
   ========================================================================== */
.casestudy { display: flex; flex-direction: column; }
.casestudy .cs-role { font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--brand); }
.casestudy h3 { margin: .4rem 0 .5rem; font-size: 1.15rem; }
.casestudy > p { color: var(--muted); font-size: .93rem; }
.casestudy .cs-do { margin-top: .9rem; font-size: .82rem; color: var(--ink-2); }
.casestudy .cs-do b { color: var(--ink); font-weight: 600; }
.cs-stats { display: flex; gap: .75rem; margin-top: auto; padding-top: 1.1rem; margin-top: 1.1rem; border-top: 1px dashed var(--line); }
.cs-stats .s { flex: 1; min-width: 0; }
.cs-stats .s b { display: block; font-size: 1.1rem; font-weight: 800; color: var(--brand); letter-spacing: -.02em; line-height: 1.1; }
.cs-stats .s span { display: block; margin-top: .2rem; font-size: .68rem; color: var(--muted); font-family: var(--mono); line-height: 1.3; }
