/* CC Analytics — design system v2 ("do dado disperso à decisão")
   One idea drives every surface: scattered operational signals resolving into
   structure, decisions and automated action. Ink/paper grounds, brand teal as
   the primary accent, signal-cyan for data on dark surfaces, and one warm
   counterpoint (action amber) reserved for the moment data becomes action.
   Type: Archivo (width axis: expanded for display, normal for body) +
   JetBrains Mono as the "instrument" layer. Sharp geometry throughout. */

:root {
  --ink: #071120;
  --ink-2: #0B1C30;
  --ink-3: #12233B;
  --paper: #F4F6FA;
  --paper-2: #E9EEF5;
  --bg: var(--paper);
  --surface: #FFFFFF;
  --surface-low: var(--paper-2);
  --text: #0B1C30;
  --muted: #4F5B72;
  --subtle: #6B778C;
  --border: #CBD2DE;
  --border-strong: #AEB8C8;
  --accent: #00687A;
  --accent-ink: #004E5C;
  --signal: #2FD3E6;
  --signal-dim: #1A8FA0;
  --action: #F0B23F;
  --action-ink: #9A6A10;
  --btn-bg: #0B1C30;
  --btn-text: #FFFFFF;
  --radius-pill: 9999px;
  --font-sans: 'Archivo', 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;
  --maxw: 1160px;
  --ease-out: cubic-bezier(.2,.7,.2,1);
  --dur: .32s;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { height: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; }
body > footer.site { flex-shrink: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--signal); color: var(--ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.viz-frame:focus-visible, canvas:focus-visible { outline-offset: -2px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Typography ---------- */
h1, h2, h3 { color: var(--text); font-weight: 700; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
h1 {
  font-size: clamp(34px, 4.6vw, 58px); line-height: 1.02; letter-spacing: -.025em;
  font-stretch: 112%; font-variation-settings: "wdth" 112; margin: 18px 0 20px;
}
h2 {
  font-size: clamp(26px, 3vw, 38px); line-height: 1.08; letter-spacing: -.02em;
  font-stretch: 110%; font-variation-settings: "wdth" 110; margin: 0 0 14px;
}
h3 { font-size: 19px; line-height: 1.25; margin: 0 0 8px; font-stretch: 104%; font-variation-settings: "wdth" 104; }
p { color: var(--muted); margin: 0 0 12px; }
strong { color: var(--text); }
.lede { font-size: 18px; line-height: 1.55; max-width: 620px; }
.lede-sm { font-size: 14.5px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 600;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.mono { font-family: var(--font-mono); }

/* ---------- Header ---------- */
header.site {
  border-bottom: 1px solid var(--border);
  background: rgba(244,246,250,.86);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20;
}
header.site .bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 16px; }
header.site .logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
header.site .logo .mark {
  width: 32px; height: 32px; background: var(--ink-2); color: var(--signal);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; position: relative;
}
header.site .logo .mark::after { content: ""; position: absolute; right: 3px; bottom: 3px; width: 4px; height: 4px; background: var(--action); }
nav.main { display: flex; align-items: center; gap: 26px; font-size: 14px; font-weight: 500; }
nav.main a { position: relative; padding: 6px 0; color: var(--text); }
nav.main a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform var(--dur) var(--ease-out);
}
nav.main a:hover::after, nav.main a.active::after { transform: scaleX(1); }
nav.main a.active { color: var(--accent); font-weight: 600; }
nav.main a.nav-secondary { color: var(--muted); }
nav.main a.nav-secondary::after { background: var(--muted); }
nav.main .nav-divider { display: none; }
.header-right { display: flex; align-items: center; gap: 14px; }

.lang-switch { display: flex; align-items: center; border: 1px solid var(--border); font-family: var(--font-mono); font-size: 12px; font-weight: 700; }
.lang-btn { background: transparent; border: none; padding: 10px 12px; color: var(--muted); cursor: pointer; font: inherit; }
.lang-btn.active { background: var(--ink-2); color: #fff; }
.lang-btn:focus-visible { outline-offset: -2px; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; padding: 0;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text); margin: 0 auto; transition: transform var(--dur) var(--ease-out), opacity var(--dur); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); font-size: 14.5px; font-weight: 600; letter-spacing: .005em;
  padding: 14px 24px; border-radius: 0; border: 1px solid transparent; cursor: pointer;
  transition: background var(--dur) var(--ease-out), color var(--dur), border-color var(--dur), transform var(--dur) var(--ease-out);
  isolation: isolate;
}
.btn-primary { background: var(--btn-bg); color: var(--btn-text); border-color: var(--btn-bg); }
.btn-primary::before {
  content: ""; position: absolute; inset: 0; background: var(--accent); z-index: -1;
  transform: scaleX(0); transform-origin: left; transition: transform .38s var(--ease-out);
}
.btn-primary:hover::before { transform: scaleX(1); }
.btn-primary:hover { border-color: var(--accent); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--text); background: var(--surface); }
.btn-sm { padding: 10px 16px; font-size: 13px; }
.btn:active { transform: translateY(1px); }

/* ---------- Badge / status ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); padding: 5px 12px; font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--text); background: var(--surface);
}
.badge .dot { width: 6px; height: 6px; background: var(--accent); }
.status-bar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: var(--subtle); padding-top: 22px; }

/* ---------- Layout ---------- */
main { padding: 0 0 48px; }
section { padding: 72px 0; }
section.wrap { padding-top: 72px; padding-bottom: 72px; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; margin-bottom: 36px; }
.section-head p.lede { margin: 10px 0 0; }
.section-head .aside { font-family: var(--font-mono); font-size: 12px; color: var(--subtle); letter-spacing: .04em; text-align: right; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1023px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero .actions { flex-direction: column; align-items: stretch; }
  .hero .actions .btn { justify-content: center; text-align: center; }
  .section-head { grid-template-columns: 1fr; }
  .section-head .aside { text-align: left; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  header.site .bar { position: relative; }
  nav.main {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--border);
    padding: 8px 24px 16px; z-index: 30;
  }
  nav.main.open { display: flex; }
  nav.main a { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--border); }
  nav.main a::after { display: none; }
  nav.main .nav-divider { display: block; width: 100%; height: 1px; }
  .header-right .btn { display: none; }
}

/* ---------- Hero ---------- */
.hero-bg { background: var(--ink); }
.hero {
  position: relative; color: #fff; background: var(--ink); overflow: hidden; padding: 0;
}
.hero::before {
  /* plotting-surface grid: the same coordinate space the resolver draws on */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .45;
  background-image:
    linear-gradient(rgba(47,211,230,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47,211,230,.07) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
}
.hero-grid {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 64px; min-height: 600px;
}
.hero h1 { color: #fff; max-width: 15ch; }
.hero .lede { color: #C9D3E3; }
.hero .lede strong { color: #fff; }
.hero .lede-sm { color: #93A2BA; }
.hero .badge { background: transparent; border-color: rgba(255,255,255,.18); color: #DCE4F0; }
.hero .badge .dot { background: var(--signal); box-shadow: 0 0 0 4px rgba(47,211,230,.15); }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.hero .btn-primary { background: var(--signal); color: var(--ink); border-color: var(--signal); }
.hero .btn-primary::before { background: #fff; }
.hero .btn-primary:hover { border-color: #fff; }
.hero .btn-secondary { color: #fff; border-color: rgba(255,255,255,.28); }
.hero .btn-secondary:hover { border-color: #fff; background: rgba(255,255,255,.06); }
.hero .status-bar { color: #8A9AB3; border-top: 1px solid rgba(255,255,255,.1); margin-top: 28px; }
.hero-copy .eyebrow { color: var(--signal); }

/* Signal Resolver — instrument panel */
.hero-viz { position: relative; }
.viz-frame {
  /* No frame line: the panel is set off by light instead — an inner radial glow on the
     surface plus a soft outer halo (box-shadow survives overflow:hidden). The transparent
     1px border keeps the corner ticks' -1px offsets and the layout box unchanged. */
  position: relative; border: 1px solid transparent; aspect-ratio: 5 / 4; overflow: hidden;
  background: radial-gradient(ellipse at 50% 45%, rgba(47,211,230,.11), rgba(47,211,230,.035) 45%, transparent 76%);
  box-shadow: 0 0 90px rgba(47,211,230,.10), 0 0 30px rgba(47,211,230,.06);
  transition: box-shadow .8s var(--ease-out);
}
.hero-viz[data-state="3"] .viz-frame { box-shadow: 0 0 90px rgba(240,178,63,.12), 0 0 30px rgba(47,211,230,.06); }
.viz-frame::before, .viz-frame::after {
  /* corner ticks — instrument chrome; they follow the state colour */
  content: ""; position: absolute; width: 14px; height: 14px; border-color: var(--signal); border-style: solid; pointer-events: none; z-index: 2;
  transition: border-color .6s var(--ease-out);
}
.hero-viz[data-state="3"] .viz-frame::before, .hero-viz[data-state="3"] .viz-frame::after { border-color: var(--action); }
.viz-frame::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.viz-frame::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }
.viz-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.viz-fallback { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.viz-frame.is-fallback .viz-fallback { display: block; }
.viz-frame.is-fallback canvas { display: none; }
.viz-readout {
  position: absolute; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 12px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: #8FA0B8; pointer-events: none; z-index: 2;
}
.viz-readout.top { top: 0; }
.viz-readout.bottom { bottom: 0; }
.viz-readout .live { display: inline-flex; align-items: center; gap: 6px; color: var(--signal); }
.viz-readout .live::before { content: ""; width: 6px; height: 6px; background: var(--signal); animation: pulse 1.6s ease-in-out infinite; }
.viz-tag { color: #8A9AB3; border: 1px solid rgba(255,255,255,.14); padding: 2px 7px; }
.viz-status { color: #C9D3E3; transition: opacity .25s; }

.viz-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.viz-step {
  position: relative; display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
  background: transparent; border: 1px solid rgba(255,255,255,.12); color: #93A2BA;
  padding: 10px 10px 12px; font: inherit; font-size: 12.5px; font-weight: 500; text-align: left; cursor: pointer; line-height: 1.2;
  transition: border-color var(--dur), color var(--dur), background var(--dur);
}
.viz-step .n { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; color: #8FA0B8; }
.viz-step::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--signal);
  transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease-out);
}
.viz-step:hover { border-color: rgba(255,255,255,.3); color: #fff; }
.viz-step.is-active { color: #fff; border-color: rgba(47,211,230,.5); background: rgba(47,211,230,.06); }
.viz-step.is-active .n { color: var(--signal); }
.viz-step.is-active::after { transform: scaleX(1); }
.viz-step[data-step="3"].is-active { border-color: rgba(240,178,63,.55); background: rgba(240,178,63,.07); }
.viz-step[data-step="3"].is-active::after { background: var(--action); }
.viz-step[data-step="3"].is-active .n { color: var(--action); }
.viz-caption { font-size: 13px; color: #93A2BA; margin: 12px 0 0; min-height: 2.6em; }
.viz-caption strong { color: #fff; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; padding-top: 56px; padding-bottom: 52px; min-height: 0; }
  .hero h1 { max-width: none; }
  .viz-frame { aspect-ratio: 4 / 3; }
}
@media (max-width: 640px) {
  .viz-steps { grid-template-columns: repeat(2, 1fr); }
  .viz-frame { aspect-ratio: 1 / 1; }
  /* Compact hero copy on phones so the resolver panel sits close to the fold */
  .hero .lede { font-size: 16px; }
  .hero .lede-sm { font-size: 13.5px; }
  .hero .status-bar { display: none; }
  .hero-grid { gap: 28px; padding-top: 40px; }
}

/* ---------- Pipeline (services as a sequence) ---------- */
.pipeline { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--border); margin-top: 8px; }
.pipeline::before {
  /* signal travelling along the pipeline — explains the chain, cheap on the GPU */
  content: ""; position: absolute; top: -1px; left: 0; height: 1px; width: 22%;
  background: linear-gradient(90deg, transparent, var(--accent) 40%, var(--action));
  animation: travel 4.6s linear infinite; opacity: .9;
}
.pipeline .card { border: none; border-right: 1px solid var(--border); padding: 28px 22px 28px 0; background: transparent; margin-right: 22px; }
.pipeline .card:last-child { border-right: none; margin-right: 0; }
.pipeline .stage { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; color: var(--accent); display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.pipeline .stage::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.pipeline .card:last-child .stage { color: var(--action-ink); }
@keyframes travel { from { transform: translateX(-100%); } to { transform: translateX(455%); } }
@media (max-width: 1023px) {
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .pipeline .card:nth-child(2) { border-right: none; margin-right: 0; }
}
@media (max-width: 640px) {
  .pipeline { grid-template-columns: 1fr; }
  .pipeline .card { border-right: none; margin-right: 0; border-bottom: 1px solid var(--border); padding: 22px 0; }
  .pipeline .card:last-child { border-bottom: none; }
}

/* ---------- Services page (stage sequence) ---------- */
.page-head { padding-bottom: 28px; }
.services { border-top: 1px solid var(--border); }
.service {
  position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr) 220px; gap: 32px; align-items: start;
  padding: 40px 0; border-bottom: 1px solid var(--border);
}
.service::before { content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 0; background: var(--accent); transition: width .55s var(--ease-out); }
.service:hover::before, .service:focus-within::before { width: 100%; }
.service.is-action::before { background: var(--action); }
.service .stage { display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; color: var(--accent); }
.service.is-action .stage { color: var(--action-ink); }
.service .icon { font-family: 'Material Symbols Outlined'; font-size: 32px; color: var(--accent); margin-top: 14px; line-height: 1; }
.service h2 { font-size: clamp(22px, 2.4vw, 28px); margin: 0 0 10px; }
.service-body p { max-width: 60ch; }
.service dl { display: grid; grid-template-columns: 132px 1fr; gap: 10px 18px; margin: 18px 0 0; max-width: 62ch; }
.service dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--subtle); padding-top: 3px; }
.service dd { margin: 0; color: var(--text); font-size: 14.5px; }
.service-side { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; }
.service-side .tag-row { justify-content: flex-end; margin: 0; }
.service-side .btn { white-space: nowrap; }
.band-dark p a { color: var(--signal); text-decoration: underline; text-underline-offset: 3px; }
.band-dark .btn-primary { background: var(--signal); color: var(--ink); border-color: var(--signal); }
.band-dark .btn-primary::before { background: #fff; }
.band-dark .btn-primary:hover { border-color: #fff; }
@media (max-width: 1023px) { .service { grid-template-columns: 120px minmax(0, 1fr); } .service-side { grid-column: 2; align-items: flex-start; } .service-side .tag-row { justify-content: flex-start; } }
@media (max-width: 640px) {
  .service { grid-template-columns: 1fr; gap: 14px; padding: 28px 0; }
  /* reset the tablet placement, otherwise grid-column:2 forces an implicit second track */
  .service-lead, .service-body, .service-side { grid-column: 1; }
  .service-lead { display: flex; align-items: center; gap: 12px; }
  .service .icon { margin-top: 0; font-size: 26px; }
  .service dl { grid-template-columns: 1fr; gap: 4px 0; }
  .service dt { margin-top: 8px; }
}

/* ---------- Cards / panels ---------- */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border); padding: 26px;
  transition: border-color var(--dur), transform var(--dur) var(--ease-out), box-shadow var(--dur);
}
.card::before {
  content: ""; position: absolute; top: -1px; left: -1px; right: -1px; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease-out);
}
.card:hover::before { transform: scaleX(1); }
.card:hover { border-color: var(--border-strong); }
.pipeline .card::before { display: none; }
.card .icon { font-family: 'Material Symbols Outlined'; font-size: 28px; color: var(--accent); margin-bottom: 14px; line-height: 1; }
.card .cta, a.cta { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--accent); margin-top: 12px; transition: gap var(--dur) var(--ease-out); }
.card:hover .cta, a.cta:hover { gap: 12px; }

.project-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.project-card > *:not(.thumb-img):not(.thumb) { margin-left: 22px; margin-right: 22px; }
.project-card h3 { margin-top: 20px; }
.project-card .cta { margin-bottom: 22px; }
/* height:auto is load-bearing: the home-page thumbs carry width/height attributes for
   layout stability, and a presentational height would otherwise override aspect-ratio
   and make object-fit crop the 16:9 mockups into a near-square box. */
.thumb-img { aspect-ratio: 16/9; width: 100%; height: auto; border-bottom: 1px solid var(--border); margin-bottom: 0; display: block; object-fit: cover; background: var(--surface-low); transition: transform .6s var(--ease-out); }
.project-card:hover .thumb-img { transform: scale(1.025); }
.project-card .thumb {
  aspect-ratio: 16/9; background: repeating-linear-gradient(45deg, var(--surface-low), var(--surface-low) 10px, var(--surface) 10px, var(--surface) 20px);
  border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; text-align: center; padding: 10px;
}
.mockup-note { font-size: 11px; color: var(--subtle); margin: -10px 0 16px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.tag { font-size: 11px; font-family: var(--font-mono); background: var(--surface-low); border: 1px solid var(--border); padding: 3px 8px; color: var(--text); }
.result-chip { font-family: var(--font-mono); font-size: 12px; color: var(--accent); font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.result-chip::before { content: ""; width: 6px; height: 6px; background: var(--action); }

.confidential { font-size: 12px; color: var(--muted); border-left: 3px solid var(--accent); padding: 8px 14px; margin-top: 16px; background: var(--surface-low); }

/* ---------- Dark "signal" band (credibility) ---------- */
.band-dark { background: var(--ink-2); color: #fff; }
.band-dark h2 { color: #fff; }
.band-dark p { color: #B9C5D8; }
.band-dark .eyebrow { color: var(--signal); }
.band-dark .placeholder-note { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.18); color: #93A2BA; }
.band-dark a.cta { color: var(--signal); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat { padding: 26px 24px 26px 0; border-right: 1px solid var(--border); margin-right: 24px; }
.stat:last-child { border-right: none; margin-right: 0; }
.stat .num { font-family: var(--font-mono); font-size: clamp(30px, 4vw, 44px); font-weight: 700; color: var(--text); letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.stat .label { font-size: 13.5px; color: var(--muted); margin-top: 10px; }
.band-dark .stats { border-color: rgba(255,255,255,.14); }
.band-dark .stat { border-color: rgba(255,255,255,.14); }
.band-dark .stat .num { color: var(--signal); }
.band-dark .stat .label { color: #B9C5D8; }

/* Evidence list: the credibility band cites independent research, one study per tile.
   Reuses .stats/.stat so the count-up and staggered reveal apply unchanged. */
.stats.evidence { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats.evidence .stat { display: flex; flex-direction: column; gap: 10px; padding-right: 28px; }
.stats.evidence .stat .num { font-size: clamp(30px, 3.6vw, 42px); }
.stats.evidence .stat .label { margin-top: 0; font-size: 14px; color: #DCE4F0; line-height: 1.45; }
.stats.evidence .stat .cite { font-family: var(--font-mono); font-size: 11px; letter-spacing: .02em; color: #8FA0B8; line-height: 1.5; }
.stats.evidence .stat .cite a { color: var(--signal); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(47,211,230,.45); }
.stats.evidence .stat .cite a:hover { text-decoration-color: var(--signal); }
.stats.evidence .stat .scope { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--signal); }
.stats.evidence .stat .scope::before { content: ""; width: 6px; height: 6px; background: currentColor; }
.stats.evidence .stat.is-action .scope { color: var(--action); }
.stats.evidence .stat.is-action .num { color: var(--action); }
@media (max-width: 1023px) { .stats.evidence { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats.evidence .stat:nth-child(2n) { border-right: none; margin-right: 0; } }
@media (max-width: 640px) { .stats.evidence { grid-template-columns: 1fr; } .stats.evidence .stat { padding-right: 0; } }
@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: none; margin-right: 0; border-bottom: 1px solid var(--border); padding: 20px 0; }
  .band-dark .stat { border-bottom-color: rgba(255,255,255,.14); }
  .stat:last-child { border-bottom: none; }
}

/* ---------- Case steps ---------- */
.case-steps { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 24px 0 40px; }
.case-steps div { font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; text-align: center; padding: 9px 4px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
@media (max-width: 860px) { .case-steps { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Forms ---------- */
form.contact { display: grid; gap: 18px; }
form.contact label { font-size: 13px; font-weight: 600; margin-bottom: 6px; display: block; }
form.contact label .req { color: var(--accent); margin-left: 2px; }
form.contact input, form.contact select, form.contact textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); background: var(--surface);
  font-family: var(--font-sans); font-size: 14.5px; color: var(--text); transition: border-color .15s, box-shadow .15s;
}
form.contact input:focus, form.contact select:focus, form.contact textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,104,122,.14);
}
form.contact .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
form.contact .required-legend { font-size: 12px; color: var(--muted); margin: -6px 0 0; }

.contact-layout { display: grid; grid-template-columns: minmax(260px,360px) 1fr; gap: 48px; align-items: start; margin-top: 32px; }
.contact-intro-note { font-size: 13px; color: var(--muted); margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.contact-channels { display: flex; flex-direction: column; gap: 10px; margin: 24px 0 0; }
.contact-channels a {
  display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 14px;
  border: 1px solid var(--border); background: var(--surface); padding: 14px 16px; color: var(--text);
  transition: border-color .15s, background .15s, transform var(--dur) var(--ease-out);
}
.contact-channels a:hover { border-color: var(--accent); background: var(--surface-low); transform: translateX(3px); }
.contact-channels .ci { font-family: 'Material Symbols Outlined'; font-size: 20px; color: var(--accent); flex-shrink: 0; }
.contact-channels svg.ci { width: 20px; height: 20px; fill: #25D366; flex-shrink: 0; }
.form-card { background: var(--surface); border: 1px solid var(--border); padding: 32px; position: relative; }
.form-card::before { content: ""; position: absolute; top: -1px; left: -1px; width: 56px; height: 2px; background: var(--accent); }
@media (max-width: 860px) { .contact-layout { grid-template-columns: 1fr; gap: 32px; } .form-card { padding: 24px; } }
@media (max-width: 600px) { form.contact .field-row { grid-template-columns: 1fr; gap: 18px; } }

/* ---------- Footer ---------- */
footer.site { border-top: 1px solid var(--border); padding: 36px 0; margin-top: 24px; background: var(--paper-2); }
footer.site .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); font-family: var(--font-mono); letter-spacing: .01em; }

/* ---------- Notes / feedback ---------- */
.placeholder-note { font-size: 12px; color: var(--muted); background: var(--surface-low); border: 1px dashed var(--border-strong); padding: 10px 14px; margin-top: 8px; }
.form-success { font-size: 14px; color: var(--text); background: var(--surface-low); border-left: 3px solid var(--accent); padding: 14px 16px; margin-top: 16px; }
.form-error { font-size: 13px; color: #B3261E; margin-top: 8px; }

.wa-float {
  position: fixed; right: 20px; bottom: 20px; width: 54px; height: 54px; border-radius: 50%;
  background: #25D366; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(7,17,32,.28); z-index: 40; transition: transform var(--dur) var(--ease-out);
}
.wa-float svg { width: 27px; height: 27px; fill: #fff; }
.wa-float:hover { transform: translateY(-2px); }

.portrait-ph {
  width: 220px; aspect-ratio: 3/4; background: var(--surface-low); border: 1px dashed var(--border-strong);
  display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px;
  text-align: center; padding: 12px; float: right; margin: 4px 0 20px 28px;
}
.pull-quote {
  border-left: 3px solid var(--accent); padding: 4px 20px; margin: 32px 0; font-size: 21px;
  font-weight: 600; color: var(--text); line-height: 1.35; font-stretch: 106%; font-variation-settings: "wdth" 106;
}
@media (max-width: 640px) { .portrait-ph { float: none; margin: 0 0 20px; width: 160px; } }

/* ---------- Reveal motion (motion.js adds .in) ---------- */
.reveal { opacity: 1; transform: none; }
.js-motion .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.js-motion .reveal.in { opacity: 1; transform: none; }
.js-motion .reveal.d1 { transition-delay: .08s; }
.js-motion .reveal.d2 { transition-delay: .16s; }
.js-motion .reveal.d3 { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js-motion .reveal { opacity: 1; transform: none; }
  .pipeline::before { display: none; }
}
