/* Road4Me — the app's own palette, so the site and the phone agree.
   Light values first; the dark block redefines only the tokens. */
:root {
  --brand: #F64D0C;
  --amber: #FDE5BF;
  --slate: #323F53;
  --accent: #136FDB;
  --warning: #C72929;

  --ink: #14161C;
  --ink-soft: #5A5F67;
  --page: #F6F7F9;
  --page-top: #DDE7F5;
  --surface: #FFFFFF;
  --line: rgba(20, 22, 28, 0.10);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #FA5C1C;
    --amber: #3A2E1C;
    --slate: #8FA3C0;
    --accent: #5CB2FF;
    --warning: #FF7373;

    --ink: #FFFFFF;
    --ink-soft: #9E9E9E;
    --page: #0D0F14;
    --page-top: #141821;
    --surface: #1A1E26;
    --line: rgba(255, 255, 255, 0.14);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Side margins for everything. Written as `padding-inline` because several
   blocks below are the same element as `.wrap` and set their own vertical
   padding: a `padding: 18px 0` shorthand there wipes these sides out, which
   is how the whole page ended up flush against the edge of the phone. */
.wrap { max-width: 880px; margin: 0 auto; padding-inline: 24px; }
.narrow { max-width: 660px; }

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

/* ── Header ─────────────────────────────────────────────── */

header.site {
  background: linear-gradient(180deg, var(--page-top), var(--page));
  border-bottom: 1px solid var(--line);
}
.bar {
  display: flex; align-items: center; gap: 12px;
  padding-block: 18px;
  /* Wraps rather than overflows. Flex items do not shrink below their own
     text, so on a phone the last link was sitting on the edge of the screen
     with the page's margin behind it. */
  flex-wrap: wrap; row-gap: 10px;
}
.bar img { width: 34px; height: 34px; border-radius: 8px; }
.bar .name {
  font-family: Nunito, sans-serif; font-weight: 800; font-size: 19px;
  letter-spacing: -0.01em;
}
.bar .name .four { color: var(--brand); }
.bar nav { margin-left: auto; display: flex; gap: 20px; font-size: 15px; }
.bar nav a { color: var(--ink-soft); text-decoration: none; }
.bar nav a:hover { color: var(--ink); }

/* On a phone the row runs out of width and the last link falls off the
   edge. The in-page anchor is the one that can go: the section it points at
   is the next thing on the screen anyway. */
@media (max-width: 560px) {
  .bar nav { gap: 16px; font-size: 14px; }
  .bar nav a.in-page { display: none; }
  .bar .name { font-size: 17px; }
}

.hero { padding-block: 40px 64px; }
.hero h1 {
  font-family: Nunito, sans-serif; font-weight: 800;
  font-size: clamp(34px, 6vw, 54px); line-height: 1.05;
  margin: 0 0 16px; text-wrap: balance; letter-spacing: -0.02em;
}
.hero p.lede { font-size: 20px; color: var(--ink-soft); margin: 0 0 28px; max-width: 34ch; }
.hero-grid { display: grid; grid-template-columns: 1fr 208px; gap: 44px; align-items: center; }
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  /* No screenshot in the hero on a phone. Beside the text it works; underneath
     it, it is either a tall column standing between the sentence and the rest
     of the page, or a crop of a screen with its head cut off. The screens are
     two sections down, at a size that suits them, and the phone-sized reader
     reaches them by scrolling — which is what a phone is for. */
  .hero-art { display: none; }
  .hero { padding-block: 24px 44px; }
}
.hero-art img {
  width: 100%; display: block; border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 44px rgba(20, 22, 28, 0.28);
}

.store {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--brand); color: #fff; text-decoration: none;
  font-weight: 600; padding: 13px 22px; border-radius: 999px;
}
.store.pending { background: var(--slate); }
.note { font-size: 14px; color: var(--ink-soft); margin-top: 12px; }

/* ── Sections ───────────────────────────────────────────── */

section { padding-block: 56px; border-top: 1px solid var(--line); }
h2 {
  font-family: Nunito, sans-serif; font-weight: 800;
  font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 22px;
}
h3 {
  font-family: Nunito, sans-serif; font-weight: 800; font-size: 21px;
  margin: 0 0 6px; text-wrap: balance;
}
p { margin: 0 0 16px; max-width: 62ch; }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 700px) { .features { grid-template-columns: 1fr; } }
.feature {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 22px;
}
.feature p { margin: 0; color: var(--ink-soft); font-size: 16px; }
.feature .tag {
  display: inline-block; font-family: "IBM Plex Mono", monospace;
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 8px;
}

.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 700px) { .shots { grid-template-columns: 1fr; } }
.shots figure { margin: 0; }
.shots img { width: 100%; border-radius: 16px; display: block; border: 1px solid var(--line); }
.shots figcaption { font-size: 14px; color: var(--ink-soft); margin-top: 10px; }

/* Real screens, shown at the size a phone is held: two of them side by side,
   stacked once the page is narrower than they are. */
.screens {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px; justify-items: center;
}
@media (max-width: 620px) { .screens { grid-template-columns: 1fr; } }
.screens figure { margin: 0; max-width: 300px; }
.screens img {
  width: 100%; display: block; border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: 0 16px 36px rgba(20, 22, 28, 0.22);
}
.screens figcaption {
  font-size: 14px; color: var(--ink-soft); margin-top: 12px; text-align: center;
}

.plain { border-left: 3px solid var(--brand); padding-left: 18px; }

/* ── Documents (privacy, support) ───────────────────────── */

.doc { padding-block: 48px 72px; }
.doc h1 {
  font-family: Nunito, sans-serif; font-weight: 800;
  font-size: clamp(28px, 4vw, 38px); margin: 0 0 8px;
}
.doc .updated { color: var(--ink-soft); font-size: 15px; margin: 0 0 32px; }
.doc h2 {
  font-size: 19px; text-transform: none; letter-spacing: 0;
  color: var(--ink); margin: 34px 0 10px;
}
.doc ul { margin: 0 0 16px; padding-left: 22px; max-width: 62ch; }
.doc li { margin-bottom: 8px; }
.todo {
  background: var(--amber); border-radius: 12px; padding: 14px 16px;
  font-size: 15px; margin: 0 0 24px; max-width: 62ch;
}

/* ── Footer ─────────────────────────────────────────────── */

footer.site {
  border-top: 1px solid var(--line);
  padding-block: 30px 48px; color: var(--ink-soft); font-size: 15px;
}
footer.site a { color: var(--ink-soft); }
footer.site .row { display: flex; gap: 20px; flex-wrap: wrap; }
footer.site .row .spacer { margin-left: auto; }
