/* Truck Lease Ledger landing — "load ticket on asphalt"
   Tokens match the app palettes in src/lib/theme.tsx (night). */

:root {
  --bg: #14171A;
  --panel: #1F2428;
  --panel-alt: #262C31;
  --rule: #343B41;
  --rule-strong: #4A535B;
  --text: #F4F1E8;
  --dim: #B9B5AA;
  --faint: #9A968C; /* slightly above app faint so small text on panels clears 4.5:1 */
  --amber: #FFB000;
  --on-amber: #14171A;
  --green: #2DBE7A;
  --red: #FF5A4D;
  --focus: #FFD36A;

  --font-head: "Overpass", "Segoe UI", sans-serif;
  --font-body: "Public Sans", "Segoe UI", sans-serif;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 80px;

  --radius: 6px;
  --radius-sm: 4px;
  --tap: 56px;
  --content: 1120px;
  --measure: 38rem;
}

@font-face {
  font-family: "Overpass";
  src: url("/fonts/overpass.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Public Sans";
  src: url("/fonts/public-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

#main, #waitlist, #what-it-does, .section h2, .waitlist h2 {
  scroll-margin-top: 80px;
}
button, input, select { font: inherit; color: inherit; }

a {
  color: var(--text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--amber); }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 100;
  background: var(--amber);
  color: var(--on-amber);
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

.wrap {
  width: min(var(--content), calc(100% - 32px));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(20, 23, 26, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 64px;
  padding-block: 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}
.brand:hover { color: var(--text); }
.brand-mark { flex: none; }
.brand-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-wrap: balance;
}
.header-cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  background: var(--amber);
  color: var(--on-amber);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border-radius: var(--radius);
}
.header-cta:hover { color: var(--on-amber); filter: brightness(1.05); }

/* Hero */
.hero {
  padding: 32px 0 48px;
}
.hero-grid {
  display: grid;
  gap: var(--space-5);
  align-items: start;
}
.eyebrow {
  margin: 0 0 12px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
}
.hero h1 {
  margin: 0 0 16px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2rem, 7vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: 18ch;
}
.hero-lead {
  margin: 0 0 var(--space-4);
  color: var(--dim);
  font-size: 1.0625rem;
  max-width: 36em;
}

/* Waitlist form */
.waitlist {
  background: var(--panel);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: 20px;
  max-width: 28rem;
}
.waitlist h2 {
  margin: 0 0 4px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.waitlist .form-help {
  margin: 0 0 16px;
  color: var(--dim);
  font-size: 0.9375rem;
}
.field { margin-bottom: 14px; }
.field label,
.field .label-text {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 6px;
}
.optional {
  font-weight: 400;
  color: var(--dim);
}
.field input[type="email"],
.field input[type="text"] {
  width: 100%;
  min-height: var(--tap);
  padding: 0 14px;
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  font-size: 1.0625rem;
}
.field input::placeholder { color: var(--faint); }
.field input:hover { border-color: var(--faint); }

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.choice {
  position: relative;
  flex: 1 1 0;
  min-width: 5.5rem;
}
.choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 10px;
  text-align: center;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 0.9375rem;
  font-weight: 500;
}
.choice input:hover + span { border-color: var(--faint); }
.choice input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.choice input:checked + span {
  background: var(--panel-alt);
  border-color: var(--amber);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--amber);
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--tap);
  margin-top: 4px;
  padding: 0 18px;
  background: var(--amber);
  color: var(--on-amber);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}
.submit:hover { filter: brightness(1.05); }
.submit:disabled {
  cursor: wait;
  filter: none;
  opacity: 0.7;
}

.form-status {
  margin: 12px 0 0;
  font-size: 0.9375rem;
  color: var(--dim);
  min-height: 1.5em;
}
.form-status[data-kind="error"] { color: var(--red); }
.form-status[data-kind="ok"] { color: var(--green); }
.form-fine {
  margin: 12px 0 0;
  font-size: 0.8125rem;
  color: var(--dim);
}
.form-fine a { color: var(--text); }

.confirm {
  display: none;
  padding: 8px 0;
}
.confirm h2 {
  margin: 0 0 8px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.confirm p { margin: 0; color: var(--dim); }
.waitlist.is-done .form-fields { display: none; }
.waitlist.is-done .confirm { display: block; }

/* Phone mock */
.device-col { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.device-caption {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--dim);
  text-align: center;
}
.device {
  width: min(100%, 320px);
  background: #0C0E10;
  border: 1px solid var(--rule-strong);
  border-radius: 24px;
  padding: 10px 8px 16px;
}
.device-bar {
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.device-bar span {
  width: 72px;
  height: 6px;
  border-radius: 99px;
  background: var(--rule-strong);
}
.device-screen {
  background: var(--bg);
  border-radius: 16px;
  padding: 14px 12px 16px;
}
.device-label {
  margin: 0 0 4px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
}
.device-title {
  margin: 0 0 12px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}
.owed {
  border: 2px solid var(--amber);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  background: #1A1608;
}
.owed .device-label { margin-bottom: 2px; color: var(--amber); }
.owed-kicker {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.owed-amt {
  margin: 2px 0 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2.75rem;
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.owed p {
  margin: 8px 0 0;
  color: var(--dim);
  font-size: 0.8125rem;
  line-height: 1.4;
}
.owed-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 176, 0, 0.28);
  font-size: 0.75rem;
}
.owed-foot .rec-label {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
.owed-foot .rec-amt {
  color: var(--green);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.flag {
  margin-top: 10px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--red);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.flag-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
}
.flag-top .owed-tag { color: var(--red); font-variant-numeric: tabular-nums; white-space: nowrap; }
.flag-meta {
  margin: 2px 0 6px;
  font-size: 0.6875rem;
  color: var(--dim);
  letter-spacing: 0.02em;
}
.flag-math {
  margin: 0;
  font-size: 0.75rem;
  color: var(--dim);
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

/* Sections */
.section {
  padding: var(--space-6) 0;
  border-top: 1px solid var(--rule);
}
.section h2 {
  margin: 0 0 var(--space-4);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.features {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.feature {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--rule);
}
.feature h3 {
  margin: 0 0 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}
.feature p {
  margin: 0;
  color: var(--dim);
  max-width: 40em;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: var(--space-4) 0 var(--space-5);
  color: var(--dim);
  font-size: 0.875rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: flex-start;
}
.foot-brand {
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--text);
  margin: 0 0 4px;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.foot-links a { color: var(--dim); }
.foot-links a:hover { color: var(--amber); }

/* Privacy page */
.legal {
  padding: var(--space-5) 0 var(--space-6);
  max-width: 40rem;
}
.legal h1 {
  margin: 0 0 8px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  letter-spacing: -0.03em;
}
.legal .updated { margin: 0 0 var(--space-4); color: var(--dim); }
.legal h2 {
  margin: var(--space-4) 0 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.125rem;
}
.legal p, .legal li { color: var(--dim); }
.legal a { color: var(--text); }

@media (min-width: 880px) {
  .hero {
    padding: 72px 0 80px;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 64px;
    align-items: center;
  }
  .features {
    grid-template-columns: 1fr 1fr;
    column-gap: 48px;
    align-items: stretch;
  }
  .feature {
    padding: var(--space-3) 0;
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  .feature:last-child {
    grid-column: 1 / -1;
  }
  .waitlist { max-width: 32rem; }
}

@media (min-width: 1100px) {
  .wrap { width: min(var(--content), calc(100% - 64px)); }
}
