/* ============================================================
   MILLION-DOLLAR LANDING v2 — cinematic + light/dark theme
   ============================================================ */

:root {
  /* Dark (default) */
  --ld-bg: #05060a;
  --ld-bg-soft: #0c0f1a;
  --ld-text: #f5f7ff;
  --ld-muted: rgba(245, 247, 255, 0.55);
  --ld-panel-bg: rgba(255, 255, 255, 0.04);
  --ld-panel-border: rgba(255, 255, 255, 0.08);
  --ld-nav-bg: rgba(15, 17, 26, 0.6);
  --ld-grid-line: rgba(255, 255, 255, 0.025);
  --ld-card-bg-from: rgba(255, 255, 255, 0.05);
  --ld-card-bg-to: rgba(255, 255, 255, 0.02);
  --ld-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);

  /* Brand gradient + accents (theme-independent) */
  --ld-accent: #6b8cff;
  --ld-accent-2: #b06bff;
  --ld-accent-3: #00d4ff;
  --ld-radius: 18px;
}

[data-theme="light"] {
  --ld-bg: #fbfbfd;
  --ld-bg-soft: #ffffff;
  --ld-text: #0a0c12;
  --ld-muted: rgba(10, 12, 18, 0.62);
  --ld-panel-bg: rgba(10, 12, 18, 0.04);
  --ld-panel-border: rgba(10, 12, 18, 0.08);
  --ld-nav-bg: rgba(255, 255, 255, 0.7);
  --ld-grid-line: rgba(10, 12, 18, 0.04);
  --ld-card-bg-from: rgba(10, 12, 18, 0.03);
  --ld-card-bg-to: rgba(10, 12, 18, 0.01);
  --ld-shadow: 0 30px 80px rgba(10, 12, 18, 0.12);
}

html.landing { scroll-behavior: auto; }
body.landing {
  margin: 0;
  background: var(--ld-bg);
  color: var(--ld-text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  overflow-x: hidden;
  font-feature-settings: "ss01", "ss02", "cv11";
  cursor: none; /* custom cursor takes over */
  transition: background 0.5s ease, color 0.5s ease;
}
@media (max-width: 900px) { body.landing { cursor: auto; } } /* no custom cursor on touch */

/* === Lenis smooth-scroll === */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* === Custom cursor === */
.ld-cursor {
  position: fixed; top: 0; left: 0; z-index: 9999;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ld-text);
  pointer-events: none;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
}
.ld-cursor.hover { width: 50px; height: 50px; opacity: 0.5; }
.ld-cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 9998;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--ld-text);
  opacity: 0.35;
  pointer-events: none;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width 0.25s ease, height 0.25s ease, opacity 0.25s ease;
}
.ld-cursor-ring.hover { width: 70px; height: 70px; opacity: 0.15; }
@media (max-width: 900px) { .ld-cursor, .ld-cursor-ring { display: none; } }

/* === Scroll progress bar === */
.ld-progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 2px;
  background: linear-gradient(90deg, var(--ld-accent), var(--ld-accent-2), var(--ld-accent-3));
  transform-origin: left center;
  transform: scaleX(0);
  will-change: transform;
}

/* === Cinematic 3D background (fixed full-viewport behind hero) === */
.ld-cinematic {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
}
#ld-cinematic-canvas { width: 100%; height: 100%; display: block; }
.ld-cinematic-fade {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 60%, var(--ld-bg) 100%);
  pointer-events: none;
}

/* === Aurora + grid (subtle, behind cinematic for dark) === */
.ld-aurora {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 50% at 20% 10%, rgba(107,140,255,0.14), transparent 60%),
    radial-gradient(50% 40% at 80% 30%, rgba(176,107,255,0.12), transparent 60%),
    radial-gradient(60% 50% at 50% 90%, rgba(0,212,255,0.10), transparent 60%);
  transition: opacity 0.5s ease;
}
[data-theme="light"] .ld-aurora {
  background:
    radial-gradient(60% 50% at 20% 10%, rgba(107,140,255,0.10), transparent 60%),
    radial-gradient(50% 40% at 80% 30%, rgba(176,107,255,0.08), transparent 60%),
    radial-gradient(60% 50% at 50% 90%, rgba(0,212,255,0.10), transparent 60%);
}
.ld-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--ld-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--ld-grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  opacity: 0.55;
  transition: opacity 0.5s ease;
}

/* === Nav === */
.ld-nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 100;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--ld-nav-bg);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--ld-panel-border);
  border-radius: 999px;
  font-size: 13.5px;
  transition: transform .35s ease, opacity .35s ease, background .5s ease, border-color .5s ease;
}
.ld-nav a, .ld-nav button { color: var(--ld-text); text-decoration: none; opacity: 0.75; padding: 6px 12px; border-radius: 999px; transition: opacity .15s, background .15s; background: transparent; border: 0; cursor: none; font: inherit; }
@media (max-width: 900px) { .ld-nav a, .ld-nav button { cursor: pointer; } }
.ld-nav a:hover, .ld-nav a.active, .ld-nav button:hover { opacity: 1; background: rgba(127,127,127,0.08); }
.ld-nav .ld-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; padding: 6px 12px; }
.ld-nav .ld-brand .ld-logo {
  width: 22px; height: 22px; border-radius: 6px;
  background: conic-gradient(from 220deg, var(--ld-accent), var(--ld-accent-2), var(--ld-accent-3), var(--ld-accent));
  box-shadow: 0 0 24px rgba(107,140,255,.5);
}
.ld-nav .ld-cta {
  background: linear-gradient(135deg, var(--ld-accent), var(--ld-accent-2));
  color: #fff !important; padding: 8px 18px; border-radius: 999px; font-weight: 600;
  box-shadow: 0 12px 30px rgba(107,140,255,.35);
  opacity: 1 !important;
}
.ld-theme-toggle { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; font-size: 16px; }

/* === Section base === */
.ld-section {
  position: relative; z-index: 1;
  min-height: 100vh;
  padding: 120px 24px;
  display: flex; align-items: center; justify-content: center;
}
.ld-section.x-tall {
  min-height: 300vh;
  display: block;
  padding: 0 24px;
}
.ld-section.x-tall .ld-pin-stage {
  position: sticky; top: 0;
  height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  max-width: 1180px; margin: 0 auto;
}
.ld-inner { width: 100%; max-width: 1180px; margin: 0 auto; position: relative; }
.ld-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ld-muted);
  padding: 6px 14px;
  background: var(--ld-panel-bg);
  border: 1px solid var(--ld-panel-border);
  border-radius: 999px;
}
.ld-kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ld-accent); box-shadow: 0 0 12px var(--ld-accent); }

/* === Hero (cinematic) === */
.ld-hero {
  padding-top: 25vh; padding-bottom: 60px;
  min-height: 100vh;
  text-align: center;
  position: relative;
  z-index: 2;
}
.ld-hero h1 {
  font-size: clamp(48px, 9.5vw, 168px);
  line-height: 0.92; letter-spacing: -0.045em; margin: 28px 0 22px;
  font-weight: 800;
}
.ld-hero h1 .accent {
  display: inline-block;
  color: #8aa3ff;
  background-image: linear-gradient(120deg, #6b8cff 0%, #b06bff 50%, #00d4ff 100%);
  -webkit-background-clip: text;
          background-clip: text;
}
@supports ((-webkit-text-fill-color: transparent) and (-webkit-background-clip: text)) {
  .ld-hero h1 .accent { -webkit-text-fill-color: transparent; }
}
.ld-hero p.sub {
  font-size: clamp(17px, 1.6vw, 22px);
  color: var(--ld-muted);
  max-width: 720px; margin: 0 auto 36px;
  line-height: 1.55;
}
.ld-hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.ld-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 24px; border-radius: 14px;
  font-weight: 600; font-size: 15px; text-decoration: none;
  border: 1px solid var(--ld-panel-border);
  background: var(--ld-panel-bg);
  color: var(--ld-text);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  cursor: none;
}
@media (max-width: 900px) { .ld-btn { cursor: pointer; } }
.ld-btn:hover { transform: translateY(-2px); border-color: rgba(127,127,127,0.25); }
.ld-btn.primary {
  background: linear-gradient(135deg, var(--ld-accent), var(--ld-accent-2));
  border-color: transparent;
  color: #fff !important;
  box-shadow: 0 18px 40px rgba(107,140,255,.35), inset 0 0 0 1px rgba(255,255,255,0.18);
}
.ld-btn.primary:hover { box-shadow: 0 24px 50px rgba(107,140,255,.45), inset 0 0 0 1px rgba(255,255,255,0.22); }
.ld-btn .arrow { transition: transform .2s ease; }
.ld-btn:hover .arrow { transform: translateX(4px); }

/* Trust strip */
.ld-trust {
  margin-top: 60px;
  display: flex; flex-wrap: wrap; gap: 22px; justify-content: center;
  color: var(--ld-muted); font-size: 13px;
}
.ld-trust span { display: inline-flex; align-items: center; gap: 6px; }
.ld-trust span::before { content: "✓"; color: #22c55e; font-weight: 700; }

/* === Scroll indicator at hero bottom === */
.ld-scroll-hint {
  position: absolute; left: 50%; bottom: 5vh; transform: translateX(-50%);
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ld-muted);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  animation: ld-bounce 2s infinite;
}
.ld-scroll-hint::after {
  content: ""; width: 1px; height: 26px;
  background: linear-gradient(to bottom, var(--ld-accent), transparent);
}
@keyframes ld-bounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }

/* === Pin-stage headlines === */
.ld-pin-headline {
  font-size: clamp(38px, 6vw, 108px);
  letter-spacing: -0.035em; line-height: 1; font-weight: 800;
  margin: 18px 0 0;
}
.ld-pin-sub { color: var(--ld-muted); font-size: clamp(17px, 1.6vw, 22px); max-width: 640px; margin-top: 18px; line-height: 1.5; }

/* === "How it works" === */
.ld-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; margin-top: 48px; }
@media (max-width: 900px) { .ld-steps { grid-template-columns: 1fr; gap: 30px; } }
.ld-steps-text { position: relative; min-height: 220px; }
.ld-steps-text > .step {
  position: absolute; inset: 0; opacity: 0; transform: translateY(20px);
  transition: opacity .35s ease, transform .35s ease;
}
.ld-steps-text > .step.active { opacity: 1; transform: translateY(0); }
.ld-steps-text .step-num { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ld-accent); font-weight: 700; }
.ld-steps-text .step-title { font-size: clamp(28px, 3.4vw, 48px); margin: 8px 0 12px; letter-spacing: -0.02em; font-weight: 800; }
.ld-steps-text .step-body { color: var(--ld-muted); font-size: clamp(15px, 1.3vw, 18px); line-height: 1.6; }

.ld-steps-visual {
  position: relative;
  aspect-ratio: 1 / 1; max-height: 520px;
  border-radius: var(--ld-radius);
  background: linear-gradient(135deg, rgba(107,140,255,0.08), rgba(176,107,255,0.06));
  border: 1px solid var(--ld-panel-border);
  overflow: hidden;
}
.ld-steps-visual > .stage {
  position: absolute; inset: 0; opacity: 0; transition: opacity .35s ease;
  display: flex; align-items: center; justify-content: center; font-size: 90px;
}
.ld-steps-visual > .stage.active { opacity: 1; }

.ld-step-rail { display: flex; gap: 8px; margin-top: 24px; }
.ld-step-rail .seg { flex: 1; height: 3px; background: var(--ld-panel-bg); border-radius: 999px; overflow: hidden; }
.ld-step-rail .seg .fill { height: 100%; background: linear-gradient(90deg, var(--ld-accent), var(--ld-accent-2)); transform-origin: left; transform: scaleX(0); transition: transform .25s ease; }
.ld-step-rail .seg.active .fill { transform: scaleX(1); }

/* === Stats === */
.ld-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 60px; }
@media (max-width: 900px) { .ld-stats { grid-template-columns: repeat(2, 1fr); } }
.ld-stat {
  background: linear-gradient(180deg, var(--ld-card-bg-from), var(--ld-card-bg-to));
  border: 1px solid var(--ld-panel-border);
  border-radius: var(--ld-radius);
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}
.ld-stat::before {
  content: ""; position: absolute; inset: -1px;
  background: linear-gradient(135deg, rgba(107,140,255,0.4), transparent 60%);
  border-radius: inherit; pointer-events: none;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  padding: 1px;
}
.ld-stat .num { font-size: clamp(34px, 4vw, 56px); font-weight: 800; letter-spacing: -0.02em; }
.ld-stat .label { color: var(--ld-muted); font-size: 14px; margin-top: 6px; }
.ld-stat .num .suffix { background: linear-gradient(120deg, var(--ld-accent), var(--ld-accent-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* === Feature pillars === */
.ld-pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 60px; }
@media (max-width: 900px) { .ld-pillars { grid-template-columns: 1fr; } }
.ld-pillar {
  position: relative;
  padding: 36px 28px;
  background: linear-gradient(180deg, var(--ld-card-bg-from), var(--ld-card-bg-to));
  border: 1px solid var(--ld-panel-border);
  border-radius: var(--ld-radius);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.15s ease;
  will-change: transform;
}
.ld-pillar h3 { font-size: 22px; margin: 14px 0 6px; letter-spacing: -0.01em; font-weight: 700; }
.ld-pillar p { color: var(--ld-muted); line-height: 1.6; font-size: 15px; margin: 0; }
.ld-pillar .ld-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(107,140,255,0.18), rgba(176,107,255,0.18));
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--ld-panel-border);
  font-size: 22px;
}

/* === "Video on scroll" — pinned cinematic === */
.ld-cinema-section { position: relative; }
.ld-cinema-section .ld-pin-stage { height: 100vh; }
.ld-cinema-frame {
  width: 100%; max-width: 1180px;
  aspect-ratio: 16 / 9; max-height: 64vh;
  border-radius: 22px;
  background: #000;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--ld-panel-border);
  box-shadow: var(--ld-shadow);
}
#ld-cinema-canvas { width: 100%; height: 100%; display: block; }
.ld-cinema-caption { color: var(--ld-muted); font-size: 14px; margin-top: 12px; }

/* === Pricing teaser === */
.ld-price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
@media (max-width: 900px) { .ld-price-grid { grid-template-columns: 1fr; } }
.ld-price {
  position: relative;
  background: linear-gradient(180deg, var(--ld-card-bg-from), var(--ld-card-bg-to));
  border: 1px solid var(--ld-panel-border);
  border-radius: 22px;
  padding: 36px 28px;
  display: flex; flex-direction: column; gap: 18px;
  transform-style: preserve-3d;
  transition: transform 0.15s ease;
  will-change: transform;
}
.ld-price.featured { border-color: rgba(107,140,255,0.4); box-shadow: 0 0 0 1px rgba(107,140,255,0.15), 0 30px 70px rgba(107,140,255,0.18); }
.ld-price .badge { position: absolute; top: -12px; right: 24px; padding: 4px 12px; background: linear-gradient(135deg, var(--ld-accent), var(--ld-accent-2)); border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fff; }
.ld-price .tier { font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--ld-muted); }
.ld-price .price { font-size: clamp(40px, 4vw, 56px); font-weight: 800; letter-spacing: -0.02em; }
.ld-price .price .per { font-size: 16px; color: var(--ld-muted); font-weight: 500; }
.ld-price ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ld-price ul li { color: var(--ld-text); opacity: 0.8; font-size: 14.5px; display: flex; gap: 8px; }
.ld-price ul li::before { content: "✓"; color: #22c55e; font-weight: 700; flex: 0 0 auto; }

/* === Finale === */
.ld-finale {
  text-align: center; padding: 160px 24px; position: relative;
  background:
    radial-gradient(50% 60% at 50% 0%, rgba(107,140,255,0.2), transparent 60%),
    radial-gradient(60% 50% at 50% 100%, rgba(176,107,255,0.15), transparent 60%);
  overflow: hidden;
}
.ld-finale h2 {
  font-size: clamp(48px, 7vw, 128px);
  line-height: 0.95; letter-spacing: -0.035em; font-weight: 800; margin: 0 0 18px;
}
.ld-finale p { color: var(--ld-muted); font-size: clamp(17px, 1.5vw, 21px); max-width: 640px; margin: 0 auto 36px; line-height: 1.55; }

/* === Footer === */
.ld-footer {
  position: relative; z-index: 2;
  padding: 80px 24px 40px;
  border-top: 1px solid var(--ld-panel-border);
  color: var(--ld-muted);
}
.ld-footer-inner { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 700px) { .ld-footer-inner { grid-template-columns: 1fr 1fr; } }
.ld-footer h4 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 14px; color: var(--ld-text); opacity: 0.85; }
.ld-footer a { display: block; color: var(--ld-muted); text-decoration: none; padding: 4px 0; font-size: 14px; cursor: none; }
@media (max-width: 900px) { .ld-footer a { cursor: pointer; } }
.ld-footer a:hover { color: var(--ld-text); }
.ld-footer-bottom { max-width: 1180px; margin: 50px auto 0; padding-top: 20px; border-top: 1px solid var(--ld-panel-border); display: flex; justify-content: space-between; font-size: 13px; }

/* === Reveal === */
.ld-reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.ld-reveal.visible { opacity: 1; transform: translateY(0); }
.ld-fade-text { display: inline-block; opacity: 0; transform: translateY(20px); }

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
  .ld-reveal, .ld-fade-text { opacity: 1; transform: none; }
  .lenis.lenis-smooth { scroll-behavior: smooth !important; }
  .ld-cursor, .ld-cursor-ring { display: none; }
  body.landing { cursor: auto; }
}
