/* Nightlid website. System font stack, night palette, light + dark, no external assets. */
:root {
  color-scheme: light;
  --bg: #f6f6fb;
  --bg-2: #eceefa;
  --surface: #ffffff;
  --surface-2: #f2f3fb;
  --text: #15172e;
  --muted: #565a78;
  --faint: #8a8eab;
  --border: #dfe1f0;
  --accent: #4b45d6;
  --accent-ink: #ffffff;
  --accent-soft: #e9e8ff;
  --warm: #c27100;
  --warm-soft: #fff1d6;
  --ok: #1d8a4a;
  --no: #b3261e;
  --code-bg: #14162e;
  --code-text: #e8e9ff;
  --hero-1: #e9e8ff;
  --hero-2: #f6f6fb;
  --shadow: 0 1px 2px rgba(20, 22, 50, .06), 0 8px 30px rgba(20, 22, 50, .08);
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a0b1d;
    --bg-2: #101232;
    --surface: #14163a;
    --surface-2: #1a1d47;
    --text: #eceefc;
    --muted: #a6aacb;
    --faint: #7a7fa6;
    --border: #262a5c;
    --accent: #8f8cff;
    --accent-ink: #0a0b1d;
    --accent-soft: #23255a;
    --warm: #ffc857;
    --warm-soft: #3a2f1a;
    --ok: #5fd38d;
    --no: #ff8a80;
    --code-bg: #070818;
    --code-text: #e8e9ff;
    --hero-1: #1d2064;
    --hero-2: #0a0b1d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 40px rgba(0, 0, 0, .35);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0b1d;
  --bg-2: #101232;
  --surface: #14163a;
  --surface-2: #1a1d47;
  --text: #eceefc;
  --muted: #a6aacb;
  --faint: #7a7fa6;
  --border: #262a5c;
  --accent: #8f8cff;
  --accent-ink: #0a0b1d;
  --accent-soft: #23255a;
  --warm: #ffc857;
  --warm-soft: #3a2f1a;
  --ok: #5fd38d;
  --no: #ff8a80;
  --code-bg: #070818;
  --code-text: #e8e9ff;
  --hero-1: #1d2064;
  --hero-2: #0a0b1d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 40px rgba(0, 0, 0, .35);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
code, kbd, pre { font-family: var(--mono); font-size: .9em; }
code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: .05em .35em; }
kbd { border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: 0 .35em; background: var(--surface); }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: var(--surface); padding: 8px 12px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.eyebrow { color: var(--warm); font-weight: 650; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .6em; }

/* Launch banner */
.launch {
  background: linear-gradient(90deg, #2b2f77, #4b45d6);
  color: #fff; text-align: center; font-size: .92rem; padding: 8px 16px;
}
.launch a { color: #ffc857; font-weight: 650; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 750; font-size: 1.1rem; }
.brand img { width: 30px; height: 30px; }
.nav-links { display: none; gap: 20px; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.nav-links a:hover { color: var(--text); }
@media (min-width: 860px) { .nav-links { display: flex; } }
.nav-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
@media (min-width: 860px) { .nav-tools { margin-left: 8px; } }
.lang { color: var(--muted); text-decoration: none; font-size: .9rem; font-weight: 600; padding: 6px 8px; border-radius: 8px; }
.lang:hover { background: var(--surface-2); color: var(--text); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; }
.theme-sun { display: none; }
:root[data-theme="dark"] .theme-sun { display: block; }
:root[data-theme="dark"] .theme-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-sun { display: block; }
  :root:not([data-theme="light"]) .theme-moon { display: none; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px;
  border-radius: 12px; font-weight: 650; font-size: 1rem; text-decoration: none; border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: .9rem; border-radius: 10px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
/* Pre-launch: "Coming soon" pseudo-button (not a link) and hero badge */
.btn-soon { background: var(--accent-soft); color: var(--accent); box-shadow: none; cursor: default; }
.btn-soon:hover { transform: none; }
.soon-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--accent);
  font-weight: 700; font-size: .82rem; border-radius: 999px; padding: 4px 12px; margin-bottom: 14px; }
.soon-badge svg { width: 14px; height: 14px; flex: none; }

/* Hero */
.hero { background: radial-gradient(1200px 600px at 75% -10%, var(--hero-1), var(--hero-2) 70%); padding: 56px 0 40px; overflow: hidden; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 920px) { .hero-grid { grid-template-columns: 1.1fr .9fr; } .hero { padding: 88px 0 64px; } }
.hero h1 .glow { color: var(--warm); }
.hero .lead { font-size: clamp(1.1rem, 2.4vw, 1.3rem); color: var(--muted); max-width: 36em; }
.hero-meta { margin-top: 14px; color: var(--muted); font-size: .9rem; }
.hero-shot { position: relative; justify-self: center; max-width: 440px; width: 100%; }
.hero-shot img { display: block; width: 100%; border-radius: 14px; box-shadow: var(--shadow); }
.hero-shot figcaption { font-size: .8rem; color: var(--faint); margin-top: 8px; text-align: center; }
.stars { position: absolute; inset: -40px -40px auto auto; width: 180px; opacity: .8; pointer-events: none; }

/* Sections */
section { padding: 64px 0; }
@media (min-width: 720px) { section { padding: 88px 0; } }
.section-alt { background: var(--bg-2); }
.section-head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* How it works */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.step svg { width: 100%; max-width: 180px; height: 96px; display: block; margin: 0 auto 14px; }
.step h3 { margin-bottom: .3em; }
.step p { color: var(--muted); font-size: .95rem; margin: 0; }
.step-num { position: absolute; top: 14px; left: 16px; font-size: .78rem; font-weight: 700; color: var(--faint); }
@media (min-width: 760px) {
  .step:not(:last-child)::after { content: ""; position: absolute; top: 60px; right: -13px; width: 10px; height: 10px;
    border-top: 2px solid var(--faint); border-right: 2px solid var(--faint); transform: rotate(45deg); }
}

/* Cards / features */
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid-2, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.card p { color: var(--muted); margin: 0; font-size: .96rem; }
.card .ico { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.card .ico svg { width: 22px; height: 22px; }
.card .ico.warm { background: var(--warm-soft); color: var(--warm); }
/* Screenshot strip under the feature cards */
.shots { margin-top: 40px; align-items: start; }
.shots figure { margin: 0; }
.shots img { display: block; width: 100%; border-radius: 12px; box-shadow: var(--shadow); }
.shots figcaption { font-size: .85rem; color: var(--faint); margin-top: 10px; text-align: center; }
@media (min-width: 640px) and (max-width: 959px) { .shots figure:last-child { grid-column: 1 / -1; } }

/* Split (text + image) */
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 920px) { .split { grid-template-columns: 1fr 1fr; } .split.rev > :first-child { order: 2; } }
.split img { border-radius: 14px; box-shadow: var(--shadow); display: block; }
.checks { list-style: none; padding: 0; margin: 0 0 1.2em; }
.checks li { position: relative; padding-left: 30px; margin-bottom: .7em; }
.checks li::before { content: ""; position: absolute; left: 4px; top: .5em; width: 12px; height: 7px;
  border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); transform: rotate(-45deg); }

/* Code */
.code { position: relative; background: var(--code-bg); color: var(--code-text); border-radius: 14px; padding: 18px 18px 16px;
  overflow-x: auto; font-size: .88rem; line-height: 1.6; margin: 0 0 1em; border: 1px solid var(--border); }
.code pre { margin: 0; white-space: pre; }
.code .c { color: #8b90c4; }
.code .p { color: #ffc857; user-select: none; }
.copy { position: absolute; top: 10px; right: 10px; font: 600 .75rem var(--font); color: #c9cbf5; background: #262a5c;
  border: 0; border-radius: 8px; padding: 5px 9px; cursor: pointer; }

/* Comparison table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.compare { border-collapse: collapse; width: 100%; min-width: 760px; font-size: .92rem; }
.compare th, .compare td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.compare thead th { font-size: .82rem; color: var(--muted); font-weight: 650; background: var(--surface-2); }
.compare tbody th { font-weight: 600; width: 22%; }
.compare tr:last-child > * { border-bottom: 0; }
.compare .us { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.yes, .no, .na { font-weight: 650; }
.yes { color: var(--ok); }
.no { color: var(--no); }
.na { color: var(--faint); }
.compare small { display: block; color: var(--muted); font-weight: 400; }

/* Pricing */
.price-card { max-width: 560px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  padding: 32px 24px; box-shadow: var(--shadow); text-align: center; }
@media (min-width: 640px) { .price-card { padding: 40px; } }
.price { font-size: 4rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; margin: 8px 0 4px; }
.price-was { font-size: 1.6rem; color: var(--faint); margin-left: 10px; font-weight: 600; }
.price-sub { color: var(--muted); margin-bottom: 22px; }
.price-card .checks { text-align: left; max-width: 400px; margin: 0 auto 26px; }
.price-card .btn-row { justify-content: center; }
.launch-pill { display: inline-block; background: var(--warm-soft); color: var(--warm); font-weight: 700; font-size: .82rem;
  border-radius: 999px; padding: 4px 12px; }

/* FAQ */
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 0 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 650; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--faint); font-weight: 400; font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 0 16px; color: var(--muted); }
.faq details > div p:last-child { margin-bottom: 0; }

/* Prose pages */
.page { padding: 48px 0 72px; }
.page h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.page h2 { font-size: 1.5rem; margin-top: 1.8em; }
.page h3 { margin-top: 1.4em; }
.page li { margin-bottom: .4em; }
.page table { border-collapse: collapse; width: 100%; font-size: .94rem; margin: 0 0 1.2em; }
.page th, .page td { border-bottom: 1px solid var(--border); padding: 9px 8px; text-align: left; vertical-align: top; }
.draft { border: 2px dashed var(--warm); background: var(--warm-soft); border-radius: 12px; padding: 12px 16px; margin: 0 0 24px; }
.callout { border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 12px 12px 0; padding: 14px 18px; margin: 0 0 1.2em; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 48px; color: var(--muted); font-size: .9rem; }
.footer-grid { display: grid; gap: 24px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.footer-title { color: var(--text); font-weight: 650; margin-bottom: 8px; }
.legal { margin-top: 28px; font-size: .8rem; color: var(--faint); }

/* Diagram strokes (classes, not inline styles: CSP) */
.sv-line { fill: none; stroke: var(--muted); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sv-thin { fill: none; stroke: var(--faint); stroke-width: 2; stroke-linecap: round; }
.sv-body { fill: var(--surface-2); stroke: var(--muted); stroke-width: 3; stroke-linejoin: round; }
.sv-screen { fill: var(--code-bg); }
.sv-text { fill: var(--ok); font: 700 15px var(--mono); }
.sv-warm { fill: var(--warm); }
.sv-glow { fill: var(--warm); filter: drop-shadow(0 0 6px var(--warm)); }
.sv-ok { fill: none; stroke: var(--ok); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.sv-zz { fill: var(--accent); font: 800 16px var(--font); }
.sym { display: none; }
.sv-label { fill: var(--text); font: 600 14px var(--font); }
.center .btn-row { justify-content: center; }
.layers { width: 100%; max-width: 460px; }
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); }
.split { align-items: start; }
.split > figure { margin: 0; }
@media (min-width: 920px) { .split > figure { position: sticky; top: 90px; } }
.sv-text { font-size: 13px; }
.table-wrap + p { margin-top: 14px; }
.price-card .btn-row + p { margin-top: 16px; margin-bottom: 0; }
.split > *, .hero-grid > *, .grid > * { min-width: 0; }
@media (max-width: 640px) { .code { padding-top: 42px; } }
