/* ============================================================
   PULSE SYNC — corporate dark/light, subtle glass, clean type
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* dark (default) */
  --bg: #0a0911;
  --bg-raise: #110f1b;
  --surface: rgba(255, 255, 255, .04);
  --surface-2: rgba(255, 255, 255, .06);
  --surface-solid: #14121f;
  --stroke: rgba(255, 255, 255, .09);
  --stroke-strong: rgba(255, 255, 255, .18);
  --shine: rgba(255, 255, 255, .08);

  --text: #f2f1f8;
  --text-dim: #a8a5bc;
  --text-faint: #6e6b84;

  --primary: #8b5cf6;
  --primary-strong: #7c3aed;
  --primary-contrast: #ffffff;
  --primary-soft: rgba(139, 92, 246, .13);
  --primary-glow: rgba(139, 92, 246, .25);

  --ok: #34d399;

  --nav-bg: rgba(13, 11, 21, .72);
  --menu-bg: rgba(10, 9, 17, .88);
  --shadow: 0 18px 48px rgba(0, 0, 0, .38);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, .25);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-lg: 22px;
  --radius-md: 14px;
  --nav-h: 64px;
  --pad-section: clamp(5.5rem, 11vw, 9rem);

  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f7f7fb;
  --bg-raise: #ffffff;
  --surface: rgba(255, 255, 255, .72);
  --surface-2: #ffffff;
  --surface-solid: #ffffff;
  --stroke: rgba(22, 19, 44, .10);
  --stroke-strong: rgba(22, 19, 44, .22);
  --shine: rgba(255, 255, 255, .9);

  --text: #18152b;
  --text-dim: #55516d;
  --text-faint: #8d8aa2;

  --primary: #6d28d9;
  --primary-strong: #5b21b6;
  --primary-contrast: #ffffff;
  --primary-soft: rgba(109, 40, 217, .09);
  --primary-glow: rgba(109, 40, 217, .16);

  --ok: #059669;

  --nav-bg: rgba(255, 255, 255, .7);
  --menu-bg: rgba(247, 247, 251, .92);
  --shadow: 0 18px 44px rgba(24, 16, 60, .10);
  --shadow-soft: 0 10px 26px rgba(24, 16, 60, .07);

  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background .35s ease, color .35s ease;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--primary-glow); }

.mono {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* accent word with a hand-drawn underline */
.accent {
  position: relative;
  display: inline-block;
  color: var(--primary);
}
.accent__stroke {
  position: absolute;
  left: -1%;
  bottom: -.06em;
  width: 102%;
  height: .16em;
  overflow: visible;
}
.accent__stroke path {
  fill: none;
  stroke: var(--primary);
  stroke-width: 5;
  stroke-linecap: round;
  opacity: .45;
}

.container {
  width: min(1200px, 100% - clamp(2rem, 6vw, 5rem));
  margin-inline: auto;
}

/* ---------- Progress bar ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px; z-index: 90; pointer-events: none;
}
.progress span {
  display: block; height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--primary);
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .9rem 1.9rem;
  border-radius: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  white-space: nowrap;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease, color .25s ease;
}
.btn--sm { padding: .55rem 1.25rem; font-size: .85rem; }

.btn--primary {
  color: var(--primary-contrast);
  background: var(--primary-strong);
}
.btn--primary:hover {
  background: var(--primary);
  transform: translateY(-1px);
}
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(10px);
}
.btn--ghost:hover { border-color: var(--stroke-strong); background: var(--surface-2); }

.btn:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---------- Dots ---------- */
.dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: .55em;
  vertical-align: 1px;
}
.dot--live { background: var(--ok); }
.dot--pulse {
  background: var(--primary);
  animation: dot-pulse 2.4s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

/* ---------- Preloader ---------- */
.preloader { display: none; }
html.js .preloader {
  display: grid;
  place-items: center;
  position: fixed; inset: 0;
  z-index: 100;
  background: var(--bg);
}
.preloader__inner { display: grid; justify-items: center; gap: 1.3rem; }
.preloader__mark { width: 52px; color: var(--primary); }
.preloader__bar {
  width: 160px; height: 2px;
  background: var(--stroke);
  border-radius: 2px;
  overflow: hidden;
}
.preloader__bar span {
  display: block; height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--primary);
}

/* Intro elements start hidden only when JS is on */
html.js [data-intro] { opacity: 0; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  width: min(1200px, 100% - 24px);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 .75rem 0 1.4rem;
  border-radius: 16px;
  background: var(--nav-bg);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: var(--shadow-soft);
  transition: transform .4s cubic-bezier(.2, .8, .2, 1), box-shadow .3s, background .35s;
}
.nav.is-hidden { transform: translateX(-50%) translateY(calc(-100% - 20px)); }
.nav.is-scrolled { box-shadow: var(--shadow); }

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .12em;
}
.nav__logo { height: 26px; width: auto; }

.nav__links { display: flex; gap: .2rem; }
.nav__links a {
  padding: .5rem .85rem;
  font-size: .87rem;
  font-weight: 500;
  color: var(--text-dim);
  border-radius: 10px;
  transition: color .25s, background .25s;
}
.nav__links a:hover { color: var(--text); background: var(--surface-2); }

.nav__actions { display: flex; align-items: center; gap: .5rem; }

/* Theme toggle */
.theme-toggle {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--text-dim);
  transition: color .25s, border-color .25s, background .25s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--stroke-strong); }
.theme-toggle svg {
  width: 17px; height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle__sun { display: none; }
.theme-toggle__moon { display: block; }
[data-theme="light"] .theme-toggle__sun { display: block; }
[data-theme="light"] .theme-toggle__moon { display: none; }

.nav__burger {
  display: none;
  width: 42px; height: 42px;
  border-radius: 10px;
  position: relative;
}
.nav__burger span {
  position: absolute; left: 11px; right: 11px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), top .35s;
}
.nav__burger span:nth-child(1) { top: 17px; }
.nav__burger span:nth-child(2) { top: 24px; }
.nav__burger.is-open span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { top: 20px; transform: rotate(-45deg); }

/* ---------- Mobile menu ---------- */
.menu {
  position: fixed; inset: 0;
  z-index: 75;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3rem;
  padding: 6rem clamp(1.5rem, 8vw, 4rem) 3rem;
  background: var(--menu-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s, visibility .4s;
}
.menu.is-open { opacity: 1; visibility: visible; }
.menu__links { display: grid; gap: .4rem; }
.menu__links a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 8vw, 2.8rem);
  font-weight: 600;
  color: var(--text);
  padding: .35rem 0;
}
.menu__links a em { font-style: normal; font-size: .8rem; color: var(--primary); }
.menu__foot {
  display: grid; gap: .5rem;
  color: var(--text-dim);
  font-size: .9rem;
}
.menu__foot .mono { color: var(--text-faint); font-size: .65rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: calc(var(--nav-h) + 50px) 0 4.5rem;
}

.hero__canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}

.hero__inner { position: relative; z-index: 1; }

.hero__content { max-width: 640px; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  padding: .5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 2rem;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 5.4vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -.025em;
}

.hero__sub {
  max-width: 52ch;
  margin-top: 1.6rem;
  color: var(--text-dim);
  font-size: clamp(.98rem, 1.5vw, 1.08rem);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-top: 2.4rem;
}

.hero__proof {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem 2.2rem;
  margin-top: 3rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--stroke);
  color: var(--text-faint);
  font-size: .66rem;
}
.hero__proof strong {
  color: var(--text);
  font-weight: 600;
  margin-right: .45em;
  font-size: .82rem;
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  z-index: 1;
  color: var(--text-faint);
  font-size: .62rem;
  transition: color .25s;
}
.hero__scroll:hover { color: var(--text-dim); }
.hero__scroll i {
  font-style: normal;
  display: inline-block;
  animation: hud-bob 1.8s ease-in-out infinite;
}
@keyframes hud-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ---------- Ticker ---------- */
.ticker-block {
  padding: 2.4rem 0 2.6rem;
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
  background: var(--surface);
}
.ticker-block__label {
  text-align: center;
  color: var(--text-faint);
  font-size: .62rem;
  margin-bottom: 1.4rem;
}
.ticker {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.ticker__track { display: flex; width: max-content; animation: ticker-run 40s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__group {
  display: flex;
  align-items: center;
  gap: 2.4rem;
  padding-right: 2.4rem;
  font-family: var(--font-display);
  font-size: .92rem;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
}
.ticker__group i { font-style: normal; color: var(--text-faint); }
.ticker__hl { color: var(--primary); }
@keyframes ticker-run { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { position: relative; padding: var(--pad-section) 0; }
.section--alt { background: var(--surface); }

.section__head { max-width: 720px; margin-bottom: clamp(3rem, 6vw, 4.5rem); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__tag {
  color: var(--primary);
  margin-bottom: 1.1rem;
  font-size: .7rem;
}
.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -.02em;
}
.section__lead {
  margin-top: 1.3rem;
  color: var(--text-dim);
  font-size: 1.02rem;
  max-width: 56ch;
}
.section__head--center .section__lead { margin-inline: auto; }

/* ---------- Cards ---------- */
.card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.1rem);
  background: var(--surface);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 var(--shine), var(--shadow-soft);
  overflow: hidden;
  transition: border-color .3s, transform .3s ease, box-shadow .3s, background .35s;
}
.card:hover {
  border-color: var(--stroke-strong);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 var(--shine), var(--shadow);
}

.card__tag {
  color: var(--text-faint);
  margin-bottom: 1.1rem;
  font-size: .66rem;
}
.card__title {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -.01em;
  margin-bottom: .55rem;
}
.card__text { color: var(--text-dim); font-size: .92rem; max-width: 46ch; }

/* ---------- Bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(.9rem, 1.6vw, 1.2rem);
}
.bento__speed { grid-column: 1 / 7; grid-row: 1 / 3; display: flex; flex-direction: column; }
.bento__eff   { grid-column: 7 / 13; }
.bento__int   { grid-column: 7 / 10; }
.bento__prec  { grid-column: 10 / 13; }
.bento__term  { grid-column: 1 / 13; }

/* Speed */
.bento__speed-figure {
  position: relative;
  display: grid;
  place-items: center;
  margin: auto 0;
  padding: 1.2rem 0 .6rem;
}
.gauge-container {
  position: relative;
  width: min(280px, 68%);
  aspect-ratio: 200 / 120;
  display: grid;
  place-items: center;
}
.gauge {
  width: 100%;
  height: 100%;
}
.gauge path {
  fill: none;
  stroke-width: 9;
  stroke-linecap: round;
}
.gauge__track { stroke: var(--stroke); }
.gauge__fill { stroke: var(--primary); }
.bento__speed-value {
  position: absolute;
  bottom: 4%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: clamp(3rem, 5.5vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1;
  white-space: nowrap;
}
.bento__speed-value .pct {
  margin-left: 0.06em;
  letter-spacing: normal;
}

/* Efficiency checklist */
.bento__check {
  list-style: none;
  margin-top: 1.4rem;
  display: grid;
  gap: .55rem;
  font-size: .85rem;
  color: var(--text-dim);
}
.bento__check li {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .6rem .85rem;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--stroke);
}
.bento__check i { font-style: normal; color: var(--ok); }
.bento__check .is-hl { color: var(--text); border-color: var(--stroke-strong); }
.bento__check .is-hl i { color: var(--primary); }

/* Orbit */
.orbit {
  position: relative;
  height: 170px;
  margin: .6rem 0 1rem;
  display: grid;
  place-items: center;
}
.orbit__core {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--primary-strong);
  color: #fff;
  font-family: var(--font-mono);
  font-size: .72rem;
  z-index: 1;
  box-shadow: var(--shadow-soft);
}
.orbit__ring {
  position: absolute;
  top: 50%; left: 50%;
  border: 1px dashed var(--stroke-strong);
  border-radius: 50%;
  animation: orbit-spin linear infinite;
}
.orbit__ring--1 { width: 110px; height: 110px; margin: -55px; animation-duration: 16s; }
.orbit__ring--2 { width: 165px; height: 165px; margin: -82.5px; animation-duration: 26s; animation-direction: reverse; }
.orbit__chip {
  position: absolute;
  top: 50%; left: 50%;
  width: 30px; height: 30px;
  margin: -15px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--surface-solid);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-soft);
  font-family: var(--font-mono);
  font-size: .58rem;
  color: var(--text-dim);
}
@keyframes orbit-spin { to { transform: rotate(360deg); } }
.orbit__ring--1 .orbit__chip { animation: orbit-counter-1 16s linear infinite; }
.orbit__ring--2 .orbit__chip { animation: orbit-counter-2 26s linear infinite; }
@keyframes orbit-counter-1 {
  from { transform: rotate(var(--a)) translateX(55px) rotate(calc(-1 * var(--a))); }
  to { transform: rotate(var(--a)) translateX(55px) rotate(calc(-1 * var(--a) - 360deg)); }
}
@keyframes orbit-counter-2 {
  from { transform: rotate(var(--a)) translateX(82.5px) rotate(calc(-1 * var(--a))); }
  to { transform: rotate(var(--a)) translateX(82.5px) rotate(calc(-1 * var(--a) + 360deg)); }
}

/* Target / precision */
.target {
  position: relative;
  height: 150px;
  margin: .8rem 0 1.2rem;
  display: grid;
  place-items: center;
}
.target span {
  position: absolute;
  border: 1px solid var(--primary-glow);
  border-radius: 50%;
  animation: target-ping 3.2s cubic-bezier(.2, .6, .3, 1) infinite;
}
.target span:nth-child(1) { width: 36px; height: 36px; animation-delay: 0s; }
.target span:nth-child(2) { width: 80px; height: 80px; animation-delay: .4s; }
.target span:nth-child(3) { width: 124px; height: 124px; animation-delay: .8s; }
.target__cross {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--primary);
}
@keyframes target-ping {
  0% { opacity: 0; transform: scale(.6); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.12); }
}

/* Terminal (always dark — reads as a real console in both themes) */
.bento__term {
  display: grid;
  grid-template-columns: minmax(240px, .9fr) 1.4fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: center;
}
.bento__term-big { font-size: clamp(2.8rem, 4.5vw, 3.8rem); color: var(--primary); }
.terminal {
  border-radius: var(--radius-md);
  background: #0b0a12;
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  font-size: .74rem;
  text-transform: none;
  letter-spacing: .02em;
}
.terminal__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: .6rem .9rem;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  color: #6e6b84;
  font-size: .62rem;
}
.terminal__bar i { width: 9px; height: 9px; border-radius: 50%; }
.terminal__bar i:nth-child(1) { background: rgba(248, 113, 113, .7); }
.terminal__bar i:nth-child(2) { background: rgba(250, 204, 21, .7); }
.terminal__bar i:nth-child(3) { background: rgba(74, 222, 128, .7); }
.terminal__bar span { margin-left: .6rem; }
.terminal__body {
  padding: 1rem 1.1rem 1.2rem;
  min-height: 132px;
  display: grid;
  align-content: start;
  gap: .4rem;
  color: #b9b6cc;
}
.terminal__body .ln { white-space: pre-wrap; }
.terminal__body .ln--ok { color: #4ade80; }
.terminal__body .ln--info { color: #93c5fd; }
.terminal__body .ln--cmd { color: #f2f1f8; }
.terminal__body .caret {
  display: inline-block;
  width: 7px; height: 13px;
  background: #8b5cf6;
  vertical-align: -2px;
  animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

/* ---------- Tabs / Pipeline ---------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem;
  margin-bottom: 1.6rem;
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .65rem 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .88rem;
  color: var(--text-dim);
  transition: color .25s, border-color .25s, box-shadow .25s, background .25s;
}
.tab svg {
  width: 15px; height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tab:hover { color: var(--text); border-color: var(--stroke-strong); }
.tab.is-active {
  color: var(--primary-contrast);
  background: var(--primary-strong);
  border-color: var(--primary-strong);
}

/* ---------- Steps (vertical journey) ---------- */
.steps {
  position: relative;
  max-width: 980px;
  margin: clamp(2.5rem, 5vw, 3.5rem) auto 0;
  display: grid;
  gap: clamp(2.4rem, 5vw, 4rem);
}
.steps__line {
  position: absolute;
  left: 27px;
  top: 30px;
  bottom: 30px;
  width: 2px;
  border-radius: 2px;
  background: var(--stroke);
}
.steps__line span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  background: var(--primary);
  transform: scaleY(0);
  transform-origin: top center;
}

.step {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) minmax(260px, 340px);
  gap: clamp(1.2rem, 3vw, 2.4rem);
  align-items: center;
}
.step__node {
  position: relative;
  z-index: 1;
  width: 56px; height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--bg-raise);
  border: 1px solid var(--stroke);
  transition: border-color .4s, background .35s;
}
.step__node svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: var(--text-dim);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .4s;
}
.step.is-active .step__node { border-color: var(--primary); }
.step.is-active .step__node svg { stroke: var(--primary); }

.step__body, .step__scene { transition: opacity .5s ease; }
html.js .step:not(.is-active) .step__body { opacity: .45; }
html.js .step:not(.is-active) .step__scene { opacity: .35; }

.step__idx { color: var(--primary); font-size: .62rem; }
.step__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -.01em;
  margin: .5rem 0 .45rem;
}
.step__desc { color: var(--text-dim); font-size: .92rem; max-width: 44ch; }

/* mini app scenes */
.scene {
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: var(--bg-raise);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.scene__bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: .55rem .85rem;
  border-bottom: 1px solid var(--stroke);
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: .58rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.scene__bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--stroke-strong); }
.scene__bar span { margin-left: .45rem; }
.scene__body {
  padding: .95rem 1rem 1.05rem;
  display: grid;
  gap: .55rem;
  justify-items: start;
  font-size: .8rem;
}
.scene__hint {
  font-family: var(--font-mono);
  font-size: .6rem;
  letter-spacing: .05em;
  color: var(--text-faint);
}
.scene__tags { display: flex; flex-wrap: wrap; gap: .4rem; }

.bub {
  padding: .5rem .8rem;
  border-radius: 12px;
  max-width: 95%;
  line-height: 1.45;
}
.bub--in {
  background: var(--surface-2);
  border: 1px solid var(--stroke);
  border-bottom-left-radius: 4px;
}
.bub--out {
  justify-self: end;
  background: var(--primary-strong);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.bub .ticks { font-style: normal; font-size: .72em; opacity: .85; margin-left: .35em; }

.tag {
  padding: .32rem .65rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  font-size: .72rem;
  color: var(--text-dim);
}
.tag--hl { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

.srow {
  display: flex;
  align-items: center;
  gap: .55rem;
  width: 100%;
  padding: .5rem .7rem;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  font-size: .78rem;
  color: var(--text-dim);
}
.srow i { font-style: normal; color: var(--ok); }
.srow b { color: var(--text); font-weight: 600; }

.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; width: 100%; }
.cal span {
  aspect-ratio: 1;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--stroke);
}
.cal .is-busy { background: var(--stroke); }
.cal .is-hit { background: var(--primary); border-color: var(--primary); }

.slots { display: flex; flex-wrap: wrap; gap: .5rem; }
.slot {
  padding: .45rem .8rem;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: .72rem;
}
.slot--pick { background: var(--primary-strong); border-color: var(--primary-strong); color: #fff; }

.confirm { display: flex; align-items: center; gap: .7rem; }
.confirm__check {
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  font-size: .85rem;
}
.confirm > div { display: grid; line-height: 1.35; }
.confirm strong { font-family: var(--font-display); font-size: .85rem; }
.confirm > div span { font-size: .72rem; color: var(--text-dim); }

.lead { display: flex; align-items: center; gap: .65rem; }
.lead__avatar {
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .7rem;
}
.lead > div { display: grid; line-height: 1.35; }
.lead strong { font-family: var(--font-display); font-size: .82rem; }
.lead > div span { font-size: .72rem; color: var(--text-dim); }

.meter {
  width: 100%;
  height: 8px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--stroke);
  overflow: hidden;
}
.meter span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--primary);
  transition: width .9s ease .35s;
}
.step.is-active .meter span { width: var(--w); }

.fbar {
  display: grid;
  grid-template-columns: 82px 1fr 34px;
  align-items: center;
  gap: .6rem;
  width: 100%;
  font-size: .7rem;
}
.fbar em { font-style: normal; color: var(--text-dim); }
.fbar b { text-align: right; font-family: var(--font-mono); font-weight: 500; font-size: .66rem; }
.fbar__track { height: 8px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.fbar__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 6px;
  background: var(--primary);
  transition: width .8s ease .3s;
}
.step.is-active .fbar__fill { width: var(--w); }

/* scene elements animate in when the step activates */
html.js .step .sa {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .55s ease, transform .55s ease;
}
html.js .step.is-active .sa { opacity: 1; transform: none; }
.step.is-active .d1 { transition-delay: .08s; }
.step.is-active .d2 { transition-delay: .24s; }
.step.is-active .d3 { transition-delay: .4s; }
.step.is-active .d4 { transition-delay: .56s; }
.step.is-active .d5 { transition-delay: .72s; }

/* closing block — "any automation" */
.steps-cta {
  margin-top: clamp(3.5rem, 7vw, 5rem);
  display: grid;
  grid-template-columns: 1fr .9fr;
  gap: clamp(1.6rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.8rem, 4vw, 2.6rem);
  border-radius: var(--radius-lg);
  background: var(--bg-raise);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-soft);
}
.steps-cta h3 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -.01em;
  margin-bottom: .6rem;
}
.steps-cta p { color: var(--text-dim); font-size: .95rem; max-width: 52ch; }
.steps-cta p strong { color: var(--text); font-weight: 600; }
.steps-cta__side { display: grid; gap: 1.2rem; justify-items: start; }
.steps-cta__chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.steps-cta__chips span {
  padding: .4rem .8rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  font-size: .78rem;
  color: var(--text-dim);
}
.steps-cta__chips span:last-child { border-color: var(--primary); color: var(--primary); }

/* ---------- Why / Diferenciais ---------- */
.why {
  display: grid;
  grid-template-columns: minmax(300px, .9fr) 1.1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.why__intro { position: sticky; top: calc(var(--nav-h) + 40px); }
.why__btn { margin-top: 2.2rem; }

.why__rows { display: grid; border-bottom: 1px solid var(--stroke); }
.why__row {
  display: grid;
  grid-template-columns: 3.4rem 1fr auto;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 1.8rem);
  padding: clamp(1.4rem, 2.5vw, 1.8rem) .4rem;
  border-top: 1px solid var(--stroke);
  transition: background .3s;
}
.why__row:hover { background: var(--surface); }
.why__num {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-faint);
  align-self: start;
  line-height: 1.4;
}
.why__row h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 600;
  margin-bottom: .35rem;
}
.why__row p { color: var(--text-dim); font-size: .9rem; max-width: 52ch; }
.why__tile {
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--primary-soft);
}
.why__icon {
  width: 22px; height: 22px;
  fill: none;
  stroke: var(--primary);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: clamp(4rem, 8vw, 6rem);
}
.stat {
  text-align: left;
  padding-top: 1.2rem;
  border-top: 2px solid var(--stroke-strong);
}
.stat__value {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.2vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -.02em;
}
.stat__label { margin-top: .5rem; color: var(--text-faint); font-size: .62rem; }

/* ---------- Contact ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(300px, .95fr) 1.05fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.contact__list {
  list-style: none;
  display: grid;
  gap: .8rem;
  margin-top: 2.4rem;
}
.contact__list li {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.05rem 1.3rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--stroke);
  transition: border-color .3s, background .35s;
}
.contact__list li:hover { border-color: var(--stroke-strong); }
.contact__list svg {
  width: 22px; height: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--primary);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.contact__list strong {
  display: block;
  font-family: var(--font-display);
  font-size: .92rem;
  font-weight: 600;
}
.contact__list span, .contact__list a {
  color: var(--text-dim);
  font-size: .88rem;
}
.contact__list a:hover { color: var(--primary); }

.contact__form {
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 3.5vw, 2.5rem);
  background: var(--bg-raise);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-soft);
}
.contact__form h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
}
.contact__form > p {
  color: var(--text-dim);
  font-size: .92rem;
  margin: .5rem 0 1.8rem;
  max-width: 46ch;
}

.form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.field { position: relative; display: grid; gap: .45rem; }
.field--full { grid-column: 1 / -1; }
.field > span { color: var(--text-faint); font-size: .6rem; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: .85rem 1rem;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  color: var(--text);
  font-family: var(--font-body);
  font-size: .92rem;
  outline: none;
  transition: border-color .25s, box-shadow .25s, background .35s;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.field select { color: var(--text-dim); cursor: pointer; padding-right: 2.4rem; text-overflow: ellipsis; }
.field select option { background: var(--surface-solid); color: var(--text); }
.field:has(select)::after {
  content: '▾';
  position: absolute;
  right: 1rem; bottom: .85rem;
  color: var(--text-faint);
  pointer-events: none;
  font-size: .8rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.field input.is-invalid, .field select.is-invalid, .field textarea.is-invalid {
  border-color: rgba(248, 113, 113, .65);
}

.form__submit { width: 100%; margin-top: 1.4rem; }
.form__status {
  display: block;
  width: 100%;
  text-align: center;
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 500;
  color: var(--primary);
  margin-top: 0;
  min-height: 0;
  opacity: 0;
  visibility: hidden;
  transition: all .25s ease-in-out;
}
.form__status:not(:empty) {
  margin-top: 1.2rem;
  min-height: 1.2em;
  opacity: 1;
  visibility: visible;
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  padding: clamp(4rem, 8vw, 6rem) 0 2rem;
  border-top: 1px solid var(--stroke);
  overflow: hidden;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: clamp(2rem, 5vw, 3rem);
}
.footer__brand p {
  margin-top: 1.1rem;
  color: var(--text-dim);
  font-size: .92rem;
  max-width: 30ch;
}
.footer__col { display: grid; align-content: start; gap: .7rem; }
.footer__col .mono { color: var(--text-faint); margin-bottom: .4rem; font-size: .64rem; }
.footer__col a, .footer__col span {
  color: var(--text-dim);
  font-size: .9rem;
  width: fit-content;
}
.footer__col a { transition: color .25s; }
.footer__col a:hover { color: var(--primary); }

.footer__big {
  margin-top: clamp(3.5rem, 7vw, 5rem);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4rem, 14vw, 12.5rem);
  line-height: .85;
  text-align: center;
  letter-spacing: -.02em;
  white-space: nowrap;
  color: var(--text);
  opacity: .045;
  user-select: none;
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .8rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.6rem;
  border-top: 1px solid var(--stroke);
  color: var(--text-faint);
  font-size: .6rem;
}

/* ---------- Chat widget ---------- */
.chat {
  position: fixed;
  right: clamp(1rem, 3vw, 1.6rem);
  bottom: clamp(1rem, 3vw, 1.6rem);
  z-index: 85;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .9rem;
}

.chat__fab {
  width: 56px; height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-strong);
  color: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform .25s ease, background .25s, box-shadow .25s;
}
.chat__fab:hover { transform: translateY(-2px); background: var(--primary); }
.chat__fab svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  grid-area: 1 / 1;
  transition: opacity .2s, transform .25s;
}
.chat__fab-close { opacity: 0; transform: rotate(-45deg); }
.chat.is-open .chat__fab-open { opacity: 0; transform: rotate(45deg); }
.chat.is-open .chat__fab-close { opacity: 1; transform: rotate(0); }

.chat__panel {
  width: min(360px, calc(100vw - 2rem));
  height: min(480px, 70vh);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: var(--bg-raise);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform-origin: bottom right;
}
.chat__panel[hidden] { display: none; }

.chat__head {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .95rem 1.1rem;
  border-bottom: 1px solid var(--stroke);
  background: var(--surface);
}
.chat__avatar {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--primary-strong);
  color: #fff;
}
.chat__avatar svg { width: 20px; }
.chat__id { display: grid; line-height: 1.3; }
.chat__id strong { font-family: var(--font-display); font-size: .95rem; }
.chat__id span { font-size: .72rem; color: var(--text-dim); }
.chat__close {
  margin-left: auto;
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--text-dim);
  transition: color .2s, background .2s;
}
.chat__close:hover { color: var(--text); background: var(--surface-2); }
.chat__close svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.chat__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  scrollbar-width: thin;
}
.chat__msg {
  max-width: 85%;
  padding: .65rem .9rem;
  border-radius: 14px;
  font-size: .88rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat__msg--bot {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--stroke);
  border-bottom-left-radius: 4px;
  color: var(--text);
}
.chat__msg--user {
  align-self: flex-end;
  background: var(--primary-strong);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat__typing {
  align-self: flex-start;
  display: inline-flex;
  gap: 4px;
  padding: .8rem .95rem;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--stroke);
}
.chat__typing i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
  animation: typing-bounce 1.2s ease-in-out infinite;
}
.chat__typing i:nth-child(2) { animation-delay: .15s; }
.chat__typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.chat__form {
  display: flex;
  gap: .5rem;
  padding: .8rem;
  border-top: 1px solid var(--stroke);
  background: var(--surface);
}
.chat__form input {
  flex: 1;
  padding: .65rem .9rem;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--stroke);
  color: var(--text);
  font-family: var(--font-body);
  font-size: .88rem;
  outline: none;
  transition: border-color .25s;
}
.chat__form input:focus { border-color: var(--primary); }
.chat__form input::placeholder { color: var(--text-faint); }
.chat__form button {
  width: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--primary-strong);
  color: #fff;
  transition: background .2s;
}
.chat__form button:hover { background: var(--primary); }
.chat__form button svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1100px) {
  .bento__speed { grid-column: 1 / 13; grid-row: auto; }
  .bento__eff   { grid-column: 1 / 7; }
  .bento__int   { grid-column: 7 / 13; }
  .bento__prec  { grid-column: 1 / 7; }
  .bento__term  { grid-column: 1 / 13; }
  .bento__prec .target { height: 120px; }
}

@media (max-width: 960px) {
  .nav__links { display: none; }
  .nav__burger { display: block; }
  .nav__cta { display: none; }

  .why { grid-template-columns: 1fr; }
  .why__intro { position: static; }

  .contact { grid-template-columns: 1fr; }

  .footer__grid { grid-template-columns: 1fr 1fr; }

  .step { grid-template-columns: 48px minmax(0, 1fr); row-gap: 1.1rem; }
  .step__node { width: 48px; height: 48px; border-radius: 14px; }
  .step__scene { grid-column: 2; max-width: 420px; }
  .steps__line { left: 23px; }

  .steps-cta { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .bento__eff, .bento__int, .bento__prec { grid-column: 1 / 13; }
  .bento__term { grid-template-columns: 1fr; }

  .stats { grid-template-columns: 1fr 1fr; gap: 2rem 1rem; }
  .form__grid { grid-template-columns: 1fr; }

  .hero__scroll { display: none; }
}

@media (max-width: 560px) {
  .why__row { grid-template-columns: 2.3rem 1fr auto; }
  .why__tile { width: 40px; height: 40px; border-radius: 12px; }
  .why__num { font-size: 1.05rem; }

  .footer__grid { grid-template-columns: 1fr; }
  .footer__legal { flex-direction: column; align-items: center; text-align: center; }
  .hero__cta .btn { width: 100%; }
  .hero__proof { gap: .9rem 1.4rem; }
  .chat__panel { height: min(440px, 62vh); }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .ticker__track { animation: none; }
  html.js [data-intro] { opacity: 1; }
}
