/* RoadListo shared stylesheet. Design notes: docs/DESIGN.md */

:root {
  color-scheme: light dark;
  --paper: #FAF6EC;        /* Dashboard Cream */
  --card: #FFFFFF;         /* Card White */
  --ink: #1E2126;          /* Asphalt */
  --ink-soft: #4A5058;     /* Gravel */
  --line: #E3DCCB;         /* Shoulder */
  --road: #2A2E35;         /* Road Surface */
  --lane: #F2B705;         /* Lane Yellow */
  --go: #13734B;           /* Go Green */
  --go-ink: #FFFFFF;       /* Text on Go Green */
  --mark: #FFE45C;         /* Placeholder highlight in legal pages */
  --focus: #1E2126;

  --font-head: "Avenir Next", Avenir, "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --gutter: 16px;
  --max: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15171B;      /* Night Road */
    --card: #1F2227;
    --ink: #F1EEE6;
    --ink-soft: #B9B4A8;
    --line: #33373E;
    --lane: #F5C842;
    --go: #4CC38A;
    --go-ink: #0E1A14;
    --mark: #5B4A00;
    --focus: #F5C842;
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--font-body);
  overflow-wrap: break-word;
}

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 7vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 5vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }

p { margin: 0 0 1em; }
img, svg { max-width: 100%; height: auto; }

a { color: var(--go); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 700;
}
.skip-link:focus { top: 0.5rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.2rem;
}
.brand img { width: 32px; height: 32px; }
.brand .listo { color: var(--go); }

.site-nav { display: flex; align-items: center; gap: 0.25rem; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 0.7rem;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
}
.site-nav a:hover { background: var(--line); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--lane); text-decoration-thickness: 3px; }
.site-nav .lang-switch { border: 2px solid var(--ink); }
.lang-short { display: none; }

@media (max-width: 380px) {
  .brand { font-size: 1.05rem; }
  .site-nav a { padding: 0 0.55rem; }
  .lang-long { display: none; }
  .lang-short { display: inline; }
}

/* ---------- Sections ---------- */

main { display: block; }
.section { padding: 3rem 0; }
.section + .section { border-top: 1px solid var(--line); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
}
.lead { font-size: 1.15rem; color: var(--ink); max-width: 38rem; }
.muted { color: var(--ink-soft); }
.narrow { max-width: 42rem; }

/* ---------- Hero ---------- */

.hero { padding: 2.5rem 0 0; }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.hero h1 { max-width: 16ch; }
.hero .who { color: var(--ink-soft); max-width: 36rem; }
.hero-note { font-size: 0.95rem; color: var(--ink-soft); margin-top: 1rem; }

@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1.3fr 1fr; }
}

/* The hero road band: the site's one moment of motion. */
.road-band {
  height: 44px;
  margin-top: 3rem;
  background-color: var(--road);
  background-image: linear-gradient(90deg, var(--lane) 0 48px, transparent 48px 96px);
  background-size: 96px 6px;
  background-repeat: repeat-x;
  background-position: 0 50%;
}
@media (prefers-reduced-motion: no-preference) {
  .road-band { animation: drive 1.2s cubic-bezier(.2, .7, .3, 1) 0.2s 1 both; }
  @keyframes drive {
    from { background-position: 384px 50%; }
    to   { background-position: 0 50%; }
  }
}

/* ---------- Store buttons ---------- */

.stores { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.store-btn {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 56px;
  min-width: 10.5rem;
  padding: 0.4rem 1.1rem;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  line-height: 1.2;
}
.store-btn .store-small { font-size: 0.8rem; }
.store-btn .store-big { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; }
a.store-btn[href]:hover { background: var(--go); color: var(--go-ink); }
.store-btn.is-soon {
  background: transparent;
  color: var(--ink-soft);
  border: 2px dashed var(--ink-soft);
  cursor: default;
}

/* ---------- Phone placeholder frames ---------- */

.phone {
  margin: 0 auto;
  width: min(250px, 72vw);
  aspect-ratio: 390 / 844;
  border: 10px solid var(--ink);
  border-radius: 38px;
  background: var(--card);
  padding: 10px;
  position: relative;
}
.phone::before { /* speaker slot */
  content: "";
  position: absolute;
  top: 8px; left: 50%;
  width: 34%; height: 6px;
  transform: translateX(-50%);
  border-radius: 6px;
  background: var(--line);
}
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 26px; }
.phone-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-align: center;
  padding: 1rem;
  border: 2px dashed var(--line);
  border-radius: 24px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.phone-empty strong { color: var(--ink); font-family: var(--font-head); }

.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(220px, 64vw);
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 0.25rem 1rem;
}
.shots figure { margin: 0; scroll-snap-align: start; }
.shots .phone { width: 100%; }
.shots figcaption { text-align: center; margin-top: 0.6rem; font-weight: 600; }
@media (min-width: 760px) {
  .shots { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: auto; overflow: visible; }
  .shots .phone { width: min(230px, 100%); }
}

/* ---------- The route (feature list) ---------- */

.route {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0 0 0 64px;
  position: relative;
  counter-reset: stop;
}
.route::before { /* the road */
  content: "";
  position: absolute;
  top: 0; bottom: 28px; left: 12px;
  width: 28px;
  border-radius: 14px 14px 0 0;
  background-color: var(--road);
  background-image: linear-gradient(var(--lane) 0 22px, transparent 22px 44px);
  background-size: 4px 44px;
  background-repeat: repeat-y;
  background-position: 50% 10px;
}
.route li {
  position: relative;
  counter-increment: stop;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.route li::before { /* stop number on the road */
  content: counter(stop, decimal-leading-zero);
  position: absolute;
  left: -64px; top: 0.9rem;
  width: 52px; height: 32px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--lane);
  color: #1E2126;
  font: 800 0.9rem/1 var(--font-head);
}
.route li p { margin: 0; color: var(--ink-soft); }
.route li h3 { margin-bottom: 0.3rem; }
.route .count-line { margin-top: 0.4rem; color: var(--ink); font-weight: 600; }

.route-end {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: -0.25rem;
  padding-left: 4px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.3rem;
}
.route-end .check {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--go);
  display: grid; place-items: center;
}
.route-end .check svg { width: 24px; height: 24px; }
.route-end .check path { stroke: var(--go-ink); }

@media (min-width: 760px) {
  .route, .route-end { max-width: 46rem; }
}

/* ---------- Free and Premium ---------- */

.plans { display: grid; gap: 1rem; margin-top: 1.5rem; }
@media (min-width: 700px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.plan.premium { border: 2px solid var(--go); }
.plan ul { margin: 0; padding-left: 1.2rem; }
.plan li { margin: 0.35rem 0; }

/* ---------- FAQ ---------- */

.faq { margin-top: 1.5rem; max-width: 46rem; }
.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 0.6rem;
}
.faq summary {
  min-height: 48px;
  padding: 0.8rem 3rem 0.8rem 1rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 1rem; top: 50%;
  transform: translateY(-50%);
  font: 800 1.4rem/1 var(--font-head);
  color: var(--go);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 1rem 1rem; }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- Notes, cards, lists ---------- */

.note {
  border-left: 6px solid var(--lane);
  background: var(--card);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.1rem;
  max-width: 46rem;
}
.note p:last-child { margin-bottom: 0; }

.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  max-width: 34rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  background: var(--go);
  color: var(--go-ink);
  font-weight: 700;
  text-decoration: none;
  max-width: 100%;
  word-break: break-all;
}
.btn:hover { filter: brightness(1.08); }

.steps { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 0.75rem; max-width: 46rem; }
.steps li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
}
.steps .path { display: block; font-family: var(--font-head); font-weight: 800; }
.steps p { margin: 0.2rem 0 0; color: var(--ink-soft); }

/* ---------- Legal pages ---------- */

.legal { max-width: 42rem; margin: 0 auto; padding: 2rem var(--gutter) 4rem; }
.legal h1 { font-size: clamp(1.8rem, 6vw, 2.4rem); margin-bottom: 0.25rem; }
.legal h2 { font-size: 1.25rem; margin: 2.25rem 0 0.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.legal p, .legal li { max-width: 70ch; }
.legal .meta { color: var(--ink-soft); margin: 0 0 1.5rem; }
.legal .summary {
  border-left: 6px solid var(--lane);
  background: var(--card);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.25rem 1rem;
  margin: 1.5rem 0;
}
.legal ul { padding-left: 1.25rem; }
.legal li { margin: 0.35rem 0; }
mark { background: var(--mark); color: inherit; padding: 0 0.2em; }

/* ---------- 404 ---------- */

.lost { padding: 3rem 0 0; }
.lost .big {
  font: 800 clamp(3.5rem, 18vw, 6rem)/1 var(--font-head);
  color: var(--ink-soft);
  margin: 0 0 0.5rem;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 2rem;
  background: var(--road);
  color: #E9E5DB;
  padding: 2.5rem 0 3rem;
  font-size: 0.95rem;
}
.site-footer a { color: #F5C842; }
.site-footer :focus-visible { outline-color: #F5C842; }
.footer-nav ul { list-style: none; padding: 0; margin: 0 0 1.25rem; display: flex; flex-wrap: wrap; gap: 0 0.5rem; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 0.4rem; font-weight: 600; }
.site-footer p { max-width: 46rem; }
.site-footer .disclaimer { color: #C9C4B8; }
.footer-brand { font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; color: #FFFFFF; }

.h3 { font-size: 1.15rem; }
.lost li a { display: inline-flex; align-items: center; min-height: 48px; }
