/* ============================================================
   AIDIANA — Design System v3 "Precision Instrument"
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  /* ---- Color: distinctive, not generic ---- */
  --navy: #07162B;        /* deep ocean */
  --ink: #050E1C;         /* footer, deepest */
  --navy-2: #0D1B2A;      /* trust bar, slightly lighter */
  --teal: #0D8B6D;        /* oxidized copper, mature */
  --teal-light: #10A67D;  /* hover */
  --white: #F7F5F2;       /* warm paper */
  --pure: #FFFFFF;        /* card / evidence white */
  --orange: #D4653B;      /* Italian terracotta */
  --charcoal: #2A2A2A;
  --line: #E8E6E3;        /* soft gray border */

  --navy-80: rgba(7,22,43,0.80);
  --navy-15: rgba(7,22,43,0.15);
  --teal-10: rgba(13,139,109,0.10);
  --white-80: rgba(247,245,242,0.80);
  --white-70: rgba(247,245,242,0.70);
  --white-50: rgba(247,245,242,0.50);
  --white-40: rgba(247,245,242,0.40);
  --white-30: rgba(247,245,242,0.30);
  --white-10: rgba(247,245,242,0.10);

  /* ---- Type ---- */
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --mono: 'Space Grotesk', 'Plus Jakarta Sans', system-ui, sans-serif;

  /* ---- Spacing scale (mathematical) ---- */
  --xs: 8px; --sm: 16px; --md: 32px; --lg: 64px; --xl: 96px; --xxl: 128px;
  --section-y: clamp(64px, 10vw, 128px);
  --maxw: 1280px;
  --gutter: clamp(24px, 5vw, 48px);

  /* ---- Radius ---- */
  --r-btn: 8px; --r-card: 12px; --r-input: 6px;

  /* ---- Shadow (subtle, never black) ---- */
  --sh-card: 0 1px 3px rgba(7,22,43,0.04);
  --sh-card-hover: 0 8px 24px rgba(7,22,43,0.08);
  --sh-feat: 0 16px 48px rgba(13,139,109,0.15);

  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

body {
  font-family: var(--sans);
  font-size: 18px; line-height: 1.65; font-weight: 400;
  color: var(--charcoal); background: var(--white);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}

h1, h2, h3, h4 { color: var(--navy); font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; }
h1 { font-size: clamp(48px, 7vw, 88px); letter-spacing: -0.03em; line-height: 1.0; }
h2 { font-size: clamp(32px, 5vw, 56px); font-weight: 500; }
h3 { font-size: 24px; font-weight: 500; letter-spacing: 0; }
p { max-width: 60ch; }
a { color: inherit; text-decoration: none; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
::selection { background: var(--teal); color: var(--white); }

/* ---- Layout ---- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
section { padding-block: var(--section-y); position: relative; }

.eyebrow {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal);
  display: inline-block; margin-bottom: var(--sm);
}
.eyebrow.orange { color: var(--orange); }
.section-head { max-width: 820px; margin-bottom: var(--lg); }
.lead { font-size: clamp(18px, 2vw, 20px); color: var(--navy-80); max-width: 56ch; }

/* ============================================================
   Buttons / links
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 500; font-size: 16px;
  padding: 16px 32px; border-radius: var(--r-btn); cursor: pointer;
  border: 1.5px solid transparent; transition: transform .2s var(--ease), background .2s, box-shadow .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.btn--teal { background: var(--teal); color: var(--white); }
.btn--teal:hover { background: var(--teal-light); box-shadow: 0 4px 12px rgba(13,139,109,0.3); }
.btn--lg { padding: 20px 40px; font-size: 18px; }
.btn--outline-dark { border-color: var(--navy); color: var(--navy); }
.btn--outline-dark:hover { background: var(--navy); color: var(--white); }
.btn--outline-light { border-color: var(--white-30); color: var(--white); }
.btn--outline-light:hover { background: var(--white); color: var(--navy); }
.btn svg { transition: transform .2s var(--ease); }
.btn:hover svg { transform: translateX(4px); }

.tlink { color: var(--white-50); position: relative; }
.tlink::after { content: ""; position: absolute; left: 0; bottom: -3px; height: 1.5px; width: 100%; background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform .2s var(--ease); }
.tlink:hover { color: var(--white); }
.tlink:hover::after { transform: scaleX(1); }

.link-arrow { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--teal); }
.link-arrow svg { transition: transform .2s var(--ease); }
.link-arrow:hover svg { transform: translateX(3px); }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247,245,242,0.88); backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 4px 20px -16px rgba(7,22,43,.5); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-logo { height: 40px; width: auto; display: block; }
@media (max-width: 560px) { .brand-logo { height: 32px; } }
.footer-brand { display: inline-flex; }
.footer-brand .brand-logo { height: 38px; }
.nav-cta { display: flex; align-items: center; gap: 12px; }
/* language switch */
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--pure); }
.lang-switch button { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .04em; padding: 7px 11px; border: 0; background: transparent; color: var(--navy-80); cursor: pointer; transition: background .2s, color .2s; }
.lang-switch button:hover { color: var(--navy); }
.lang-switch button.active { background: var(--teal); color: #fff; }
.lang-switch button:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
@media (max-width: 860px) { .lang-switch { margin-left: auto; } }
.brand-name { font-weight: 600; font-size: 20px; letter-spacing: -0.01em; color: var(--white); }
.brand-name b { color: inherit; font-weight: 800; }
.on-light .brand-name { color: var(--navy); }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; }
.nav-links a { font-size: 15px; font-weight: 500; color: var(--navy-80); position: relative; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--navy); }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0; background: var(--teal); transition: width .25s var(--ease); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; z-index: 101; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: .3s; }
.site-header.open .nav-toggle span { background: var(--white); }

/* ============================================================
   Dark sections
   ============================================================ */
.dark { background: var(--navy); color: var(--white-80); }
.dark h1, .dark h2, .dark h3 { color: var(--white); }

/* Hero */
.hero { min-height: calc(100vh - 74px); display: flex; align-items: center; }
.hero-grid { display: grid; grid-template-columns: 60% 40%; align-items: center; gap: var(--lg); width: 100%; }
.hero h1 .accent { color: var(--teal); }
.hero .lead { color: var(--white-80); max-width: 540px; margin-top: var(--md); }
.hero-actions { display: flex; align-items: center; gap: var(--md); margin-top: var(--lg); flex-wrap: wrap; }
.hero-visual { position: relative; aspect-ratio: 1/1; width: 100%; }
.hero-visual canvas { width: 100%; height: 100%; display: block; }

.fade-up { opacity: 0; transform: translateY(20px); animation: fadeUp .8s var(--ease) forwards; }
.fade-up.d1 { animation-delay: .1s; } .fade-up.d2 { animation-delay: .2s; }
.fade-up.d3 { animation-delay: .3s; } .fade-up.d4 { animation-delay: .5s; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

/* Trust bar */
.trust { background: var(--navy-2); border-block: 1px solid var(--white-10); padding-block: var(--md); }
.trust .wrap { display: flex; align-items: center; gap: var(--lg); flex-wrap: wrap; justify-content: space-between; }
.trust p { font-family: var(--mono); font-size: 14px; color: var(--white-50); }
.trust-logos { display: flex; gap: var(--lg); align-items: center; flex-wrap: wrap; }
.trust-logos svg { width: 30px; height: 30px; color: var(--white-30); transition: color .3s; }
.trust-logos svg:hover { color: var(--white-50); }

/* ============================================================
   Problem (dark, heavy)
   ============================================================ */
.sep-line { height: 1px; background: var(--white-10); position: relative; overflow: hidden; }
.sep-line::after { content: ""; position: absolute; inset: 0; width: 0; background: rgba(13,139,109,.4); transition: width 1.3s var(--ease); }
.sep-line.in::after { width: 100%; }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--lg); }
.metric .num { font-family: var(--mono); font-weight: 400; font-size: clamp(56px, 8vw, 96px); line-height: 1.0; color: var(--orange); letter-spacing: -0.03em; }
.metric .mlabel { color: var(--white-70); font-size: 18px; margin-top: var(--sm); max-width: 28ch; }
.metric .bar { height: 4px; width: 100%; max-width: 200px; background: var(--white-10); border-radius: 2px; margin-top: var(--md); overflow: hidden; }
.metric .bar i { display: block; height: 100%; width: 0; background: rgba(212,101,59,.6); border-radius: 2px; transition: width 1.5s var(--ease); }

.flow-wide { margin-top: var(--xl); }
.flow-wide svg { width: 100%; height: auto; display: block; }
.flow-cap { font-family: var(--mono); font-size: 14px; color: var(--white-40); margin-top: var(--sm); }

/* diagonal transition dark→light */
.clip-diag { position: relative; }
.clip-diag::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 6vw; max-height: 90px;
  background: var(--white); clip-path: polygon(0 0, 100% 100%, 0 100%); z-index: 1;
}

/* ============================================================
   Solution — sequential steps
   ============================================================ */
.proc-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 0; }
.proc-arrow { display: grid; place-items: center; color: var(--line); padding: 0 var(--sm); transition: color .3s; }
.proc-arrow svg { width: 32px; height: 32px; }
.proc-flow:hover .proc-arrow { color: var(--teal); }
.proc-step { background: var(--pure); border: 1px solid var(--line); border-radius: var(--r-card); padding: 40px; transition: transform .3s var(--ease), box-shadow .3s; box-shadow: var(--sh-card); }
.proc-step:hover { transform: translateY(-4px); box-shadow: var(--sh-card-hover); }
.proc-step .seq { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); }
.proc-step .pic { width: 56px; height: 56px; margin: var(--sm) 0 var(--md); color: var(--teal); }
.proc-step .pic svg { width: 100%; height: 100%; overflow: visible; }
.proc-step:hover .pic .rot { transform: rotate(90deg); transform-origin: center; transform-box: fill-box; transition: transform .5s var(--ease); }
.proc-step:hover .pic .draw-line { stroke-dashoffset: 0; }
.proc-step:hover .pic .morph { opacity: 1; transition: opacity .5s var(--ease); }
.proc-step h3 { margin-bottom: var(--xs); }
.proc-step p { font-size: 16px; color: var(--navy-80); }
.pic .draw-line { stroke-dasharray: 80; stroke-dashoffset: 80; transition: stroke-dashoffset .8s var(--ease); }
.pic .morph { opacity: 0; }

/* ============================================================
   Process — vertical timeline, scroll-linked
   ============================================================ */
.proc-time { display: grid; grid-template-columns: 24px 1fr; gap: var(--md); }
.tl-rail { position: relative; }
.tl-rail .track { position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-rail .fill { position: absolute; left: 7px; top: 6px; width: 2px; background: var(--teal); height: 0; }
.tl-steps { display: grid; gap: var(--lg); }
.tl-step { display: grid; grid-template-columns: 72px 1fr; gap: var(--md); align-items: start; }
.tl-step .n { font-family: var(--mono); font-size: clamp(32px, 4vw, 48px); font-weight: 400; color: var(--line); line-height: 1; transition: color .3s; }
.tl-step.active .n { color: var(--teal); }
.tl-step .dur { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--teal); }
.tl-step h3 { margin: 6px 0 8px; }
.tl-step p { font-size: 16px; color: var(--navy-80); }
.tl-step .outcome { font-family: var(--mono); font-size: 14px; color: var(--teal); margin-top: var(--xs); display: inline-block; }
.proc-note { margin-top: var(--lg); font-size: 14px; color: rgba(42,42,42,.6); font-style: italic; }

/* vertical timeline (process) */
.timeline-v { display: grid; gap: 0; max-width: 760px; }
.tv-step { display: grid; grid-template-columns: 64px 1fr; gap: var(--md); padding: var(--md) 0; border-left: 2px solid var(--line); padding-left: var(--md); margin-left: 12px; position: relative; }
.tv-step::before { content: ""; position: absolute; left: -8px; top: calc(var(--md) + 6px); width: 14px; height: 14px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px var(--white); }
.tv-step:first-child { padding-top: 0; } .tv-step:first-child::before { top: 6px; }
.tv-step .n { font-family: var(--mono); font-size: clamp(28px,4vw,42px); color: var(--teal); line-height: 1; }
.tv-step h3 { margin: 2px 0 6px; }
.tv-step p { font-size: 16px; color: var(--navy-80); }
.tv-step .outc { font-family: var(--mono); font-size: 14px; color: var(--teal); margin-top: 8px; display: inline-block; }
@media (max-width: 560px) { .tv-step { grid-template-columns: 1fr; gap: 6px; } }

/* case blockquote/cite (plain, no wrapper) */
.case-body blockquote { font-size: 16px; color: var(--navy); font-style: italic; line-height: 1.45; margin: var(--sm) 0 4px; border: 0; padding: 0; }
.case-body cite { display: block; font-style: normal; font-family: var(--mono); font-size: 12px; color: rgba(42,42,42,.6); margin-bottom: var(--md); }
.hero h1 .accent { display: inline; }

/* model (no packages) */
.model-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--md); }
.model-card { background: var(--pure); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--md); box-shadow: var(--sh-card); transition: transform .3s var(--ease), box-shadow .3s; }
.model-card:hover { transform: translateY(-4px); box-shadow: var(--sh-card-hover); }
.model-card.free { border-color: var(--teal); border-width: 2px; }
.model-card h4 { font-family: var(--mono); font-size: 14px; letter-spacing: .04em; color: var(--teal); margin-bottom: 10px; }
.model-card p { font-size: 15px; color: var(--navy-80); }
.model-note { text-align: center; margin-top: var(--lg); font-size: 14px; color: rgba(42,42,42,.65); max-width: 60ch; margin-inline: auto; }
@media (max-width: 900px) { .model-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .model-grid { grid-template-columns: 1fr; } }

/* differentiator */
.diff { max-width: 880px; margin-inline: auto; border-top: 1px solid var(--line); }
.diff-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--md); padding: var(--md) 0; border-bottom: 1px solid var(--line); align-items: start; }
.diff-row .o, .diff-row .u { font-size: 16px; position: relative; padding-left: 30px; }
.diff-row .o { color: var(--navy-80); }
.diff-row .o::before { content: "✕"; position: absolute; left: 0; color: var(--orange); font-weight: 700; }
.diff-row .u { color: var(--navy); font-weight: 600; }
.diff-row .u::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 700; }
.diff-head { display: grid; grid-template-columns: 1fr 1fr; gap: var(--md); padding-bottom: 12px; }
.diff-head span { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; padding-left: 30px; }
.diff-head .ho { color: var(--navy-80); } .diff-head .hu { color: var(--teal); }
@media (max-width: 640px) { .diff-row, .diff-head { grid-template-columns: 1fr; gap: 8px; } }

/* founder */
.founder-line { font-family: var(--mono); font-size: 14px; color: var(--navy); margin-top: var(--md); }
.slogan { color: var(--teal); font-style: italic; font-size: 18px; margin-top: 6px; }

/* ============================================================
   Case studies
   ============================================================ */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--md); }
.case { background: var(--pure); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s; box-shadow: var(--sh-card); }
.case:hover { transform: translateY(-4px); box-shadow: var(--sh-card-hover); }
.case-img { aspect-ratio: 16/10; background: var(--navy); position: relative; overflow: hidden; display: grid; place-items: center; }
.case-img .sector { font-family: var(--mono); font-weight: 700; font-size: clamp(48px, 8vw, 90px); color: rgba(247,245,242,.08); transform: rotate(-5deg); white-space: nowrap; letter-spacing: -.02em; }
.case-body { padding: var(--md); display: flex; flex-direction: column; flex: 1; }
.pill { align-self: flex-start; font-family: var(--mono); font-size: 12px; color: var(--teal); background: var(--teal-10); padding: 5px 12px; border-radius: 999px; }
.ba { display: flex; align-items: baseline; gap: 10px; margin: var(--md) 0 6px; flex-wrap: wrap; font-family: var(--mono); }
.ba .before { font-size: 14px; color: var(--orange); text-decoration: line-through; }
.ba .arrow { font-size: 14px; color: var(--charcoal); }
.ba .after { font-size: 14px; color: var(--teal); font-weight: 700; }
.case .clabel { font-size: 16px; color: var(--charcoal); }
.case-quote { display: flex; gap: 12px; align-items: flex-start; margin: var(--md) 0; }
.case-quote .av { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: var(--white); display: grid; place-items: center; font-family: var(--mono); font-size: 13px; font-weight: 500; }
.case-quote blockquote { font-size: 16px; color: var(--navy); font-style: italic; line-height: 1.45; }
.case-quote cite { display: block; font-style: normal; font-size: 13px; color: rgba(42,42,42,.6); margin-top: 6px; }
.case .savings { font-family: var(--mono); font-size: 16px; font-weight: 700; color: var(--teal); margin-bottom: var(--md); }
.case .link-arrow { margin-top: auto; }

/* ============================================================
   Pricing
   ============================================================ */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--md); align-items: center; }
.tier { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); padding: 40px 32px; display: flex; flex-direction: column; position: relative; box-shadow: var(--sh-card); }
.tier h3 { font-size: 24px; }
.tier .price { font-family: var(--mono); font-weight: 400; font-size: 48px; color: var(--navy); margin: var(--sm) 0 6px; letter-spacing: -.03em; line-height: 1; }
.tier .psub { font-size: 16px; color: rgba(42,42,42,.7); margin-bottom: var(--md); }
.tier ul { list-style: none; display: grid; gap: 12px; margin-bottom: var(--lg); }
.tier li { font-size: 15px; padding-left: 28px; position: relative; color: var(--charcoal); }
.tier li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 700; }
.tier .btn { margin-top: auto; justify-content: center; }
.tier.featured { background: var(--pure); border: 2px solid var(--teal); transform: scale(1.05); box-shadow: var(--sh-feat); z-index: 2; }
.tier.featured .price { font-size: 56px; color: var(--teal); }
.tier .badge { position: absolute; top: -13px; right: 24px; background: var(--teal); color: var(--white); font-family: var(--mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; padding: 6px 12px; border-radius: 4px; }
.tier .key { position: absolute; top: 24px; right: 24px; color: var(--teal); }
.tier.enterprise .price { font-size: 36px; font-style: italic; }
.compliance { text-align: center; margin-top: var(--lg); font-size: 14px; color: rgba(42,42,42,.6); }
@media (max-width: 1024px) { .tier.featured { transform: none; } }

/* ============================================================
   About / Founder
   ============================================================ */
.about-grid { display: grid; grid-template-columns: 40% 60%; gap: var(--lg); align-items: center; }
.founder-vis { aspect-ratio: 4/5; border-radius: var(--r-card); background: var(--white); border: 1px solid var(--line); display: grid; align-items: center; padding: var(--lg); }
.founder-vis p { font-size: clamp(24px, 3vw, 32px); font-weight: 500; line-height: 1.25; color: rgba(7,22,43,.15); max-width: none; }
.about-quote { font-size: clamp(20px, 2.4vw, 24px); color: var(--navy); font-style: italic; border-left: 3px solid var(--teal); padding-left: 24px; margin: var(--md) 0; line-height: 1.4; }
.about-bio { font-size: 18px; color: var(--charcoal); }
.values-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--md); margin-top: var(--lg); }
.value .vi { color: var(--teal); margin-bottom: 12px; }
.value strong { display: block; font-size: 16px; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.value p { font-size: 14px; color: rgba(42,42,42,.7); }

/* ============================================================
   FAQ
   ============================================================ */
.faq-grid { display: grid; grid-template-columns: 30% 70%; gap: var(--lg); align-items: start; }
.faq-aside { position: sticky; top: 100px; }
.faq-aside h2 { font-size: clamp(28px, 3.4vw, 40px); margin: var(--sm) 0; }
.faq-aside p { font-size: 16px; color: rgba(42,42,42,.7); }
.faq-aside a { color: var(--teal); font-weight: 600; }
.faq-list { display: grid; }
.faq-item { border-bottom: 1px solid var(--line); transition: background .3s; padding-inline: 16px; margin-inline: -16px; }
.faq-item.open { background: var(--pure); border-left: 3px solid var(--teal); border-radius: 4px; }
.faq-q { width: 100%; background: none; border: 0; cursor: pointer; text-align: left; display: flex; align-items: center; gap: 16px; padding: 26px 0; font-family: var(--sans); font-size: 18px; font-weight: 500; color: var(--navy); }
.faq-q .num { font-family: var(--mono); font-size: 14px; color: var(--line); transition: color .3s; }
.faq-item.open .faq-q .num { color: var(--teal); }
.faq-q .plus { margin-left: auto; flex: none; width: 22px; height: 22px; position: relative; transition: transform .3s var(--ease); }
.faq-q .plus::before, .faq-q .plus::after { content: ""; position: absolute; background: var(--teal); }
.faq-q .plus::before { top: 10px; left: 0; width: 22px; height: 2px; }
.faq-q .plus::after { top: 0; left: 10px; width: 2px; height: 22px; }
.faq-item.open .faq-q .plus { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s var(--ease); }
.faq-a p { font-size: 16px; color: var(--charcoal); padding-bottom: 26px; }

/* ============================================================
   Final CTA
   ============================================================ */
.cta-final { text-align: center; }
.cta-final .inner { max-width: 760px; margin-inline: auto; transform: translateX(-2%); }
.cta-final h2 span { color: var(--teal); display: block; }
.cta-final .lead { color: var(--white-70); margin: var(--md) auto 0; }
.cta-final .btn { margin-top: var(--lg); }
.cta-final .reply { margin-top: var(--md); font-size: 16px; color: var(--white-50); }
.cta-final .reply a { color: var(--teal); }
.cta-live { margin-top: var(--md); font-family: var(--mono); font-size: 14px; color: var(--white-40); display: inline-flex; align-items: center; gap: 8px; }
.cta-live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0%,100% { opacity: .4; transform: scale(1); } 50% { opacity: 1; transform: scale(1.25); } }

/* ---- Define / integrations section ---- */
.define-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--lg); align-items: center; }
.ba-diagram { background: var(--pure); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--md); box-shadow: var(--sh-card); }
.ba-diagram svg { width: 100%; height: auto; display: block; }
.dodont { display: grid; grid-template-columns: 1fr 1fr; gap: var(--md); margin-top: var(--lg); }
.dodont .col { background: var(--pure); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--md); }
.dodont h4 { font-size: 14px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; margin-bottom: var(--sm); }
.dodont .do h4 { color: var(--teal); }
.dodont .dont h4 { color: var(--orange); }
.dodont ul { list-style: none; display: grid; gap: 10px; }
.dodont li { font-size: 15px; padding-left: 24px; position: relative; color: var(--charcoal); }
.dodont .do li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 700; }
.dodont .dont li::before { content: "✕"; position: absolute; left: 0; color: var(--orange); font-weight: 700; }
.integrations { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--md); }
.integrations span { font-family: var(--mono); font-size: 13px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--navy); background: var(--pure); }
.stack-note { font-size: 15px; color: var(--navy-80); margin-top: var(--md); }
.stack-note b { color: var(--navy); }
.proof-note { font-size: 14px; color: rgba(42,42,42,.6); margin-top: var(--md); font-style: italic; }
@media (max-width: 1024px) { .define-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .dodont { grid-template-columns: 1fr; } }

/* logo center node pulse */
.lm-core { transform-box: fill-box; transform-origin: center; animation: corePulse 3s var(--ease) infinite; }
@keyframes corePulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .lm-core { animation: none; } }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--ink); color: var(--white-50); padding-block: var(--xl) var(--md); }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--md); }
.site-footer .brand-name { color: var(--white); }
.footer-tag { font-size: 14px; color: var(--white-50); max-width: 30ch; margin: var(--sm) 0 var(--md); }
.socials { display: flex; gap: 14px; }
.socials a { color: var(--white-40); transition: color .2s; }
.socials a:hover { color: var(--teal); }
.footer-col h4 { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--white-40); margin-bottom: var(--sm); }
.footer-col ul { list-style: none; display: grid; gap: 12px; }
.footer-col a { font-size: 14px; color: var(--white-70); transition: color .2s; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid var(--white-10); margin-top: var(--xl); padding-top: var(--md); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-family: var(--mono); font-size: 12px; color: var(--white-30); }

/* ============================================================
   Scroll reveal + count
   ============================================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.draw { stroke-dasharray: var(--len, 1200); stroke-dashoffset: var(--len, 1200); transition: stroke-dashoffset 1.6s var(--ease); }
.draw.in { stroke-dashoffset: 0; }

/* ============================================================
   Mobile sticky CTA
   ============================================================ */
.mobile-cta { display: none; }

/* ============================================================
   Inner pages (subpage shared)
   ============================================================ */
.page-hero { padding-block: clamp(56px, 9vw, 120px) var(--lg); }
.page-hero h1 { font-size: clamp(40px, 6vw, 72px); }
.bg-tint { background: var(--white); }
.grid-pattern { background-image: linear-gradient(rgba(7,22,43,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(7,22,43,.04) 1px, transparent 1px); background-size: 44px 44px; }

/* case study template */
.cs-hero-meta { display: flex; gap: var(--md); flex-wrap: wrap; margin-top: var(--md); font-family: var(--mono); }
.cs-hero-meta span { display: block; color: var(--navy-80); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.cs-hero-meta strong { color: var(--navy); font-size: 18px; }
.cs-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--md); }
.cs-metrics .card { background: var(--pure); border: 1px solid var(--line); border-radius: var(--r-card); padding: 36px; text-align: center; }
.cs-metrics .stat { font-family: var(--mono); font-size: clamp(34px, 4vw, 50px); color: var(--navy); line-height: 1; }
.cs-metrics .unit { color: var(--teal); }
.cs-metrics .card-label { margin-top: 14px; font-size: 16px; color: var(--navy-80); }
.cs-body { max-width: 720px; margin-inline: auto; }
.cs-body h2 { font-size: clamp(26px, 3vw, 36px); margin: var(--lg) 0 var(--sm); }
.cs-body p { margin-bottom: var(--sm); color: var(--charcoal); }
.cs-body blockquote { font-size: clamp(20px, 2.6vw, 28px); color: var(--navy); font-weight: 500; line-height: 1.3; border-left: 4px solid var(--teal); padding-left: 24px; margin: var(--lg) 0; }
.cs-body blockquote cite { display: block; font-size: 15px; font-weight: 400; color: var(--navy-80); margin-top: 14px; font-style: normal; font-family: var(--mono); }

/* blog */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--md); }
.post-card { background: var(--pure); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s; box-shadow: var(--sh-card); }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--sh-card-hover); }
.post-thumb { aspect-ratio: 16/10; background: var(--navy); position: relative; }
.post-thumb .cat { position: absolute; top: 16px; left: 16px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; background: var(--white); color: var(--navy); padding: 5px 12px; border-radius: 999px; }
.post-body { padding: var(--md); display: flex; flex-direction: column; flex: 1; }
.post-body .meta { font-family: var(--mono); font-size: 12px; color: var(--navy-80); margin-bottom: 12px; }
.post-body h3 { font-size: 20px; margin-bottom: 10px; }
.post-body p { font-size: 15px; color: var(--navy-80); flex: 1; }
.post-body .link-arrow { margin-top: var(--sm); }
.featured-post { display: grid; grid-template-columns: 1.1fr 1fr; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; background: var(--pure); margin-bottom: var(--lg); }
.featured-post .post-thumb { aspect-ratio: auto; min-height: 320px; }
.featured-post .post-body { padding: clamp(30px, 4vw, 56px); justify-content: center; }
.featured-post h2 { font-size: clamp(26px, 3vw, 38px); margin: 14px 0; }
.filter-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: var(--lg); }
.chip { font-family: var(--mono); font-size: 13px; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--pure); color: var(--navy); cursor: pointer; transition: .2s; }
.chip.active, .chip:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: var(--lg); align-items: start; }
.card { background: var(--pure); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--sh-card); }
.form-field { margin-bottom: 22px; }
.form-field label { display: block; font-size: 14px; font-weight: 600; color: var(--navy); margin-bottom: 8px; }
.form-field label .req { color: var(--orange); }
.form-field input, .form-field select, .form-field textarea { width: 100%; font-family: var(--sans); font-size: 16px; padding: 14px 16px; color: var(--charcoal); background: var(--pure); border: 1.5px solid var(--line); border-radius: var(--r-input); transition: border-color .25s, box-shadow .25s; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-10); }
.form-field .helper { font-size: 13px; color: var(--navy-80); margin-top: 6px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.contact-info .info-block { display: flex; gap: 16px; margin-bottom: 28px; align-items: flex-start; }
.contact-info .info-block .icon { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--teal-10); color: var(--teal); display: grid; place-items: center; }
.contact-info .info-block strong { display: block; color: var(--navy); }
.contact-info .info-block span { font-size: 15px; color: var(--navy-80); }
.steps-mini { list-style: none; counter-reset: s; margin-top: 20px; }
.steps-mini li { counter-increment: s; padding: 14px 0 14px 44px; position: relative; border-bottom: 1px solid var(--line); font-size: 15px; }
.steps-mini li::before { content: counter(s); position: absolute; left: 0; top: 12px; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: var(--white); font-family: var(--mono); font-size: 14px; display: grid; place-items: center; }

/* 404 */
.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: var(--gutter); }
.notfound .code { font-family: var(--mono); font-size: clamp(90px, 20vw, 200px); font-weight: 700; color: var(--navy); line-height: 1; }
.notfound .code span { color: var(--teal); }
.notfound h1 { font-size: clamp(28px, 4vw, 44px); margin: 10px 0 18px; }
.notfound .actions { margin-top: var(--md); display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 380px; }
  .cases, .pricing, .post-grid, .cs-metrics { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .faq-grid, .contact-grid, .featured-post { grid-template-columns: 1fr; }
  .faq-aside { position: static; }
}
@media (max-width: 860px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: block; }
  .site-header.open .nav-links {
    display: flex; position: fixed; inset: 74px 0 0; flex-direction: column; align-items: center; justify-content: center; gap: var(--md);
    background: var(--navy); padding: var(--lg);
  }
  .site-header.open .nav-links a { color: var(--white); font-size: 22px; }
  .proc-flow { grid-template-columns: 1fr; gap: var(--sm); }
  .proc-arrow { transform: rotate(90deg); padding: var(--xs) 0; }
  .mobile-cta { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: var(--navy); transform: translateY(120%); transition: transform .35s var(--ease); }
  .mobile-cta.show { transform: none; }
  .mobile-cta .btn { width: 100%; justify-content: center; }
}
@media (max-width: 560px) {
  .metrics, .cases, .pricing, .post-grid, .cs-metrics, .values-grid, .form-grid-2 { grid-template-columns: 1fr; }
  .trust .wrap { flex-direction: column; align-items: flex-start; gap: var(--md); }
}

/* ============================================================
   Aesthetic modules (vanilla ports)
   ============================================================ */

/* ---- Hero word-cycle ---- */
.hero h1 .word-cycle { display: inline-block; will-change: transform, opacity, filter; }
.word-cycle.wc-out { animation: wc-out .3s var(--ease) forwards; }
.word-cycle.wc-in { animation: wc-in .44s var(--ease) forwards; }
@keyframes wc-out { to { opacity: 0; transform: translateY(16px); filter: blur(6px); } }
@keyframes wc-in { from { opacity: 0; transform: translateY(-16px); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }
@media (prefers-reduced-motion: reduce) { .word-cycle.wc-out, .word-cycle.wc-in { animation: none; } }

/* ---- Trust bar: avatar stack + tool marquee ---- */
.trust .wrap { flex-direction: column; align-items: stretch; gap: var(--md); }
.trust-proof { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.avatar-stack { display: inline-flex; align-items: center; }
.avatar-stack .av { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--navy-2); margin-left: -10px; background: var(--navy); }
.avatar-stack .av:first-child { margin-left: 0; }
.avatar-stack .more { width: 38px; height: 38px; border-radius: 50%; margin-left: -10px; display: grid; place-items: center; background: var(--teal); color: #fff; font-family: var(--mono); font-size: 12px; font-weight: 500; border: 2px solid var(--navy-2); }
.trust-proof p { font-family: var(--mono); font-size: 14px; color: var(--white-50); margin: 0; }
.trust .marquee { width: 100%; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee-track { display: flex; gap: 12px; width: max-content; animation: marquee-x 34s linear infinite; will-change: transform; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-family: var(--mono); font-size: 13px; white-space: nowrap; color: var(--white-70); border: 1px solid var(--white-10); border-radius: 999px; padding: 8px 16px; }
@keyframes marquee-x { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---- Scroll-reel testimonials ---- */
.reel { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 1000px; margin-inline: auto; gap: 10px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--pure); box-shadow: var(--sh-card); outline: none; }
.reel:focus-visible { box-shadow: 0 0 0 2px var(--teal); }
@media (min-width: 768px) { .reel { flex-direction: row; min-height: 340px; } }
.reel-stage { position: relative; width: 100%; height: 230px; flex: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent), linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent), linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect; }
@media (min-width: 768px) { .reel-stage { width: 360px; height: auto; } }
.reel-cols { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; }
.reel-col { display: flex; flex-direction: column; gap: 8px; flex: none; will-change: transform; }
.reel-cell { width: 110px; height: 110px; flex: none; border-radius: 12px; border: 1px solid var(--line); background: linear-gradient(to bottom, var(--white), var(--pure)); filter: blur(1px); box-shadow: 0 1px 2px rgba(7,22,43,.05), inset 0 2px 0 rgba(255,255,255,1); }
.reel-feat { position: relative; width: 110px; height: 110px; flex: none; border-radius: 12px; overflow: hidden; background: var(--navy); box-shadow: var(--sh-card-hover); }
.reel-feat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.reel-sheen { position: absolute; inset: 0; pointer-events: none; filter: blur(6px); mix-blend-mode: overlay;
  background: linear-gradient(220deg, rgba(13,139,109,0) 34%, rgba(16,166,125,.85) 44%, rgba(173,177,255,.5) 50%, rgba(13,139,109,0) 64%); }
.reel-content { display: flex; flex: 1; min-width: 0; flex-direction: column; justify-content: space-between; gap: 18px; padding: 28px 24px; }
.reel-mark { width: 44px; height: 44px; color: var(--teal); opacity: .45; flex: none; }
.reel-text { position: relative; max-width: 42ch; }
.reel-quote { font-size: clamp(18px, 2vw, 22px); font-weight: 500; line-height: 1.35; letter-spacing: -.01em; color: var(--navy); margin: 0 0 10px; }
.reel-author { font-family: var(--mono); font-size: 13px; color: rgba(42,42,42,.6); margin: 0; }
.reel-text .rw { display: inline-block; white-space: nowrap; }
.reel-controls { display: flex; gap: 8px; }
.reel-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--line); background: var(--pure); color: var(--navy); font-size: 18px; line-height: 1; cursor: pointer; transition: transform .2s var(--ease), background .2s, color .2s, opacity .2s; }
.reel-btn:hover:not(:disabled) { transform: scale(1.08); background: var(--teal); color: #fff; border-color: var(--teal); }
.reel-btn:disabled { opacity: .35; cursor: default; }
.reel-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.reel-char { display: inline-block; opacity: 0; animation: reel-char-rise .4s var(--ease) forwards; }
.reel-text.reel-exit { animation: reel-exit .24s var(--ease) forwards; }
@keyframes reel-char-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes reel-exit { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-12px); } }
@media (prefers-reduced-motion: reduce) { .reel-char { animation: none; opacity: 1; } .reel-col { transition: none !important; } }

/* ============================================================
   Mobile revisit
   ============================================================ */
@media (max-width: 768px) {
  /* footer 4 cols cramped on phones -> 2x2 */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--lg) var(--md); }
  /* reel: keep portraits shorter so quote gets room */
  .reel-stage { height: 200px; }
  /* touch targets >=40-44px on touch screens */
  .nav-toggle { min-width: 44px; min-height: 44px; }
  .reel-btn { width: 40px; height: 40px; }
}
@media (max-width: 560px) {
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
  /* lang switch: taller tap target (width stays narrow to fit 5 pills + logo + burger) */
  .lang-switch button { padding: 12px 11px; }
  /* hero: tighten so cycling word + visual breathe */
  .hero { min-height: auto; padding-block: var(--lg) var(--xl); }
  .hero-visual { max-width: 300px; }
  /* section heads centered reel/diff stay readable */
  .reel-content { padding: 24px 20px; }
}
@media (max-width: 400px) {
  /* avoid logo+5 lang buttons+burger overflow on very small phones (narrow width, keep height) */
  .brand-logo { height: 30px; }
  .lang-switch button { padding: 12px 8px; font-size: 11px; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--md); }
}
