/* ══════════════════════════════════════════════════
   RunLine — Design tokens
   ══════════════════════════════════════════════════ */
:root {
  --cream:     #F6F4EF;
  --fog:       #E8EEF7;
  --ink:       #0B1A38;
  --ink-deep:  #081228;
  --signal:    #1E6BFF;
  --sky:       #7FB8FF;

  --bg:        var(--cream);
  --bg-alt:    var(--fog);
  --fg:        var(--ink);
  --muted:     color-mix(in oklab, var(--ink) 58%, transparent);
  --hairline:  color-mix(in oklab, var(--ink) 12%, transparent);
  --accent:    var(--signal);

  --maxw:      1120px;
  --pad:       clamp(20px, 4vw, 40px);

  --f-sans:    "Jost", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --f-mono:    "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;

  --t-fast: 180ms cubic-bezier(.2,.6,.2,1);
  --t-med:  320ms cubic-bezier(.2,.6,.2,1);
}

[data-theme="dark"] {
  --bg:       var(--ink-deep);
  --bg-alt:   #0D1A35;
  --fg:       var(--cream);
  --muted:    color-mix(in oklab, var(--cream) 60%, transparent);
  --hairline: color-mix(in oklab, var(--cream) 16%, transparent);
  --accent:   var(--sky);
}

/* Dark theme — invert logo so it reads on dark bg */
[data-theme="dark"] .nav__logo,
[data-theme="dark"] .hero__logo {
  filter: invert(1) hue-rotate(180deg) brightness(1.1);
}

/* ══════════════════════════════════════════════════
   Reset + base
   ══════════════════════════════════════════════════ */
*,*::before,*::after { box-sizing: border-box; }
html,body { margin:0; padding:0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background var(--t-med), color var(--t-med);
  min-height: 100vh;
  display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: 0; color: inherit; cursor: pointer; }
img,svg { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #fff; }

.mono {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ══════════════════════════════════════════════════
   Buttons
   ══════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 14.5px;
  line-height: 1;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast), filter var(--t-fast);
  border: 1px solid transparent;
  white-space: nowrap;
  letter-spacing: -0.005em;
}
.btn--lg { padding: 15px 26px; font-size: 15.5px; }
.btn--primary {
  background: var(--fg);
  color: var(--bg);
}
.btn--primary:hover { transform: translateY(-1px); filter: brightness(0.92); }
[data-theme="dark"] .btn--primary:hover { filter: brightness(1.1); }

.btn--text {
  color: var(--accent);
  padding-left: 4px; padding-right: 4px;
}
.btn--text:hover { gap: 10px; }

/* ══════════════════════════════════════════════════
   Nav
   ══════════════════════════════════════════════════ */
.nav {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  background: color-mix(in oklab, var(--bg) 75%, transparent);
  border-bottom: 1px solid var(--hairline);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav__menu {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
  font-size: 14.5px;
}
.nav__link {
  color: var(--muted);
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: color var(--t-fast);
  white-space: nowrap;
}
.nav__link:hover { color: var(--fg); }
.nav__link.is-active { color: var(--fg); }
@media (max-width: 560px) {
  .nav__menu { gap: 14px; font-size: 13.5px; }
}

.nav__lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 0;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}
.nav__lang-link {
  color: var(--muted);
  padding: 4px 6px;
  border-radius: 6px;
  transition: color var(--t-fast);
}
.nav__lang-link:hover { color: var(--fg); }
.nav__lang-link.is-active { color: var(--fg); }
.nav__lang-sep { color: var(--hairline); }
@media (max-width: 480px) {
  .nav__inner { gap: 10px; }
  .nav__lang { font-size: 11px; }
  .nav__lang-link { padding: 4px 4px; }
}
.nav__brand {
  display: inline-flex; align-items: center;
  height: 48px;
}
.nav__logo {
  height: 48px; width: auto;
  display: block;
}
@media (min-width: 720px) {
  .nav__brand, .nav__logo { height: 96px; }
}
@media (min-width: 1080px) {
  .nav__brand, .nav__logo { height: 168px; }
}

/* ══════════════════════════════════════════════════
   Hero
   ══════════════════════════════════════════════════ */
.hero {
  padding: clamp(32px, 8vw, 120px) var(--pad) clamp(56px, 10vw, 140px);
  max-width: var(--maxw);
  margin: 0 auto;
  text-align: center;
}
.hero__inner {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__logo {
  width: 100%;
  max-width: var(--logo-max, 640px);
  height: auto;
  margin-bottom: clamp(24px, 4vw, 48px);
}
[data-logo="small"]  { --logo-max: 360px; }
[data-logo="medium"] { --logo-max: 480px; }
[data-logo="large"]  { --logo-max: 640px; }
[data-logo="xlarge"] { --logo-max: 820px; }

.hero__headline {
  font-family: var(--f-sans);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  font-size: clamp(42px, 6.2vw, 80px);
  margin: 0 0 24px;
  text-wrap: balance;
}

.hero__lede {
  font-size: clamp(17px, 1.5vw, 21px);
  color: var(--muted);
  line-height: 1.5;
  max-width: 58ch;
  margin: 0 auto 40px;
  text-wrap: pretty;
  letter-spacing: -0.005em;
}

.hero__actions {
  display: flex; gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 56px;
}

.hero__meta {
  color: var(--muted);
}

/* ══════════════════════════════════════════════════
   Waitlist CTA
   ══════════════════════════════════════════════════ */
.cta {
  background: var(--bg-alt);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: clamp(72px, 10vw, 120px) var(--pad);
}
.cta__inner {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}
.cta__headline {
  font-family: var(--f-sans);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-size: clamp(32px, 4.4vw, 48px);
  margin: 0 0 16px;
  text-wrap: balance;
}
.cta__lede {
  font-size: clamp(16px, 1.3vw, 18px);
  color: var(--muted);
  margin: 0 auto 32px;
  max-width: 48ch;
  line-height: 1.5;
}

.waitlist {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: stretch;
}
.waitlist__field { display: flex; }
.waitlist input {
  font: inherit; color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--hairline);
  padding: 15px 20px;
  border-radius: 999px;
  transition: border-color var(--t-fast);
  width: 100%;
  letter-spacing: -0.005em;
}
.waitlist input::placeholder { color: var(--muted); }
.waitlist input:focus {
  outline: none;
  border-color: var(--fg);
}
.waitlist__note, .waitlist__ok, .waitlist__err {
  grid-column: 1 / -1;
  margin-top: 14px;
  color: var(--muted);
  text-align: center;
}
.waitlist__ok { color: var(--accent); }
.waitlist__err { color: #c0392b; }
.waitlist__note a, .waitlist__err a { color: inherit; text-decoration: underline; }
@media (max-width: 560px) {
  .waitlist { grid-template-columns: 1fr; }
  .waitlist .btn { width: 100%; justify-content: center; }
}

/* ══════════════════════════════════════════════════
   Footer
   ══════════════════════════════════════════════════ */
.foot {
  padding: 28px var(--pad);
  border-top: 1px solid var(--hairline);
}
.foot__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.foot__copy { color: var(--muted); }
.foot__links { display: flex; align-items: center; gap: 24px; }
.foot__links a { color: var(--muted); font-size: 13px; transition: color var(--t-fast); }
.foot__links a:hover { color: var(--fg); }
.foot__social { display: inline-flex; align-items: center; gap: 6px; }
.foot__social svg { opacity: 0.8; }

/* ══════════════════════════════════════════════════
   Tweaks panel
   ══════════════════════════════════════════════════ */
.tweaks {
  position: fixed; right: 20px; bottom: 20px;
  width: 280px; z-index: 60;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: 0 20px 60px -20px color-mix(in oklab, var(--ink) 45%, transparent);
  overflow: hidden;
}
@media (max-width: 560px) {
  .tweaks {
    right: 12px; left: 12px; bottom: 12px;
    width: auto;
  }
}
.tweaks__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
}
.tweaks__x {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--bg-alt);
  font-size: 16px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.tweaks__body { padding: 14px; display: grid; gap: 14px; }
.tweaks__row { display: grid; gap: 6px; }
.tweaks__row select {
  font: inherit; color: var(--fg);
  background: var(--bg-alt);
  border: 1px solid var(--hairline);
  padding: 10px 12px;
  border-radius: 8px;
}
.tweaks__row--toggle { grid-template-columns: 1fr auto; align-items: center; }

/* ══════════════════════════════════════════════════
   FAQ page
   ══════════════════════════════════════════════════ */
.faq {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) var(--pad) clamp(64px, 8vw, 96px);
}
.faq__head {
  margin-bottom: clamp(40px, 5vw, 64px);
  padding-bottom: clamp(32px, 4vw, 48px);
  border-bottom: 1px solid var(--hairline);
}
.faq__eyebrow {
  display: inline-block;
  color: var(--muted);
  margin-bottom: 16px;
}
.faq__title {
  font-size: clamp(36px, 5.4vw, 60px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 0 0 16px;
  text-wrap: balance;
}
.faq__lede {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--muted);
  line-height: 1.55;
  max-width: 56ch;
  margin: 0;
}
.faq__lede a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.faq__group {
  margin-bottom: clamp(56px, 7vw, 88px);
}
.faq__group-title {
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--fg);
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  padding-top: 18px;
}
.faq__group-title::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 56px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}
.faq__group-title .mono {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.14em;
}

.faq__item {
  border-bottom: 1px solid var(--hairline);
}
.faq__item:first-of-type {
  border-top: 1px solid var(--hairline);
}
.faq__item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 32px 18px 0;
  font-size: clamp(15.5px, 1.2vw, 17px);
  font-weight: 500;
  letter-spacing: -0.008em;
  color: var(--fg);
  position: relative;
  transition: color var(--t-fast);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "";
  position: absolute;
  right: 4px; top: 50%;
  width: 12px; height: 12px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  transition: transform var(--t-fast);
  color: var(--muted);
}
.faq__item[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
  color: var(--fg);
}
.faq__item summary:hover { color: var(--accent); }
.faq__a {
  padding: 0 32px 24px 0;
  color: color-mix(in oklab, var(--fg) 80%, var(--muted));
  font-size: 16px;
  line-height: 1.65;
}
.faq__a p { margin: 0; }
.faq__a a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.faq__cta {
  margin-top: clamp(48px, 6vw, 72px);
  padding: clamp(32px, 4vw, 48px);
  background: var(--bg-alt);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  text-align: center;
}
.faq__cta h2 {
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.faq__cta p {
  color: var(--muted);
  margin: 0 0 24px;
}

/* ══════════════════════════════════════════════════
   Privacy page
   ══════════════════════════════════════════════════ */
.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) var(--pad);
}
.legal__eyebrow {
  color: var(--muted);
  display: inline-block;
  margin-bottom: 16px;
}
.legal h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 0 0 8px;
}
.legal__meta { color: var(--muted); margin-bottom: 40px; display: flex; gap: 16px; flex-wrap: wrap; }
.legal h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 48px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}
.legal h2 .mono { display: block; color: var(--muted); margin-bottom: 6px; font-weight: 500; font-size: 11px; }
.legal p, .legal li { font-size: 16px; line-height: 1.65; }
.legal p { color: color-mix(in oklab, var(--fg) 82%, var(--muted)); }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 8px; color: color-mix(in oklab, var(--fg) 82%, var(--muted)); }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.legal__toc {
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 16px 20px;
  margin: 32px 0 48px;
  background: var(--bg-alt);
}
.legal__toc ol { margin: 8px 0 0; padding-left: 24px; }
.legal__toc li { font-size: 14.5px; margin-bottom: 4px; color: var(--fg); }
.legal__toc a { color: var(--fg); text-decoration: none; }
.legal__toc a:hover { color: var(--accent); }
