/* Vestyn marketing site — built on design/tokens.css.
 * Editorial, warm, borders-first. Fraunces display, Inter body, JetBrains Mono
 * for code/secrets/versions. Marketing chrome is vs-*; product-frame shots reuse
 * the app's hd-*/vm-* classes so the site and the apps are visibly one system. */

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  min-height: 100vh; margin: 0; background: var(--bg); color: var(--ink);
  display: flex; flex-direction: column;
  font-family: var(--font-ui); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: color-mix(in oklab, var(--accent) 26%, transparent); }

.vs-wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.vs-wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ── Type ─────────────────────────────────────────────────── */
.vs-display { font-family: var(--font-display); font-optical-sizing: auto; font-weight: 500; letter-spacing: -0.01em; line-height: 1.04; color: var(--ink); }
.vs-mono { font-family: var(--font-mono); }
.vs-eyebrow { font: 600 12px/1 var(--font-ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); display: inline-flex; align-items: center; gap: 8px; }
.vs-lead { font-size: 19px; line-height: 1.6; color: var(--ink-muted); }
.vs-muted { color: var(--ink-muted); }
.vs-faint { color: var(--ink-faint); }

h1.vs-h { font-size: clamp(42px, 6vw, 76px); }
h2.vs-h { font-size: clamp(30px, 3.6vw, 46px); }
h3.vs-h { font-size: clamp(22px, 2.2vw, 28px); }
.vs-h { font-family: var(--font-display); font-optical-sizing: auto; font-weight: 500; letter-spacing: -0.015em; line-height: 1.06; color: var(--ink); margin: 0; }

/* ── Buttons ──────────────────────────────────────────────── */
.vs-btn {
  box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 46px; padding: 0 20px; border-radius: var(--radius-control);
  font: 500 15px/1 var(--font-ui); cursor: pointer; border: 1px solid transparent;
  transition: background var(--duration-state) var(--ease), border-color var(--duration-state) var(--ease), transform var(--duration-state) var(--ease);
  white-space: nowrap;
}
.vs-btn:active { transform: translateY(1px); }
.vs-btn-primary { background: var(--accent); color: var(--on-accent); }
.vs-btn-primary:hover { background: var(--accent-hover); }
.vs-btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.vs-btn-secondary:hover { background: var(--surface-sunken); }
.vs-btn-disabled,
.vs-btn-disabled:hover {
  cursor: not-allowed;
  color: var(--ink-faint);
  background: var(--surface-sunken);
  border-color: var(--line);
  transform: none;
}
.vs-btn-ghost { background: transparent; color: var(--ink); }
.vs-btn-ghost:hover { background: var(--surface-sunken); }
.vs-btn svg { width: 18px; height: 18px; }
.vs-btn-lg { height: 52px; padding: 0 26px; font-size: 16px; }

/* ── Nav ──────────────────────────────────────────────────── */
.vs-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%); border-bottom: 1px solid var(--line); }
.vs-nav { display: flex; align-items: center; gap: 14px; height: 64px; }
.vs-brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 600; font-size: 20px; color: var(--ink); letter-spacing: 0.01em; }
.vs-brandmark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; font: 600 16px/1 var(--font-display); }
.vs-navlinks { display: flex; align-items: center; gap: 4px; margin-left: 18px; }
.vs-navlink { padding: 8px 12px; border-radius: 7px; font: 500 14px/1 var(--font-ui); color: var(--ink-muted); transition: color var(--duration-state) var(--ease), background var(--duration-state) var(--ease); }
.vs-navlink:hover { color: var(--ink); background: var(--surface-sunken); }
.vs-navlink.active { color: var(--ink); }
.vs-nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.vs-iconbtn { width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background var(--duration-state) var(--ease), color var(--duration-state) var(--ease); }
.vs-iconbtn:hover { background: var(--surface-sunken); color: var(--ink); }
.vs-iconbtn svg { width: 18px; height: 18px; }
.vs-iconbtn .moon { display: none; } .vs-iconbtn .sun { display: block; }
[data-mode="dark"] .moon { display: block; }
[data-mode="dark"] .sun { display: none; }
.vs-burger { display: none; }

/* ── Sections ─────────────────────────────────────────────── */
.vs-section { padding: 96px 0; }
.vs-section-sm { padding: 64px 0; }
.vs-sec-head { max-width: 680px; margin-bottom: 48px; }
.vs-sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.vs-sec-head .vs-lead { margin-top: 16px; }
.vs-divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ── Hero ─────────────────────────────────────────────────── */
.vs-hero { position: relative; padding: 72px 0 88px; overflow: hidden; }
.vs-hero-glow { position: absolute; inset: 0; pointer-events: none; z-index: 0; background: linear-gradient(180deg, color-mix(in oklab, var(--surface-sunken) 52%, transparent), transparent 64%); }
.vs-hero .vs-wrap { position: relative; z-index: 1; }
.vs-hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.vs-hero h1 { margin: 18px 0 0; }
.vs-hero .vs-lead { margin-top: 22px; max-width: 540px; }
.vs-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.vs-hero-sub { margin-top: 18px; font: 13px/1.5 var(--font-ui); color: var(--ink-faint); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vs-hero-sub .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-faint); }

/* ── Pills / badges ───────────────────────────────────────── */
.vs-pill { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: 500 12.5px/1 var(--font-ui); color: var(--ink-muted); }
.vs-pill svg { width: 14px; height: 14px; color: var(--accent); }
.vs-tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 6px; background: color-mix(in oklab, var(--accent) 12%, var(--surface-sunken)); color: var(--accent); font: 600 11px/1 var(--font-ui); letter-spacing: 0.03em; text-transform: uppercase; }

/* ── Feature grid ─────────────────────────────────────────── */
.vs-grid { display: grid; gap: 16px; }
.vs-grid > * { min-width: 0; }
.vs-grid-3 { grid-template-columns: repeat(3, 1fr); }
.vs-grid-2 { grid-template-columns: repeat(2, 1fr); }
.vs-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 26px; transition: border-color var(--duration-state) var(--ease); }
.vs-card:hover { border-color: color-mix(in oklab, var(--ink) 16%, var(--line)); }
.vs-card-icon { width: 40px; height: 40px; border-radius: 10px; background: color-mix(in oklab, var(--accent) 12%, var(--surface-sunken)); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.vs-card-icon svg { width: 20px; height: 20px; }
.vs-card h3 { margin: 0 0 7px; font: 600 17px/1.3 var(--font-ui); color: var(--ink); }
.vs-card p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-muted); }

/* ── Steps (how it works) ─────────────────────────────────── */
.vs-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.vs-step { position: relative; padding-top: 18px; border-top: 2px solid var(--line); }
.vs-step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font: 600 13px/1 var(--font-mono); color: var(--accent); }
.vs-step h3 { margin: 12px 0 6px; font: 600 18px/1.3 var(--font-ui); color: var(--ink); }
.vs-step p { margin: 0; font-size: 14.5px; color: var(--ink-muted); }

/* ── Product frame (floating app window) ──────────────────── */
.vs-shot { position: relative; }
.vs-shot .vm-win { width: 100%; }
.vs-shot-float { filter: drop-shadow(0 40px 80px rgb(20 16 12 / 0.28)); }
.vs-shot .vm-row-name, .vs-shot .vm-row-sub { display: block; }
.vs-shot .vm-reveal { white-space: nowrap; }

/* ── Code blocks ──────────────────────────────────────────── */
.vs-code { background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 16px 18px; font: 13px/1.7 var(--font-mono); color: var(--ink); overflow-x: auto; position: relative; }
.vs-code .c { color: var(--ink-faint); }
.vs-code .k { color: var(--accent); }
.vs-code .s { color: var(--ok); }
.vs-codecopy { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.vs-codecopy:hover { color: var(--ink); }
.vs-codecopy svg { width: 15px; height: 15px; }

/* ── Split / prose ────────────────────────────────────────── */
.vs-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.vs-prose { font-size: 16px; line-height: 1.7; color: var(--ink-muted); }
.vs-prose h2 { margin: 40px 0 14px; font: 500 26px/1.2 var(--font-display); color: var(--ink); }
.vs-prose h3 { margin: 28px 0 10px; font: 600 18px/1.3 var(--font-ui); color: var(--ink); }
.vs-prose p { margin: 0 0 16px; }
.vs-prose ul { margin: 0 0 16px; padding-left: 22px; }
.vs-prose li { margin: 0 0 8px; }
.vs-prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.vs-prose strong { color: var(--ink); font-weight: 600; }
.vs-prose code { font-family: var(--font-mono); font-size: 0.88em; background: var(--surface-sunken); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }

/* ── Download cards ───────────────────────────────────────── */
.vs-dl { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-modal); padding: 28px; }
.vs-dl-primary { border-color: color-mix(in oklab, var(--accent) 40%, var(--line)); box-shadow: var(--shadow-pop); }
.vs-dl-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.vs-dl-mark { width: 48px; height: 48px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in oklab, var(--accent) 12%, var(--surface-sunken)); color: var(--accent); }
.vs-dl-mark svg { width: 26px; height: 26px; }
.vs-dl-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 18px 0; font: 13px/1.5 var(--font-ui); color: var(--ink-muted); }
.vs-dl-meta b { color: var(--ink); font-weight: 500; }
.vs-hashrow { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 12px; background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--radius-control); font: 11.5px/1.4 var(--font-mono); color: var(--ink-faint); word-break: break-all; }
.vs-hashrow span { min-width: 0; overflow-wrap: anywhere; }
.vs-hashrow svg { width: 14px; height: 14px; flex: none; color: var(--ok); }

/* ── Stat / trust strip ───────────────────────────────────── */
.vs-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.vs-stat { text-align: center; padding: 8px; }
.vs-stat b { display: block; font: 500 32px/1 var(--font-display); color: var(--ink); margin-bottom: 6px; }
.vs-stat span { font: 13px/1.4 var(--font-ui); color: var(--ink-muted); }

/* ── Tables (changelog/specs) ─────────────────────────────── */
.vs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.vs-table th { text-align: left; font: 600 12px/1 var(--font-ui); text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-faint); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.vs-table td { padding: 12px; border-bottom: 1px solid var(--line); color: var(--ink-muted); vertical-align: top; }
.vs-table td b { color: var(--ink); font-weight: 500; }

/* ── Changelog (multi-product) ────────────────────────────── */
.vs-cl-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.vs-cl-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font: 500 13.5px/1 var(--font-ui); color: var(--ink-muted); cursor: pointer;
  transition: border-color var(--duration-state) var(--ease), color var(--duration-state) var(--ease), background var(--duration-state) var(--ease);
}
.vs-cl-chip:hover { color: var(--ink); border-color: color-mix(in oklab, var(--ink) 18%, var(--line)); }
.vs-cl-chip:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.vs-cl-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--prod, var(--accent)); flex: none; }
.vs-cl-chip .ct { font: 500 12px/1 var(--font-mono); color: var(--ink-faint); }
.vs-cl-chip.active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.vs-cl-chip.active .ct { color: color-mix(in oklab, var(--bg) 70%, transparent); }
.vs-cl-list { position: relative; }
.vs-cl-entry { position: relative; margin-bottom: 16px; }
.vs-cl-entry[hidden] { display: none; }
.vs-cl-card {
  display: block; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-card);
  background: var(--surface); transition: border-color var(--duration-state) var(--ease);
}
a.vs-cl-card:hover { border-color: color-mix(in oklab, var(--ink) 18%, var(--line)); }
a.vs-cl-card:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.vs-cl-accent { display: block; height: 3px; background: var(--prod, var(--accent)); }
.vs-cl-head { display: flex; align-items: center; gap: 13px; padding: 18px 22px 14px; }
.vs-cl-tile {
  width: 38px; height: 38px; border-radius: var(--radius-card); flex: none;
  background: color-mix(in oklab, var(--prod, var(--accent)) 16%, var(--surface-sunken));
  color: var(--prod, var(--accent)); display: inline-flex; align-items: center; justify-content: center;
}
.vs-cl-tile svg { width: 20px; height: 20px; }
.vs-cl-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vs-cl-prod { font: 600 14.5px/1 var(--font-ui); color: var(--ink); }
.vs-cl-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vs-cl-ver { font: 500 12.5px/1 var(--font-mono); color: var(--ink-muted); }
.vs-cl-date {
  margin-left: auto; padding-top: 3px; flex: none; align-self: flex-start; white-space: nowrap;
  font: 500 12.5px/1 var(--font-mono); color: var(--ink-faint);
}
.vs-cl-channel {
  display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 5px;
  font: 600 10px/1 var(--font-ui); letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
}
.vs-cl-channel.stable { background: color-mix(in oklab, var(--ok) 16%, transparent); color: var(--ok); }
.vs-cl-channel.beta { background: color-mix(in oklab, var(--warn) 16%, transparent); color: var(--warn); }
.vs-cl-channel.soon { background: var(--surface-sunken); color: var(--ink-faint); border: 1px solid var(--line); }
.vs-cl-body { display: block; padding: 0 22px 20px 73px; }
.vs-cl-body ul { margin: 0; padding-left: 18px; }
.vs-cl-body li { margin: 4px 0; font-size: 14.5px; line-height: 1.62; color: var(--ink-muted); }
.vs-cl-body li::marker { color: var(--prod, var(--accent)); }
.vs-cl-roadmap { display: block; padding: 4px 22px 20px 73px; }
.vs-cl-roadmap > span { font-size: 14.5px; line-height: 1.62; color: var(--ink-muted); }
.vs-cl-roadmap strong { color: var(--ink); font-weight: 600; }
.vs-cl-empty, .vs-cl-error { padding: 48px 0; text-align: center; color: var(--ink-faint); font-size: 14px; }
.vs-cl-error { color: var(--danger); }
.vs-cl-foot { margin: 28px 0 0; font-size: 13px; text-align: center; color: var(--ink-faint); }
.vs-cl-foot a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ── CTA band ─────────────────────────────────────────────── */
.vs-cta { background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--radius-modal); padding: 56px 40px; text-align: center; }
.vs-cta .vs-hero-cta { justify-content: center; }

/* ── Footer ───────────────────────────────────────────────── */
.vs-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; margin-top: auto; }
.vs-foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.vs-foot-col h4 { margin: 0 0 14px; font: 600 12px/1 var(--font-ui); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); }
.vs-foot-col a { display: block; padding: 5px 0; font: 14px/1.4 var(--font-ui); color: var(--ink-muted); }
.vs-foot-col a:hover { color: var(--ink); }
.vs-foot-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); font: 13px/1.5 var(--font-ui); color: var(--ink-faint); flex-wrap: wrap; }
.vs-foot-brand p { margin: 14px 0 0; font-size: 14px; color: var(--ink-muted); max-width: 280px; }

/* ── Reveal animation ─────────────────────────────────────── */
.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 640ms var(--ease), transform 640ms var(--ease); }
.js [data-reveal].in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: 80ms; }
[data-reveal][data-delay="2"] { transition-delay: 160ms; }
[data-reveal][data-delay="3"] { transition-delay: 240ms; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ── Hero entrance choreography ───────────────────────────── */
@keyframes vs-rise { from { opacity: 0; transform: translateY(28px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes vs-rowin { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.vs-anim .vs-shot { animation: vs-rise 900ms var(--ease) both; }
.vs-anim .vs-shot .vm-row { opacity: 0; animation: vs-rowin 520ms var(--ease) both; }
.vs-anim .vs-shot .vm-row:nth-child(1) { animation-delay: 360ms; }
.vs-anim .vs-shot .vm-row:nth-child(2) { animation-delay: 420ms; }
.vs-anim .vs-shot .vm-row:nth-child(3) { animation-delay: 480ms; }
.vs-anim .vs-shot .vm-row:nth-child(4) { animation-delay: 540ms; }
.vs-anim .vs-shot .vm-row:nth-child(5) { animation-delay: 600ms; }
.vs-anim .vs-shot .vm-row:nth-child(6) { animation-delay: 660ms; }
@media (prefers-reduced-motion: reduce) {
  .vs-anim .vs-shot, .vs-anim .vs-shot .vm-row { animation: none; opacity: 1; }
}

/* ── Page hero (interior pages) ───────────────────────────── */
.vs-pagehero { padding: 64px 0 40px; border-bottom: 1px solid var(--line); }
.vs-pagehero h1 { margin: 14px 0 0; font-size: clamp(34px, 4.4vw, 52px); }
.vs-pagehero .vs-lead { margin-top: 16px; max-width: 620px; }

/* ── 404 ──────────────────────────────────────────────────── */
.vs-404 { min-height: 64vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 18px; padding: 80px 0; }
.vs-404 .code { font: 500 clamp(80px, 14vw, 160px)/0.9 var(--font-display); color: var(--ink); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 920px) {
  .vs-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .vs-grid-3, .vs-steps, .vs-strip { grid-template-columns: 1fr 1fr; }
  .vs-split { grid-template-columns: 1fr; gap: 32px; }
  .vs-foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .vs-wrap, .vs-wrap-narrow { padding: 0 20px; }
  .vs-section { padding: 64px 0; }
  .vs-pagehero { padding: 56px 0 36px; }
  .vs-navlinks { display: none; }
  .vs-navlinks.in-drawer { display: flex; }
  .vs-burger { display: inline-flex; }
  .vs-grid-3, .vs-grid-2, .vs-steps, .vs-strip, .vs-foot-grid { grid-template-columns: 1fr; }
  .vs-cl-filter { margin-bottom: 28px; }
  .vs-cl-chip { flex: 1 1 auto; justify-content: center; }
  .vs-cl-head { align-items: flex-start; flex-wrap: wrap; }
  .vs-cl-date { width: 100%; margin-left: 51px; }
  .vs-cl-body, .vs-cl-roadmap { padding-left: 22px; }
  .vs-dl { padding: 24px; }
  .vs-dl > .vs-btn { width: 100%; }
  .vs-code { white-space: pre-wrap; overflow-wrap: anywhere; }
  .vs-nav.open .vs-navlinks { display: flex; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 24px 18px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .vs-nav { position: relative; }
  .vs-cta { padding: 40px 22px; }
}
