/* css/landing.css
 * Landing-page design system for the widget test harness.
 *
 * A light "Geist" marketing look layered on top of css/harness.css (which owns the
 * brand tokens + the fixed left control rail). This file styles ONLY the simulated
 * landing-page chrome and content (nav, hero, features, quotes, pricing, CTA band,
 * footer) plus the floating debug chip.
 *
 * Reuses harness tokens: --bg, --border, --accent, --muted, --heading, --sans, etc.
 * Layout contract (see SPEC §5):
 *   - <body> already has padding-left:440px (0 under 900px) to clear the rail.
 *   - The nav is position:sticky;top:0 inside <body>, so it inherits that offset.
 *   - Landing sections live in a centered ~1100px container in the content area.
 */

:root {
  /* landing-only tokens (harness tokens are reused as-is) */
  --lp-ink: #111111;
  --lp-muted: #666666;
  --lp-radius: 12px;
  --lp-radius-sm: 8px;
  --lp-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.04);
  --lp-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --lp-container: 1100px;
  --lp-section-pad: 80px;

  /* campaign accents */
  --lp-geo: #f5a623;        /* amber */
  --lp-institute: #7c5cff;  /* purple */

  /* the active section accent — default = brand blue; overridden by .lp-accent-* */
  --lp-accent: var(--accent);
  --lp-accent-weak: var(--accent-weak);
}

/* The centered content column. Sections opt in by living inside a width-constrained
   wrapper; we constrain at the section-inner level so full-bleed bands can exist. */
.lp-section,
.lp-hero-inner,
.lp-nav-inner,
.lp-trust,
.lp-cta-band-inner,
.lp-footer-cols {
  max-width: var(--lp-container);
  margin-left: auto;
  margin-right: auto;
}

/* ===========================================================================
   NAV  (sticky, prepended by js/chrome.js)
   =========================================================================== */
.lp-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.lp-nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 32px;
}
.lp-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--lp-ink);
  text-decoration: none;
}
.lp-logo svg { display: block; }
.lp-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
}
.lp-nav-link {
  font-size: 14px;
  font-weight: 450;
  color: var(--muted);
  text-decoration: none;
  padding: 7px 11px;
  border-radius: var(--lp-radius-sm);
  transition: color 0.15s, background 0.15s;
}
.lp-nav-link:hover { color: var(--lp-ink); background: var(--bg-subtle); }
.lp-nav-link.is-active { color: var(--lp-ink); font-weight: 550; }
.lp-nav-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 999px;
  padding: 8px 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.lp-nav-cta:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

/* ===========================================================================
   HERO
   =========================================================================== */
.lp-hero {
  padding: 88px 32px 64px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(900px 400px at 80% -10%, var(--lp-accent-weak), transparent 60%);
}
.lp-hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.lp-hero-text { max-width: 560px; }
.lp-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lp-accent);
  margin: 0 0 18px;
}
.lp-h1 {
  font-size: 56px;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--lp-ink);
  margin: 0 0 20px;
}
.lp-lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 32px;
  max-width: 46ch;
}
.lp-cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---- buttons (shared) ---- */
.lp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 550;
  font-family: var(--sans);
  border-radius: 999px;
  padding: 12px 22px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.05s;
}
.lp-btn:active { transform: translateY(1px); }
.lp-btn-primary {
  background: var(--lp-accent);
  color: #fff;
  border-color: var(--lp-accent);
  box-shadow: var(--lp-shadow-sm);
}
.lp-btn-primary:hover { filter: brightness(0.94); }
.lp-btn-ghost {
  background: var(--bg);
  color: var(--lp-ink);
  border-color: var(--border-strong);
}
.lp-btn-ghost:hover { background: var(--bg-subtle); border-color: var(--lp-ink); }

/* ---- hero visual: a gradient panel with an abstract "dashboard" in pure CSS ---- */
.lp-hero-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--lp-radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background:
    linear-gradient(135deg, var(--lp-accent), color-mix(in srgb, var(--lp-accent) 55%, #000));
  box-shadow: var(--lp-shadow);
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto 1fr auto;
  gap: 14px;
}
/* faux header bar */
.lp-hero-visual::before {
  content: "";
  grid-column: 1 / -1;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  width: 45%;
}
/* faux KPI cards row + chart, built from generated children-free boxes via box-shadow.
   We use child <i> elements if present, but degrade gracefully with backgrounds. */
.lp-hero-visual > i {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(2px);
}
.lp-hero-visual > i.kpi { aspect-ratio: 3 / 2; }
.lp-hero-visual > i.chart {
  grid-column: 1 / -1;
  background:
    linear-gradient(to top, rgba(255, 255, 255, 0.30) 0 22%, transparent 22%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.22) 0 12px,
      transparent 12px 34px
    );
  position: relative;
  min-height: 90px;
}
.lp-hero-visual > i.bar {
  align-self: end;
  width: 100%;
  background: rgba(255, 255, 255, 0.55);
  border: none;
  border-radius: 6px 6px 0 0;
}

/* ===========================================================================
   TRUST BAR
   =========================================================================== */
.lp-trust {
  padding: 40px 32px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.lp-trust-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 20px;
}
.lp-trust-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.lp-logo-chip {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 18px;
}

/* ===========================================================================
   SECTION scaffolding
   =========================================================================== */
.lp-section { padding: var(--lp-section-pad) 32px; }
.lp-section-head {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}
.lp-section-title {
  font-size: 38px;
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--lp-ink);
  margin: 0 0 14px;
}
.lp-section-sub {
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

/* ===========================================================================
   FEATURES
   =========================================================================== */
.lp-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.lp-feature {
  border: 1px solid var(--border);
  border-radius: var(--lp-radius);
  background: var(--bg);
  padding: 26px;
  box-shadow: var(--lp-shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.lp-feature:hover {
  border-color: var(--border-strong);
  box-shadow: var(--lp-shadow);
  transform: translateY(-2px);
}
.lp-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--lp-accent-weak);
  color: var(--lp-accent);
  margin: 0 0 18px;
}
.lp-feature-icon svg { display: block; }
.lp-feature-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--lp-ink);
  margin: 0 0 8px;
}
.lp-feature-body {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

/* ===========================================================================
   QUOTES / TESTIMONIALS
   =========================================================================== */
.lp-quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.lp-quote {
  border: 1px solid var(--border);
  border-radius: var(--lp-radius);
  background: var(--bg-subtle);
  padding: 28px;
}
.lp-quote-body {
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  margin: 0 0 22px;
  letter-spacing: -0.01em;
}
.lp-quote-author {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}
.lp-quote-author b { color: var(--lp-ink); font-weight: 600; }
.lp-quote-author span { display: block; }

/* avatars: CSS circles with initials (no <img>) */
.lp-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--lp-accent), color-mix(in srgb, var(--lp-accent) 50%, #000));
}

/* ===========================================================================
   PRICING
   =========================================================================== */
.lp-pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}
.lp-tier {
  border: 1px solid var(--border);
  border-radius: var(--lp-radius);
  background: var(--bg);
  padding: 30px 26px;
  box-shadow: var(--lp-shadow-sm);
}
.lp-tier.is-featured {
  border-color: var(--lp-accent);
  box-shadow: 0 0 0 1px var(--lp-accent), var(--lp-shadow);
  position: relative;
}
.lp-tier.is-featured::before {
  content: "Most popular";
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--lp-accent);
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}
.lp-tier-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--lp-ink);
  margin: 0 0 6px;
}
.lp-price {
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--lp-ink);
  margin: 0 0 4px;
}
.lp-price small {
  font-size: 15px;
  font-weight: 450;
  color: var(--faint);
  letter-spacing: 0;
}
.lp-tier-list {
  list-style: none;
  margin: 22px 0;
  padding: 0;
}
.lp-tier-list li {
  position: relative;
  font-size: 15px;
  color: var(--muted);
  padding: 8px 0 8px 26px;
  border-top: 1px solid var(--border);
}
.lp-tier-list li:first-child { border-top: none; }
.lp-tier-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--lp-accent);
  border-bottom: 2px solid var(--lp-accent);
  transform: translateY(-65%) rotate(-45deg);
}
.lp-tier-cta {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--sans);
  border-radius: var(--lp-radius-sm);
  padding: 11px 16px;
  text-decoration: none;
  cursor: pointer;
  background: var(--bg);
  color: var(--lp-ink);
  border: 1px solid var(--border-strong);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.lp-tier-cta:hover { background: var(--bg-subtle); border-color: var(--lp-ink); }
.lp-tier.is-featured .lp-tier-cta {
  background: var(--lp-accent);
  color: #fff;
  border-color: var(--lp-accent);
}
.lp-tier.is-featured .lp-tier-cta:hover { filter: brightness(0.94); }

/* ===========================================================================
   CTA BAND
   =========================================================================== */
.lp-cta-band {
  padding: 72px 32px;
  background: var(--lp-ink);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.lp-cta-band-inner { text-align: center; }
.lp-cta-band-title {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: #fff;
  margin: 0 0 12px;
}
.lp-cta-band-sub {
  font-size: 18px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 auto;
  max-width: 50ch;
}

/* ===========================================================================
   FOOTER  (appended by js/chrome.js)
   =========================================================================== */
.lp-footer {
  padding: 64px 32px 40px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}
.lp-footer-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.lp-footer-col h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 16px;
}
.lp-footer-link {
  display: block;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  padding: 5px 0;
  transition: color 0.15s;
}
.lp-footer-link:hover { color: var(--lp-ink); }
.lp-footer-bottom {
  margin-top: 28px;
  font-size: 13px;
  color: var(--faint);
}

/* ===========================================================================
   CAMPAIGN ACCENTS — wrap a section to re-tint eyebrow, primary button, accents.
   Sets --lp-accent locally; everything that reads var(--lp-accent) follows.
   =========================================================================== */
.lp-accent-geo {
  --lp-accent: var(--lp-geo);
  --lp-accent-weak: #fff7e6;
}
.lp-accent-institute {
  --lp-accent: var(--lp-institute);
  --lp-accent-weak: #f1edff;
}

/* ===========================================================================
   DEBUG CHIP  (injected by js/debug-chip.js) — fixed top-right, below the widget
   =========================================================================== */
.lp-debug-chip {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9000;
  font-family: var(--sans);
}
/* collapsed = pill button */
.lp-debug-chip > button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 13px;
  cursor: pointer;
  box-shadow: var(--lp-shadow);
  transition: border-color 0.15s, background 0.15s;
}
.lp-debug-chip > button:hover { border-color: var(--border-strong); background: var(--bg-subtle); }

/* open panel — hidden until .is-open */
.lp-debug-panel {
  display: none;
  margin-top: 8px;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--lp-radius);
  box-shadow: var(--lp-shadow);
  padding: 14px 16px;
}
.lp-debug-chip.is-open .lp-debug-panel { display: block; }

.lp-debug-row {
  display: flex;
  gap: 8px;
  font-size: 12px;
  line-height: 1.5;
  padding: 5px 0;
  color: var(--text);
  border-top: 1px solid var(--border);
}
.lp-debug-row:first-child { border-top: none; }
.lp-debug-row b {
  flex: 0 0 88px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.lp-debug-row > span,
.lp-debug-row code {
  font-family: var(--mono);
  font-size: 11.5px;
  word-break: break-word;
}

.lp-debug-params {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.lp-debug-param {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 7px;
  color: var(--text);
  word-break: break-all;
}
.lp-debug-param b { color: var(--accent); font-weight: 600; }
.lp-debug-empty {
  font-size: 11.5px;
  font-style: italic;
  color: var(--faint);
}

/* ===========================================================================
   RESPONSIVE — degrade under 900px (rail collapses there too, padding-left:0)
   =========================================================================== */
@media (max-width: 900px) {
  .lp-hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .lp-h1 { font-size: 42px; }
  .lp-features,
  .lp-pricing { grid-template-columns: 1fr; }
  .lp-footer-cols { grid-template-columns: 1fr 1fr; }
  .lp-section { padding: 56px 24px; }
  .lp-hero { padding: 56px 24px 48px; }
  .lp-nav-inner { padding: 12px 20px; }
}
@media (max-width: 560px) {
  .lp-nav-links { display: none; }
  .lp-h1 { font-size: 34px; }
  .lp-section-title { font-size: 30px; }
  .lp-footer-cols { grid-template-columns: 1fr; }
}
