/* kinfleet.com — the v1 landing page, restyled on the v2 design tokens (docs/v2.md §13).
   Asphalt by default; Daylight when the visitor's system is light. The hero, the nav once
   scrolled, the Early Access band and the footer are the road, so they stay asphalt. */

:root {
  color-scheme: dark;
  --canvas: #141517;
  --surface: #1f2124;
  --sunken: #18191b;
  --raised: #292c30;
  --border: #33363b;
  --border-strong: #787d86;
  --text: #f3f3ef;
  --text-2: #b4b7bd;
  --muted: #9a9ea5;
  --primary: #6aa6ff;
  --fill: #2b6fc4;
  --fill-hover: #2f74cf;
  --soft: #16263d;
  --soft-ink: #a9cbff;
  --success: #30d158;
  --shadow: none;

  /* The road: the same in both themes. */
  --road: #1f2124;
  --road-deep: #141517;
  --road-text: #f3f3ef;
  --road-text-2: #b4b7bd;
  --road-line: #33363b;
  --stripe: #f5b400;
  --lane: #f3f3ef;
  --sign-blue: #2b6fc4;
  --sign-yellow: #ffc400;
  --sign-ink: #111111;

  --radius-card: 14px;
  --radius-control: 10px;
  --max-width: 1200px;
  --section-pad: 5rem 1.5rem;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --canvas: #eeeeea;
    --surface: #ffffff;
    --sunken: #e6e6e1;
    --raised: #ffffff;
    --border: #dadad5;
    --border-strong: #7c8087;
    --text: #17181a;
    --text-2: #52555b;
    --muted: #62666c;
    --primary: #175cc8;
    --fill: #175cc8;
    --fill-hover: #134fae;
    --soft: #e6effd;
    --soft-ink: #0f4291;
    --success: #1b8a4b;
    --shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--canvas);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.text-center { text-align: center; }

/* A double yellow centre line: two 2px lines, 2px apart (§13.3). */
.centerline { height: 2px; box-sizing: content-box; border-top: 2px solid var(--stripe); border-bottom: 2px solid var(--stripe); }

/* ─── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 44px; padding: 0 1.4rem; border-radius: var(--radius-control);
  font: 600 1rem/1 inherit; font-family: inherit; cursor: pointer; border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, transform 0.1s; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--fill); color: #fff; }
.btn-primary:hover { background: var(--fill-hover); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-outline:hover { background: var(--sunken); }
.btn-lg { height: 52px; padding: 0 2rem; font-size: 1.05rem; }
/* On the road (hero, nav, Early Access), buttons use the asphalt values in both themes. */
.on-road .btn-primary { background: var(--sign-blue); }
.on-road .btn-outline { color: var(--road-text); border-color: #787d86; }
.on-road .btn-outline:hover { background: rgba(255, 255, 255, 0.06); }

/* ─── Navigation ──────────────────────────────────────────────────────── */
.nav { position: fixed; inset: 0 0 auto; z-index: 1000; color: var(--road-text); transition: background 0.3s; }
.nav .centerline { opacity: 0; transition: opacity 0.3s; }
.nav.scrolled { background: var(--road); }
.nav.scrolled .centerline { opacity: 1; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.nav-logo { display: flex; align-items: center; gap: 0.6rem; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; color: var(--road-text); }
.nav-logo img { width: 32px; height: 32px; border-radius: 8px; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: var(--road-text-2); font-size: 0.95rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--road-text); }
.nav-right { display: flex; align-items: center; gap: 0.75rem; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--road-text); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile { display: none; flex-direction: column; background: var(--road); border-top: 1px solid var(--road-line); padding: 1rem 1.5rem 1.5rem; }
.nav-mobile.open { display: flex; }
.nav-mobile a:not(.btn) { padding: 0.8rem 0; color: var(--road-text-2); font-size: 1.05rem; font-weight: 500; border-bottom: 1px solid var(--road-line); }
.nav-mobile a:not(.btn):hover { color: var(--road-text); }
.nav-mobile .btn { margin-top: 0.75rem; }
@media (max-width: 800px) {
  .nav-links, .nav-right .btn { display: none; }
  .nav-toggle { display: flex; }
}

/* ─── Hero: the road ──────────────────────────────────────────────────── */
.hero {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  background: var(--road-deep); color: var(--road-text); padding: 7rem 1.5rem 0; position: relative; overflow: hidden;
}
/* White lane dashes running down either side, like the road seen from above. */
.hero::before, .hero::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 6px; opacity: 0.18;
  background: repeating-linear-gradient(180deg, var(--lane) 0 48px, transparent 48px 96px);
}
.hero::before { left: 8%; }
.hero::after { right: 8%; }
.hero-inner { max-width: var(--max-width); margin: 0 auto; text-align: center; position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; justify-content: center; padding-bottom: 4rem; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem; align-self: center;
  background: #12301f; color: #6be3a3; border-radius: 999px; padding: 0.35rem 1rem;
  font-size: 0.85rem; font-weight: 600; margin-bottom: 1.5rem;
}
.hero-badge .lamp { width: 8px; height: 8px; border-radius: 50%; background: #30d158; box-shadow: 0 0 8px #30d158; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 3.75rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 1.25rem; }
.hero-sub { font-size: clamp(1rem, 2vw, 1.2rem); color: var(--road-text-2); max-width: 620px; margin: 0 auto 2.5rem; }
.hero-actions { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.hero-note { display: inline-flex; align-items: center; gap: 0.5rem; align-self: center; font-size: 0.85rem; color: var(--road-text-2); }
.hero-note a { color: var(--road-text); text-decoration: underline; text-decoration-color: var(--stripe); text-underline-offset: 3px; }
.hero .centerline { position: relative; z-index: 1; }
.hero-foot { height: 2.5rem; }

/* ─── Sections ────────────────────────────────────────────────────────── */
.section { padding: var(--section-pad); }
.section-label { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary); margin-bottom: 0.75rem; }
.section-heading { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 700; line-height: 1.25; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.section-sub { font-size: 1.05rem; color: var(--text-2); max-width: 580px; }
.section-header { margin-bottom: 3rem; }
.section-header.text-center .section-sub { margin: 0 auto; }

/* ─── Features ────────────────────────────────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 900px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features-grid { grid-template-columns: 1fr; } }
.feature-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 1.6rem; box-shadow: var(--shadow); transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.feature-icon {
  width: 46px; height: 46px; border-radius: var(--radius-control); background: var(--sunken);
  display: flex; align-items: center; justify-content: center; margin-bottom: 1rem;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { font-size: 1.08rem; font-weight: 650; margin-bottom: 0.45rem; }
.feature-card p { font-size: 0.95rem; color: var(--text-2); }
.feature-card .new { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft-ink); background: var(--soft); border-radius: 999px; padding: 0.15rem 0.55rem; margin-left: 0.4rem; vertical-align: 2px; }

/* A tiny traffic signal for the Overdue Alerts card (§13.5). */
.signal { width: 14px; height: 36px; border-radius: 5px; background: #0e0f10; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; }
.signal i { width: 7px; height: 7px; border-radius: 50%; background: #34373c; }
.signal i.red { background: #ff5a4f; box-shadow: 0 0 6px #ff5a4f; }

/* ─── How it works ────────────────────────────────────────────────────── */
#how-it-works { background: var(--surface); border-block: 1px solid var(--border); }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; position: relative; }
/* Lane dashes connecting the steps. */
.steps-grid::before {
  content: ""; position: absolute; top: 27px; left: calc(16.67% + 1.5rem); right: calc(16.67% + 1.5rem); height: 2px;
  background: repeating-linear-gradient(90deg, var(--border-strong) 0 10px, transparent 10px 20px);
}
@media (max-width: 700px) { .steps-grid { grid-template-columns: 1fr; } .steps-grid::before { display: none; } }
.step { text-align: center; position: relative; }
.step-number {
  width: 56px; height: 56px; border-radius: 12px; background: var(--sign-blue); color: #fff;
  font-size: 1.3rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem; position: relative; z-index: 1;
}
.step h3 { font-size: 1.1rem; font-weight: 650; margin-bottom: 0.45rem; }
.step p { font-size: 0.95rem; color: var(--text-2); }

/* ─── Pricing ─────────────────────────────────────────────────────────── */
.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; max-width: 820px; margin: 0 auto; }
@media (max-width: 640px) { .pricing-grid { grid-template-columns: 1fr; } }
.pricing-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 2rem; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.pricing-card.featured { border-color: var(--primary); background: var(--raised); box-shadow: 0 0 0 1px var(--primary), var(--shadow); position: relative; }
.pricing-badge {
  position: absolute; top: -0.8rem; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--sign-blue); color: #fff; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; padding: 0.25rem 0.85rem; border-radius: 999px;
}
.pricing-plan { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.75rem; }
.pricing-price { font-size: 2.75rem; font-weight: 700; line-height: 1; letter-spacing: -0.03em; margin-bottom: 0.25rem; }
.pricing-price sup { font-size: 1.25rem; font-weight: 600; vertical-align: super; }
.pricing-subtitle { font-size: 0.9rem; color: var(--text-2); margin-bottom: 1.75rem; }
.pricing-features { list-style: none; margin-bottom: 2rem; flex: 1; display: flex; flex-direction: column; gap: 0.65rem; }
.pricing-features li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.95rem; color: var(--text-2); }
.pricing-features .check { color: var(--success); font-weight: 700; flex-shrink: 0; }
.pricing-note { text-align: center; font-size: 0.88rem; color: var(--text-2); max-width: 620px; margin: 2rem auto 0; }

/* ─── Early access: the road again ────────────────────────────────────── */
#waitlist { background: var(--road); color: var(--road-text); text-align: center; padding-top: 0; }
#waitlist .centerline { margin-bottom: 4.5rem; }
#waitlist .section-label { color: var(--stripe); }
#waitlist .section-sub { color: var(--road-text-2); margin: 0 auto 2rem; }
.waitlist-form { display: flex; flex-direction: column; gap: 0.75rem; max-width: 480px; margin: 0 auto 1rem; }
.waitlist-form-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.waitlist-form input {
  flex: 1; min-width: 200px; height: 48px; padding: 0 1rem; border-radius: var(--radius-control);
  border: 1px solid #787d86; background: #141517; color: var(--road-text); font: inherit;
}
.waitlist-form input::placeholder { color: #9a9ea5; }
.waitlist-form input:focus { outline: 2px solid #6aa6ff; outline-offset: 1px; }
.form-message { font-size: 0.9rem; min-height: 1.3rem; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.form-message.error { color: #ffd452; }
.waitlist-thank-you { display: none; font-size: 1.1rem; font-weight: 600; padding: 1rem; }
.waitlist-privacy { font-size: 0.82rem; color: var(--road-text-2); margin-top: 0.5rem; }

/* ─── Footer ──────────────────────────────────────────────────────────── */
.footer { background: var(--road-deep); color: var(--road-text-2); padding: 3rem 1.5rem 2rem; border-top: 1px solid var(--road-line); }
.footer-inner { max-width: var(--max-width); margin: 0 auto 2.5rem; display: grid; grid-template-columns: 1fr auto auto; gap: 2rem 3rem; align-items: start; }
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; text-align: center; } .footer-brand .nav-logo { justify-content: center; } .footer-tagline { margin: 0 auto; } }
.footer-tagline { font-size: 0.9rem; max-width: 260px; margin-top: 0.75rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { font-size: 0.9rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--road-text); }
.footer-install { font-size: 0.85rem; max-width: 240px; }
.footer-install strong { display: block; color: var(--road-text); margin-bottom: 0.25rem; }
.footer-bottom { max-width: var(--max-width); margin: 0 auto; padding-top: 1.5rem; border-top: 1px solid var(--road-line); font-size: 0.85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }

/* ─── Legal pages ─────────────────────────────────────────────────────── */
.page-band { background: var(--road); height: 64px; }
.legal { max-width: 720px; margin: 0 auto; padding: 3.5rem 1.5rem 4rem; }
.legal h1 { font-size: 2rem; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.legal h2 { font-size: 1.15rem; margin: 1.75rem 0 0.4rem; }
.legal p, .legal li { color: var(--text-2); }
.legal ul { padding-left: 1.25rem; }
.legal a { color: var(--primary); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
