/* =========================================================================
   VILA — design system
   Aesthetic derived from design/design.md (ElevenLabs-inspired).
   ========================================================================= */

:root {
  /* base */
  --bg: #f4f3f1;
  --surface: #ffffff;
  --surface-muted: #efeeec;
  --ink: #0a0a0a;
  --ink-secondary: #6b6b6b;
  --ink-tertiary: #9a9a9a;
  --border: #e3e2df;
  --border-strong: #d6d4d0;

  /* type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter Tight", var(--font-sans);

  /* radii */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* spacing rhythm */
  --section-y: clamp(72px, 11vw, 160px);
  --gutter: clamp(20px, 5vw, 64px);
  --maxw: 1240px;

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}
.h-display { font-size: clamp(40px, 6.4vw, 84px); line-height: 1.02; letter-spacing: -0.03em; }
.h1 { font-size: clamp(34px, 5vw, 60px); }
.h2 { font-size: clamp(28px, 3.6vw, 46px); }
.h3 { font-size: clamp(20px, 2vw, 26px); letter-spacing: -0.015em; }

p { margin: 0; }
.lead { font-size: clamp(17px, 1.45vw, 21px); color: var(--ink-secondary); line-height: 1.55; }
.muted { color: var(--ink-secondary); }
.tertiary { color: var(--ink-tertiary); }

.eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(135deg,#ff6b4a,#ff9e5e); }
.eyebrow.live .dot { background: #2faa5a; box-shadow: 0 0 0 4px rgba(47,170,90,.15); }

/* ---------- layout ---------- */
.container { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(48px, 7vw, 96px); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head .h2 { max-width: 18ch; }
.divider { border: 0; border-top: 1px solid var(--border); margin: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-sans); font-size: 14px; font-weight: 500;
  padding: 9px 17px; border-radius: var(--r-pill);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: #262626; }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn--ghost:hover { background: #fafafa; border-color: var(--ink); }
.btn--lg { padding: 11px 20px; font-size: 14.5px; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(150%) blur(12px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 600; font-size: 21px; letter-spacing: -0.01em; }
.brand img { width: 22px; height: 22px; }
.nav__links { display: flex; gap: 30px; }
.nav__links a { font-size: 15px; color: var(--ink-secondary); transition: color .2s var(--ease); }
.nav__links a:hover { color: var(--ink); }
.nav__cta { display: flex; align-items: center; gap: 10px; }
.nav__burger { display: none; }

/* ---------- hero ---------- */
.hero { padding-top: clamp(40px, 7vw, 96px); padding-bottom: clamp(28px,4vw,56px); }
.hero__grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(24px, 4vw, 72px); align-items: end; }
.hero h1 { margin-top: 18px; max-width: 16ch; }
.hero__aside { padding-bottom: 10px; }
.hero__aside .lead { max-width: 42ch; }
.hero__cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* showcase panel (orb carousel) */
.showcase {
  margin-top: clamp(40px, 6vw, 72px);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: clamp(20px, 3vw, 36px);
}
.orbrow { display: flex; align-items: center; justify-content: center; gap: clamp(8px, 2vw, 28px); padding: clamp(20px,4vw,48px) 0; }
.orbrow figure { margin: 0; text-align: center; flex: 0 0 auto; transition: transform .4s var(--ease), opacity .4s var(--ease); }
.orbrow img { width: clamp(90px, 13vw, 170px); aspect-ratio: 1; filter: drop-shadow(0 18px 40px rgba(0,0,0,.10)); }
.orbrow .o-edge { opacity: .5; }
.orbrow .o-edge img { width: clamp(60px, 8vw, 110px); }
.orbrow .o-center img { width: clamp(120px, 18vw, 240px); }
.orbrow figcaption { margin-top: 16px; font-size: 14px; color: var(--ink-secondary); }
.orbrow .o-center figcaption { color: var(--ink); font-weight: 500; }

/* ---------- positioning strip ---------- */
.strip { border-block: 1px solid var(--border); }
.strip__inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-block: 26px; flex-wrap: wrap; }
.strip__lead { font-size: 15px; color: var(--ink-secondary); max-width: 46ch; }
.strip__tags { display: flex; gap: 10px; flex-wrap: wrap; }
.tag { font-size: 13.5px; color: var(--ink-secondary); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 7px 15px; background: var(--surface); }

/* ---------- generic prose block ---------- */
.prose-block { max-width: 760px; }
.prose-block .h2 { margin-bottom: 24px; max-width: 20ch; }
.prose-block p + p { margin-top: 18px; }

/* ---------- numbered model steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step {
  background: var(--surface-muted); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 28px; display: flex; flex-direction: column;
  min-height: 380px; transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.step:hover { transform: translateY(-4px); box-shadow: 0 20px 50px rgba(0,0,0,.05); }
.step__art { height: 170px; display: grid; place-items: center; margin-bottom: 8px; }
.step__art img { height: 150px; width: auto; }
.step__no { font-size: 13px; color: var(--ink-tertiary); font-variant-numeric: tabular-nums; }
.step h3 { margin-top: 10px; margin-bottom: 10px; }
.step p { font-size: 15.5px; color: var(--ink-secondary); }

/* ---------- vertical / insurance ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.workflows { margin-top: 30px; display: flex; flex-direction: column; }
.wf { display: grid; grid-template-columns: auto 1fr; gap: 18px; padding: 22px 0; border-top: 1px solid var(--border); }
.wf:last-child { border-bottom: 1px solid var(--border); }
.wf__k { font-size: 13px; color: var(--ink-tertiary); font-variant-numeric: tabular-nums; padding-top: 4px; }
.wf h4 { font-family: var(--font-display); font-size: 19px; font-weight: 500; letter-spacing: -0.01em; margin: 0 0 4px; }
.wf p { font-size: 15px; color: var(--ink-secondary); }
.panel-media { border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--border); box-shadow: 0 30px 70px rgba(0,0,0,.08); aspect-ratio: 1 / 1; }
.panel-media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- whats next tag cloud ---------- */
.nextrow { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 8px 28px; }
.nextrow .tag { font-size: 15px; padding: 10px 18px; }
.nextrow .tag--live { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- why-it-works cards ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 30px; transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 44px rgba(0,0,0,.05); }
.card__icon { width: 38px; height: 38px; border-radius: 10px; background: var(--surface-muted); display: grid; place-items: center; margin-bottom: 18px; }
.card__icon svg { width: 20px; height: 20px; stroke: var(--ink); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-secondary); font-size: 15.5px; }

/* ---------- research / leadership ---------- */
.research { background: var(--surface-muted); border-radius: var(--r-xl); padding: clamp(32px,5vw,64px); }
.research__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(28px,4vw,64px); align-items: center; }
.research ul { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; }
.research li { display: grid; grid-template-columns: auto 1fr; gap: 12px; font-size: 15.5px; color: var(--ink-secondary); }
.research li svg { width: 18px; height: 18px; margin-top: 4px; stroke: var(--ink); flex: none; }
.research__art { display: grid; place-items: center; }
.research__art img { width: min(320px, 80%); }

/* ---------- closing CTA ---------- */
.cta-final { position: relative; background: var(--ink); color: #fff; border-radius: var(--r-xl); overflow: hidden; padding: clamp(48px,7vw,104px) clamp(28px,5vw,72px); }
.cta-final__orb { position: absolute; right: -80px; top: -80px; width: 420px; opacity: .9; pointer-events: none; }
.cta-final h2 { color: #fff; max-width: 18ch; position: relative; }
.cta-final .lead { color: rgba(255,255,255,.7); margin-top: 18px; max-width: 46ch; position: relative; }
.cta-final__btns { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; position: relative; }
.cta-final .btn--primary { background: #fff; color: var(--ink); }
.cta-final .btn--primary:hover { background: #ededed; }
.cta-final .btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.cta-final .btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.06); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding-block: clamp(48px,6vw,80px) 40px; }
.footer__grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr; gap: 32px; }
.footer__brand .brand { font-size: 22px; }
.footer__brand p { margin-top: 16px; font-size: 14.5px; color: var(--ink-secondary); max-width: 34ch; }
.footer h5 { font-size: 13px; font-weight: 600; color: var(--ink); margin: 0 0 14px; letter-spacing: 0; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer ul a { font-size: 14.5px; color: var(--ink-secondary); }
.footer ul a:hover { color: var(--ink); }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: clamp(40px,5vw,64px); padding-top: 24px; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--ink-tertiary); }

/* ---------- contact page ---------- */
.contact { padding-top: clamp(48px, 7vw, 110px); }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.contact__aside h1 { max-width: 12ch; margin-top: 16px; }
.contact__aside .lead { margin-top: 20px; max-width: 42ch; }
.contact__points { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 18px; }
.contact__points li { display: grid; grid-template-columns: auto 1fr; gap: 12px; font-size: 15px; color: var(--ink-secondary); }
.contact__points svg { width: 18px; height: 18px; margin-top: 3px; stroke: var(--ink); flex: none; }
.contact__points b { color: var(--ink); font-weight: 500; }
.contact__direct { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 15px; color: var(--ink-secondary); }
.contact__direct a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: clamp(24px, 3vw, 40px); }
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 13.5px; font-weight: 500; color: var(--ink); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-sans); font-size: 15px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 12px 14px; outline: none; transition: border-color .2s var(--ease), background .2s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-tertiary); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); background: var(--surface); }
.field textarea { min-height: 120px; resize: vertical; }
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.field--row .field { margin-bottom: 0; }
.form-card .btn { width: 100%; justify-content: center; margin-top: 6px; }
.form-status { font-size: 14px; color: var(--ink-secondary); margin-top: 14px; min-height: 1.2em; }
.form-legal { font-size: 12.5px; color: var(--ink-tertiary); margin-top: 14px; line-height: 1.5; }

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

/* ---------- reveal animation (only hidden when JS is active) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; align-items: start; }
  .steps { grid-template-columns: 1fr; }
  .step { min-height: 0; }
  .split { grid-template-columns: 1fr; }
  .research__grid { grid-template-columns: 1fr; }
  .research__art { order: -1; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .cta-final__orb { width: 300px; opacity: .5; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .nav__links { display: none; }
  .nav__cta .btn--ghost { display: none; }
  .cards { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .strip__inner { flex-direction: column; align-items: flex-start; }
  .orbrow .o-edge { display: none; }
}
