/* TapsVision agency site
   Palette: white paper, charcoal ink, one electric blue, one red reserved for "where it breaks". */

:root {
  --ink: #16191f;
  --ink-2: #3a404b;
  --muted: #5e6675;
  --line: #e2e6ec;
  --paper: #ffffff;
  --tint: #f4f6f9;
  --grid-line: #edf0f4;
  --blue: #1f5bff;
  --blue-deep: #1747cc;
  --blue-wash: #eaf0ff;
  --leak: #d9413a;

  --sans: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1180px;
  --gutter: clamp(18px, 4vw, 32px);
  --section: clamp(64px, 9vw, 112px);
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; color: var(--ink); }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 6px;
}
.skip:focus { top: 12px; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo {
  font-weight: 800; font-size: 1.375rem; letter-spacing: -.03em; text-decoration: none;
}
.logo span { color: var(--blue); }
.logo-sm { font-size: 1.125rem; }

.site-nav { display: flex; align-items: center; gap: 30px; font-size: .9375rem; }
.site-nav a { text-decoration: none; color: var(--ink-2); }
.site-nav a:hover { color: var(--ink); }
.site-nav .nav-cta {
  color: var(--ink); font-weight: 600;
  border: 1.5px solid var(--ink); padding: 8px 15px; border-radius: 8px;
}
.site-nav .nav-cta:hover { background: var(--ink); color: #fff; }

.menu-toggle {
  display: none; font: inherit; font-size: .9375rem; font-weight: 600;
  background: none; border: 1.5px solid var(--ink); border-radius: 8px; padding: 6px 12px; cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 22px; border-radius: 8px;
  font: inherit; font-size: 1rem; font-weight: 600; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(48px, 7vw, 88px); }
.hero-copy { max-width: 820px; }
.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.75rem);
  line-height: 1.01;
  letter-spacing: -.04em;
  font-weight: 800;
  max-width: 14ch;
}
.lede {
  margin-top: 26px; max-width: 62ch;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem); line-height: 1.55; color: var(--ink-2);
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.system {
  margin: clamp(40px, 6vw, 64px) 0 0;
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff;
}
.system-svg { display: block; width: 100%; height: auto; }
.system-v { display: none; }
.system figcaption {
  border-top: 1px solid var(--line); padding: 14px 20px;
  font-size: .9375rem; color: var(--muted);
}
.node rect { fill: #fff; stroke: var(--ink); stroke-width: 1.5; }
.node-warn rect { stroke: var(--leak); }
.node-goal rect { fill: var(--ink); }
.node-goal .n-title { fill: #fff; }
.node-goal .n-sub { fill: #b8bfcb; }
.n-title { font-family: var(--sans); font-size: 17px; font-weight: 700; fill: var(--ink); }
.n-sub, .n-chip { font-family: var(--mono); font-size: 12px; fill: var(--muted); }
.n-chip { fill: var(--blue); }
.n-layer { font-family: var(--mono); font-size: 12px; fill: var(--blue); }
.n-leak { font-family: var(--sans); font-size: 14px; font-weight: 600; fill: var(--leak); }

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; }
.section-tint { background: var(--tint); }
.section h2 {
  font-size: clamp(1.9rem, 3.8vw, 2.875rem);
  line-height: 1.06; letter-spacing: -.03em; font-weight: 750;
  max-width: 20ch;
}
.section-head { margin-bottom: clamp(36px, 5vw, 56px); }
.section-head p, .split-head p { margin-top: 16px; max-width: 58ch; color: var(--ink-2); }
h3 { font-size: 1.1875rem; line-height: 1.3; letter-spacing: -.01em; }

/* Problem */
.split { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.split-head { position: sticky; top: 100px; }
.symptoms { width: 100%; border-collapse: collapse; }
.symptoms th {
  text-align: left; font-size: .875rem; font-weight: 600; color: var(--muted);
  padding: 0 16px 12px 0; border-bottom: 1.5px solid var(--ink);
}
.symptoms td { padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.symptoms td:first-child { font-size: 1.0625rem; color: var(--ink); width: 58%; }
.symptoms td:last-child { color: var(--blue-deep); font-weight: 600; font-size: .9875rem; }
.pull { margin-top: 28px; font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; }

/* Services */
.services {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1.5px solid var(--ink);
}
.services li { padding: 26px 28px 30px 0; border-bottom: 1px solid var(--line); }
.services li:not(:nth-child(3n)) { border-right: 1px solid var(--line); }
.services li:not(:nth-child(3n + 1)) { padding-left: 28px; }
.stage {
  display: inline-block; font-size: .8125rem; font-weight: 600; color: var(--blue-deep);
  background: var(--blue-wash); padding: 3px 9px; border-radius: 99px; margin-bottom: 14px;
}
.services p { margin-top: 8px; color: var(--ink-2); font-size: 1rem; }

/* Approach */
.steps {
  list-style: none; margin: 0; padding: 0; counter-reset: step;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
}
.steps li {
  counter-increment: step; position: relative;
  padding: 0 22px 0 0;
}
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--ink); background: #fff;
  font-weight: 700; font-size: .9375rem; position: relative; z-index: 1;
  margin-bottom: 20px;
}
.steps li::after {
  content: ""; position: absolute; top: 18px; left: 36px; right: 0; height: 1.5px; background: var(--ink);
}
.steps li:last-child::after { display: none; }
.steps li:last-child::before { background: var(--ink); color: #fff; }
.steps p { margin-top: 8px; color: var(--ink-2); font-size: .975rem; }

/* Industries */
.industries { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 36px); }
.industry { border-top: 1.5px solid var(--ink); padding-top: 22px; display: flex; flex-direction: column; }
.industry > p { margin-top: 10px; color: var(--ink-2); font-size: 1rem; flex: 1; }
.journey {
  list-style: none; margin: 22px 0 0; padding: 14px 0 0; border-top: 1px dashed #c9cfd8;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0;
  font-family: var(--mono); font-size: .8125rem; color: var(--ink-2);
}
.journey li { display: inline-flex; align-items: center; }
.journey li:not(:last-child)::after {
  content: ""; display: inline-block; width: 18px; height: 1.5px; background: #9aa3b0; margin: 0 7px;
}
.journey li:last-child { color: var(--blue-deep); font-weight: 500; }
.industry-next {
  margin-top: clamp(36px, 5vw, 52px); border-top-style: dashed; border-top-color: #9aa3b0;
}
.industry-next h3 { font-weight: 600; color: var(--ink-2); }
.industry-next .journey { border-top: 0; padding-top: 0; margin-top: 14px; }

/* TAPS */
.taps { background: var(--ink); color: #fff; padding: var(--section) 0; }
.taps-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: end; }
.taps-word { color: #fff; font-weight: 800; letter-spacing: -.045em; line-height: .96; font-size: clamp(3rem, 8.6vw, 7rem); }
.taps-line { display: block; color: #5b6372; }
.taps-line b { color: #fff; font-weight: 800; }
.taps-copy p { color: #c2c8d2; font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); max-width: 46ch; }
.taps-copy p + p { margin-top: 18px; color: #fff; font-weight: 600; }

/* Why */
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: start; }
.reasons { margin: 32px 0 0; }
.reasons > div { padding: 18px 0; border-top: 1px solid var(--line); }
.reasons > div:last-child { border-bottom: 1px solid var(--line); }
.reasons dt { font-weight: 700; font-size: 1.125rem; }
.reasons dd { margin: 6px 0 0; color: var(--ink-2); font-size: 1rem; }

.dash {
  margin: 0; border: 1px solid var(--line); border-radius: 14px; padding: 20px;
  background: #fff; box-shadow: 0 1px 0 var(--line), 0 24px 48px -28px rgba(22, 25, 31, .28);
}
.dash-top { display: flex; justify-content: space-between; align-items: center; }
.dash-title { font-weight: 700; }
.dash-live {
  font-size: .8125rem; font-weight: 600; color: #17733f; background: #e7f6ec; padding: 3px 10px; border-radius: 99px;
}
.dash-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.dash-metrics div { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.dash-metrics span { display: block; font-size: .75rem; color: var(--muted); }
.dash-metrics strong { display: block; font-size: 1.375rem; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.dash-chart { display: block; width: 100%; height: 120px; margin-top: 16px; }
.dash-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .875rem; font-variant-numeric: tabular-nums; }
.dash-table th { text-align: left; color: var(--muted); font-weight: 500; padding: 6px 0; border-bottom: 1px solid var(--line); }
.dash-table td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.dash-table th:not(:first-child), .dash-table td:not(:first-child) { text-align: right; }
.dash figcaption { margin-top: 12px; font-size: .8125rem; color: var(--muted); }

/* Story */
.story { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 80px); }
.story-copy p { font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); color: var(--ink-2); max-width: 60ch; }
.story-copy p + p { margin-top: 18px; }
.story-copy .signoff { color: var(--ink); font-weight: 600; font-size: 1rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-intro p { margin-top: 16px; color: var(--ink-2); max-width: 44ch; }
.lead-form { border: 1px solid var(--line); border-radius: 14px; padding: clamp(20px, 3vw, 32px); background: #fff; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.field-full { grid-column: 1 / -1; }
.field label { display: block; font-size: .9375rem; font-weight: 600; margin-bottom: 6px; }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  border: 1.5px solid #d5dae2; border-radius: 8px; padding: 11px 12px; background: #fff;
  min-height: 48px;
}
.field textarea { resize: vertical; min-height: 112px; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-wash); }
.field [aria-invalid="true"] { border-color: var(--leak); }
.err { min-height: 1.25rem; font-size: .8125rem; color: var(--leak); margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: .9375rem !important; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; min-height: 0; margin: 3px 0 0; flex: none; accent-color: var(--blue); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn-submit { width: 100%; margin-top: 8px; }
.btn-submit[disabled] { opacity: .65; cursor: progress; }
.form-status { margin-top: 12px; font-size: .9375rem; min-height: 1.5rem; }
.form-status.is-error { color: var(--leak); }
.lead-form.is-sent .fields, .lead-form.is-sent .btn-submit { display: none; }
.lead-form.is-sent .form-status { margin: 0; }
.sent h3 { font-size: 1.375rem; }
.sent p { margin-top: 8px; color: var(--ink-2); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: .875rem; color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; }
.footer-row p:last-child { margin-left: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li { padding: 0 0 26px 56px; }
  .steps li::before { position: absolute; left: 0; top: 0; margin: 0; }
  .steps li::after { top: 36px; bottom: 0; left: 17px; right: auto; width: 1.5px; height: auto; }
  .steps h3 { padding-top: 5px; }
  .services { grid-template-columns: 1fr 1fr; }
  .services li { padding: 24px 0 26px !important; border-right: 0 !important; }
  .services li:nth-child(odd) { padding-right: 24px !important; border-right: 1px solid var(--line) !important; }
  .services li:nth-child(even) { padding-left: 24px !important; }
  .industries { grid-template-columns: 1fr; }
  .industry > p { max-width: 64ch; }
}

@media (max-width: 860px) {
  .menu-toggle { display: inline-block; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 68px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 18px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .site-nav .nav-cta { margin-top: 14px; text-align: center; border-bottom: 1.5px solid var(--ink); }

  .split, .why-grid, .story, .contact-grid, .taps-grid { grid-template-columns: 1fr; }
  .split-head { position: static; }
  .taps-grid { align-items: start; }
}

@media (max-width: 640px) {
  .system-h { display: none; }
  .system-v { display: block; max-width: 420px; margin: 0 auto; }
  .services { grid-template-columns: 1fr; }
  .services li, .services li:nth-child(odd), .services li:nth-child(even) { padding: 22px 0 !important; border-right: 0 !important; }
  .fields { grid-template-columns: 1fr; }
  .symptoms thead { display: none; }
  .symptoms tr { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .symptoms td { display: block; border: 0; padding: 0; width: auto !important; }
  .symptoms td:last-child { margin-top: 6px; }
  .symptoms tbody { border-top: 1.5px solid var(--ink); display: block; }
  .dash-metrics { grid-template-columns: 1fr 1fr; }
  .dash { padding: 16px; }
  .actions .btn { flex: 1 1 100%; }
  .footer-row p:last-child { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flow { display: none; }
  * { transition: none !important; }
}

/* FAQ */
.faq-item { border-top: 1px solid #d5dae2; }
.faq-item:last-child { border-bottom: 1px solid #d5dae2; }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font-weight: 600; font-size: 1.0625rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 4px; top: 16px; font-size: 1.5rem; font-weight: 400; color: var(--blue-deep);
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding: 0 0 22px; color: var(--ink-2); max-width: 62ch; }

/* ---------- v3 additions ---------- */
.h-link { text-decoration: none; background-image: linear-gradient(var(--blue), var(--blue)); background-size: 0 1.5px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .2s ease; }
.h-link:hover, .h-link:focus-visible { background-size: 100% 1.5px; color: var(--blue-deep); }
.check a { color: var(--blue-deep); }

/* Team */
.people { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 36px); margin-top: clamp(40px, 6vw, 64px); }
.person { display: grid; grid-template-columns: 132px 1fr; gap: 22px; align-items: start; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.person img { width: 132px; height: 132px; border-radius: 10px; object-fit: cover; background: var(--tint); }
.person h3 { font-size: 1.25rem; }
.person-role { color: var(--blue-deep); font-weight: 600; font-size: .9375rem; margin-top: 2px; }
.person p:not(.person-role) { margin-top: 10px; color: var(--ink-2); font-size: .975rem; }
.person-link { display: inline-block; margin-top: 12px; font-weight: 600; font-size: .9375rem; color: var(--blue-deep); }

/* Footer */
.site-footer { padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; }
.footer-tag { margin-top: 10px; max-width: 36ch; }
.footer-h { font-weight: 700; color: var(--ink); margin-bottom: 10px; font-size: .9375rem; }
.site-footer ul, .related ul, .ty-links { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 4px 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.footer-base { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); }

/* WhatsApp */
.wa-float {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 30;
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 99px;
  background: #1a7f4b; color: #fff; text-decoration: none; font-weight: 600; font-size: .9375rem;
  box-shadow: 0 10px 24px -10px rgba(22, 25, 31, .45);
}
.wa-float:hover { background: #136a3e; }

/* Subpages */
.page-hero { padding: clamp(36px, 6vw, 72px) 0 clamp(48px, 7vw, 80px); }
.page-hero h1 { font-size: clamp(2.1rem, 4.8vw, 3.6rem); line-height: 1.04; letter-spacing: -.035em; font-weight: 800; max-width: 22ch; }
.crumbs { display: flex; gap: 8px; font-size: .875rem; color: var(--muted); margin-bottom: 22px; }
.crumbs a { color: var(--muted); }
.journey-lg { margin-top: 40px; font-size: .9375rem; border-top: 1.5px solid var(--ink); padding-top: 18px; }
.services-plain li .stage { display: none; }
.cta-band { background: var(--ink); }
.cta-band h2 { color: #fff; }
.cta-band p { color: #c2c8d2; margin-top: 12px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.related { margin-top: 48px; padding-top: 20px; border-top: 1px solid #3a404b; }
.related .footer-h { color: #fff; }
.related ul { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.related a { color: #c2c8d2; }
.related a:hover { color: #fff; }

/* Thank you */
.thanks-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: start; }
.thanks h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.04; letter-spacing: -.035em; font-weight: 800; }
.ty-ref { margin-top: 14px; color: var(--muted); font-size: .9375rem; }
.steps-v { grid-template-columns: 1fr !important; }
.steps-v li { padding: 0 0 26px 56px !important; }
.steps-v li::before { position: absolute; left: 0; top: 0; margin: 0 !important; }
.steps-v li::after { top: 36px !important; bottom: 0; left: 17px !important; right: auto !important; width: 1.5px; height: auto !important; }
.steps-v li:last-child::after { display: none; }
.steps-v h3 { padding-top: 5px; }
.ty-links { margin-top: 20px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 32px; }
.ty-links a { display: block; padding: 14px 0; border-bottom: 1px solid #d5dae2; font-weight: 600; text-decoration: none; }
.ty-links a:hover { color: var(--blue-deep); }

/* Prose (privacy) */
.prose { max-width: 720px; }
.prose h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.03em; }
.prose h2 { font-size: 1.25rem; margin-top: 32px; }
.prose p { margin-top: 10px; color: var(--ink-2); }
.prose .muted { color: var(--muted); font-size: .9375rem; }

@media (max-width: 860px) {
  .people, .footer-grid, .thanks-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .person { grid-template-columns: 88px 1fr; gap: 16px; padding: 18px; }
  .person img { width: 88px; height: 88px; }
  .wa-float span { display: none; }
  .wa-float { padding: 14px; }
  .ty-links { grid-template-columns: 1fr; }
  .cta-row .btn { width: 100%; }
}

/* =====================================================================
   Motion layer (v4). Only transform/opacity. Disabled for reduced motion.
   ===================================================================== */
:root { --ease-out: cubic-bezier(.2, .8, .2, 1); --ease-spring: cubic-bezier(.34, 1.4, .64, 1); }

/* Header + progress */
.site-header { transition: box-shadow .25s ease, background-color .25s ease; }
.site-header.is-scrolled { box-shadow: 0 6px 24px -18px rgba(22, 25, 31, .5); }
.scroll-progress {
  position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 40;
  background: var(--blue); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none;
}

/* Tap and hover feedback */
.btn { transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .12s ease; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.97); }
@media (hover: hover) {
  .btn-primary:hover { transform: translateY(-1px); }
  .person, .industry, .services li { transition: transform .3s var(--ease-out), box-shadow .3s ease; }
  .person:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -26px rgba(22, 25, 31, .45); }
  .dash { transition: transform .4s var(--ease-out); }
  .dash:hover { transform: translateY(-4px); }
}

/* ---------- Hero load sequence (pure CSS, runs once) ---------- */
.js-motion .hero h1,
.js-motion .page-hero h1,
.js-motion .thanks h1 { animation: rise .9s var(--ease-out) both; }
.js-motion .hero .lede,
.js-motion .page-hero .lede,
.js-motion .thanks .lede { animation: rise .9s var(--ease-out) .12s both; }
.js-motion .hero .actions,
.js-motion .page-hero .actions,
.js-motion .thanks .actions { animation: rise .9s var(--ease-out) .22s both; }
.js-motion .crumbs { animation: fade .6s ease both; }
.js-motion .system { animation: rise 1s var(--ease-out) .3s both; }
.js-motion .system .node { animation: node-in .6s var(--ease-spring) both; transform-box: fill-box; transform-origin: 50% 50%; }
.js-motion .system .node:nth-of-type(2) { animation-delay: .55s; }
.js-motion .system .node:nth-of-type(3) { animation-delay: .7s; }
.js-motion .system .node:nth-of-type(4) { animation-delay: .85s; }
.js-motion .system .node:nth-of-type(5) { animation-delay: 1s; }
.js-motion .system .node:nth-of-type(6) { animation-delay: 1.15s; }
.js-motion .system .flow { opacity: 0; transition: opacity .6s ease; }
.js-motion .system.is-flowing .flow { opacity: 1; }
.js-motion .system .n-leak, .js-motion .system .n-layer { animation: fade .6s ease 1.4s both; }
.leak-line { animation: dash-move 1.2s linear infinite; }
.node-warn rect { animation: warn-pulse 2.4s ease-in-out 1.6s infinite; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes node-in { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@keyframes dash-move { to { stroke-dashoffset: -20; } }
@keyframes warn-pulse { 0%, 100% { stroke-width: 1.5; } 50% { stroke-width: 3; } }

/* ---------- Scroll reveals ---------- */
[data-reveal] { opacity: 0; transition: opacity .7s ease, transform .7s var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
[data-reveal="up"], [data-reveal="dash"] { transform: translateY(22px); }
[data-reveal="row"] { transform: translateX(-12px); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* Symptom rows: cause text sweeps in after the quote */
.symptoms tr td:last-child { transition: opacity .5s ease .2s, transform .5s var(--ease-out) .2s; }
[data-reveal="row"] td:last-child { opacity: 0; transform: translateX(10px); }
[data-reveal="row"].is-in td:last-child { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 70ms + 250ms); }

/* Steps: number pops, connector draws */
[data-reveal="step"] { transform: translateY(14px); }
[data-reveal="step"]::before { transform: scale(.6); transition: transform .5s var(--ease-spring); transition-delay: calc(var(--i, 0) * 120ms); }
[data-reveal="step"].is-in::before { transform: none; }
.steps:not(.steps-v) li::after { transform-origin: 0 50%; }
[data-reveal="step"]::after { transform: scaleX(0); transition: transform .6s var(--ease-out); transition-delay: calc(var(--i, 0) * 120ms + 200ms); }
[data-reveal="step"].is-in::after { transform: none; }
@media (max-width: 1000px) {
  .steps li::after { transform-origin: 50% 0; }
  [data-reveal="step"]::after { transform: scaleY(0); }
}
.steps-v li::after { transform-origin: 50% 0; }
.steps-v [data-reveal="step"]::after, .steps-v li[data-reveal]::after { transform: scaleY(0); }
.steps-v li[data-reveal].is-in::after { transform: none; }

/* Journey chips light up in order, last one lands blue */
.journey[data-reveal] li { opacity: .25; transition: opacity .4s ease; transition-delay: calc(var(--i, 0) * 160ms); }
.journey[data-reveal] li::after { transform: scaleX(0); transform-origin: 0 50%; transition: transform .35s ease; transition-delay: calc(var(--i, 0) * 160ms + 90ms); }
.journey.is-play li { opacity: 1; }
.journey.is-play li::after { transform: none; }
.journey[data-reveal] { opacity: 1; }

/* Dashboard: chart line draws */
.chart-line { stroke-dasharray: 1; stroke-dashoffset: 0; }
.dash[data-reveal] .chart-line { stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease-out) .25s; }
.dash[data-reveal].is-in .chart-line { stroke-dashoffset: 0; }

/* TAPS: letters slide in one by one, words follow */
[data-reveal="taps"] { opacity: 1; }
[data-reveal="taps"] .taps-line { opacity: 0; transform: translateX(-28px); transition: opacity .6s ease, transform .7s var(--ease-out); }
[data-reveal="taps"] .taps-line:nth-child(2) { transition-delay: 0s; }
[data-reveal="taps"] .taps-line:nth-child(3) { transition-delay: .12s; }
[data-reveal="taps"] .taps-line:nth-child(4) { transition-delay: .24s; }
[data-reveal="taps"] .taps-line:nth-child(5) { transition-delay: .36s; }
[data-reveal="taps"].is-in .taps-line { opacity: 1; transform: none; }
.taps-line b { display: inline-block; }
.taps-word.is-in .taps-line b { animation: letter-glow 2.2s ease .6s both; }
.taps-word.is-in .taps-line:nth-child(3) b { animation-delay: .8s; }
.taps-word.is-in .taps-line:nth-child(4) b { animation-delay: 1s; }
.taps-word.is-in .taps-line:nth-child(5) b { animation-delay: 1.2s; }
@keyframes letter-glow { 0% { color: #fff; } 30% { color: #6f97ff; } 100% { color: #fff; } }

/* FAQ open/close */
.faq-item summary::after { transition: transform .25s ease; }
.faq-item[open] summary::after { transform: rotate(180deg); }
.faq-item[open] p { animation: rise .35s var(--ease-out) both; }

/* Form feedback */
.lead-form .field input, .lead-form .field select, .lead-form .field textarea { transition: border-color .15s ease, box-shadow .15s ease; }
.field [aria-invalid="true"] { animation: shake .35s ease; }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.btn-submit[disabled]::after {
  content: ""; width: 14px; height: 14px; margin-left: 10px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.sent { animation: rise .5s var(--ease-out) both; }

/* WhatsApp nudge */
.wa-float { transition: transform .2s ease, background-color .15s ease; }
.wa-float:active { transform: scale(.94); }
.wa-float.is-nudge { animation: nudge 1s ease 2; }
@keyframes nudge { 0%, 100% { transform: none; } 30% { transform: translateY(-6px) scale(1.04); } 60% { transform: translateY(0) scale(.98); } }

/* ---------- Mobile action bar ---------- */
.m-bar { display: none; }
@media (max-width: 640px) {
  .m-bar {
    display: grid; grid-template-columns: 1fr auto; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    transform: translateY(110%); transition: transform .35s var(--ease-out);
  }
  .m-bar.is-shown { transform: none; }
  .m-bar .btn { min-height: 46px; padding: 10px 16px; font-size: .9375rem; }
  .m-bar .m-wa { background: #1a7f4b; color: #fff; display: inline-flex; gap: 8px; }
  .wa-float { display: none; }
  .site-footer { padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- Reduced motion: everything static ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal], [data-reveal] * { opacity: 1 !important; transform: none !important; }
  .scroll-progress { display: none; }
  .m-bar { transform: none; }
}

/* ---------- Team cards v5: speaker-style, greyscale until hover ---------- */
.people { grid-template-columns: repeat(2, minmax(0, 360px)); justify-content: start; gap: clamp(20px, 3vw, 40px); }
.person { display: block; padding: 0; overflow: hidden; background: #fff; }
.person-photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #e9ecf1; }
.person-photo img {
  display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0;
  filter: grayscale(1) contrast(1.04);
  transform: scale(1.001);
  transition: filter .6s ease, transform .8s var(--ease-out);
}
.person-photo::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: var(--blue); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .5s var(--ease-out);
}
.person-body { padding: 20px 22px 24px; }
.person-body h3 { font-size: 1.3125rem; }
@media (hover: hover) {
  .person:hover .person-photo img, .person:focus-within .person-photo img { filter: none; transform: scale(1.04); }
  .person:hover .person-photo::after, .person:focus-within .person-photo::after { transform: none; }
  .person:hover { transform: translateY(-4px); }
}
/* Touch screens: colour comes in when the card is in the middle of the screen */
@media (hover: none) {
  .person.is-color .person-photo img { filter: none; transform: scale(1.03); }
  .person.is-color .person-photo::after { transform: none; }
}
@media (max-width: 860px) {
  .people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .people { grid-template-columns: 1fr; max-width: 400px; }
  .person { grid-template-columns: none; }
  .person img { width: 100%; height: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .person-photo img { filter: none; }
}
