/*
 * WO-115b §2a — REVISED 2026-07-22: founder + CTO did not approve
 * theme-responsive; committing to the fixed premium identity instead (the
 * CTO's original recommendation). The site no longer follows the visitor's
 * OS light/dark preference — every visitor sees the same alternating
 * dark/light section rhythm on the homepage (§3's table), and a single
 * fixed light identity on the legal/contact/pricing pages and the nav/
 * footer chrome. Dashboard theme-responsiveness is unaffected — that's a
 * different app with a different rule.
 *
 * Carries forward the V1 mockup's visual language
 * (docs/design/marketing-mockup/index.html) — serif display type, mono
 * eyebrows, violet accent, ink/paper/surface/line tokens.
 */
:root {
  --ink: #141f3d;
  --violet: #7d6bb0;
  --violet-dim: #6b5a9c;
  --paper: #f8f7fa;
  --surface: #ffffff;
  --line: #e4e1ec;
  --muted: #5b6480;
  --faint: #8a91a6;
  --sage: #4f7c6b;
  --sage-bg: #edf3f0;
  --amber: #b0863f;
  --amber-bg: #faf3e6;

  --display: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Times New Roman', serif;
  --body: ui-sans-serif, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  --measure: 62ch;
  --pad: clamp(20px, 5vw, 40px);
}

/**
 * Homepage section rhythm (WO-115b §3 table). `.tone-dark` reuses the
 * mockup's dark-mode palette as a FIXED look, not an OS-following one.
 * `.tone-light-a` / `.tone-light-b` are the two named soft-neutral shades —
 * "never pure white" — alternated so adjacent light islands (Why Selbi vs.
 * Security+FAQ) don't read as one repeated block.
 */
.tone-dark {
  --ink: #eef0f6;
  --violet: #a695d4;
  --violet-dim: #8e7cc0;
  --paper: #0e1630;
  --surface: #17203f;
  --line: #2a345a;
  --muted: #a2aac4;
  --faint: #7c859f;
  --sage: #7fb79e;
  --sage-bg: #17302a;
  --amber: #d9ac64;
  --amber-bg: #322715;
  background: var(--paper);
  color: var(--ink);
}
.tone-light-a {
  --paper: #fafafb;
  --surface: #ffffff;
  background: var(--paper);
  color: var(--ink);
}
.tone-light-b {
  --paper: #f7f8fc;
  --surface: #ffffff;
  background: var(--paper);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

.page {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-inline: var(--pad);
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  margin: 0;
}
h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(1.55rem, 3.2vw, 2.1rem);
  line-height: 1.16;
  letter-spacing: -0.016em;
  margin: 0 0 16px;
}
h3 {
  font-size: 1.06rem;
  line-height: 1.35;
  margin: 0 0 8px;
}
p {
  margin: 0 0 14px;
}
a {
  color: var(--violet);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--faint);
}
.lede {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: var(--measure);
}

/* ---------------- nav ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 62px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-size: 1.16rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 4px;
}
.nav-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.nav-links a:hover {
  color: var(--ink);
}
@media (max-width: 720px) {
  .nav-links {
    display: none;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 9px 17px;
  border-radius: 7px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--violet-dim);
}
.btn-quiet {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}
.btn-quiet:hover {
  border-color: var(--violet);
}
:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

/* ---------------- hero ---------------- */
.hero {
  padding: clamp(48px, 8vw, 88px) 0 clamp(36px, 6vw, 56px);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}
.hero h1 span {
  color: var(--violet);
}
.hero .lede {
  margin-top: 18px;
}
.hero-cta {
  display: flex;
  gap: 11px;
  margin-top: 26px;
  flex-wrap: wrap;
}
.hero-note {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--faint);
}

/* -------- hero workflow flow (WO-115b §4: motion that teaches) -------- */
.hero-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 4px;
  margin-bottom: 22px;
}
.flow-step {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
}
.flow-arrow {
  color: var(--faint);
  font-size: 0.8rem;
}
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  }
  .hero-flow .flow-step,
  .hero-flow .flow-arrow {
    animation: rise 0.4s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  }
  .hero-flow > *:nth-child(1) {
    animation-delay: 0.02s;
  }
  .hero-flow > *:nth-child(2) {
    animation-delay: 0.08s;
  }
  .hero-flow > *:nth-child(3) {
    animation-delay: 0.14s;
  }
  .hero-flow > *:nth-child(4) {
    animation-delay: 0.2s;
  }
  .hero-flow > *:nth-child(5) {
    animation-delay: 0.26s;
  }
  .hero-flow > *:nth-child(6) {
    animation-delay: 0.32s;
  }
  .hero-flow > *:nth-child(7) {
    animation-delay: 0.38s;
  }
  .hero-flow > *:nth-child(8) {
    animation-delay: 0.44s;
  }
  .hero-flow > *:nth-child(9) {
    animation-delay: 0.5s;
  }
  .hero-flow > *:nth-child(10) {
    animation-delay: 0.56s;
  }
  .hero-flow > *:nth-child(11) {
    animation-delay: 0.62s;
  }
  .card.reveal {
    animation-delay: 0.68s;
  }
  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(9px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* ------------- approval card ------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow:
    0 1px 2px rgba(20, 31, 61, 0.04),
    0 12px 30px -18px rgba(20, 31, 61, 0.22);
}
.card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 17px;
  border-bottom: 1px solid var(--line);
}
.chip {
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 3px 8px;
  border-radius: 5px;
}
.chip-wait {
  background: var(--amber-bg);
  color: var(--amber);
}
.chip-cost {
  margin-left: auto;
  background: var(--sage-bg);
  color: var(--sage);
}
.card-body {
  padding: 17px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.quote {
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.6;
  border-left: 2px solid var(--line);
  padding-left: 13px;
  margin: 0;
}
.quote b {
  color: var(--ink);
  font-weight: 600;
}
.field-label {
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--faint);
}
.diff {
  display: grid;
  gap: 7px;
  margin-top: 7px;
}
.diff-row {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 0.88rem;
}
.diff-tag {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--faint);
  width: 30px;
  flex: none;
}
.diff-old {
  color: var(--faint);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.diff-new {
  color: var(--ink);
  font-weight: 500;
}
.policy {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--sage-bg);
  color: var(--sage);
  border-radius: 7px;
  padding: 9px 12px;
  font-size: 0.84rem;
}
.card-foot {
  display: flex;
  gap: 9px;
  padding: 0 17px 17px;
}
.card-foot .btn {
  flex: 1;
}

/* ---------------- sections ---------------- */
.section {
  padding: clamp(48px, 7vw, 76px) 0;
  border-top: 1px solid var(--line);
}
.section-head {
  max-width: var(--measure);
  margin-bottom: 34px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* comparison (Why Selbi) */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  max-width: 640px;
}
.compare-col {
  background: var(--surface);
}
.compare-col.ours {
  background: color-mix(in srgb, var(--violet) 6%, var(--surface));
}
.compare-head {
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--faint);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.compare-col.ours .compare-head {
  color: var(--violet);
}
.compare-row {
  padding: 13px 16px;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--line);
}
.compare-col > .compare-row:last-child {
  border-bottom: none;
}

/* steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 24px;
}
.step-n {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--violet);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  display: block;
  margin-bottom: 8px;
}
.step p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* what selbi automates */
.automate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.automate-card {
  background: var(--surface);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.automate-card.live {
  background: color-mix(in srgb, var(--violet) 7%, var(--surface));
}
.automate-card b {
  font-size: 0.95rem;
}
.automate-card span {
  font-size: 0.85rem;
  color: var(--faint);
}

.honest {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 28px;
}
@media (max-width: 760px) {
  .honest {
    grid-template-columns: 1fr;
  }
}
.honest ul {
  margin: 8px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.honest li {
  font-size: 0.89rem;
  color: var(--muted);
}

/* product screens (hand-built stand-ins, not screenshots) */
.screens-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.screen-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.screen-card figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 10px;
}
.mini-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.8rem;
  margin-bottom: 6px;
}
.mini-row:last-child {
  margin-bottom: 0;
}
.mini-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}
.mini-dot.amber {
  background: var(--amber);
}
.mini-dot.sage {
  background: var(--sage);
}
.mini-bar-track {
  background: var(--line);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  margin-top: 10px;
}
.mini-bar-fill {
  background: var(--violet);
  height: 100%;
}

/* ---------------- pricing ---------------- */
.region-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--faint);
  margin: 28px 0 12px;
}
.region-label:first-of-type {
  margin-top: 0;
}
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.plan {
  background: var(--surface);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plan.featured {
  background: color-mix(in srgb, var(--violet) 7%, var(--surface));
}
.plan-name {
  display: flex;
  align-items: center;
  gap: 7px;
}
.plan-name b {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
}
.badge {
  font-family: var(--mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--violet);
  border: 1px solid var(--violet);
  border-radius: 4px;
  padding: 2px 6px;
}
.price {
  font-family: var(--display);
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.price small {
  font-family: var(--body);
  font-size: 0.78rem;
  color: var(--faint);
  letter-spacing: 0;
}
.plan ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.plan li {
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.plan li b {
  color: var(--ink);
  font-weight: 600;
}

.table-scroll {
  overflow-x: auto;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 0.88rem;
}
th,
td {
  text-align: left;
  padding: 11px 15px;
  border-bottom: 1px solid var(--line);
}
thead th {
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--faint);
  font-weight: 400;
}
tbody tr:last-child td {
  border-bottom: 0;
}
td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
td.credits {
  font-family: var(--mono);
  color: var(--violet);
  text-align: right;
}
td.zero {
  color: var(--sage);
}

.callout {
  margin-top: 24px;
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--violet);
  background: var(--surface);
  max-width: var(--measure);
}
.callout p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}
.callout p + p {
  margin-top: 8px;
}

/* security */
.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.security-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.security-card p {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}

/* faq — native <details>, zero JS */
.faq-list {
  max-width: var(--measure);
  border-top: 1px solid var(--line);
}
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::before {
  content: '+';
  color: var(--violet);
  margin-right: 10px;
  font-family: var(--mono);
}
.faq-item[open] summary::before {
  content: '–';
}
.faq-item p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------------- footer ---------------- */
.foot {
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
}
.foot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
  align-items: flex-start;
}
.foot-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.foot-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
}
.foot-links a:hover {
  color: var(--ink);
}
.legal {
  font-size: 0.78rem;
  color: var(--faint);
  max-width: 52ch;
  margin: 0;
}

/* simple content pages (legal, contact) — narrower reading measure than the
 * homepage's 1080px `.wrap` */
.legal-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px var(--pad) 72px;
}
.legal-wrap address {
  font-style: normal;
}
.legal-wrap table {
  margin: 12px 0;
}

@media (max-width: 600px) {
  .hero {
    padding-top: 32px;
  }
  .compare {
    grid-template-columns: 1fr;
  }
}
