/* ─────────────────────────────────────────────────────────────────────
   TEELS — design tokens + base styles + section styles
   Two themes via [data-theme="dark"] / [data-theme="light"] on <html>.
   ────────────────────────────────────────────────────────────────── */

/* ─── Self-hosted fonts (added during migration) ─────────────────── */
@font-face{font-family:"Space Grotesk";font-style:normal;font-weight:400;font-display:swap;src:url("/fonts/space-grotesk-400.woff2") format("woff2");}
@font-face{font-family:"Space Grotesk";font-style:normal;font-weight:500;font-display:swap;src:url("/fonts/space-grotesk-500.woff2") format("woff2");}
@font-face{font-family:"Space Grotesk";font-style:normal;font-weight:600;font-display:swap;src:url("/fonts/space-grotesk-600.woff2") format("woff2");}
@font-face{font-family:"Space Grotesk";font-style:normal;font-weight:700;font-display:swap;src:url("/fonts/space-grotesk-700.woff2") format("woff2");}
@font-face{font-family:"JetBrains Mono";font-style:normal;font-weight:400;font-display:swap;src:url("/fonts/jetbrains-mono-400.woff2") format("woff2");}
@font-face{font-family:"JetBrains Mono";font-style:normal;font-weight:500;font-display:swap;src:url("/fonts/jetbrains-mono-500.woff2") format("woff2");}

/* ─── Reset + base ───────────────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; }

html,
body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
button { font-family: inherit; }

/* ─── Tokens — DARK (default) ────────────────────────────────────── */
:root,
[data-theme="dark"] {
  --bg:           #0a0d10;
  --surface:      #11161b;
  --surface-2:    #161c22;
  --line:         rgba(255, 255, 255, 0.07);
  --line-strong:  rgba(255, 255, 255, 0.14);
  --text:         #e8ebee;
  --mute:         #7a818a;
  --mute-soft:    #9aa1ab;
  --accent:       #14b8a6;  /* teal */
  --accent-soft:  #0d9488;
  --spark:        #4ade80;  /* emerald — primary brand "energy" tone */
  --spark-rgba-18: rgba(74, 222, 128, 0.18);
  --spark-rgba-25: rgba(74, 222, 128, 0.25);
  --danger:       #ef6a5a;
  --on-spark:     #0a0d10;
  --nav-bg:       rgba(10, 13, 16, 0.78);
  --shadow-card:  none;
  --hairline-pulse: 0 4px 14px rgba(0, 0, 0, 0.45);
}

/* ─── Tokens — LIGHT ─────────────────────────────────────────────── */
[data-theme="light"] {
  --bg:           #f4f5f7;
  --surface:      #ffffff;
  --surface-2:    #fafbfc;
  --line:         rgba(15, 19, 28, 0.08);
  --line-strong:  rgba(15, 19, 28, 0.20);
  --text:         #0f131c;
  --mute:         #6b7280;
  --mute-soft:    #4a5363;
  --accent:       #0f766e;
  --accent-soft:  #14b8a6;
  --spark:        #059669;
  --spark-rgba-18: rgba(5, 150, 105, 0.18);
  --spark-rgba-25: rgba(5, 150, 105, 0.25);
  --danger:       #dc2626;
  --on-spark:     #ffffff;
  --nav-bg:       rgba(244, 245, 247, 0.82);
  --shadow-card:  0 1px 0 rgba(0, 0, 0, 0.02), 0 10px 30px rgba(15, 19, 28, 0.04);
  --hairline-pulse: 0 4px 14px rgba(0, 0, 0, 0.12);
}

/* ─── Typography ─────────────────────────────────────────────────── */
:root {
  --font: "Space Grotesk", "Helvetica Neue", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --pad-x: 56px;
  /* Max content width; sections cap+center to this on wide screens, falling
     back to --pad-x gutters below it. (--pad-x still drops to 24px <720px.) */
  --maxw: 1200px;
  --pad-inline: max(var(--pad-x), calc((100% - var(--maxw)) / 2));
}

@media (max-width: 720px) {
  :root { --pad-x: 24px; }
}

/* ─── Nav ────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--pad-inline);
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__brand {
  display: flex; align-items: center; gap: 10px;
  background: none; border: none; cursor: pointer;
  color: var(--text); font: inherit;
}
.nav__wordmark { font-size: 17px; font-weight: 600; letter-spacing: 0.12em; }
.nav__collapse {
  flex: 1; min-width: 0; margin-left: 36px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav__links { display: flex; gap: 36px; }
.nav__link {
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; font-size: 14px;
  color: var(--mute-soft); text-decoration: none;
}
.nav__link:hover { color: var(--text); }
.nav__link[aria-current="page"] { color: var(--text); }
.nav__right { display: flex; align-items: center; gap: 16px; }
/* Language dropdown — a <details> disclosure; JS only enhances close-on-outside/Escape */
.nav__lang { position: relative; font-family: var(--mono); font-size: 11px; }
.nav__lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 8px; cursor: pointer; list-style: none;
  color: var(--mute); border: 1px solid transparent; border-radius: 6px;
}
.nav__lang-btn::-webkit-details-marker { display: none; }
.nav__lang-btn:hover { color: var(--text); }
.nav__lang[open] .nav__lang-btn { color: var(--text); border-color: var(--line); }
.nav__lang-code { letter-spacing: 0.08em; }
.nav__lang-chevron { width: 10px; height: 10px; transition: transform 0.15s ease; }
.nav__lang[open] .nav__lang-chevron { transform: rotate(180deg); }
.nav__lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 30;
  margin: 0; padding: 6px; min-width: 168px; list-style: none;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--hairline-pulse);
}
.nav__lang-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 6px;
  font-family: var(--font); font-size: 14px;
  color: var(--mute-soft); text-decoration: none;
}
.nav__lang-item:hover { background: var(--surface-2); color: var(--text); }
.nav__lang-item[aria-current="true"] { color: var(--spark); }
.nav__lang-check { width: 12px; flex-shrink: 0; color: var(--spark); font-size: 12px; }

/* Hamburger toggle — hidden on desktop, shown in the mobile breakpoint */
.nav__toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; padding: 0;
  background: transparent; border: 1px solid var(--line-strong);
  border-radius: 8px; cursor: pointer;
}
.nav__toggle-bar {
  display: block; width: 18px; height: 2px; margin: 0 auto;
  background: var(--text); border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav[data-open="true"] .nav__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav[data-open="true"] .nav__toggle-bar:nth-child(2) { opacity: 0; }
.nav[data-open="true"] .nav__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav__toggle { display: flex; }
  .nav__collapse {
    position: absolute; top: 100%; left: 0; right: 0;
    margin-left: 0; padding: 16px var(--pad-inline) 28px;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 20px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: var(--hairline-pulse);
    display: none;
  }
  .nav[data-open="true"] .nav__collapse { display: flex; }
  .nav__links { flex-direction: column; gap: 4px; }
  .nav__link { font-size: 17px; padding: 10px 0; }
  .nav__right { flex-wrap: wrap; gap: 14px; }
  .nav__right .btn { flex: 1; justify-content: center; }
  .nav__lang { width: 100%; font-size: 13px; }
  .nav__lang-btn { justify-content: space-between; width: 100%; }
  .nav__lang-menu { position: static; margin-top: 8px; min-width: 0; box-shadow: none; }
}

/* ─── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: none; cursor: pointer;
  font-family: var(--font);
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.btn:hover { opacity: 0.85; }

.btn--primary {
  background: var(--spark); color: var(--on-spark);
  border-radius: 999px; padding: 14px 26px;
  font-weight: 600; font-size: 15px;
}
.btn--primary-sm {
  background: var(--spark); color: var(--on-spark);
  border-radius: 999px; padding: 10px 18px;
  font-weight: 600; font-size: 13px;
}
.btn--ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 12px 16px;
  font-weight: 500; font-size: 14px;
}
.btn--text-sm {
  background: transparent; color: var(--text);
  border-radius: 999px; padding: 10px 12px;
  font-weight: 600; font-size: 13px;
}
.btn--outline-sm {
  background: transparent; color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 9px 17px;
  font-weight: 600; font-size: 13px;
}

/* ─── Section shell ──────────────────────────────────────────────── */
.section {
  padding: 120px var(--pad-inline);
  border-bottom: 1px solid var(--line);
}
.section--tight { padding: 80px var(--pad-inline); }
.section--hero  { padding: 80px var(--pad-inline) 64px; position: relative; }
.section--stats { padding: 40px var(--pad-inline);
  display: grid; grid-template-columns: repeat(4, 1fr); }

.section-header {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 56px;
  align-items: baseline;
}
.kicker {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.12em;
  color: var(--mute); text-transform: uppercase;
}
.title-l { font-size: 52px; }
.title-m { font-size: 44px; }
.section-header h2 {
  margin: 0; font-size: 44px; font-weight: 500;
  line-height: 1.05; letter-spacing: -0.02em;
  color: var(--text); max-width: 880px;
}

/* ─── Hero ───────────────────────────────────────────────────────── */
.hero { position: relative; }
.hero::before,
.hero::after {
  content: ""; position: absolute; left: var(--pad-inline); right: var(--pad-inline);
  height: 1px; background: var(--line);
}
.hero::before { top: 0; }
.hero::after  { bottom: 0; }
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 64px; align-items: end;
}
.hero__eyebrow {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; color: var(--mute);
  text-transform: uppercase;
}
.hero__eyebrow .dot { color: var(--spark); }
.hero__title {
  margin: 24px 0 0;
  font-size: 92px; line-height: 0.95; font-weight: 500;
  letter-spacing: -0.035em; color: var(--text); white-space: pre-line;
}
.hero__sub {
  margin: 32px 0 0;
  font-size: 19px; line-height: 1.45;
  color: var(--mute-soft); max-width: 560px;
}
.hero__cta-row { margin-top: 36px; display: flex; align-items: center; gap: 20px; }
.hero__cta-note { margin-top: 16px; font-family: var(--mono); font-size: 12px; color: var(--mute); }

.hero__card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow-card);
}
.hero__card-meta {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 10.5px;
  color: var(--mute); letter-spacing: 0.06em;
}
.hero__card-summary {
  margin-top: 8px; font-family: var(--mono);
  font-size: 11px; color: var(--mute-soft);
}
.hero__card-spark { width: 100%; height: 110px; display: block; }
.hero__card-days {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 9.5px;
  color: var(--mute); margin-top: 4px;
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__title { font-size: 56px; }
}

/* ─── Stats strip ────────────────────────────────────────────────── */
.stat { padding: 8px 32px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat__k {
  font-size: 36px; font-weight: 500;
  letter-spacing: -0.02em; color: var(--text);
}
.stat__v {
  margin-top: 6px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.06em; color: var(--mute);
  text-transform: uppercase;
}

/* ─── Problem ────────────────────────────────────────────────────── */
.problem__grid {
  display: grid; grid-template-columns: 180px 1fr; gap: 56px;
}
.problem__title {
  margin: 0; font-size: 52px; line-height: 1.05;
  font-weight: 500; letter-spacing: -0.025em;
  color: var(--text); max-width: 920px;
}
.problem__body {
  margin-top: 32px; font-size: 18px; line-height: 1.55;
  color: var(--mute-soft); max-width: 780px;
}
.problem__bullets {
  margin-top: 32px; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 16px; max-width: 780px;
}
.problem__bullets li {
  display: flex; gap: 14px; align-items: flex-start;
  font-family: var(--mono); font-size: 12.5px;
  color: var(--mute-soft); letter-spacing: 0.02em;
}
.problem__bullets li::before {
  content: "↳"; color: var(--spark); flex-shrink: 0;
}

/* ─── Feature carousel ───────────────────────────────────────────── */
.feature-carousel {
  display: grid; grid-template-columns: 320px 1fr;
  gap: 32px;
  border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; background: var(--surface);
}
.feature-tabs { border-right: 1px solid var(--line); padding: 8px 0; }
.feature-tab {
  display: block; width: 100%; text-align: left;
  padding: 18px 24px;
  border: none; background: transparent;
  border-left: 2px solid transparent;
  color: var(--mute-soft); cursor: pointer;
  font-family: var(--font); transition: background 0.15s;
}
.feature-tab[aria-selected="true"] {
  background: var(--surface-2);
  border-left-color: var(--spark);
  color: var(--text);
}
.feature-tab__n {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.12em; color: var(--mute);
}
.feature-tab__name { margin-top: 4px; font-size: 15px; font-weight: 500; }
.feature-panel { padding: 36px 40px 36px 8px; min-height: 480px;
  display: flex; flex-direction: column; }
.feature-panel__meta {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em; color: var(--mute);
}
.feature-panel__title {
  margin: 14px 0 12px;
  font-size: 32px; font-weight: 500; letter-spacing: -0.02em;
  color: var(--text);
}
.feature-panel__desc { margin: 0; font-size: 15px; line-height: 1.55;
  color: var(--mute-soft); max-width: 460px; }
.feature-panel__preview {
  margin-top: 28px; flex: 1; min-height: 280px;
}
.feature-panel__preview canvas,
.feature-panel__preview img {
  width: 100%; height: 360px; display: block;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.feature-panel__preview img { object-fit: contain; }
.feature-panel__preview [hidden] { display: none; }

/* ─── Pipeline (4 steps) ─────────────────────────────────────────── */
.pipeline {
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; background: var(--surface);
}
.pipeline__rail {
  position: absolute; top: 64px; left: 6%; right: 6%;
  height: 1px; background: var(--line);
}
.pipeline__rail-fill {
  position: absolute; top: 64px; left: 6%;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--spark));
  transition: width 0.6s cubic-bezier(.6, .2, .3, 1);
}
.pipeline__step {
  position: relative; padding: 32px 24px 28px;
  min-height: 200px;
}
.pipeline__step + .pipeline__step { border-left: 1px solid var(--line); }
.pipeline__n {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em; color: var(--mute);
  transition: color 0.3s;
}
.pipeline__step[aria-current="step"] .pipeline__n { color: var(--spark); }
.pipeline__dot-wrap {
  position: relative; height: 28px; margin-top: 12px;
}
.pipeline__dot {
  position: absolute; top: 8px; left: 50%;
  transform: translate(-50%, -50%);
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  transition: all 0.3s ease;
}
.pipeline__step[aria-current="step"] .pipeline__dot {
  width: 14px; height: 14px;
  background: var(--spark); border-color: var(--spark);
  box-shadow: 0 0 0 4px var(--spark-rgba-18);
}
.pipeline__step[data-past="true"] .pipeline__dot {
  background: var(--accent); border-color: var(--accent);
}
.pipeline__name {
  margin-top: 24px; font-size: 17px; font-weight: 500;
  color: var(--text);
}
.pipeline__desc {
  margin-top: 8px; font-size: 13.5px; line-height: 1.45;
  color: var(--mute-soft);
}

@media (max-width: 720px) {
  .pipeline { grid-template-columns: 1fr; }
  .pipeline__rail, .pipeline__rail-fill { display: none; }
  .pipeline__step + .pipeline__step {
    border-left: none; border-top: 1px solid var(--line);
  }
}

/* ─── Before / After slider ──────────────────────────────────────── */
.ba {
  position: relative; width: 100%; height: 480px;
  border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: ew-resize; user-select: none;
}
.ba__after, .ba__before { position: absolute; inset: 0; }
.ba__before { background: var(--bg); /* clip-path set in JS */ }
.ba__label {
  position: absolute; top: 24px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.ba__label-after  { right: 28px; color: var(--spark); }
.ba__label-before { left: 28px; color: var(--danger); }
.ba__label .dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 4px; margin-right: 8px;
}
.ba__label-after  .dot { background: var(--spark); }
.ba__label-before .dot { background: var(--danger); }
.ba__divider {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; background: var(--spark);
}
.ba__handle {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--spark);
  display: flex; align-items: center; justify-content: center;
  color: var(--spark); font-family: var(--mono); font-size: 14px;
  box-shadow: var(--hairline-pulse);
}
.ba__after-img { width: 100%; height: 100%; display: block; object-fit: cover; }

.ba__csv {
  position: absolute; inset: 0;
  padding: 70px 28px 28px; overflow: hidden;
  font-family: var(--mono); font-size: 10.5px;
  color: var(--mute-soft); line-height: 1.55;
}
.ba__csv-header,
.ba__csv-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.ba__csv-header {
  color: var(--text); font-size: 10px;
  padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.ba__csv-row { border-bottom: 1px solid var(--line); }
.ba__csv-cell {
  padding: 2px 4px; overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis;
}

/* ─── Use cases ──────────────────────────────────────────────────── */
.cases__grid {
  margin-top: 56px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
}
.case {
  padding: 28px 28px 32px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface);
}
.case__head { display: flex; justify-content: space-between; align-items: center; }
.case__who { font-size: 22px; font-weight: 500; color: var(--text); }
.case__n   { font-family: var(--mono); font-size: 11px; color: var(--mute); }
.case__use { margin-top: 14px; font-size: 15px; line-height: 1.55; color: var(--mute-soft); }

/* ─── Big CTA ────────────────────────────────────────────────────── */
.bigcta { padding: 140px var(--pad-inline); border-bottom: 1px solid var(--line); }
.bigcta__title {
  margin: 0; font-size: 72px; line-height: 1; font-weight: 500;
  letter-spacing: -0.03em; color: var(--text); max-width: 920px;
}
.bigcta__sub {
  margin-top: 24px; font-size: 19px; line-height: 1.5;
  color: var(--mute-soft); max-width: 560px;
}
.bigcta__row {
  margin-top: 36px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.bigcta__mail {
  font-family: var(--mono); font-size: 13px;
  color: var(--mute-soft);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
}
.bigcta__note {
  margin-top: 28px; padding-top: 20px;
  border-top: 1px dashed var(--line);
  max-width: 520px;
  display: flex; gap: 14px; align-items: flex-start;
}
.bigcta__note-label {
  font-family: var(--mono); font-size: 11px;
  color: var(--spark); letter-spacing: 0.08em;
  flex-shrink: 0; padding-top: 2px;
}
.bigcta__note-text {
  font-size: 14px; line-height: 1.5;
  color: var(--mute-soft); font-style: italic;
}

/* ─── Footer ─────────────────────────────────────────────────────── */
.footer {
  padding: 56px var(--pad-inline) 32px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  border-top: 1px solid var(--line);
}
.footer__brand { display: flex; align-items: center; gap: 10px; }
.footer__wordmark { font-size: 14px; letter-spacing: 0.12em; color: var(--text); }
.footer__tag { margin-top: 14px; font-size: 14px; color: var(--mute-soft); max-width: 280px; }
.footer__made {
  margin-top: 20px;
  font-family: var(--mono); font-size: 11px;
  color: var(--mute); letter-spacing: 0.08em;
}
.footer__col {
  font-family: var(--font); font-size: 13.5px;
  color: var(--mute-soft); line-height: 1.9;
}
.footer__col-h {
  color: var(--text); font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; margin-bottom: 10px;
}
.footer__col a { color: var(--mute-soft); text-decoration: none; }
.footer__col a:hover { color: var(--text); }

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

/* ─── Inner pages: Features/Pricing/About ────────────────────────── */
.page-hero { padding: 120px var(--pad-inline) 60px; border-bottom: 1px solid var(--line); }
.page-hero__path {
  font-family: var(--mono); font-size: 11px;
  color: var(--mute); letter-spacing: 0.12em;
  text-transform: uppercase;
}
.page-hero__title {
  margin: 24px 0 0; font-size: 72px;
  line-height: 0.95; font-weight: 500;
  letter-spacing: -0.03em; color: var(--text); max-width: 900px;
}
.page-hero__sub { margin-top: 24px; font-size: 19px; color: var(--mute-soft); max-width: 620px; }

/* Features page */
.feat-cats {
  padding: 80px var(--pad-inline);
  display: flex; flex-direction: column; gap: 64px;
}
.feat-cat__head {
  display: flex; align-items: baseline; gap: 16px;
  padding-bottom: 20px; margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.feat-cat__n {
  font-family: var(--mono); font-size: 11px;
  color: var(--mute); letter-spacing: 0.1em; text-transform: uppercase;
}
.feat-cat__label { margin: 0; font-size: 28px; font-weight: 500; color: var(--text); }
.feat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feat-card {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 24px; background: var(--surface);
}
.feat-card__name { font-size: 17px; font-weight: 500; color: var(--text); }
.feat-card__desc { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--mute-soft); }

@media (max-width: 900px) {
  .feat-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .feat-cards { grid-template-columns: 1fr; }
}

/* Pricing */
.tiers {
  padding: 64px var(--pad-inline);
  /* auto-fit, so adding or dropping a tier needs no CSS change */
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px;
}
.tier {
  position: relative; min-height: 460px;
  padding: 32px 28px 36px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface);
}
.tier--featured {
  background: var(--surface-2);
  border-color: var(--spark);
  box-shadow: 0 0 0 1px var(--spark);
}
.tier__badge {
  position: absolute; top: -10px; left: 28px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.06em;
  background: var(--surface);
  color: var(--mute-soft);
  padding: 3px 10px; border-radius: 4px;
  border: 1px solid var(--line);
}
.tier__name { font-size: 22px; font-weight: 500; color: var(--text); }
.tier__for { margin-top: 8px; font-size: 14px; color: var(--mute-soft); min-height: 22px; }
.tier__price-row { margin-top: 28px; display: flex; align-items: baseline; gap: 10px; min-height: 48px; }
.tier__pre { font-family: var(--mono); font-size: 12px; color: var(--mute); }
.tier__price { font-size: 48px; font-weight: 500; color: var(--text); letter-spacing: -0.02em; }
.tier__price--quote { font-size: 28px; color: var(--mute-soft); }
.tier__per { font-family: var(--mono); font-size: 12px; color: var(--mute); }
.tier__billed { font-family: var(--mono); font-size: 11px; color: var(--mute); margin-top: 6px; }
.tier__cta {
  display: block; box-sizing: border-box;
  margin-top: 24px; width: 100%;
  padding: 12px 16px; border-radius: 8px;
  font-family: var(--font); font-weight: 500; font-size: 14px;
  text-align: center; text-decoration: none;
  cursor: pointer;
}
.tier__cta:hover { opacity: 0.85; }
.tier--featured .tier__cta {
  background: var(--spark); color: var(--on-spark); border: none;
}
.tier:not(.tier--featured) .tier__cta {
  background: transparent; color: var(--text);
  border: 1px solid var(--line-strong);
}
.tier__items { margin: 28px 0 0; padding: 0; list-style: none; }
.tier__items li {
  padding: 10px 0; border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--mute-soft);
  display: flex; gap: 10px;
}
.tier__items li::before { content: "✓"; color: var(--accent); }
.tier--featured .tier__items li::before { color: var(--spark); }

/* Modules */
.modules {
  padding: 0 var(--pad-inline) 72px;
}
.modules__title { font-size: 22px; font-weight: 500; color: var(--text); }
.modules__sub { margin: 8px 0 28px; font-size: 14px; color: var(--mute-soft); max-width: 640px; }
.modules__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.module-card {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 24px; background: var(--surface);
}
.module-card__name { font-size: 17px; font-weight: 500; color: var(--text); }
.module-card__price { margin-top: 10px; font-size: 24px; font-weight: 500; color: var(--text); letter-spacing: -0.01em; }
.module-card__price span { font-family: var(--mono); font-size: 11px; color: var(--mute); }
.module-card__desc { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--mute-soft); }

/* Feature matrix */
.matrix { padding: 0 var(--pad-inline) 64px; }
.matrix__title { font-size: 22px; font-weight: 500; color: var(--text); }
.matrix__sub { margin: 8px 0 28px; font-size: 14px; color: var(--mute-soft); max-width: 640px; }
.matrix__scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.matrix__table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 14px; }
.matrix__table th, .matrix__table td { padding: 12px 16px; text-align: center; vertical-align: middle; }
.matrix__table thead th {
  font-weight: 500; color: var(--text);
  border-bottom: 1px solid var(--line-strong);
}
.matrix__feat {
  text-align: left; font-weight: 400; color: var(--text);
  max-width: 340px;
}
.matrix__grouprow th {
  text-align: left; padding: 12px 16px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--mute); background: var(--surface-2);
  border-top: 1px solid var(--line);
}
.matrix__note {
  text-transform: none; letter-spacing: 0;
  font-family: var(--font); color: var(--mute);
}
.matrix__table tbody tr:not(.matrix__grouprow) { border-top: 1px solid var(--line); }
.cell { font-weight: 500; }
.cell--yes { color: var(--spark); }
.cell--add { color: var(--accent); }
.cell--off { color: var(--mute); opacity: 0.55; }
.cell--txt { color: var(--mute-soft); font-size: 13px; }
.matrix__legend {
  display: flex; flex-wrap: wrap; gap: 20px;
  margin-top: 16px; font-family: var(--mono); font-size: 12px; color: var(--mute-soft);
}
.matrix__legend .cell { margin-right: 5px; }

@media (max-width: 900px) {
  .tiers { grid-template-columns: 1fr; }
  .modules__grid { grid-template-columns: 1fr; }
}

/* About */
.about-blocks {
  padding: 80px var(--pad-inline);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px;
}
.about-block__h {
  font-family: var(--mono); font-size: 11px;
  color: var(--spark); letter-spacing: 0.12em;
  text-transform: uppercase;
}
.about-block__b { margin-top: 16px; font-size: 16px; line-height: 1.55; color: var(--mute-soft); }

/* Founders strip — sits above the three story columns */
.about-team { padding: 56px var(--pad-inline); border-bottom: 1px solid var(--line); }
.about-team__label {
  font-family: var(--mono); font-size: 11px;
  color: var(--spark); letter-spacing: 0.12em;
  text-transform: uppercase;
}
.team-grid {
  margin-top: 28px; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px;
}
.team-grid__item {
  display: flex; flex-direction: column; gap: 6px;
  padding-top: 16px; border-top: 1px solid var(--line-strong);
}
.team-grid__name { font-size: 17px; color: var(--text); font-weight: 500; }
.team-grid__role { font-family: var(--mono); font-size: 11px; color: var(--mute); }
.about-contact-row {
  padding: 40px var(--pad-inline) 120px;
  border-top: 1px solid var(--line);
}
.about-contact-row__text {
  font-size: 28px; color: var(--text); font-weight: 500; max-width: 720px;
}
.about-thanks { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); }
.about-thanks__label {
  font-family: var(--mono); font-size: 11px;
  color: var(--spark); letter-spacing: 0.12em;
  text-transform: uppercase;
}
.about-thanks__intro {
  margin-top: 18px; max-width: 620px;
  font-size: 20px; line-height: 1.5; color: var(--mute-soft);
}
.about-thanks__chips {
  margin-top: 28px; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.about-thanks__chip {
  padding: 8px 16px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 14px; color: var(--text); background: transparent;
}

@media (max-width: 900px) {
  .about-blocks { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
}

/* ─── Two-path cards (used by the 404 page) ──────────────────────── */
.demo-paths {
  /* Full-bleed padding aligns the left edge with the page hero; the columns are
     capped and packed left so the two cards don't stretch the whole width.
     (Do NOT add max-width here — it fights var(--pad-inline) under border-box.) */
  padding: 16px var(--pad-inline) 48px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 380px));
  justify-content: start; gap: 24px;
}
.demo-path {
  display: flex; flex-direction: column; align-items: flex-start; gap: 18px;
  padding: 28px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface);
}
.demo-path__note { margin: 0; flex: 1; font-size: 15px; line-height: 1.5; color: var(--mute-soft); }
.demo-path .btn { width: 100%; justify-content: center; }
@media (max-width: 640px) {
  .demo-paths { grid-template-columns: 1fr; gap: 28px; }
}

/* ─── Logo SVG colors via currentColor not needed — we set fill in markup */

/* ─── Theme toggle button (added during migration) ───────────────── */
.nav__theme {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: transparent; color: var(--mute); cursor: pointer;
  transition: color .15s, border-color .15s;
}
.nav__theme:hover { color: var(--text); border-color: var(--text); }
.nav__theme svg { width: 15px; height: 15px; }

/* ─── Footer copyright line (added during migration) ─────────────── */
.footer__copy {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; color: var(--mute);
  letter-spacing: 0.06em;
}

/* ─── Legal / prose pages (added during migration) ───────────────── */
.legal { padding: 40px var(--pad-inline) 120px; }
.legal__prose { max-width: 760px; }
.legal__prose h2 { font-size: 22px; font-weight: 600; margin: 40px 0 12px; color: var(--text); }
.legal__prose h3 { font-size: 17px; font-weight: 600; margin: 28px 0 10px; color: var(--text); }
.legal__prose p { font-size: 16px; line-height: 1.75; color: var(--mute-soft); margin: 0 0 16px; }
.legal__prose ul, .legal__prose ol { color: var(--mute-soft); font-size: 16px; line-height: 1.75; padding-left: 22px; margin: 0 0 16px; }
.legal__prose li { margin: 4px 0; }
.legal__prose a { color: var(--spark); text-decoration: underline; }
.legal__prose strong { color: var(--text); }
.legal__prose code { font-family: var(--mono); font-size: 0.9em; color: var(--text); }
.legal__updated { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--mute); }

/* ─── FAQ ────────────────────────────────────────────────────────── */
.faq {
  padding: 60px var(--pad-inline) 100px; display: grid; gap: 56px;
  border-bottom: 1px solid var(--line);
}
.faq-group { max-width: 860px; }
.faq-list {
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); box-shadow: var(--shadow-card);
  overflow: hidden;
}
.faq-item + .faq-item { border-top: 1px solid var(--line); }
/* Deep links land under the sticky nav without it covering the question. */
.faq-item { scroll-margin-top: 90px; }
.faq-q {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 22px; cursor: pointer;
  font-size: 16.5px; font-weight: 500; color: var(--text);
  list-style: none;
}
/* The question is an <h3> for document outline; it inherits the row's type. */
.faq-q__text { margin: 0; font-size: inherit; font-weight: inherit; }
.faq-q::-webkit-details-marker { display: none; }
.faq-q:hover { background: var(--surface-2); }
.faq-q:focus-visible { outline: 2px solid var(--spark); outline-offset: -2px; }
.faq-chevron {
  width: 14px; height: 14px; margin-left: auto; flex-shrink: 0;
  color: var(--mute); transition: transform 0.15s ease;
}
.faq-item[open] .faq-chevron { transform: rotate(180deg); }
.faq-a { padding: 0 22px 22px; max-width: 68ch; }
.faq-a p { margin: 0 0 12px; font-size: 15.5px; line-height: 1.7; color: var(--mute-soft); }
.faq-a p:last-child { margin-bottom: 0; }
.faq-a a { color: var(--spark); text-decoration: underline; }
.faq-updated {
  margin: 0; padding-top: 16px; border-top: 1px solid var(--line);
  max-width: 860px; font-size: 14px; color: var(--mute);
}

/* Review aid: marks a question that still needs a decided answer. Renders only
   while a question carries `todo:` in data/*.yaml — currently none do. */
.faq-flag {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--danger);
  border: 1px solid var(--danger); border-radius: 5px; padding: 2px 6px;
}
.faq-open {
  margin: 0; padding: 12px 14px;
  border-left: 2px solid var(--danger); border-radius: 0 6px 6px 0;
  background: var(--surface-2);
  font-family: var(--mono); font-size: 13px; line-height: 1.6; color: var(--mute-soft);
}

/* ─── Logo lockup (theme-aware, added during migration) ──────────── */
.logo { display: block; }
.logo--light { display: none; }
[data-theme="light"] .logo--dark  { display: none; }
[data-theme="light"] .logo--light { display: block; }

/* ─── Skip link (added during a11y pass) ─────────────────────────── */
.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 100;
  padding: 10px 16px; border-radius: 8px;
  background: var(--spark); color: var(--on-spark);
  font-family: var(--font); font-size: 14px; font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 8px; }

/* ─── Responsive refinements (tablet + phone) ────────────────────── */
@media (max-width: 820px) {
  /* Feature carousel: stack panel under a horizontal tab strip */
  .feature-carousel { grid-template-columns: 1fr; }
  .feature-tabs {
    border-right: none; border-bottom: 1px solid var(--line);
    display: flex; overflow-x: auto; padding: 0;
  }
  .feature-tab {
    border-left: none; border-bottom: 2px solid transparent;
    white-space: nowrap; padding: 14px 18px;
  }
  .feature-tab[aria-selected="true"] {
    border-left-color: transparent; border-bottom-color: var(--spark);
  }
  .feature-panel { min-height: 0; padding: 28px 20px; }
  .feature-panel__preview { min-height: 0; }
}

@media (max-width: 720px) {
  /* Section rhythm: less vertical air on phones */
  .section { padding: 72px var(--pad-inline); }
  .section--tight { padding: 56px var(--pad-inline); }
  .bigcta { padding: 88px var(--pad-inline); }

  /* Collapse the fixed-sidebar grids to a single column */
  .section-header { grid-template-columns: 1fr; gap: 12px; }
  .problem__grid  { grid-template-columns: 1fr; gap: 16px; }

  /* Type scale-down */
  .section-header h2,
  .title-m { font-size: 32px; }
  .title-l,
  .problem__title { font-size: 34px; }
  .bigcta__title { font-size: 44px; }
  .page-hero__title { font-size: 44px; }
  .page-hero { padding: 80px var(--pad-inline) 48px; }
  .feature-panel__title { font-size: 26px; }

  /* Stats: 2×2, drop the vertical rules */
  .section--stats { grid-template-columns: repeat(2, 1fr); gap: 4px 0; }
  .stat { padding: 16px 0; }
  .stat + .stat { border-left: none; }
  .stat__k { font-size: 30px; }

  /* One-column cards */
  .cases__grid { grid-template-columns: 1fr; }
  .problem__bullets { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero__title { font-size: 44px; }
}

/* ─── Reduced motion ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
