/* ==========================================================================
   lighter — marketing + docs site
   Standalone, framework-free, zero external requests, system fonts only.
   Structure & token model borrowed from ../../../top/site; palette is lighter's
   own blue product accent (#2f6bff light / #4c86ff dark) with AlterCPA cat-warmth.
   Three-way theme: :root=light default · [data-theme=dark] · OS fallback.
   ========================================================================== */

/* -------- Tokens -------------------------------------------------------- */
:root,
:root[data-theme="light"] {
  --accent: #2f6bff;
  --accent-strong: #1e50d8;
  --accent-soft: #e5edff;
  --on-accent: #ffffff;
  --accent-grad: linear-gradient(135deg, #4c86ff, #2f6bff 60%, #1e50d8);

  /* AlterCPA cat-warm secondary (used sparingly for illustration frames/accents) */
  --warm: #ff8fb3;
  --warm-soft: #ffe4ee;

  --success: #21a366;
  --warning: #d99312;
  --danger: #e0483d;

  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #eef1f7;
  --surface-3: #e6eaf2;
  --text: #10151f;
  --muted: #5a6577;            /* WCAG-AA on --surface */
  --border: #dbe1ec;
  --hairline: #e8ecf3;
  --code-bg: #f0f3f9;
  --code-text: #1b2b4d;

  --glow-1: rgba(47, 107, 255, 0.16);
  --glow-2: rgba(255, 143, 179, 0.14);

  --maxw: 1140px;
  --header-h: 62px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 26px;
  --shadow-sm: 0 1px 2px rgba(16, 21, 31, 0.06), 0 1px 3px rgba(16, 21, 31, 0.05);
  --shadow: 0 6px 20px rgba(16, 21, 31, 0.08);
  --shadow-pop: 0 18px 50px rgba(16, 21, 31, 0.16);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

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

:root[data-theme="dark"] {
  --accent: #4c86ff;
  --accent-strong: #6f9dff;
  --accent-soft: #17233f;
  --on-accent: #081020;
  --accent-grad: linear-gradient(135deg, #6f9dff, #4c86ff 60%, #2f6bff);

  --warm: #ff9ec0;
  --warm-soft: #2a1a22;

  --success: #3ecf8e;
  --warning: #e3b34d;
  --danger: #ff6b60;

  --bg: #0c1017;
  --surface: #141a24;
  --surface-2: #1b2330;
  --surface-3: #232d3d;
  --text: #eef2f8;
  --muted: #9aa7bd;
  --border: #2a3547;
  --hairline: #212a39;
  --code-bg: #10161f;
  --code-text: #cfe0ff;

  --glow-1: rgba(76, 134, 255, 0.22);
  --glow-2: rgba(255, 158, 192, 0.12);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 8px 26px rgba(0, 0, 0, 0.5);
  --shadow-pop: 0 22px 60px rgba(0, 0, 0, 0.6);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --accent: #4c86ff;
    --accent-strong: #6f9dff;
    --accent-soft: #17233f;
    --on-accent: #081020;
    --accent-grad: linear-gradient(135deg, #6f9dff, #4c86ff 60%, #2f6bff);
    --warm: #ff9ec0;
    --warm-soft: #2a1a22;
    --success: #3ecf8e;
    --warning: #e3b34d;
    --danger: #ff6b60;
    --bg: #0c1017;
    --surface: #141a24;
    --surface-2: #1b2330;
    --surface-3: #232d3d;
    --text: #eef2f8;
    --muted: #9aa7bd;
    --border: #2a3547;
    --hairline: #212a39;
    --code-bg: #10161f;
    --code-text: #cfe0ff;
    --glow-1: rgba(76, 134, 255, 0.22);
    --glow-2: rgba(255, 158, 192, 0.12);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 8px 26px rgba(0, 0, 0, 0.5);
    --shadow-pop: 0 22px 60px rgba(0, 0, 0, 0.6);
  }
}

/* -------- Reset / base ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* -------- Layout ------------------------------------------------------- */
.container { width: min(var(--maxw), 92vw); margin-inline: auto; }
.section { padding-block: clamp(56px, 8vw, 100px); }
.section--tight { padding-block: clamp(40px, 5vw, 64px); }
.narrow { max-width: 760px; }
.center { text-align: center; }
.grad {
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* -------- Typography helpers ------------------------------------------- */
h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -0.02em; font-weight: 840; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--accent-strong);
  background: var(--accent-soft);
  padding: 5px 12px; border-radius: 999px;
}
.sec-head { max-width: 720px; margin-bottom: 40px; }
.sec-head.center { margin-inline: auto; }
.sec-title { font-size: clamp(26px, 4vw, 40px); }
.sec-sub { margin-top: 14px; color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); }
.kicker { font-size: 13px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* -------- Buttons ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 15px;
  padding: 11px 20px; border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent-grad); color: var(--on-accent); box-shadow: 0 6px 18px var(--glow-1); }
.btn-primary:hover { box-shadow: 0 10px 28px var(--glow-1); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn-block { width: 100%; }

/* -------- Header / nav ------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
.site-header.is-stuck { border-bottom-color: var(--hairline); box-shadow: var(--shadow-sm); }
.site-header .container { display: flex; align-items: center; gap: 20px; width: min(var(--maxw), 94vw); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 850; font-size: 19px; letter-spacing: -0.03em; }
.brand .mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--accent-grad); box-shadow: 0 3px 10px var(--glow-1);
  display: grid; place-items: center; color: var(--on-accent); font-size: 15px;
}
.brand b { font-weight: 850; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-link { padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 15px; color: var(--muted); transition: color 0.15s, background 0.15s; }
.nav-link:hover, .nav-link.is-active { color: var(--text); background: var(--surface-2); }
.nav-spacer { flex: 1; }
.nav-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center; color: var(--muted);
  border: 1px solid var(--border); background: var(--surface);
  transition: color 0.15s, border-color 0.15s;
}
.icon-btn:hover { color: var(--accent-strong); border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.lang-switch a { padding: 7px 11px; font-size: 13px; font-weight: 700; color: var(--muted); }
.lang-switch a.is-active { background: var(--accent); color: var(--on-accent); }
.nav-toggle { display: none; }

/* Mobile nav */
@media (max-width: 940px) {
  .nav, .nav-tools .lang-switch, .nav-tools .btn { display: none; }
  .nav-toggle { display: grid; }
  .site-header.nav-open .nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 12px; box-shadow: var(--shadow-pop);
  }
  .site-header.nav-open .nav .nav-link { font-size: 17px; padding: 12px; }
}

/* -------- Hero --------------------------------------------------------- */
.hero { position: relative; padding-block: clamp(48px, 7vw, 92px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 60%;
  background: radial-gradient(60% 100% at 30% 0%, var(--glow-1), transparent 70%),
              radial-gradient(50% 100% at 90% 10%, var(--glow-2), transparent 70%);
  z-index: -1; filter: blur(10px);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.hero h1 { font-size: clamp(32px, 5.2vw, 58px); font-weight: 860; }
.hero .lead { margin-top: 20px; font-size: clamp(16px, 1.9vw, 20px); color: var(--muted); max-width: 34ch; }
.hero .lead b { color: var(--text); }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip { font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--hairline); color: var(--text); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-micro { margin-top: 14px; font-size: 14px; color: var(--muted); }
.hero-visual { position: relative; aspect-ratio: 4 / 3; }

/* -------- Screenshot / art media (image-set backgrounds) --------------- */
.media {
  border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface-2) center / cover no-repeat; box-shadow: var(--shadow);
  overflow: hidden;
}
.media--shot { aspect-ratio: 16 / 10; }
.media--art { aspect-ratio: 1 / 1; background-color: var(--warm-soft); border-color: transparent; box-shadow: none; }
.media--wide { aspect-ratio: 16 / 9; }
/* Individual shot/art classes are appended by assets/media.css (generated at build). */

/* -------- Generic card grid ------------------------------------------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm); transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card h3 { font-size: 19px; font-weight: 780; }
.card p { margin-top: 8px; color: var(--muted); font-size: 15px; }
.card .card-ico {
  width: 42px; height: 42px; border-radius: 12px; margin-bottom: 14px;
  display: grid; place-items: center; color: var(--accent-strong);
  background: var(--accent-soft);
}
.card .card-ico svg { width: 22px; height: 22px; }

/* Pain card (alien archetype) */
.pain { border-color: var(--hairline); }
.pain .pain-tag { font-size: 13px; font-weight: 800; color: var(--warning); }
.pain h3 { margin-top: 6px; }

/* Feature card links */
a.card { display: block; }
a.card .go { margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--accent-strong); }

/* -------- Four-words definition list ----------------------------------- */
.defs { display: grid; gap: 12px; margin-top: 8px; }
.def {
  display: grid; grid-template-columns: 160px 1fr; gap: 16px; align-items: baseline;
  padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.def dt { font-weight: 820; font-size: 17px; color: var(--accent-strong); }
.def dd { color: var(--text); }
.def dd .kt { color: var(--muted); font-size: 14px; }
@media (max-width: 560px) { .def { grid-template-columns: 1fr; gap: 4px; } }

/* -------- Compare (old tracker vs lighter) ----------------------------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.compare .col { padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.compare .col--old { background: var(--surface-2); }
.compare .col--new { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.compare h3 { font-size: 18px; }
.compare ul { margin-top: 12px; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.compare li { display: flex; gap: 10px; color: var(--muted); font-size: 15px; }
.compare li::before { content: "—"; color: var(--muted); }
.compare .col--new li { color: var(--text); }
.compare .col--new li::before { content: "✓"; color: var(--success); font-weight: 800; }

/* -------- Callouts (tip / gotcha / joke) ------------------------------- */
.callout {
  display: grid; grid-template-columns: 26px 1fr; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2);
  font-size: 15px; margin: 18px 0;
}
.callout .co-ico { width: 26px; height: 26px; }
.callout--tip { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.callout--warn { background: color-mix(in srgb, var(--warning) 14%, var(--surface)); border-color: color-mix(in srgb, var(--warning) 40%, transparent); }
.callout--joke { background: var(--warm-soft); border-color: color-mix(in srgb, var(--warm) 40%, transparent); }
.callout b { font-weight: 780; }

/* -------- FAQ ---------------------------------------------------------- */
.qa { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 10px; overflow: hidden; }
.qa summary { list-style: none; cursor: pointer; padding: 16px 20px; font-weight: 720; font-size: 17px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; color: var(--accent-strong); font-weight: 800; font-size: 22px; transition: transform 0.2s; }
.qa[open] summary::after { transform: rotate(45deg); }
.qa .qa-body { padding: 0 20px 18px; color: var(--muted); }

/* -------- CTA band ----------------------------------------------------- */
.cta-band { text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(36px, 6vw, 64px); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: auto -10% -60% -10%; height: 80%; background: radial-gradient(50% 100% at 50% 100%, var(--glow-1), transparent 70%); z-index: 0; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { font-size: clamp(24px, 3.6vw, 40px); }
.cta-band p { margin-top: 12px; color: var(--muted); font-size: 18px; }
.cta-band .hero-cta { justify-content: center; }

/* -------- Footer ------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--hairline); padding-block: 40px; color: var(--muted); font-size: 14px; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: flex-start; justify-content: space-between; }
.foot-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 10px; font-weight: 800; }
.foot-col a { display: block; padding: 3px 0; color: var(--text); }
.foot-col a:hover { color: var(--accent-strong); }
.foot-sign { width: 100%; padding-top: 18px; border-top: 1px solid var(--hairline); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }

/* -------- Responsive --------------------------------------------------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 520px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .compare { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .hero .lead { max-width: none; }
}

/* -------- Scroll reveal (progressive; only with html.js) --------------- */
html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html.js .reveal { opacity: 1; transform: none; } }

/* -------- Hero: full-width head · split copy/visual · centered foot ----- */
.hero-head { max-width: 940px; margin: 0 auto clamp(26px, 4vw, 44px); text-align: center; }
.hero-head h1 { margin-top: 16px; }
.hero-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.hero-split .lead { margin-top: 0; max-width: 48ch; }
.hero-split .hero-chips { margin-top: 22px; }
.hero-foot { margin-top: clamp(30px, 4vw, 44px); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.hero-foot .hero-cta { margin-top: 0; justify-content: center; }
.hero-foot .hero-micro { margin-top: 8px; max-width: 62ch; }
@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-split .hero-visual { order: -1; max-width: 520px; margin-inline: auto; }
  .hero-split .lead { max-width: none; }
}

/* -------- Split: square art beside a stack of text --------------------- */
.split { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: clamp(26px, 4vw, 52px); align-items: center; }
.split-media .media--art { max-width: 460px; margin-inline: auto; }
.split-stack { display: grid; gap: 16px; }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .split-media { max-width: 420px; margin-inline: auto; }
}

/* -------- Screenshot gallery (click to zoom) --------------------------- */
.shots-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.shot-fig { margin: 0; }
.zoomable { position: relative; cursor: zoom-in; transition: transform 0.2s var(--ease), box-shadow 0.2s; }
.zoomable:hover { transform: translateY(-3px); box-shadow: var(--shadow-pop); }
.zoomable .zoom-badge {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center; color: var(--on-accent);
  background: color-mix(in srgb, var(--accent) 88%, transparent);
  box-shadow: var(--shadow-sm); opacity: 0; transition: opacity 0.2s;
}
.zoomable .zoom-badge svg { width: 16px; height: 16px; }
.zoomable:hover .zoom-badge, .zoomable:focus-visible .zoom-badge { opacity: 1; }
.shot-fig figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; }
@media (max-width: 620px) { .shots-grid { grid-template-columns: 1fr; } }

/* -------- Lightbox ----------------------------------------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; padding: clamp(16px, 4vw, 52px);
  background: rgba(6, 9, 14, 0.84); backdrop-filter: blur(6px);
}
.lightbox.open { display: flex; }
.lightbox-img {
  width: 100%; max-width: min(1120px, 94vw); max-height: 88vh; aspect-ratio: 16 / 10;
  background: #0b0f16 center / contain no-repeat; border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: var(--shadow-pop);
}
.lightbox-close {
  position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; color: #fff;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22);
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-close svg { width: 20px; height: 20px; }
.lightbox-cap { position: absolute; left: 0; right: 0; bottom: 20px; text-align: center; color: #cdd5e2; font-size: 14px; padding-inline: 20px; }

/* -------- Quote cards (inclusive-design newspeak) ---------------------- */
.qcard { display: grid; gap: 12px; }
.qcard .qi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--accent-strong); background: var(--accent-soft); }
.qcard .qi svg { width: 22px; height: 22px; }
.qcard p { margin: 0; color: var(--text); font-size: 15px; }

/* -------- Steps (how to turn it on) ------------------------------------ */
.steps { display: grid; gap: 16px; counter-reset: step; max-width: 820px; margin-inline: auto; }
.step {
  display: grid; grid-template-columns: 44px 1fr; gap: 18px; align-items: start;
  padding: 20px 22px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.step::before {
  counter-increment: step; content: counter(step);
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  font-weight: 840; font-size: 19px; color: var(--on-accent);
  background: var(--accent-grad); box-shadow: 0 5px 14px var(--glow-1);
}
.step h3 { font-size: 18px; }
.step p { margin-top: 6px; color: var(--muted); font-size: 15px; }
.step p b { color: var(--text); }

/* -------- Visually-hidden ---------------------------------------------- */
.vh { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
