/* Sherlane: the app's site.
   Colours from the Sherlane logo: its green (#00a651, darkened where text must read on white) and its orange accent.
   Change only the tokens in the blocks below (light and dark); nothing else in this file names a colour. */

:root {
  --brand: #007a3b;            /* the logo's green, dark enough for small text on white (5.5:1) */
  --brand-strong: #006b37;     /* buttons and links (6.7:1 with white) */
  --brand-soft: #e8f6ee;       /* a pale tint of the green */
  --accent: #f7941d;           /* the logo's orange */
  --logo-green: #00a651;       /* the wordmark's "lane", as in the logo */
  --on-brand: #ffffff;

  --ground: #ffffff;
  --ground-alt: #f5f6f8;
  --card: #ffffff;
  --line: #e2e5ea;
  --text: #141820;
  --text-soft: #4b5361;
  --text-faint: #7a8291;

  --radius: 16px;
  --wrap: 1120px;
  --gutter: 20px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #3ccf7a;
    --brand-strong: #7ee0a4;
    --brand-soft: #13281c;
    --accent: #f7a541;
    --logo-green: #2fc06b;
    --on-brand: #0f1217;

    --ground: #0f1217;
    --ground-alt: #151920;
    --card: #181c24;
    --line: #2a303b;
    --text: #eef0f3;
    --text-soft: #b3bac6;
    --text-faint: #858d9b;
    color-scheme: dark;
  }
}

/* The same dark values, for the toggle (theme.js). Keep the two blocks the same. */
:root[data-theme="dark"] {
  --brand: #3ccf7a;
  --brand-strong: #7ee0a4;
  --brand-soft: #13281c;
  --accent: #f7a541;
  --logo-green: #2fc06b;
  --on-brand: #0f1217;

  --ground: #0f1217;
  --ground-alt: #151920;
  --card: #181c24;
  --line: #2a303b;
  --text: #eef0f3;
  --text-soft: #b3bac6;
  --text-faint: #858d9b;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; background: var(--ground); color: var(--text);
  font-family: var(--font); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand-strong); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--brand-strong); color: var(--ground); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--ground) 85%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }

/* ---- header end: nav and the light/dark toggle ---- */
.header-end { display: flex; align-items: center; gap: 6px; }
.theme-toggle {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center; padding: 0; cursor: pointer;
  border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--text);
}
.theme-toggle:hover { border-color: var(--brand); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.theme-toggle .icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* The logo: the mark, then the name with "lane" in the logo's green. */
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 750; font-size: 22px; letter-spacing: -.02em; }
.wordmark .mark { width: auto; height: 40px; display: block; }
.wordmark .lane { color: var(--logo-green); }

.nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--text-soft); text-decoration: none; font-size: 15px; padding: 6px 12px; border-radius: 999px; }
.nav a:hover { color: var(--text); background: var(--ground-alt); }
.nav a.nav-cta { background: var(--brand-strong); color: var(--ground); font-weight: 600; }
.nav a.nav-cta:hover { background: var(--brand); color: var(--on-brand); }

/* ---- hero ---- */
.hero { padding: 72px 0 80px; background: linear-gradient(180deg, var(--brand-soft), var(--ground) 85%); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: 13px; font-weight: 650; color: var(--brand); margin: 0 0 12px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
.hero h1 { font-size: clamp(36px, 6vw, 60px); font-weight: 800; }
.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--text-soft); max-width: 46ch; margin: 0 0 28px; }
.buttons { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 999px; font-weight: 650; text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--brand-strong); color: var(--ground); }
.btn-primary:hover { background: var(--brand); color: var(--on-brand); }
.btn-ghost { border-color: var(--line); color: var(--text); background: var(--card); }
.btn-ghost:hover { border-color: var(--brand); }
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.note { color: var(--text-faint); font-size: 14px; margin: 14px 0 0; }

/* phone frame with a placeholder screen (TODO(owner): app screenshots) */
.phone {
  justify-self: center; width: min(300px, 74vw); aspect-ratio: 9 / 19.5;
  border-radius: 42px; padding: 12px; background: var(--brand-strong);
  box-shadow: 0 30px 60px -20px color-mix(in srgb, var(--brand-strong) 45%, transparent);
}
.phone .screen {
  width: 100%; height: 100%; border-radius: 32px; overflow: hidden; position: relative;
  background: var(--ground-alt); display: grid; place-items: center; text-align: center; color: var(--text-faint); font-size: 14px;
}
.phone .screen img { width: 100%; height: 100%; object-fit: cover; }
.phone .screen .map {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, transparent 47%, var(--line) 47% 53%, transparent 53%),
    linear-gradient(0deg, transparent 30%, var(--line) 30% 34%, transparent 34%),
    linear-gradient(35deg, transparent 60%, var(--line) 60% 63%, transparent 63%),
    var(--ground-alt);
}
.phone .screen .route { position: absolute; inset: 0; }
.phone .screen .route path { fill: none; stroke: var(--brand); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.phone .screen .route circle { fill: var(--card); stroke: var(--brand-strong); stroke-width: 3; }
.phone .sheet {
  position: absolute; left: 10px; right: 10px; bottom: 10px; border-radius: 20px; padding: 14px 16px; text-align: left;
  background: var(--card); color: var(--text); box-shadow: 0 8px 24px -8px rgba(0,0,0,.25);
}
.phone .sheet b { display: block; font-size: 15px; }
.phone .sheet span { font-size: 13px; color: var(--text-soft); }
.phone .sheet .legs { display: flex; gap: 6px; margin-top: 8px; }
.phone .sheet .legs i { font-style: normal; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-strong); }

/* ---- sections ---- */
section { padding: 88px 0; }
section.alt { background: var(--ground-alt); }
.section-head { max-width: 62ch; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.section-head p { color: var(--text-soft); margin: 0; }

.features { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.feature .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); display: grid; place-items: center; margin-bottom: 16px; }
.feature .icon svg { width: 22px; height: 22px; stroke: var(--brand-strong); fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 19px; margin-bottom: 6px; }
.feature p { color: var(--text-soft); margin: 0; font-size: 16px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.steps li { counter-increment: step; padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-strong); color: var(--ground); font-weight: 750; margin-bottom: 14px;
}
.steps h3 { font-size: 18px; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--text-soft); font-size: 16px; }

.promise { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.promise blockquote { margin: 0; padding: 22px 24px; border-left: 4px solid var(--brand); background: var(--card); border-radius: 0 var(--radius) var(--radius) 0; }
.promise blockquote p { margin: 0 0 8px; font-weight: 650; }
.promise blockquote span { color: var(--text-soft); font-size: 15px; }

.download { text-align: center; }
.download .section-head { margin: 0 auto 28px; }
.download .buttons { justify-content: center; }

.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 650; list-style-position: outside; }
.faq details p { color: var(--text-soft); margin: 10px 0 0; }

/* ---- plain pages ---- */
.page { padding: 64px 0 88px; }
.page .wrap { max-width: 760px; }
.page h1 { font-size: clamp(30px, 4.5vw, 44px); font-weight: 800; }
.page h2 { font-size: 21px; margin-top: 2em; }
.page p, .page li { color: var(--text-soft); }
.todo { border: 1px dashed var(--accent); border-radius: 10px; padding: 12px 16px; background: var(--brand-soft); color: var(--text); }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--text-faint); font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--text-soft); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.site-footer .credits { width: 100%; }

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .phone { width: min(260px, 70vw); }
}
@media (max-width: 560px) {
  .nav a:not(.nav-cta) { display: none; }
  section { padding: 64px 0; }
  .hero { padding: 48px 0 64px; }
}
