/* Ralis site. Layout: full-width bands, each with a centered .wrap. The hero pairs the pain headline
   with the offer panel; figures follow as the evidence. Slate neutrals, teal accent, red only for the decline. */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2196-2199, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-latin-var.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2196-2199, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin-var.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  ascent-override: 90.44%;
  descent-override: 22.52%;
  line-gap-override: 0%;
  size-adjust: 107.12%;
}

:root {
  --bg: #F6F8F8;
  --bg-tint: #EAF1F0;
  --surface: #FFFFFF;
  --fg: #0E1A22;
  --muted: #4F5F6B;
  --line: #D8E0E3;
  --accent: #0B7C70;
  --accent-strong: #08655B;
  --accent-fg: #FFFFFF;
  --accent-soft: #DDF2EE;
  --down: #B4232F;
  --error: #B4232F;
  --code-bg: #0F1B24;
  --code-fg: #D7E2E8;
  --code-dim: #8597A3;

  --font-body: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", "Inter Fallback", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --text-xs: .75rem;
  --text-sm: .875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: clamp(1.75rem, 1.25rem + 1.8vw, 2.375rem);
  --text-stat: clamp(2.5rem, 1.9rem + 2.4vw, 3.5rem);
  --text-hero: clamp(2.375rem, 1.35rem + 4.1vw, 3.75rem);

  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 5.5rem;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --measure: 62ch;
  --wrap: 1100px;
  --shadow: 0 20px 44px -28px rgba(5, 20, 30, .45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1218; --bg-tint: #0E1A21; --surface: #111C24; --fg: #E4EBEF; --muted: #9DAEB9; --line: #22313C;
    --accent: #3CCFBB; --accent-strong: #63DCCB; --accent-fg: #04201C; --accent-soft: #0F302C;
    --down: #F58C93; --error: #F58C93; --code-bg: #071016; --shadow: 0 20px 44px -26px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A1218; --bg-tint: #0E1A21; --surface: #111C24; --fg: #E4EBEF; --muted: #9DAEB9; --line: #22313C;
  --accent: #3CCFBB; --accent-strong: #63DCCB; --accent-fg: #04201C; --accent-soft: #0F302C;
  --down: #F58C93; --error: #F58C93; --code-bg: #071016; --shadow: 0 20px 44px -26px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
p, ul, ol, figure, pre, table { margin: 0; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img, svg { max-width: 100%; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 30;
  background: var(--fg); color: var(--bg); padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm); font-weight: 600;
}
.skip-link:focus { top: var(--space-4); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px; padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm); border: 1px solid transparent;
  font: 600 var(--text-base)/1 var(--font-body); text-decoration: none; cursor: pointer;
}
.btn-sm { min-height: 38px; padding: var(--space-2) var(--space-4); font-size: var(--text-sm); }
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { background: var(--accent-strong); color: var(--accent-fg); }
.btn-primary[disabled] { opacity: .65; cursor: progress; }
.btn-secondary { background: var(--surface); color: var(--fg); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--accent); color: var(--fg); }
.btn.is-pending { color: var(--muted); border-style: dashed; cursor: default; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: var(--space-5); padding-block: var(--space-4); }
.brand { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--fg); text-decoration: none; }
.brand:hover { color: var(--fg); }
.brand-mark { width: 32px; height: 32px; flex: none; }
.brand-mark-sm { width: 22px; height: 22px; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: var(--text-xl); letter-spacing: -.01em; }
.nav-primary { margin-left: auto; }
.nav-primary ul { display: flex; gap: var(--space-5); list-style: none; padding: 0; }
.nav-primary a { color: var(--muted); font-size: var(--text-sm); font-weight: 500; text-decoration: none; }
.nav-primary a:hover { color: var(--fg); }
@media (max-width: 760px) {
  .nav-primary { display: none; }
  .nav .btn { margin-left: auto; }
}

/* Hero */
.hero { padding-block: var(--space-8) var(--space-9); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: var(--space-7); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); } .hero { padding-block: var(--space-6) var(--space-8); } }
.eyebrow { font-size: var(--text-sm); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--space-4); }
.hero h1 { font-size: var(--text-hero); letter-spacing: -.025em; line-height: 1.05; margin-bottom: var(--space-5); }
.hero-pain { display: block; font-size: .6em; line-height: 1.2; letter-spacing: -.015em; margin-bottom: .45em; }
.hero-answer { display: block; }
.trust-mark {
  color: var(--accent);
  background: linear-gradient(transparent 64%, var(--accent-soft) 64%);
  padding-inline: .06em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.lede { font-size: var(--text-lg); color: var(--muted); max-width: var(--measure); margin-bottom: var(--space-6); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* Offer panel */
.offer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: var(--space-6); min-width: 0; }
.offer-kicker { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--space-2); }
.offer-title { font-size: var(--text-xl); margin-bottom: var(--space-5); }
.offer-checks { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.offer-checks li { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.check-tag { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.offer-checks strong { font-family: var(--font-display); font-size: var(--text-lg); }
.offer-checks span:last-child { color: var(--muted); font-size: var(--text-sm); }
.offer-foot { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--line); font-weight: 600; font-size: var(--text-sm); }

/* Bands */
.band { padding-block: var(--space-9); border-top: 1px solid var(--line); }
.band-tint { background: var(--bg-tint); }
.band-tint a:not(.btn), .proof-band a:not(.btn), .proof-id { color: var(--accent-strong); }
.band h2 { font-size: var(--text-2xl); max-width: 26ch; margin-bottom: var(--space-4); }
.section-lede { font-size: var(--text-lg); color: var(--muted); max-width: var(--measure); margin-bottom: var(--space-5); }
.section-lede.strong { color: var(--fg); font-weight: 500; }
.band > .wrap > .section-lede:last-of-type { margin-bottom: var(--space-7); }

/* Figures */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); margin-block: var(--space-6); }
@media (max-width: 860px) { .stats { grid-template-columns: minmax(0, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-5); min-width: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.stat-num { font-family: var(--font-display); font-weight: 700; font-size: var(--text-stat); line-height: 1; letter-spacing: -.02em; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat-num > span:not(.arrow):not(.num-down) { font-size: .42em; letter-spacing: 0; }
.arrow { font-size: .6em; vertical-align: .15em; }
.arrow.down, .num-down { color: var(--down); }
.stat figcaption { color: var(--muted); font-size: var(--text-sm); }
.stat figcaption strong { color: var(--fg); font-weight: 600; }
.stat cite { display: block; margin-top: var(--space-2); font-family: var(--font-mono); font-style: normal; font-size: var(--text-xs); color: var(--muted); }
.stat sup a { text-decoration: none; }
.connector { max-width: var(--measure); font-size: var(--text-lg); }
.footnote { margin-top: var(--space-5); font-size: var(--text-xs); color: var(--muted); }

/* Drift and comparison */
.drift-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: var(--space-7); align-items: start; }
@media (max-width: 900px) { .drift-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); } }
.drift-grid .section-lede:last-child { margin-bottom: 0; }
.compare-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.compare { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.compare caption { text-align: left; padding: var(--space-4) var(--space-4) var(--space-2); font-weight: 600; font-family: var(--font-display); font-size: var(--text-base); }
.compare th, .compare td { text-align: left; padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.compare thead th:last-child, .compare td:last-child { color: var(--fg); font-weight: 600; background: var(--accent-soft); }
.compare thead th:last-child { color: var(--accent-strong); }
.compare tbody th { color: var(--muted); font-weight: 500; white-space: nowrap; }
.compare td { color: var(--muted); }

/* Steps */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
@media (max-width: 820px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.step { border-top: 2px solid var(--accent); padding-top: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.step-n { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--accent); }
.step h3 { font-size: var(--text-lg); }
.step p { color: var(--muted); }

/* Proof */
.proof-band { background: var(--bg-tint); border-top: 1px solid var(--line); }
.proof-inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-3) var(--space-6); align-items: center; padding-block: var(--space-6); }
@media (max-width: 760px) { .proof-inner { grid-template-columns: minmax(0, 1fr); } }
.proof-label { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; flex-direction: column; gap: var(--space-1); }
.proof-id { color: var(--accent); letter-spacing: .02em; }
.proof-text { font-family: var(--font-display); font-weight: 600; font-size: var(--text-xl); line-height: 1.3; }
.proof-em { color: var(--down); }
.proof-link { font-weight: 600; font-size: var(--text-sm); white-space: nowrap; }

/* Cards */
.grid-2, .grid-3 { display: grid; gap: var(--space-4); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 820px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-5); min-width: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.card h3 { font-size: var(--text-lg); }
.card p { color: var(--muted); }
.card-accent { border-color: var(--accent); }
.card .card-note { font-size: var(--text-xs); }

/* Products */
.product-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--space-2) var(--space-3); }
.product-head h3 { font-size: var(--text-xl); }
.pill { font-size: var(--text-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: var(--space-1) var(--space-3); border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); white-space: nowrap; }
.feature-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); color: var(--muted); }
.feature-list li { padding-left: 1.4em; position: relative; }
.feature-list li::before { content: "+"; position: absolute; left: 0; font-family: var(--font-mono); color: var(--accent); }
.links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin-top: auto; font-weight: 600; font-size: var(--text-sm); }
.band > .wrap > .links { margin-top: var(--space-5); }
.note { margin-top: var(--space-5); color: var(--muted); font-size: var(--text-sm); max-width: var(--measure); }

/* Code */
.code-card { background: var(--code-bg); border-radius: var(--radius); min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid rgba(255, 255, 255, .08); color: var(--code-dim); font-size: var(--text-sm); }
.code-card pre { padding: var(--space-4); overflow-x: auto; flex: 1; }
.code-card code { font-family: var(--font-mono); font-size: .8125rem; line-height: 1.75; color: var(--code-fg); white-space: pre; }
.code-note { padding: 0 var(--space-4) var(--space-4); color: var(--code-dim); font-size: .8125rem; }
.copy-btn { background: transparent; border: 1px solid rgba(255, 255, 255, .18); color: var(--code-fg); border-radius: var(--radius-sm); padding: var(--space-1) var(--space-3); font: 500 var(--text-xs)/1.4 var(--font-body); cursor: pointer; min-height: 28px; }
.copy-btn:hover { border-color: var(--code-fg); }

/* About */
.founder { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-6); display: flex; gap: var(--space-5); align-items: flex-start; min-width: 0; max-width: 760px; margin-top: var(--space-6); }
.founder-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
@media (max-width: 480px) { .founder { flex-direction: column; } }
.founder-photo { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; flex: none; background: var(--bg-tint); }
.founder-body { display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-start; min-width: 0; }
.founder-role { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.founder-name { font-size: var(--text-xl); }
.founder-facts { list-style: none; padding: 0; color: var(--muted); display: flex; flex-direction: column; gap: var(--space-1); margin-bottom: var(--space-3); }
.founder-facts strong { color: var(--fg); font-weight: 600; }

/* Forms */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.form-card h3 { font-size: var(--text-xl); }
.form-intro { color: var(--muted); margin-top: calc(var(--space-2) * -1); }
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field label { font-weight: 600; font-size: var(--text-sm); }
.optional { color: var(--muted); font-weight: 400; }
.field input:not([type="radio"]):not([type="checkbox"]), .field textarea {
  width: 100%; min-height: 44px; padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--fg); font: var(--text-base)/1.5 var(--font-body);
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--error); }
.field-error { color: var(--error); font-size: var(--text-sm); }
.topic-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.topic-field legend { font-weight: 600; font-size: var(--text-sm); padding: 0; margin-bottom: var(--space-2); }
.topic-options { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.topic-option { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 40px; padding: var(--space-2) var(--space-4) var(--space-2) var(--space-3); border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--fg); font-size: var(--text-sm); font-weight: 500; line-height: 1.2; cursor: pointer; }
.topic-option:hover { border-color: var(--accent); }
.topic-option input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.topic-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.topic-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-card .btn { align-self: flex-start; }
.form-privacy { font-size: var(--text-xs); color: var(--muted); margin-top: calc(var(--space-2) * -1); }
.form-status { font-size: var(--text-sm); color: var(--muted); min-height: 1.4em; }
.form-status.is-error { color: var(--error); }
.form-done { display: flex; flex-direction: column; gap: var(--space-2); }
.form-done h3 { color: var(--accent); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-7); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-4); padding-block: var(--space-6) var(--space-7); font-size: var(--text-sm); color: var(--muted); }
.footer-brand { display: inline-flex; align-items: center; gap: var(--space-2); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); list-style: none; padding: 0; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--fg); }

/* Simple pages: 404 and thanks */
.simple-page { min-height: 70vh; display: grid; place-content: center; justify-items: center; gap: var(--space-4); text-align: center; padding-block: var(--space-8); }
.simple-page h1 { font-size: var(--text-2xl); }
.simple-page p { color: var(--muted); max-width: 46ch; }
