/* ============================= tokens ============================= */
:root {
  /* dark-first: bare :root carries the dark palette (the unstamped
     "system" default matches this app's own dark-first shell) */
  --bg: #0a0908;
  --surface: #141210;
  --surface-2: #1a1613;
  --border: #27231f;
  --border-soft: #201c19;
  --ink: #f7f4f1;
  --ink-dim: #a89f92;
  --ink-faint: #756c60;
  --accent: #fd9117;
  --accent-2: #fbc02d;
  --accent-ink: #17100a;
  --ok: #4ade80;
  --shadow-accent: 0 0 60px -20px rgba(253, 145, 23, 0.35);

  --font-display: "DM Sans", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-mono: "DM Mono", "SFMono-Regular", Consolas, monospace;

  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #faf7f3;
    --surface: #ffffff;
    --surface-2: #f2ece3;
    --border: #e6dcce;
    --border-soft: #ede6da;
    --ink: #211c17;
    --ink-dim: #71675a;
    --ink-faint: #a39a8c;
    --accent: #e07a0e;
    --accent-2: #b9800f;
    --accent-ink: #fffaf3;
    --ok: #16a34a;
    --shadow-accent: 0 0 60px -24px rgba(224, 122, 14, 0.25);
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg: #faf7f3;
  --surface: #ffffff;
  --surface-2: #f2ece3;
  --border: #e6dcce;
  --border-soft: #ede6da;
  --ink: #211c17;
  --ink-dim: #71675a;
  --ink-faint: #a39a8c;
  --accent: #e07a0e;
  --accent-2: #b9800f;
  --accent-ink: #fffaf3;
  --ok: #16a34a;
  --shadow-accent: 0 0 60px -24px rgba(224, 122, 14, 0.25);
  color-scheme: light;
}

/* ============================= reset ============================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ============================= layout ============================= */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 28px; }
.rule { border-top: 1px solid var(--border-soft); }

/* faint diagonal-line motif, echoing the hero backdrop this brand's
   other site uses — kept much quieter here since it sits behind text */
.grid-motif {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(115deg, transparent 0 68px, color-mix(in srgb, var(--accent) 14%, transparent) 68px 69px, transparent 69px 140px);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 75%);
          mask-image: linear-gradient(to bottom, black, transparent 75%);
  opacity: 0.5;
}

/* ============================= nav ============================= */
header.site {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}
.wordmark {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wordmark .dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.nav-links {
  display: flex;
  gap: 24px;
  margin-left: 8px;
  flex: 1;
}
.nav-links a {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-dim);
  transition: color 150ms ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a.accent-link { color: var(--accent); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 18px;
  border-radius: 4px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 70px -18px rgba(253, 145, 23, 0.5); }
.btn-primary:disabled, .btn-primary[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { height: 32px; padding: 0 14px; font-size: 12.5px; }
.btn-lg { height: 46px; padding: 0 26px; font-size: 14.5px; }
.btn-block { width: 100%; }

/* ---- mobile nav: hidden on desktop, this is the whole point of
   keeping it a *separate* panel below the bar rather than trying to
   cram links + two buttons into one row on a phone-width header ---- */
.nav-toggle {
  display: none;
  width: 36px; height: 36px;
  margin-left: auto;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 15px; height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 150ms ease, opacity 150ms ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0 18px;
  border-top: 1px solid var(--border-soft);
}
.nav-mobile.open { display: flex; }
.nav-mobile a.nav-mobile-link {
  padding: 13px 4px;
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--border-soft);
}
.nav-mobile-actions { display: flex; gap: 10px; margin-top: 14px; }
.nav-mobile-actions .btn { flex: 1; }

/* ============================= hero ============================= */
.hero { position: relative; padding: 96px 0 88px; overflow: hidden; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.eyebrow .pulse {
  width: 6px; height: 6px; border-radius: 999px;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 56px;
  margin-top: 28px;
}
@media (min-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); align-items: center; gap: 40px; }
}
h1.headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 5.4vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 18px 0 0;
  text-wrap: balance;
}
h1.headline em {
  font-style: normal;
  color: var(--accent);
}
.lede {
  margin: 20px 0 0;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-dim);
  max-width: 46ch;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.fine-print {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}

/* --- hero mockup: a stylized, drawn app window, not a screenshot --- */
.mockup {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 40px 90px -40px rgba(0,0,0,0.6), var(--shadow-accent);
  overflow: hidden;
  transform: perspective(1400px) rotateY(-4deg) rotateX(1deg);
}
.mockup-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface-2);
}
.mockup-bar span { width: 9px; height: 9px; border-radius: 999px; background: var(--border); }
.mockup-bar .title {
  /* `.mockup-bar span` above (meant only for the 3 traffic-light dots)
     also matches this span and sets width/height: 9px — overridden
     explicitly here rather than relying on flex's `min-width: auto`
     default to paper over it, which is what silently kept this
     readable before and broke the moment truncation needed real
     `min-width: 0` to work on narrow screens. */
  width: auto;
  height: auto;
  margin-left: 8px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
}
.mockup-body { display: grid; grid-template-columns: 148px 1fr; min-height: 260px; }
.mockup-side { border-right: 1px solid var(--border-soft); padding: 14px 10px; background: color-mix(in srgb, var(--surface) 92%, black 4%); }
.mockup-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px; border-radius: 6px; margin-bottom: 4px;
}
.mockup-row.active { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.mockup-row .rdot { width: 6px; height: 6px; border-radius: 999px; background: var(--ink-faint); flex-shrink: 0; }
.mockup-row.active .rdot { background: #4ade80; box-shadow: 0 0 0 2px color-mix(in srgb, #4ade80 25%, transparent); }
.mockup-row .bar { height: 6px; border-radius: 3px; background: var(--border); flex: 1; }
.mockup-row.active .bar { background: color-mix(in srgb, var(--ink) 55%, transparent); }
.mockup-main { padding: 16px 18px; font-family: var(--font-mono); font-size: 11.5px; line-height: 1.9; color: var(--ink-faint); }
.mockup-main .ok { color: #4ade80; }
.mockup-main .warn { color: var(--accent-2); }
.mockup-main .accent { color: var(--accent); }
.mockup-main .in {
  animation: type-in 400ms ease both;
  animation-timeline: view();
}
@keyframes type-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.caret { display: inline-block; width: 6px; height: 12px; background: var(--accent); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ============================= page hero (subpages) ============================= */
.page-hero { padding: 64px 0 40px; }
.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 4.6vw, 42px);
  letter-spacing: -0.02em;
  margin: 12px 0 0;
  text-wrap: balance;
}
.page-hero .lede { margin-top: 14px; }

/* ============================= section shell ============================= */
section { padding: 84px 0; }
.section-head { max-width: 640px; }
.kicker {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
h2.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 3.4vw, 32px);
  letter-spacing: -0.015em;
  margin: 10px 0 0;
  text-wrap: balance;
}
.section-sub { margin: 12px 0 0; color: var(--ink-dim); font-size: 15px; max-width: 54ch; }

/* ---- features: a set, not a sequence — grid with icon marks, no numbers ---- */
.feature-grid {
  display: grid;
  /* 300px min caps this at 3 columns inside the 1120px wrap, so 6 items
     fill two even rows instead of leaving empty trailing cells when a
     4th column briefly fits (that read as blank tan boxes at ~1400px+
     viewports — a real layout bug, not a screenshot artifact). */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1px;
  margin-top: 44px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  overflow: hidden;
}
.feature {
  background: var(--bg);
  padding: 26px 24px;
}
.feature-mark {
  width: 34px; height: 34px;
  border-radius: 7px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}
.feature-mark svg { width: 17px; height: 17px; }
.feature h3 {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  margin: 16px 0 0;
}
.feature p { margin: 8px 0 0; font-size: 13.8px; line-height: 1.6; color: var(--ink-dim); }

/* ---- loaders strip ---- */
.loaders {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px;
}
.loader-chip {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-dim);
}

/* ---- how it works: a real sequence — numbers earn their keep here ---- */
.steps { margin-top: 48px; }
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 26px 0;
  border-top: 1px solid var(--border-soft);
}
.step:last-child { border-bottom: 1px solid var(--border-soft); }
.step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: color-mix(in srgb, var(--ink) 30%, transparent);
  padding-top: 2px;
}
.step h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; margin: 0; }
.step p { margin: 6px 0 0; color: var(--ink-dim); font-size: 14.5px; max-width: 56ch; }

/* ---- final CTA ---- */
.cta-band {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 56px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse 60% 100% at 50% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%);
}
.cta-band h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(24px, 4vw, 34px);
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.cta-band p { color: var(--ink-dim); margin: 12px 0 0; }
.cta-band .cta-row { justify-content: center; margin-top: 26px; }

/* ============================= pricing (premium page) ============================= */
.pricing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-top: 44px;
}
@media (min-width: 760px) {
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.plan-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 32px;
}
@media (min-width: 760px) {
  .plan-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.plan-grid .price-card { padding: 26px 22px; }
.plan-grid .price-amount { font-size: 30px; }
.savings-tag {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ok);
}
.price-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 28px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, var(--surface)), var(--surface) 60%);
  box-shadow: var(--shadow-accent);
  position: relative;
}
.price-card .plan-badge {
  position: absolute;
  top: -12px;
  right: 24px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 11px;
  border-radius: 999px;
}
.price-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  margin: 0;
}
.price-card .price-amount {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 38px;
  letter-spacing: -0.02em;
  margin: 14px 0 0;
}
.price-card .price-amount .unit { font-size: 14px; font-weight: 500; color: var(--ink-dim); margin-left: 4px; }
.price-card .price-desc { color: var(--ink-dim); font-size: 13.8px; margin: 8px 0 0; min-height: 40px; }
.price-features {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
  flex: 1;
}
.price-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.8px;
  color: var(--ink);
}
.price-features li.dim { color: var(--ink-faint); }
.price-features .check {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--ok) 16%, transparent);
  color: var(--ok);
  font-size: 11px;
  margin-top: 1px;
}
.price-features li.dim .check {
  background: color-mix(in srgb, var(--ink-faint) 14%, transparent);
  color: var(--ink-faint);
}
.price-card .btn { margin-top: 26px; }
.price-note {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-faint);
  text-align: center;
}

.status-banner {
  margin-top: 28px;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  font-size: 13.5px;
  color: var(--ink-dim);
  display: flex;
  align-items: center;
  gap: 10px;
}
.status-banner strong { color: var(--ink); }

.roadmap-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid color-mix(in srgb, var(--accent-2) 40%, var(--border));
  border-radius: 999px;
  padding: 2px 8px;
  vertical-align: middle;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 13.5px;
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
  z-index: 50;
  max-width: calc(100vw - 40px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

/* ============================= legal / prose pages ============================= */
.prose { max-width: 720px; }
.prose h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin: 40px 0 12px;
  letter-spacing: -0.01em;
}
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-dim); font-size: 15px; line-height: 1.75; }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--ink); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.updated-badge {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
}

/* ============================= footer ============================= */
footer.site {
  border-top: 1px solid var(--border-soft);
  padding: 48px 0 36px;
}
.footer-grid {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px;
  padding-bottom: 28px;
}
.footer-tagline { color: var(--ink-faint); font-size: 13px; margin-top: 8px; max-width: 32ch; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a {
  font-size: 12.5px; color: var(--ink-dim); text-decoration: none;
  letter-spacing: 0.03em;
}
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding-top: 22px; border-top: 1px solid var(--border-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-faint);
}
.footer-bottom a { color: var(--ink-faint); text-decoration: underline; text-underline-offset: 2px; }
.footer-bottom a:hover { color: var(--accent); }

::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

/* ============================= mobile ============================= */
@media (max-width: 760px) {
  .wrap, .wrap-narrow { padding: 0 18px; }

  /* the actual "navbar must be separate" fix: links + both buttons
     drop out of the bar entirely below this width, replaced by one
     toggle button that reveals them as their own panel underneath —
     not squeezed into the same row as the wordmark. */
  .nav { gap: 12px; }
  .nav-links, .nav > .btn { display: none; }
  .nav-toggle { display: flex; }

  .hero { padding: 48px 0 40px; }
  .hero-grid { gap: 40px; }
  .lede { max-width: none; }
  .mockup { transform: none; }
  .mockup-body { grid-template-columns: 108px 1fr; min-height: 0; }
  .mockup-main { padding: 14px; font-size: 11px; line-height: 1.8; }

  section { padding: 56px 0; }
  .cta-band { padding: 40px 22px; }

  .footer-grid { flex-direction: column; }
}

@media (max-width: 460px) {
  /* the sidebar mockup is decorative — at this width it's cramped
     enough to hurt more than it helps, so it goes and the console
     output (the part that actually says something) gets the room. */
  .mockup-body { grid-template-columns: 1fr; }
  .mockup-side { display: none; }
}
