/* Tokens ------------------------------------------------------------ */
:root {
  --bg: #ffffff;
  --mist: #f3f4f7;
  --tile: #ffffff;
  --ink: #14161a;
  --slate: #5c616b;
  --line: #dfe2e8;
  --current: #4a3aff;
  --current-text: #4a3aff;
  --on-current: #ffffff;
  --done: #12905f;
  --nav-bg: rgba(255, 255, 255, 0.78);
  --font: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

.dark {
  --bg: #000000;
  --mist: #15171c;
  --tile: #15171c;
  --ink: #f4f5f7;
  --slate: #a3a8b3;
  --line: #2c2f37;
  --current: #5b4dff;
  --current-text: #a59dff;
  --done: #3dd598;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --mist: #101216;
    --tile: #191b21;
    --ink: #f4f5f7;
    --slate: #a3a8b3;
    --line: #2c2f37;
    --current: #5b4dff;
    --current-text: #a59dff;
    --done: #3dd598;
    --nav-bg: rgba(0, 0, 0, 0.72);
    color-scheme: dark;
  }
}

/* Base -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--current-text); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.wrap-narrow { width: min(720px, 100% - 40px); }

/* Type -------------------------------------------------------------- */
h1, .title {
  font-stretch: 86%;
  font-weight: 600;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
h1 { font-size: clamp(3.25rem, 10vw, 7rem); line-height: 0.98; }
.title { font-size: clamp(2rem, 4.6vw, 3.5rem); line-height: 1.05; text-align: center; max-width: 18em; margin-inline: auto; }
.sub { color: var(--slate); text-align: center; max-width: 34em; margin: 18px auto 0; font-size: 1.1875rem; }
.lede { color: var(--slate); font-size: clamp(1.125rem, 2vw, 1.375rem); line-height: 1.45; max-width: 31em; margin: 28px auto 0; }
.fine { color: var(--slate); font-size: 0.875rem; text-align: center; margin-top: 28px; }

/* Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  border: 0; border-radius: 999px;
  font-weight: 600; font-size: 1rem; text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--current); color: var(--on-current); }
.btn-primary:hover { background: #3a2be0; }
.btn-quiet { background: var(--mist); color: var(--ink); }
.btn-quiet:hover { background: var(--line); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 0.9375rem; }
.btn-block { display: flex; width: 100%; }

/* Nav --------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { width: min(1120px, 100% - 40px); margin-inline: auto; height: 60px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.125rem; letter-spacing: -0.02em; text-decoration: none; }
.brand svg { fill: currentColor; }
.nav-links { display: flex; gap: 28px; margin-inline: auto; }
.nav-links a, .bundle-link { font-size: 0.9375rem; color: var(--slate); text-decoration: none; }
.nav-links a:hover, .bundle-link:hover { color: var(--ink); }
.bundle-link, .nav .btn { white-space: nowrap; }
.nav-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.nav-links + .nav-actions { margin-left: 0; }
.count {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px;
  border-radius: 999px; background: var(--current); color: var(--on-current);
  font-size: 0.75rem; font-weight: 700;
}
.count[hidden] { display: none; }

/* Hero -------------------------------------------------------------- */
.hero { padding: clamp(64px, 11vw, 136px) 0 clamp(56px, 8vw, 96px); text-align: center; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 36px; }

.demo {
  margin-top: clamp(56px, 8vw, 96px);
  background: var(--mist);
  border-radius: 32px;
  padding: clamp(24px, 4vw, 44px);
  text-align: left;
}
.demo-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.demo-head h2 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.015em; }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg); border-radius: 999px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: none; border: 0; background: transparent; cursor: pointer;
  padding: 8px 16px; border-radius: 999px;
  font-size: 0.9375rem; font-weight: 500; color: var(--slate); white-space: nowrap;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.tabs-center { width: fit-content; margin: 36px auto 0; background: var(--mist); }

.flow { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); margin-top: 48px; }
.step { position: relative; padding: 0 10px; text-align: center; }
.step::after {
  content: ""; position: absolute; top: 21px; left: calc(50% + 22px);
  width: calc(100% - 44px); height: 2px; background: var(--line);
  transition: background-color 0.3s;
}
.step:last-child::after { display: none; }
.step[data-state="done"]::after { background: var(--done); }
.dot {
  position: relative; display: grid; place-items: center;
  width: 44px; height: 44px; margin: 0 auto 18px;
  border-radius: 50%; border: 2px solid var(--line); background: var(--tile);
  transition: background-color 0.3s, border-color 0.3s;
}
.dot svg { width: 20px; height: 20px; stroke: #fff; stroke-width: 2.5; fill: none; opacity: 0; transition: opacity 0.2s; }
.step[data-state="running"] .dot { border-color: transparent; }
.step[data-state="running"] .dot::before {
  content: ""; position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--current-text);
  animation: spin 0.7s linear infinite;
}
.step[data-state="done"] .dot { background: var(--done); border-color: var(--done); }
.step[data-state="done"] .dot svg { opacity: 1; }
.step-app, .step-text { display: block; }
.step-app { font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }
.step-text { color: var(--slate); font-size: 0.9375rem; line-height: 1.4; margin-top: 4px; }
.step[data-state="idle"] .step-app, .step[data-state="idle"] .step-text { opacity: 0.55; }
@keyframes spin { to { transform: rotate(360deg); } }

.demo-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); }
.demo-foot p { font-weight: 500; }
.demo-foot .btn-quiet { background: var(--bg); }
.now { color: var(--slate); margin-top: 28px; }

/* Sections ---------------------------------------------------------- */
.section { padding: clamp(72px, 10vw, 136px) 0; background: var(--bg); }
.section-mist { background: var(--mist); }
.dark { background: var(--bg); color: var(--ink); }

/* What we automate */
.examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; margin-top: 48px; }
.example { padding: 24px 0; border-top: 1px solid var(--line); }
.example h3 { font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.015em; }
.example p { color: var(--slate); margin-top: 6px; max-width: 30em; }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 56px; counter-reset: s; }
.steps li { counter-increment: s; background: var(--tile); border-radius: 24px; padding: 28px; }
.steps li::before {
  content: counter(s); display: block;
  font-stretch: 86%; font-weight: 600; font-size: 3rem; line-height: 1; letter-spacing: -0.04em;
  color: var(--current-text); margin-bottom: 28px;
}
.steps h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.015em; }
.steps p { color: var(--slate); font-size: 1rem; margin-top: 8px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 56px; align-items: stretch; }
.plan { display: flex; flex-direction: column; background: var(--mist); border-radius: 28px; padding: 32px; border: 2px solid transparent; }
.plan-featured { border-color: var(--current-text); }
.plan.is-selected { border-color: var(--done); }
.plan h3 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.plan-for { color: var(--slate); margin-top: 4px; }
.price { margin-top: 28px; color: var(--slate); }
.amount { font-stretch: 86%; font-size: 3.25rem; font-weight: 600; letter-spacing: -0.04em; line-height: 1; color: var(--ink); margin-right: 4px; }
.plan ul { margin: 28px 0 32px; display: grid; gap: 12px; }
.plan li { position: relative; padding-left: 26px; font-size: 1rem; line-height: 1.45; }
.plan li::before {
  content: ""; position: absolute; left: 2px; top: 0.4em; width: 12px; height: 7px;
  border-left: 2px solid var(--done); border-bottom: 2px solid var(--done); transform: rotate(-45deg);
}
.plan-btn { margin-top: auto; }
.plan .btn-quiet { background: var(--bg); }
.plan .btn-quiet:hover { background: var(--line); }

/* Bundle */
.bundle { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; margin-top: 56px; align-items: start; }
.addons { display: grid; gap: 10px; }
.addon {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 20px;
  background: var(--tile); border-radius: 20px; padding: 20px 20px 20px 24px;
  border: 2px solid transparent;
}
.addon.is-on { border-color: var(--done); }
.addon h3 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; }
.addon p { color: var(--slate); font-size: 0.9375rem; line-height: 1.4; margin-top: 2px; }
.addon-price { font-weight: 600; white-space: nowrap; }
.addon button {
  min-width: 92px; min-height: 40px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--line); background: transparent; font-weight: 600; font-size: 0.9375rem;
}
.addon button:hover { border-color: var(--slate); }
.addon button[aria-pressed="true"] { background: var(--done); border-color: var(--done); color: #00160d; }

.summary { position: sticky; top: 84px; background: var(--tile); border-radius: 28px; padding: 28px; }
.summary h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 16px; }
.sum-empty { color: var(--slate); margin-bottom: 24px; }
.sum-lines { display: grid; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.sum-line { display: flex; justify-content: space-between; gap: 16px; font-size: 0.9375rem; }
.sum-line span:last-child { white-space: nowrap; }
.sum-line.is-saving { color: var(--done); }
.sum-totals { display: grid; gap: 6px; padding: 16px 0 24px; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; color: var(--slate); }
.sum-total strong { font-stretch: 86%; font-size: 1.75rem; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); }
.sum-remove { border: 0; background: none; padding: 0; color: var(--slate); text-decoration: underline; cursor: pointer; font-size: 0.875rem; }

/* FAQ */
.faq { margin-top: 48px; border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 22px 0; cursor: pointer; list-style: none;
  font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px;
  border-right: 2px solid var(--slate); border-bottom: 2px solid var(--slate);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq details p { color: var(--slate); padding: 0 40px 24px 0; max-width: 38em; }

/* Form */
.form { margin-top: 48px; display: grid; gap: 20px; justify-items: start; }
.form > * { width: 100%; }
.form > .btn { width: auto; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 600; font-size: 0.9375rem; }
.optional { font-weight: 400; color: var(--slate); }
.field input, .field textarea {
  width: 100%; padding: 13px 16px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--tile);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus-visible, .field textarea:focus-visible { outline-offset: 0; border-color: var(--current-text); border-radius: 14px; }
.field [aria-invalid="true"] { border-color: #c8321f; }
::placeholder { color: var(--slate); opacity: 0.75; }
.request { background: var(--tile); border-radius: 18px; padding: 18px 20px; font-size: 0.9375rem; }
.request-title { font-weight: 600; margin-bottom: 4px; }
.request a { display: inline-block; margin-top: 8px; color: var(--current-text); }
.form-msg { font-weight: 500; min-height: 1.55em; }
.form-msg.is-error { color: #c8321f; }
.form-msg.is-ok { color: var(--done); }
@media (prefers-color-scheme: dark) {
  .form-msg.is-error { color: #ff8a7a; }
  .field [aria-invalid="true"] { border-color: #ff8a7a; }
}

/* Footer */
.footer { padding: 40px 0 48px; border-top: 1px solid var(--line); font-size: 0.9375rem; color: var(--slate); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; }
.footer .brand { color: var(--ink); }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-inline: auto; }
.footer nav a { text-decoration: none; }
.footer nav a:hover { color: var(--ink); }

/* 404 */
.lost { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 40px 20px; }
.lost h1 { font-size: clamp(2.5rem, 7vw, 5rem); }
.lost p { color: var(--slate); font-size: 1.1875rem; margin: 24px auto 36px; max-width: 28em; }

/* Responsive -------------------------------------------------------- */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .bundle { grid-template-columns: 1fr; }
  .summary { position: static; }
}

@media (max-width: 720px) {
  .flow { grid-template-columns: 1fr; margin-top: 32px; }
  .step { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 16px; text-align: left; padding: 0 0 26px; }
  .step:last-child { padding-bottom: 0; }
  .step::after { top: 44px; left: 21px; width: 2px; height: calc(100% - 44px); }
  .dot { margin: 0; grid-row: span 2; }
  .step-app { align-self: end; }
  .examples { grid-template-columns: 1fr; }
  .tabs-center { width: auto; }
  .field-row { grid-template-columns: 1fr; }
  .addon { grid-template-columns: minmax(0, 1fr) auto; padding: 18px; }
  .addon-text { grid-column: 1 / -1; }
  .demo { border-radius: 24px; }
}

@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .nav-inner { gap: 10px; width: calc(100% - 28px); }
  .nav-actions { gap: 10px; }
  .nav .btn-small { padding: 0 13px; font-size: 0.875rem; }
  .brand { gap: 7px; font-size: 1.0625rem; }
  .nav .brand svg { display: none; }
  .footer nav { margin-inline: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
