/* ============================================================
   LeanScale Design System — SITE  (v2.0)
   Requires: ls-foundations.css

   The shared web spine for every scrolling page — informational
   microsites AND marketing landing pages. Landing pages then add
   ls-landing.css for conversion components.

   The spine, top to bottom:
     nav.ls-nav  →  header.ls-hero  →  .ls-band (thesis)
     →  section.ls-section × n  →  footer.ls-footer
   ============================================================ */

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-prose { max-width: var(--maxw-prose); margin: 0 auto; padding: 0 var(--gutter); }
section { position: relative; overflow: hidden; }

/* Alternating bands set the page rhythm. Never two darks in a row. */
.band-light { background: var(--m-surface); }
.band-tint  { background: var(--m-surface-2); }
.band-card  { background: var(--m-card); }
.band-dark  { background: var(--m-grad-hero); color: var(--fg-on-dark); }
.band-dark::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(520px circle at 78% 14%, rgba(200,232,158,0.11), rgba(200,232,158,0) 62%);
}
.band-dark h1, .band-dark h2, .band-dark h3 { color: var(--fg-on-dark); }
/* Text links go lime on dark — but never buttons, which carry their own
   foreground. Without :not(.m-btn) a lime button gets lime text. */
.band-dark a:not(.m-btn) { color: var(--ls-lime); }

.pad    { padding: 104px 0; }
.pad-sm { padding: 72px 0; }
.pad-lg { padding: 136px 0; }

/* ---------- Nav ---------- */
.ls-nav {
  position: sticky; top: 0; z-index: 60;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
}
.ls-nav .wrap { display: flex; align-items: center; gap: 32px; height: 68px; }
.ls-nav .ls-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: var(--fw-bold); color: var(--m-ink); letter-spacing: -0.02em; }
.ls-nav .ls-brand img { height: 24px; width: auto; }
.ls-navlink {
  font-size: 13.5px; font-weight: var(--fw-semibold); color: var(--fg-secondary);
  letter-spacing: -0.01em; padding: 7px 2px;
  border-bottom: 2px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.ls-navlink:hover, .ls-navlink.on { color: var(--accent); border-color: var(--accent); }
.ls-nav-cta {
  margin-left: auto; display: inline-flex; align-items: center; gap: 9px;
  background: var(--m-ink); color: var(--fg-on-dark) !important;
  font-size: 13.5px; font-weight: var(--fw-bold);
  padding: 11px 20px; border-radius: var(--radius-pill);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.ls-nav-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(42,20,48,0.28); }

/* ---------- Hero ---------- */
.ls-hero { position: relative; overflow: hidden; padding: 96px 0 84px; }
.ls-hero h1 {
  font-size: clamp(40px, 5.4vw, 68px); line-height: 1.02;
  letter-spacing: var(--tracking-xtight); margin: 18px 0 0;
  max-width: 15ch;
}
.ls-hero .ls-lead { margin-top: 22px; max-width: 58ch; font-size: 18px; }
.ls-hero-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.ls-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.ls-hero > .wrap { position: relative; z-index: 2; }

/* ============================================================
   DARK HERO — the default for landing pages
   ============================================================
   The house opening: an aubergine field with drifting auras, a slow
   orbit and film grain, then the page drops into light. It gives the
   page a "curtain up" and makes the first light band feel like a
   release. This is what the 2026 pricing page ships.

     <header class="ls-hero ls-hero-dark">
       <div class="ls-aura ls-aura-a" style="…"></div>
       <svg class="ls-orbit" …></svg>
       <div class="wrap"> … </div>
     </header>

   The nav stays light above it — don't invert it. */
.ls-hero-dark {
  background: var(--m-grad-hero);
  color: var(--fg-on-dark);
  padding: 96px 0 84px;
}
.ls-hero-dark::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(520px circle at 78% 14%, rgba(200,232,158,0.11), rgba(200,232,158,0) 62%);
}
/* grain, baked in — a dark hero always gets it */
.ls-hero-dark::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScxODAnIGhlaWdodD0nMTgwJz48ZmlsdGVyIGlkPSduJz48ZmVUdXJidWxlbmNlIHR5cGU9J2ZyYWN0YWxOb2lzZScgYmFzZUZyZXF1ZW5jeT0nMC45JyBudW1PY3RhdmVzPScyJyBzdGl0Y2hUaWxlcz0nc3RpdGNoJy8+PC9maWx0ZXI+PHJlY3Qgd2lkdGg9JzEwMCUnIGhlaWdodD0nMTAwJScgZmlsdGVyPSd1cmwoI24pJy8+PC9zdmc+");
  background-size: 180px 180px; opacity: 0.05; mix-blend-mode: overlay;
}
.ls-hero-dark h1 { max-width: none; }
.ls-hero-dark .ls-lead { color: var(--fg-on-dark-2); }
.ls-hero-dark a:not(.m-btn) { color: var(--ls-lime); }

/* GRADIENT DISPLAY TEXT — the white→lavender wash on a dark headline.
   Pair with .ls-accent for a lime terminal mark. */
.ls-display-grad {
  background: linear-gradient(176deg, #FFFFFF 0%, #F0E4F5 46%, #D9C2E6 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: 0.08em;   /* stops the clip cropping descenders */
}
/* The lime full-stop. One per headline — it's a period, not a highlighter. */
.ls-accent {
  color: var(--ls-lime); -webkit-text-fill-color: var(--ls-lime);
  text-shadow: 0 0 26px rgba(200, 232, 158, 0.7);
}

/* Split hero — copy left, a floating proof card right. */
.ls-hero-split {
  display: grid; grid-template-columns: 1.2fr 380px;
  gap: 56px; align-items: center;
}

/* FLOATING CARD — frosted glass on the dark field, gently bobbing.
   Use it to show the recommended plan, a live number, or a preview. */
@keyframes lsFloatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.ls-hero-card {
  background: linear-gradient(165deg, rgba(255,251,255,0.11), rgba(255,251,255,0.04));
  border: 1px solid rgba(255,255,255,0.18); border-radius: 22px;
  padding: 24px 26px 20px;
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 32px 80px rgba(10,3,14,0.55);
  animation: lsFloatY 9s ease-in-out infinite;
}
.ls-hero-card .ls-rule { border-top-color: rgba(255,255,255,0.12); margin: 16px 0 14px; }

/* HERO FIGURES — the headline numbers under the fold line.
   Lime numbers, muted labels, hairline rules between. */
.ls-hero-figs {
  display: flex; align-items: center; gap: 44px; flex-wrap: wrap;
  border-top: 1px solid var(--border-on-dark);
  padding-top: 28px; margin-top: 58px;
}
.ls-hero-fig b {
  display: block; font-size: 26px; font-weight: var(--fw-bold);
  letter-spacing: -0.02em; color: var(--ls-lime);
}
.ls-hero-fig span { display: block; font-size: 12.5px; color: var(--fg-on-dark-3); margin-top: 4px; }
.ls-vr { width: 1px; height: 40px; background: var(--border-on-dark); }
/* On a light hero the figures invert. */
.ls-hero:not(.ls-hero-dark) .ls-hero-figs { border-top-color: var(--border-subtle); }
.ls-hero:not(.ls-hero-dark) .ls-hero-fig b { color: var(--accent); }
.ls-hero:not(.ls-hero-dark) .ls-hero-fig span { color: var(--fg-secondary); }
.ls-hero:not(.ls-hero-dark) .ls-vr { background: var(--border-subtle); }

/* Hero-scale buttons — bigger than the in-page .m-btn. */
.m-btn-lg { font-size: 16px; padding: 16px 28px; gap: 12px; }
.m-btn-ondark {
  border-color: rgba(251,248,252,0.30); color: var(--fg-on-dark) !important;
  background: transparent; font-size: 15px; font-weight: var(--fw-semibold); padding: 15px 26px;
}
.m-btn-ondark:hover { background: rgba(251,248,252,0.08); border-color: rgba(251,248,252,0.55); }

/* ---------- Thesis band ----------
   ONE per page, near the top. The argument in a sentence.
   <em> inside goes lime. */
.ls-band {
  background: var(--m-grad-purple); color: var(--fg-on-dark);
  border-radius: var(--radius-xl); padding: 48px 56px;
  box-shadow: var(--shadow-dark); position: relative; overflow: hidden;
}
.ls-band p {
  margin: 0; font-size: clamp(21px, 2.5vw, 30px); font-weight: var(--fw-semibold);
  line-height: 1.34; letter-spacing: -0.022em; max-width: 34ch;
}
.ls-band em { font-style: normal; color: var(--ls-lime); }

/* ---------- Section heads ----------
   Kicker + h2 on the left, deck on the right, hairline under. */
.ls-sec-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 48px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 22px; margin: 14px 0 44px;
}
.ls-sec-head h2 { font-size: clamp(30px, 3.6vw, 46px); }
.ls-sec-head .ls-lead { max-width: 420px; padding-bottom: 3px; }
.band-dark .ls-sec-head { border-bottom-color: var(--border-on-dark-2); }

/* ---------- Grids ---------- */
.ls-grid   { display: grid; gap: 20px; }
.ls-grid-2 { grid-template-columns: repeat(2, 1fr); }
.ls-grid-3 { grid-template-columns: repeat(3, 1fr); }
.ls-grid-4 { grid-template-columns: repeat(4, 1fr); }
.ls-split  { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }

/* ---------- Cards on a page ---------- */
.ls-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card); box-shadow: var(--shadow-lg);
  padding: 28px;
  transition: transform var(--dur-slow) var(--ease),
              box-shadow var(--dur-slow) var(--ease), border-color 400ms ease;
}
.ls-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); border-color: var(--m-purple-300); }
.ls-card h3 { font-size: 21px; margin-bottom: 10px; }
.ls-card p  { margin: 0; font-size: 14px; line-height: 1.62; color: var(--fg-secondary); }
.ls-card-dark {
  background: radial-gradient(120% 130% at 80% -10%, #47225A 0%, #2A1430 60%);
  border-color: var(--border-on-dark); color: var(--fg-on-dark); box-shadow: var(--shadow-dark);
}
.ls-card-dark p { color: var(--fg-on-dark-2); }
.ls-card-dark:hover { border-color: rgba(232,255,207,0.5); box-shadow: 0 34px 74px rgba(10,3,14,0.5); }

/* Numbered card — the counter is a soft lavender tile. */
.ls-card-num {
  width: 30px; height: 30px; border-radius: 10px;
  background: var(--m-lavender-wash); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: var(--fw-bold); margin-bottom: 14px;
}

/* ---------- Insight callout ----------
   The lime "so what". One per section, at most. */
.ls-insight {
  background: var(--m-lime-wash); border: 1px solid rgba(63,107,36,0.16);
  border-left: 4px solid var(--ls-lime-deep);
  border-radius: var(--radius-md); padding: 22px 26px;
}
.ls-insight .ls-label { color: var(--m-lime-ink); margin-bottom: 8px; display: block; }
.ls-insight p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--m-ink); }

/* ---------- Finding ----------
   Numbered research finding: big index, claim, evidence. */
.ls-find { display: grid; grid-template-columns: 56px 1fr; gap: 20px; padding: 26px 0; border-top: 1px solid var(--border-subtle); }
.ls-find-n { font-size: 34px; font-weight: var(--fw-bold); letter-spacing: -0.04em; color: var(--m-purple-300); line-height: 1; }
.ls-find h3 { font-size: 20px; margin-bottom: 8px; }
.ls-find p  { margin: 0; font-size: 14.5px; line-height: 1.65; color: var(--fg-secondary); }

/* ---------- Stat block ---------- */
.ls-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.ls-kpi { padding: 24px; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
.ls-kpi b { display: block; font-size: 40px; font-weight: var(--fw-bold); letter-spacing: -0.035em; line-height: 1; }
.ls-kpi span { display: block; font-size: 12.5px; color: var(--fg-secondary); margin-top: 8px; line-height: 1.45; }
.band-dark .ls-kpi { background: rgba(251,248,252,0.05); border-color: var(--border-on-dark); }
.band-dark .ls-kpi span { color: var(--fg-on-dark-2); }

/* ---------- Prose ----------
   For long-form reading blocks inside a microsite. */
.ls-prose { font-size: 16.5px; line-height: 1.72; color: var(--fg-secondary); }
.ls-prose p { margin: 0 0 18px; }
.ls-prose h3 { margin: 34px 0 12px; font-size: 22px; color: var(--fg-primary); }
.ls-prose ul, .ls-prose ol { margin: 0 0 18px; padding-left: 22px; }
.ls-prose li { margin-bottom: 8px; }
.ls-prose strong { color: var(--fg-primary); font-weight: var(--fw-semibold); }
.ls-prose blockquote {
  margin: 24px 0; padding: 4px 0 4px 22px;
  border-left: 3px solid var(--m-purple-300);
  font-size: 18px; line-height: 1.6; color: var(--fg-primary); font-weight: var(--fw-medium);
}

/* ---------- Methodology / footnotes ---------- */
.ls-method { display: grid; gap: 10px; }
.ls-method li { list-style: none; font-size: 13px; line-height: 1.6; color: var(--fg-secondary); padding-left: 20px; position: relative; }
.ls-method li::before { content: "→"; position: absolute; left: 0; color: var(--m-purple-300); }

/* ---------- Footer ---------- */
.ls-footer { background: var(--m-grad-hero); color: var(--fg-on-dark); padding: 72px 0 44px; position: relative; overflow: hidden; }
.ls-footer h3 { font-size: 26px; margin-bottom: 12px; }
.ls-footer p { color: var(--fg-on-dark-2); font-size: 14px; line-height: 1.65; max-width: 50ch; }
.ls-footer a:not(.m-btn) { color: var(--ls-lime); }
.ls-footer-base {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--border-on-dark);
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: 12px; color: var(--fg-on-dark-3);
}

/* ============================================================
   SCROLL REVEAL
   Add .rv to anything that should rise in. ls-site.js staggers
   siblings automatically.
   ============================================================ */
.rv { opacity: 0; transform: translateY(26px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.rv.in { opacity: 1; transform: none; }
/* Already on screen at load — paint it, don't animate it. Set by ls-site.js. */
.rv.rv-now { opacity: 1; transform: none; transition: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; } }

/* ============================================================
   RESPONSIVE
   Two breakpoints. Test both before shipping.
   ============================================================ */
@media (max-width: 960px) {
  :root { --gutter: 28px; }
  .pad { padding: 76px 0; } .pad-lg { padding: 92px 0; }
  .ls-grid-3, .ls-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .ls-split { grid-template-columns: 1fr; gap: 32px; }
  .ls-kpis { grid-template-columns: repeat(2, 1fr); }
  .ls-sec-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .ls-sec-head .ls-lead { max-width: none; }
  .ls-band { padding: 36px 32px; }
  /* The hero card drops below the copy and stops bobbing — a floating
     element in a single column reads as a glitch, not as depth. */
  .ls-hero-split { grid-template-columns: 1fr; gap: 40px; }
  .ls-hero-card { animation: none; max-width: 420px; }
  .ls-hero-figs { gap: 26px; margin-top: 44px; }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .pad, .pad-lg { padding: 60px 0; } .pad-sm { padding: 48px 0; }
  .ls-grid-2, .ls-grid-3, .ls-grid-4 { grid-template-columns: 1fr; }
  .ls-kpis { grid-template-columns: 1fr 1fr; }
  .ls-hero { padding: 64px 0 56px; }
  .ls-nav .wrap { gap: 16px; overflow-x: auto; }
  .ls-navlink { white-space: nowrap; }
  .ls-find { grid-template-columns: 1fr; gap: 8px; }
  .ls-hero-dark { padding: 64px 0 56px; }
  .ls-hero-figs { gap: 20px; }
  .ls-vr { display: none; }
  .ls-hero-fig { flex: 1 1 40%; }
}
