/* drivelamp.com
 *
 * The brand is the app icon's: paper, ink and the one amber lamp (ios/Drivelamp/Icon,
 * monogram-ink-amber.svg). Amber marks things and never carries text on paper, where it
 * measures under 3:1; text that has to be amber uses --amber-ink.
 *
 * Type: Sora for the wordmark and headings (the wordmark's own face, self-hosted, so a visit
 * asks nothing of Google), and the system's rounded face for reading, which on an iPhone is
 * SF Rounded, the app's own.
 *
 * Shapes: images and panels 18px, buttons and badges full pill. Nothing else is rounded.
 * The page has no scroll animation on purpose: it is for people who are anxious, and stillness
 * reads as calm.
 */

@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/sora-latin-var.woff2") format("woff2");
}

:root {
  --paper: #f4f3ef;
  --paper-2: #ebe9e2;
  --surface: #fbfaf7;
  --ink: #1c1f23;
  --ink-2: #474c54;
  --ink-3: #686d75;
  --rule: #d9d6cc;
  --amber: #ef9f32;
  --amber-ink: #8f5407;
  --amber-wash: #f7e3c2;
  --shadow: 0 1px 2px rgb(28 31 35 / 0.06), 0 12px 32px -12px rgb(28 31 35 / 0.22);
  --font-head: "Sora", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --measure: 66ch;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141619;
    --paper-2: #1c1f23;
    --surface: #1a1d21;
    --ink: #edebe5;
    --ink-2: #bdbab3;
    --ink-3: #96938c;
    --rule: #2d3136;
    --amber: #f2a93f;
    --amber-ink: #f4b960;
    --amber-wash: #3a2c17;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 16px 40px -16px rgb(0 0 0 / 0.6);
  }
}
:root[data-theme="dark"] {
  --paper: #141619;
  --paper-2: #1c1f23;
  --surface: #1a1d21;
  --ink: #edebe5;
  --ink-2: #bdbab3;
  --ink-3: #96938c;
  --rule: #2d3136;
  --amber: #f2a93f;
  --amber-ink: #f4b960;
  --amber-wash: #3a2c17;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 16px 40px -16px rgb(0 0 0 / 0.6);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-head); color: var(--ink); margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.6rem); font-weight: 650; line-height: 1.06; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.65rem, 3.2vw, 2.35rem); font-weight: 620; line-height: 1.12; letter-spacing: -0.02em; }
h3 { font-size: 1.12rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* The wordmark: lowercase, Sora 700, the i's dot is the lamp. A dotless i carries it, and the
   amber circle sits where Sora's own dot would: measured on Sora 700, the dot's centre is 0.69em
   above the baseline and 0.155em in from the letter's origin. `.i` stays an inline box so its
   content area starts at the font's ascent (0.97em above the baseline), which puts the centre
   0.28em below that top. */
.wordmark {
  font-family: "Sora", var(--font-head);
  font-weight: 700;
  letter-spacing: -0.035em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.wordmark .i { position: relative; }
.wordmark .i::after {
  content: "";
  position: absolute;
  left: 0.155em;
  top: 0.28em;
  width: 0.205em;
  height: 0.205em;
  margin: -0.1025em 0 0 -0.1025em;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 0.065em color-mix(in srgb, var(--amber) 24%, transparent);
}

/* Header */
.site-head { border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; box-shadow: 0 0 0 1px var(--rule); }
.brand .wordmark { font-size: 1.4rem; }
.site-nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px); font-size: 0.98rem; }
.site-nav a { text-decoration: none; color: var(--ink-2); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--amber); }
@media (max-width: 560px) { .site-nav .optional { display: none; } }

/* The App Store link. Until the app is released it is a plain note, not a link to a page that
   does not exist yet (see README). */
.store {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 22px 0 18px;
  border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font: 600 1rem/1 var(--font-body);
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.store svg { width: 20px; height: 20px; fill: currentColor; }
a.store:hover { background: color-mix(in srgb, var(--ink) 88%, var(--amber)); }
a.store:active { transform: translateY(1px); }
.store.soon { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }

/* Hero */
.hero { padding: clamp(32px, 5vw, 64px) 0 clamp(48px, 7vw, 88px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero-copy { display: grid; gap: 22px; justify-items: start; }
.hero-copy p { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--ink-2); max-width: 34ch; }
/* Sized so the whole capture and the headline fit a 1280 x 800 window together. */
.hero-shot { justify-self: center; width: min(100%, 290px); }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-shot { width: min(78%, 300px); }
}

/* A phone screenshot: the capture itself, cornered like the phone, never a drawn device. */
.phone {
  border-radius: 13.5% / 6.2%;
  box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent);
  background: var(--paper-2);
}
figure { margin: 0; }
figcaption { margin-top: 14px; font-size: 0.92rem; color: var(--ink-3); text-align: center; }

section { padding: clamp(56px, 8vw, 104px) 0; }
section + section { border-top: 1px solid var(--rule); }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 58ch; }
.stack { display: grid; gap: 18px; }

/* The four roads: a plain 2 x 2, the app's own words. */
.roads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px clamp(28px, 5vw, 64px); margin-top: 44px; }
.road { display: grid; gap: 8px; padding-left: 18px; border-left: 3px solid var(--amber); }
.road p { color: var(--ink-2); }
@media (max-width: 680px) { .roads { grid-template-columns: 1fr; } }
.roads-note { margin-top: 40px; color: var(--ink-2); max-width: 60ch; }

/* Split: image one side, words the other. Used twice at most. */
.split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(36px, 7vw, 96px); align-items: center; }
.split .phone { width: min(100%, 300px); justify-self: center; }
.split ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.split li { padding-left: 26px; position: relative; color: var(--ink-2); }
.split li::before { content: ""; position: absolute; left: 4px; top: 0.62em; width: 9px; height: 9px; border-radius: 50%; background: var(--amber); }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } .split .phone { width: min(78%, 280px); } }

/* The way out: a tinted band, two captures side by side. */
.band { background: var(--paper-2); }
.band .head { display: grid; gap: 16px; max-width: 62ch; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); justify-content: center; gap: clamp(24px, 5vw, 64px); margin-top: 52px; }
@media (max-width: 600px) { .pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; } }

/* The car: one wide capture. */
.car { margin-top: 44px; border-radius: 18px; box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent); }

/* Prices */
.plans { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 20px; margin-top: 44px; align-items: start; }
.plan { background: var(--surface); border: 1px solid var(--rule); border-radius: 18px; padding: clamp(22px, 3vw, 32px); display: grid; gap: 16px; }
.plan.plus { border-color: color-mix(in srgb, var(--amber) 55%, var(--rule)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--amber) 35%, transparent); }
.plan h3 { font-size: 1.35rem; }
.plan ul { margin: 0; padding: 0 0 0 1.15em; display: grid; gap: 8px; color: var(--ink-2); }
.plan .price { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.prices { display: grid; gap: 6px; padding-top: 14px; border-top: 1px solid var(--rule); }
.prices div { display: flex; justify-content: space-between; gap: 12px; }
.prices span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.small { font-size: 0.92rem; color: var(--ink-3); }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* Privacy in one breath */
.promise { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; }
.promise .lede { max-width: 54ch; }
@media (max-width: 760px) { .promise { grid-template-columns: 1fr; } }

/* Footer */
.site-foot { border-top: 1px solid var(--rule); padding: 40px 0 48px; font-size: 0.95rem; color: var(--ink-3); }
.site-foot .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 40px; align-items: start; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: end; }
.site-foot nav a { color: var(--ink-2); text-decoration: none; }
.site-foot nav a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--amber); }
.site-foot .wordmark { font-size: 1.25rem; }
.site-foot p + p { margin-top: 6px; }
@media (max-width: 640px) { .site-foot .wrap { grid-template-columns: 1fr; } .site-foot nav { justify-content: start; } }

/* Long-form pages: privacy, terms, support */
.doc { padding: clamp(36px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.doc .wrap { max-width: 780px; }
.doc header { display: grid; gap: 12px; margin-bottom: 36px; }
.doc header p { color: var(--ink-3); }
.doc h2 { font-size: clamp(1.3rem, 2.4vw, 1.55rem); margin: 44px 0 12px; scroll-margin-top: 24px; }
.doc h3 { margin: 26px 0 8px; }
.doc p, .doc ul, .doc ol { color: var(--ink-2); max-width: var(--measure); }
.doc p + p { margin-top: 12px; }
.doc ul, .doc ol { margin: 12px 0; padding-left: 1.25em; display: grid; gap: 7px; }
.doc strong { color: var(--ink); font-weight: 600; }
.summary { background: var(--surface); border: 1px solid var(--rule); border-radius: 18px; padding: clamp(20px, 3vw, 28px); display: grid; gap: 10px; }
.summary h2 { margin: 0 0 4px; font-size: 1.2rem; }
.summary ul { margin: 0; }
.toc { margin: 28px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.95rem; }
.toc a { color: var(--ink-2); }
.table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.97rem; }
.table th, .table td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
.table th { color: var(--ink); font-weight: 600; font-family: var(--font-body); }
.table-scroll { overflow-x: auto; }
.faq details { border-bottom: 1px solid var(--rule); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style-position: outside; }
.faq details p { margin-top: 10px; }
.mail { font-family: var(--font-head); font-size: 1.2rem; font-weight: 600; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  .site-head nav, .site-foot nav, .store { display: none; }
  body { background: #fff; color: #000; }
}
