/* ==========================================================================
   SketchMap — marketing site.

   Separate from styles.css on purpose. styles.css is the app dashboard: a
   full-height two-column shell that assumes a map canvas. Every page that is
   not the tool loads this instead, so a visitor reading /about never downloads
   the dashboard layout, and the marketing pages never inherit its constraints.

   Shares the same design tokens as styles.css. If a token changes there, it
   changes here too — they are duplicated deliberately rather than split into a
   third file, because there is no build step and a second stylesheet request
   on every page costs more than 40 duplicated lines.
   ========================================================================== */

:root {
  --bg:          #0b0f14;
  --panel:       #111820;
  --panel-2:     #161f2a;
  --line:        #23303e;
  --line-soft:   #1b2531;
  --text:        #e6edf5;
  --text-dim:    #93a4b8;
  --text-faint:  #64748b;
  --accent:      #38bdf8;
  --accent-ink:  #04212f;
  --ok:          #34d399;
  --pin-a:       #34d399;
  --pin-b:       #f472b6;

  --radius: 10px;
  --radius-sm: 7px;
  --wrap: 1080px;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  color-scheme: dark;
}

:root[data-theme="day"] { color-scheme: light; }

@media (prefers-color-scheme: light) {
  :root:not([data-theme="night"]) {
    --bg:         #eef2f6;
    --panel:      #ffffff;
    --panel-2:    #f4f7fa;
    --line:       #d8e0e9;
    --line-soft:  #e6ecf2;
    --text:       #0f1b26;
    --text-dim:   #506274;
    --text-faint: #7b8b9c;
    --accent:     #0284c7;
    --accent-ink: #ffffff;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

a { color: var(--accent); }

/* ── header ──────────────────────────────────────────────────────────── */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-head__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 58px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: inherit;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand__mark {
  width: 18px; height: 18px;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--pin-a), var(--accent) 55%, var(--pin-b));
}

.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a {
  font-size: 14px;
  color: var(--text-dim);
  text-decoration: none;
}
.site-nav a:hover { color: var(--text); }

@media (max-width: 720px) {
  .site-nav__links { display: none; }
}

/* ── buttons ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { filter: brightness(1.08); }

.btn--ghost { border-color: var(--line); color: var(--text); background: none; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn--lg { padding: 13px 24px; font-size: 15px; }

/* ── hero ────────────────────────────────────────────────────────────── */

.hero { padding: 64px 0 40px; }

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 4.6vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero__sub {
  margin: 0 0 26px;
  font-size: 17px;
  color: var(--text-dim);
  max-width: 46ch;
}

.hero__cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.hero__note { margin: 16px 0 0; font-size: 13px; color: var(--text-faint); }

/* The canvas is sized by CSS; preview-canvas.js matches the backing store to
   it at device pixel ratio. aspect-ratio keeps it stable before JS runs, so
   there is no layout shift. */
.hero__canvas-frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 120% at 30% 20%, var(--panel-2), var(--panel) 70%);
  overflow: hidden;
}

.hero__canvas-frame canvas {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
}

.hero__canvas-cap {
  position: absolute;
  left: 14px; bottom: 12px;
  font-size: 11.5px;
  font-family: var(--mono);
  color: var(--text-faint);
  letter-spacing: 0.01em;
}

@media (max-width: 880px) {
  .hero { padding: 40px 0 28px; }
  .hero__grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ── proof strip ─────────────────────────────────────────────────────── */

.proof {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.proof li {
  background: var(--panel);
  padding: 16px 18px;
}

.proof strong { display: block; font-size: 14px; }
.proof span { font-size: 12.5px; color: var(--text-faint); }

@media (max-width: 720px) {
  .proof { grid-template-columns: repeat(2, 1fr); }
}

/* ── generic sections ────────────────────────────────────────────────── */

.section { padding: 56px 0; border-top: 1px solid var(--line-soft); }
.section__title { margin: 0 0 8px; font-size: 24px; letter-spacing: -0.02em; }
.section__lead { margin: 0 0 32px; color: var(--text-dim); max-width: 62ch; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  margin-bottom: 12px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 700;
}

.step h3 { margin: 0 0 6px; font-size: 15px; }
.step p { margin: 0; font-size: 14px; color: var(--text-dim); }

@media (max-width: 780px) { .steps { grid-template-columns: 1fr; } }

.cta-band {
  text-align: center;
  padding: 64px 0 72px;
  border-top: 1px solid var(--line-soft);
}
.cta-band h2 { margin: 0 0 10px; font-size: 26px; letter-spacing: -0.02em; }
.cta-band p { margin: 0 0 24px; color: var(--text-dim); }

/* ── footer ──────────────────────────────────────────────────────────── */

.site-foot {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  font-size: 13px;
  color: var(--text-faint);
}

.site-foot__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-foot a { color: var(--text-dim); text-decoration: none; }
.site-foot a:hover { color: var(--accent); }

/* ── static document pages (ported from styles.css) ──────────────────── */

.doc {
  max-width: 72ch;
  margin: 0 auto;
  padding: 40px 24px 72px;
}

.doc h1 { font-size: 28px; letter-spacing: -0.02em; margin: 0 0 6px; }
.doc h2 { font-size: 17px; margin: 34px 0 8px; }
.doc p, .doc li { color: var(--text-dim); }
.doc a { color: var(--accent); }
.doc ul { padding-left: 20px; }
.doc code { font-family: var(--mono); font-size: 13px; color: var(--text); }
.doc__meta { font-size: 13px; color: var(--text-faint); }
.doc__foot {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--text-faint);
}

/* ── 404 ─────────────────────────────────────────────────────────────── */

.notfound { text-align: center; padding: 96px 24px; }
.notfound h1 { font-size: 46px; margin: 0 0 8px; letter-spacing: -0.03em; }
.notfound p { color: var(--text-dim); margin: 0 0 24px; }
