/* Shared styling for the generated marketing pages (see scripts/build-marketing.mjs).
   Deliberately standalone — these pages load no JS bundle, so they must not depend
   on the app's stylesheet. Palette AND typeface match docs.html and the SPA landing. */

/* Inter — the SPA landing's font. Without it these pages fell back to system fonts,
   so one site read in two different typefaces. @import must lead the file. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* Dark only, matching web/src/styles.css exactly. The app has no light theme, so
   following prefers-color-scheme here made the static pages flip to light while
   the SPA stayed dark — one site, two looks, depending on the visitor's OS. */
:root {
  color-scheme: dark;
  --bg: #0b0e14; --panel: #141922; --panel2: #1b212c; --border: #262d3a;
  --text: #e6e9ef; --muted: #8a93a6; --accent: #4f8cff; --btn: #2563eb;
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text); line-height: 1.6;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* --- header --- */
header.top {
  position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px);
}
.top-inner { max-width: 1160px; margin: 0 auto; padding: 12px 22px; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; }
.brand img { width: 28px; height: 28px; border-radius: 6px; }
.spacer { flex: 1; }
.tlink { color: var(--muted); font-weight: 600; font-size: 14px; }
.tlink:hover { color: var(--text); }
.cta, .btn {
  display: inline-block; background: var(--btn); color: #fff; font-weight: 700;
  border-radius: 9px; padding: 9px 16px; font-size: 14px; border: 1px solid var(--btn);
}
.cta:hover, .btn:hover { background: #1d4ed8; }

/* --- landing-style top nav, matching the SPA header exactly --- */
.lp-nav { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(10px); }
.lp-nav-inner { max-width: 1160px; margin: 0 auto; padding: 14px 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.lp-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; color: var(--text); }
.lp-logo { width: 30px; height: 30px; border-radius: 7px; object-fit: contain; }
.lp-links { display: flex; align-items: center; gap: 22px; font-weight: 600; font-size: 15px; color: var(--muted); }
.lp-links > a:hover { color: var(--text); }
.lp-links .btn-primary { background: var(--btn); color: #fff; border: 1px solid var(--btn); border-radius: 9px; padding: 8px 14px; font-size: 14px; font-weight: 700; }
.lp-links .btn-primary:hover { background: #1d4ed8; }

.lp-menu { position: relative; display: inline-flex; }
.lp-menu-btn { background: transparent; border: none; padding: 0; font: inherit; font-weight: 600; font-size: 15px; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.lp-menu-btn:hover { color: var(--text); }
.lp-menu::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 12px; }
.lp-menu-panel { position: absolute; top: calc(100% + 10px); left: 0; min-width: 210px; display: flex; flex-direction: column; gap: 2px; padding: 8px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-6px); transition: opacity .14s ease, transform .14s ease; z-index: 40; }
.lp-menu:hover .lp-menu-panel, .lp-menu:focus-within .lp-menu-panel { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
.lp-menu-panel a { display: block; padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.lp-menu-panel a:hover { color: var(--text); background: var(--panel2); }

/* The checkbox is only a toggle for the mobile menu — never shown. (Hidden here, not
   just inside the media query, or it renders as a raw checkbox on desktop.) A
   display:none checkbox still toggles via its <label for="lpnav">. */
.lp-nav-cb { display: none; }
.lp-nav-toggle { display: none; } /* desktop: the ☰ label shows only on mobile */

@media (max-width: 860px) {
  .lp-nav-inner { position: relative; padding: 12px 16px; }
  .lp-nav-toggle {
    display: grid; place-items: center;
    width: 42px; height: 42px; border-radius: 9px;
    background: var(--panel2); border: 1px solid var(--border);
    color: var(--text); font-size: 18px; line-height: 1; cursor: pointer;
  }
  .lp-links {
    display: none;
    position: absolute; top: calc(100% + 1px); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 18px 18px;
    background: var(--panel); border-bottom: 1px solid var(--border);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
    max-height: calc(100vh - 62px); overflow-y: auto;
  }
  #lpnav:checked ~ .lp-links { display: flex; }
  .lp-links > a { padding: 11px 4px; font-size: 16px; }
  .lp-links .btn-primary { text-align: center; margin-top: 8px; }
  .lp-menu { display: block; }
  .lp-menu-btn { width: 100%; justify-content: flex-start; padding: 11px 4px; font-size: 16px; }
  .lp-menu::after { display: none; }
  .lp-menu-panel {
    position: static; opacity: 1; visibility: visible; pointer-events: auto;
    transform: none; box-shadow: none; border: none; background: transparent;
    min-width: 0; padding: 0 0 6px 14px; gap: 0;
  }
  .lp-menu-panel a { font-size: 15px; padding: 8px 4px; }
}

main { max-width: 1160px; margin: 0 auto; padding: 0 22px 40px; }
section { padding: 54px 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: none; }
h1 { font-size: 44px; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 14px; }
h2 { font-size: 28px; letter-spacing: -0.01em; margin: 0 0 22px; }
h3 { font-size: 17px; margin: 0 0 6px; }
p { margin: 0 0 14px; }

/* --- hero --- */
.hero { text-align: center; padding-top: 64px; }
.hero .lead { font-size: 19px; color: var(--muted); max-width: 700px; margin: 0 auto 26px; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn.lg { padding: 13px 24px; font-size: 16px; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { background: var(--panel); }
.fine { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* --- screenshots --- */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.shot { margin: 0; }
.shot img {
  width: 100%; height: auto; display: block; border-radius: 12px;
  border: 1px solid var(--border); background: var(--panel);
}
.shot figcaption { margin-top: 8px; font-size: 13px; font-weight: 600; }
.shot figcaption span { color: var(--muted); font-weight: 500; }

/* --- points --- */
.point-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.point { background: var(--panel); border: 1px solid var(--border); border-radius: 13px; padding: 20px; }
.point p { margin: 0; color: var(--muted); font-size: 15px; }

/* --- steps --- */
.steps ol { margin: 0; padding-left: 20px; max-width: 760px; }
.steps li { margin: 10px 0; color: var(--muted); }
.steps li strong { color: var(--text); }

/* --- faq --- */
.faq details {
  background: var(--panel); border: 1px solid var(--border); border-radius: 11px;
  margin-bottom: 10px; max-width: 820px;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 15px 20px; font-weight: 600;
  display: flex; justify-content: space-between; gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--muted); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0; padding: 0 20px 16px; color: var(--muted); }

/* --- related --- */
.rel-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.rel {
  display: block; background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 18px;
}
.rel:hover { border-color: var(--accent); }
.rel strong { display: block; margin-bottom: 4px; }
.rel span { color: var(--muted); font-size: 14px; }

/* --- gallery --- */
.gal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* --- final CTA --- */
.final { text-align: center; }
.final h2 { margin-bottom: 20px; }

/* --- footer --- */
.foot { border-top: 1px solid var(--border); background: var(--panel); }
.foot-inner { max-width: 1160px; margin: 0 auto; padding: 40px 22px; }
.foot-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.foot-cols h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 10px; }
.foot-cols a { display: block; color: var(--muted); font-size: 14px; padding: 3px 0; }
.foot-cols a:hover { color: var(--text); }
.foot-copy { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
  .shots, .point-grid, .rel-row, .gal-grid { grid-template-columns: 1fr 1fr; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 34px; }
}
@media (max-width: 600px) {
  .shots, .point-grid, .rel-row, .gal-grid { grid-template-columns: 1fr; }
  h1 { font-size: 28px; }
  .hero .lead { font-size: 17px; }
  section { padding: 38px 0; }
  .tlink { display: none; }
}
