/* ============================================================================
   Landing page — public marketing splash for site visitors.
   Reuses design tokens from tokens.css (dark night-sky brand). Link order in
   index.html is tokens.css → landing.css so the custom properties resolve here.
   No images: hero mockup, share cards, and heatmap are all CSS/inline-SVG.
   ========================================================================== */

/* Minimal reset — index.html links only tokens.css + landing.css (not base.css),
   so the box-sizing/margin normalization base.css usually provides lives here. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, svg { max-width: 100%; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { text-decoration: none; color: var(--accent); }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; overflow-wrap: break-word; }
ol, ul { list-style: none; }

.landing-body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 720px at 12% -8%, rgba(124, 92, 255, 0.22), transparent 60%),
    radial-gradient(900px 640px at 100% 0%, rgba(70, 200, 255, 0.10), transparent 55%),
    radial-gradient(1000px 900px at 50% 120%, rgba(124, 92, 255, 0.14), transparent 60%),
    linear-gradient(180deg, #0b0e16 0%, #11151f 100%);
  background-attachment: fixed;
  color: var(--text-primary);
}

.lp-container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: var(--space-6);
}

/* Skip link ------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
}
.skip-link:focus {
  left: var(--space-4);
  top: var(--space-4);
  color: #fff;
}

:where(a, button):focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ============================ Buttons ============================ */
.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform var(--transition), background var(--transition),
    border-color var(--transition), box-shadow var(--transition), color var(--transition);
  white-space: nowrap;
}
.lp-btn-lg { padding: 15px 28px; font-size: 16px; }

.lp-btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.35);
}
.lp-btn-primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 38px rgba(124, 92, 255, 0.45);
}
.lp-btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
  color: var(--text-primary);
}
.lp-btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  background: rgba(124, 92, 255, 0.10);
  transform: translateY(-1px);
}

/* ============================ Header ============================ */
.lp-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 22, 0.72);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.lp-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-h);
}
.lp-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.lp-brand:hover { color: var(--text-primary); }
.lp-brand-mark {
  font-size: 20px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lp-nav { display: flex; align-items: center; gap: var(--space-4); }
.lp-nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 15px;
}
.lp-nav-link:hover { color: var(--text-primary); }

/* ============================ Hero ============================ */
.lp-hero {
  padding: clamp(48px, 8vw, 104px) 0 clamp(40px, 6vw, 80px);
  position: relative;
}
.lp-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.lp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-strong);
  margin-bottom: var(--space-4);
  padding: 6px 14px;
  border: 1px solid rgba(124, 92, 255, 0.35);
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.08);
}
.lp-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 0 8px var(--accent-2);
}
.lp-hero-title {
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 700;
  background: linear-gradient(180deg, #ffffff 0%, #c9cfe6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lp-hero-sub {
  margin-top: var(--space-5);
  max-width: 30rem;
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  color: var(--text-secondary);
  line-height: 1.6;
}
.lp-hero-cta {
  margin-top: var(--space-6);
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.lp-hero-note {
  margin-top: var(--space-4);
  font-size: 13px;
  color: var(--text-muted);
}

/* Trust strip under the hero CTA */
.lp-trust {
  margin-top: var(--space-5);
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.lp-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.lp-trust-item::before {
  content: '✓';
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  color: var(--success);
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.35);
}

/* ---- Hero visual: CSS browser mockup ---- */
.lp-hero-visual {
  display: flex;
  justify-content: center;
  position: relative;
}
/* Soft glow halo behind the mockup */
.lp-hero-visual::before {
  content: '';
  position: absolute;
  inset: -10% -6%;
  background:
    radial-gradient(50% 50% at 50% 45%, rgba(124, 92, 255, 0.22), transparent 70%);
  pointer-events: none;
}
.lp-browser {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 80px rgba(124, 92, 255, 0.18);
  overflow: hidden;
  position: relative;
  transform: perspective(1200px) rotateY(-4deg) rotateX(1.5deg);
  transition: transform 400ms cubic-bezier(.2,.7,.3,1);
}
.lp-hero-visual:hover .lp-browser {
  transform: perspective(1200px) rotateY(0deg) rotateX(0deg);
}
/* Floating "session saved" chip — a little life without any JS */
.lp-float-chip {
  position: absolute;
  right: max(4%, 8px);
  bottom: 14%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(17, 21, 31, 0.92);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  animation: lp-float 5s ease-in-out infinite;
}
.lp-float-chip::before {
  content: '✓';
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  font-size: 11px;
  color: #fff;
  background: var(--success);
}
@keyframes lp-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.lp-browser-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.lp-dot { width: 11px; height: 11px; border-radius: 999px; display: inline-block; }
.lp-dot-r { background: #ff5f57; }
.lp-dot-y { background: #febc2e; }
.lp-dot-g { background: #28c840; }
.lp-browser-url {
  margin-left: 10px;
  flex: 1;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg);
  border-radius: 999px;
  padding: 4px 12px;
  text-align: center;
  font-family: var(--font-mono);
}
.lp-browser-body { padding: var(--space-5); }
.lp-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}
.lp-preview-title { font-weight: 600; font-size: 14px; color: var(--text-secondary); }
.lp-preview-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 3px 10px;
}

/* Heatmap grid of tiny cells (7 rows) */
.lp-heatmap {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  grid-auto-rows: 1fr;
  gap: 4px;
  margin-bottom: var(--space-5);
}
.lp-heatmap i {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 3px;
  background: var(--surface-2);
}
.lp-heatmap i.h0 { background: var(--surface-2); }
.lp-heatmap i.h1 { background: var(--heat-1); }
.lp-heatmap i.h2 { background: var(--heat-2); }
.lp-heatmap i.h3 { background: var(--heat-3); }
.lp-heatmap i.h4 { background: var(--heat-4); }
.lp-heatmap i.h5 { background: var(--heat-5); }

.lp-preview-cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.lp-stat-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lp-stat-num {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lp-stat-label { font-size: 12px; color: var(--text-secondary); }

/* ============================ Sections ============================ */
.lp-section { padding: clamp(48px, 7vw, 88px) 0; }
.lp-section-alt {
  background: rgba(17, 21, 31, 0.55);
  border-block: 1px solid var(--border-soft);
}
.lp-section-title {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  letter-spacing: -0.02em;
  text-align: center;
}
.lp-section-sub {
  margin: var(--space-3) auto 0;
  max-width: 34rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* ---- Feature grid ---- */
.lp-feature-grid {
  list-style: none;
  padding: 0;
  margin: var(--space-7) 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
.lp-tile {
  background: linear-gradient(180deg, rgba(28, 34, 48, 0.7), rgba(22, 27, 39, 0.7));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: transform var(--transition), border-color var(--transition),
    box-shadow var(--transition);
}
.lp-tile:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md), 0 0 40px rgba(124, 92, 255, 0.12);
}
.lp-tile-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent-strong);
  margin-bottom: var(--space-4);
}
.lp-tile-icon svg { width: 24px; height: 24px; }
.lp-tile-title { font-size: 1.05rem; margin-bottom: var(--space-2); }
.lp-tile-text { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.55; }

/* ---- How it works ---- */
.lp-steps {
  list-style: none;
  padding: 0;
  margin: var(--space-7) 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  counter-reset: step;
}
.lp-step {
  position: relative;
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.lp-step-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 20px rgba(124, 92, 255, 0.3);
  margin-bottom: var(--space-4);
}
.lp-step-title { font-size: 1.05rem; margin-bottom: var(--space-2); }
.lp-step-text { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.55; }

/* ---- Social strip ---- */
.lp-social {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.lp-social .lp-section-title,
.lp-social .lp-social-text { text-align: left; }
.lp-social-text {
  margin: var(--space-4) 0 var(--space-5);
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 30rem;
}
.lp-social-cards {
  position: relative;
  min-height: 240px;
  display: grid;
  place-items: center;
}
.lp-share-card {
  width: 230px;
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-lg);
  background:
    radial-gradient(400px 300px at 20% 0%, rgba(124, 92, 255, 0.35), transparent 60%),
    linear-gradient(180deg, #0b0e16, #11151f);
}
.lp-share-card-a {
  transform: rotate(-5deg) translateX(-24px);
  z-index: 2;
}
.lp-share-card-b {
  position: absolute;
  transform: rotate(6deg) translateX(46px) translateY(30px);
  background:
    radial-gradient(400px 300px at 80% 0%, rgba(70, 200, 255, 0.32), transparent 60%),
    linear-gradient(180deg, #0b0e16, #11151f);
}
.lp-share-mark { font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.lp-share-big {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff, var(--accent-strong));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lp-share-sub { font-size: 12px; color: var(--text-muted); }

/* ---- Final CTA band ---- */
.lp-cta-band {
  background:
    radial-gradient(700px 400px at 50% 0%, rgba(124, 92, 255, 0.18), transparent 65%);
}
.lp-cta-inner { text-align: center; }
.lp-cta-center { justify-content: center; margin-top: var(--space-6); }

/* ============================ Footer ============================ */
.lp-footer {
  border-top: 1px solid var(--border-soft);
  background: var(--bg-elev);
  padding: var(--space-6) 0;
}
.lp-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.lp-footer-links { display: flex; gap: var(--space-5); flex-wrap: wrap; }
.lp-footer-links a { color: var(--text-secondary); font-size: 14px; }
.lp-footer-links a:hover { color: var(--accent-strong); }
.lp-footer-legal { color: var(--text-muted); font-size: 13px; }

/* ============================ Responsive ============================ */
@media (max-width: 720px) {
  .lp-container { padding-inline: var(--space-5); }
  .lp-hero-grid { grid-template-columns: 1fr; }
  .lp-hero-visual { order: -1; }
  .lp-hero-sub { max-width: none; }
  .lp-feature-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-steps { grid-template-columns: 1fr; }
  .lp-social { grid-template-columns: 1fr; }
  .lp-social .lp-section-title,
  .lp-social .lp-social-text { text-align: center; margin-inline: auto; }
  .lp-social-cards { min-height: 300px; margin-top: var(--space-4); }
}

@media (max-width: 560px) {
  .lp-container { padding-inline: var(--space-4); }
  .lp-nav { gap: var(--space-3); }
  .lp-nav-link { display: none; } /* keep header light; "Sign in" also in hero */
  .lp-hero-cta .lp-btn,
  .lp-cta-center .lp-btn { flex: 1 1 auto; }
  .lp-feature-grid { grid-template-columns: 1fr; }
  .lp-footer-inner { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
  .lp-trust { gap: var(--space-3); }
  .lp-float-chip { font-size: 12px; padding: 8px 12px; bottom: 8%; }
  /* Flat mockup on phones — the 3D tilt reads as skew at small sizes. */
  .lp-browser { transform: none; }
}

/* ============================ Motion ============================ */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
  .lp-btn:hover,
  .lp-tile:hover { transform: none; }
  .landing-body { background-attachment: scroll; }
  .lp-float-chip { animation: none; }
  .lp-browser { transform: none; transition: none; }
}
