/* SightLine landing page — tokens, layout, components. No framework. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-alt: #f3f6f9;
  --surface: #ffffff;
  --border: #d3dae3;
  --text: #0f172a;
  --muted: #4b5567;
  --accent: #0b7a6e;        /* teal, 5.4:1 on white */
  --accent-ink: #ffffff;
  --accent-soft: #d9f3ef;
  --code-bg: #0f172a;
  --code-text: #e6edf5;
  --code-key: #8ad8cf;
  --code-str: #ffd58a;
  --focus: #b4480a;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --radius: 12px;
  --gutter: 16px;
  --measure: 65ch;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220;
    --bg-alt: #111a2b;
    --surface: #141e31;
    --border: #2b3850;
    --text: #e8edf5;
    --muted: #a9b4c6;
    --accent: #4fd1c0;      /* 9.6:1 on #0b1220 */
    --accent-ink: #06211d;
    --accent-soft: #163a37;
    --code-bg: #060b14;
    --code-text: #e6edf5;
    --code-key: #8ad8cf;
    --code-str: #ffd58a;
    --focus: #ffb86b;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1220; --bg-alt: #111a2b; --surface: #141e31; --border: #2b3850;
  --text: #e8edf5; --muted: #a9b4c6; --accent: #4fd1c0; --accent-ink: #06211d;
  --accent-soft: #163a37; --code-bg: #060b14; --focus: #ffb86b; --shadow: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: anywhere;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw + .5rem, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.5vw + .5rem, 2.125rem); font-weight: 750; }
h3 { font-size: 1.125rem; font-weight: 700; }
p { margin: 0 0 1em; max-width: var(--measure); }
a { color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2.5px; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
code { font-size: .9375em; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 6px; padding: 0 .35em; }

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

.skip {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--text); color: var(--bg); padding: .6rem 1rem; border-radius: 8px;
  z-index: 100; text-decoration: none; font-weight: 600;
}
.skip:focus { top: 8px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 32px; } }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; flex: none; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.125rem; }
.brand svg { width: 28px; height: 28px; flex: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: nowrap; justify-content: flex-end; white-space: nowrap; }
.site-nav a {
  display: inline-block; padding: 10px 12px; min-height: 44px; line-height: 24px;
  color: var(--text); text-decoration: none; border-radius: 8px; font-weight: 500;
}
.site-nav a:hover { background: var(--bg-alt); text-decoration: underline; }
@media (max-width: 599px) { .site-nav li:not(.nav-primary) { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 1.25rem; border-radius: 10px; font-weight: 650;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--muted); }
.btn-secondary:hover { border-color: var(--text); background: var(--bg-alt); }

/* Sections */
section { padding: clamp(48px, 8vw, 96px) 0; }
section + section { border-top: 1px solid var(--border); }
.alt { background: var(--bg-alt); }
.lede { font-size: 1.125rem; color: var(--muted); }
.kicker { display: block; font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: .5rem; }

/* Hero */
.hero { padding-top: clamp(56px, 10vw, 120px); }
.hero .wrap { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.1fr .9fr; } }
.hero h1 { max-width: 20ch; }
.hero .lede { font-size: clamp(1.125rem, 1.5vw + .5rem, 1.375rem); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }
.hero-art { width: 100%; height: auto; display: block; max-width: 520px; margin: 0 auto; }

/* How it works */
.steps { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 20px; counter-reset: step; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { counter-increment: step; position: relative; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.step::before { content: counter(step); position: absolute; top: 14px; right: 16px; font-size: .8125rem; font-weight: 700; color: var(--muted); }
.step svg { width: 44px; height: 44px; display: block; margin-bottom: 12px; color: var(--accent); }
.step h3 { margin-bottom: .25em; }
.step p { margin: 0; color: var(--muted); font-size: .9375rem; }

/* Cards */
.cards { display: grid; gap: 20px; margin-top: 2rem; }
@media (min-width: 768px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card h3 { display: flex; align-items: center; gap: 10px; }
.card svg { width: 24px; height: 24px; color: var(--accent); flex: none; }
.card p { margin: 0; color: var(--muted); }
.card ul { margin: .75rem 0 0; padding-left: 1.1rem; color: var(--muted); }
.card li + li { margin-top: .25rem; }

/* API */
.api-grid { display: grid; gap: 24px; margin-top: 2rem; }
@media (min-width: 900px) { .api-grid { grid-template-columns: 1fr 1fr; } }
.code-block { margin: 0; }
.code-block figcaption { font-size: .875rem; color: var(--muted); margin-bottom: .5rem; }
pre {
  margin: 0; padding: 16px 18px; max-width: 100%; overflow-x: auto;
  background: var(--code-bg); color: var(--code-text);
  border-radius: var(--radius); font-size: .875rem; line-height: 1.55; tab-size: 2;
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.k { color: var(--code-key); }
.s { color: var(--code-str); }
.c { color: #9fb0c8; }
.hosted { margin-top: 2rem; padding: 20px 24px; border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface); }
.hosted p:last-child { margin: 0; }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--text); margin-left: .5em; vertical-align: middle; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; color: var(--muted); font-size: .9375rem; }
.site-footer .wrap { display: grid; gap: 24px; }
@media (min-width: 768px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } }
.site-footer h2 { font-size: 1rem; margin-bottom: .5rem; color: var(--text); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: .25rem 0; }
.site-footer a { color: var(--text); }
.site-footer small { display: block; margin-top: 1rem; }

[tabindex="-1"]:focus-visible { outline: none; }
