/* Shared landing-page stylesheet — Phase 1 architecture refactor, 2026-07-29.
 *
 * ONE file serves both dusklight.app and hivespace.org. Every color, gradient,
 * and alpha lives in each page's own :root block (index.html <style>) — this
 * file only ever references var(--token). Editing structure/layout here changes
 * both sites at once; editing a :root block changes one brand.
 *
 * Source of truth lives at local/landing/shared/landing.css; deploy_landing.sh
 * copies it into each product's web root as landing.css. Values were lifted
 * verbatim from the pre-refactor inline styles — Phase 1's contract is that the
 * rendered pages are pixel-identical to before.
 */

/* ── Base ──────────────────────────────────────────────────────────────── */
/* Background on html/body, not just .page — otherwise mobile overscroll
   (rubber-banding past the top/bottom) reveals the browser's default white
   canvas behind the content (real phone report, 2026-07-29). */
html, body { background: var(--bg); }
body { margin: 0; }
.page {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  min-height: 100vh;
  padding: 0;
  margin: 0;
  overflow-x: hidden;
  position: relative;
}
.page a { color: inherit; }
em.accent { color: var(--accent-text); font-style: italic; }

#features, #demo, #pricing, #trust, #revival { scroll-margin-top: 88px; }

/* ── Ambient orbs ──────────────────────────────────────────────────────── */
.orbs {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.orb { position: absolute; border-radius: 50%; filter: blur(80px); }
.orb-1 { width: 400px; height: 400px; background: var(--primary); opacity: 0.12; top: -100px; right: -100px; }
.orb-2 { width: 300px; height: 300px; background: var(--orb2); opacity: 0.1; bottom: -50px; left: -50px; }

/* ── Nav ───────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 40px;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-nav);
}
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 24px; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
}
.logo-orb {
  width: 32px; height: 32px; background: var(--icon-gradient);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav-actions { display: flex; gap: 12px; align-items: center; }
.nav-login { color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; }

.menu-btn {
  display: none;
  align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: transparent; border: 1px solid var(--line-menu-btn);
  border-radius: 10px; cursor: pointer; padding: 0;
}
.menu-icon { display: block; width: 16px; height: 2px; background: var(--text); position: relative; }
.menu-icon::before, .menu-icon::after {
  content: ''; position: absolute; left: 0; width: 16px; height: 2px; background: var(--text);
}
.menu-icon::before { top: -5px; }
.menu-icon::after { top: 5px; }

.mobile-menu {
  display: none; flex-direction: column;
  position: sticky; top: 73px; z-index: 99;
  background: var(--surface);
  border-bottom: 1px solid var(--line-menu);
  padding: 8px 24px 16px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 12px 0; border-bottom: 1px solid var(--line-menu-item);
}
.mobile-menu a.accent { color: var(--accent-text); font-weight: 600; border-bottom: none; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .menu-btn { display: flex; }
}
@media (max-width: 480px) {
  .nav { padding: 14px 16px; }
  .nav-login { display: none; }
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  border: none; border-radius: 28px;
  font-size: 15px; font-weight: 600; font-family: inherit;
  padding: 14px 32px; cursor: pointer;
  text-decoration: none; display: inline-block;
}
.btn-primary { background: var(--gradient); color: var(--on-brand); box-shadow: var(--glow); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-sm { padding: 10px 24px; font-size: 14px; border-radius: 24px; box-shadow: none; }
.btn-lg { padding: 16px 40px; font-size: 16px; }
.btn-block { width: 100%; box-sizing: border-box; display: block; text-align: center; }
.btn-disabled { background: transparent; color: var(--text-3); border: 1px solid var(--line); cursor: not-allowed; }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  text-align: center; padding: 120px 20px 80px;
  max-width: 720px; margin: 0 auto; position: relative; z-index: 2;
}
.badge-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  background: var(--soft-fill); border: 1px solid var(--line);
  border-radius: 20px; font-size: 13px; color: var(--accent-text);
  margin-bottom: 32px;
}
.badge-pill .dot { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; display: inline-block; }
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(40px, 6vw, 72px); font-weight: 400; line-height: 1.1;
  margin: 0 0 24px;
}
.hero-sub {
  font-size: clamp(16px, 2vw, 20px); color: var(--text-2); line-height: 1.7;
  max-width: 560px; margin: 0 auto 40px;
}
.cta-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px; }
.trust-chips { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; color: var(--text-3); font-size: 13px; }

/* ── Sections ──────────────────────────────────────────────────────────── */
.section { padding: 100px 20px; position: relative; z-index: 2; }
.section-contained { max-width: 1100px; margin: 0 auto; }
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 4vw, 42px);
  text-align: center; margin: 0 0 16px; font-weight: 400;
}
.section-sub {
  text-align: center; color: var(--text-2);
  max-width: 500px; margin: 0 auto 60px;
  font-size: 16px; line-height: 1.6;
}
.section-sub-tight { margin-bottom: 16px; max-width: 560px; }
.section-note {
  text-align: center; color: var(--text-3);
  max-width: 560px; margin: 0 auto 60px;
  font-size: 13px; line-height: 1.5;
}

/* ── Features ──────────────────────────────────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line-card);
  border-radius: 20px; padding: 32px;
}
.card h3 { font-size: 18px; font-weight: 600; margin: 0 0 10px; }
.card p { color: var(--text-2); font-size: 14px; line-height: 1.6; margin: 0; }
.icon-tile {
  width: 48px; height: 48px; background: var(--icon-gradient);
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 20px;
}

/* ── Demo / How it Works ───────────────────────────────────────────────── */
.band { background: linear-gradient(to bottom, var(--bg), var(--surface), var(--bg)); }
.demo-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
@media (max-width: 700px) {
  .demo-grid { grid-template-columns: 1fr; }
  .phone-wrap { order: 2; }
}
.phone-wrap { display: flex; justify-content: center; }
.phone {
  width: 280px; height: 560px;
  background: var(--surface-2);
  border: 2px solid var(--line);
  border-radius: 36px; position: relative; overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
}
.phone-notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 120px; height: 28px; background: var(--bg);
  border-bottom-left-radius: 16px; border-bottom-right-radius: 16px; z-index: 10;
}
.phone-inner { padding: 50px 20px 20px; height: 100%; display: flex; flex-direction: column; box-sizing: border-box; }
.phone-header { text-align: center; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.phone-header h4 { font-size: 14px; font-weight: 600; margin: 0; }
.online {
  font-size: 11px; color: var(--presence);
  display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 4px;
}
.chat { flex: 1; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.bubble { max-width: 80%; padding: 10px 14px; border-radius: 16px; font-size: 12px; line-height: 1.5; }
.bubble.in {
  align-self: flex-start;
  background: var(--surface-2); border: 1px solid var(--line);
  border-bottom-left-radius: 4px; color: var(--text-2);
}
.bubble.out {
  align-self: flex-end;
  background: var(--gradient); color: var(--on-brand);
  border-bottom-right-radius: 4px;
}
.composer { display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.composer-input { flex: 1; height: 36px; background: var(--surface-2); border-radius: 18px; border: 1px solid var(--line); }
.composer-send {
  width: 36px; height: 36px; background: var(--primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--on-brand); font-size: 14px;
}
.demo-copy h2 {
  font-family: 'Playfair Display', serif;
  font-size: 36px; margin: 0 0 20px; line-height: 1.2; font-weight: 400;
}
.demo-copy > p { color: var(--text-2); font-size: 16px; line-height: 1.7; margin: 0 0 24px; }
.star-list { list-style: none; display: flex; flex-direction: column; gap: 16px; padding: 0; margin: 0; }
.star-list li { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.star-list .star { color: var(--primary); }

/* ── Pricing ───────────────────────────────────────────────────────────── */
.band-surface { background: var(--surface); }
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px; max-width: 1200px; margin: 0 auto;
}
.price-card { background: var(--bg); border: 1px solid var(--line); border-radius: 24px; padding: 40px 32px; }
.price-card h3 { font-size: 20px; margin: 0 0 8px; font-weight: 600; }
.price-card.featured { border-color: var(--primary); position: relative; box-shadow: var(--glow-wide); }
.price-card.muted { opacity: 0.85; }
.price { font-size: 42px; font-weight: 700; margin: 16px 0; display: flex; align-items: baseline; gap: 4px; }
.price span { font-size: 16px; color: var(--text-3); font-weight: 400; }
.plan-sub { color: var(--text-2); font-size: 14px; margin: 0 0 20px; }
.plan-note { font-size: 11px; color: var(--text-3); font-style: italic; margin: 0 0 20px; }
.check-list { list-style: none; display: flex; flex-direction: column; gap: 12px; margin: 24px 0; padding: 0; }
.check-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); }
.check-list .check { color: var(--presence); font-weight: 700; }
.badge-float {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gradient); color: var(--on-brand);
  font-size: 12px; font-weight: 600; padding: 6px 16px; border-radius: 12px; white-space: nowrap;
}
.chip {
  display: inline-block; background: var(--soft-fill-10); color: var(--accent-text);
  font-size: 11px; font-weight: 600; padding: 4px 12px; border-radius: 10px; margin-bottom: 12px;
}

/* ── Trust ─────────────────────────────────────────────────────────────── */
.trust-wrap { max-width: 700px; margin: 0 auto; text-align: center; }
.trust-wrap > p { color: var(--text-2); font-size: 16px; line-height: 1.6; margin: 0 0 40px; }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.trust-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.trust-emoji { font-size: 28px; margin-bottom: 12px; }
.trust-card h4 { font-size: 15px; font-weight: 600; margin: 0 0 6px; }
.trust-card p { font-size: 13px; color: var(--text-2); line-height: 1.5; margin: 0; }

/* ── Revival ───────────────────────────────────────────────────────────── */
.revival-card {
  max-width: 720px; margin: 0 auto; text-align: center;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 28px; padding: 60px 40px; position: relative; overflow: hidden;
}
.revival-orb {
  position: absolute; top: -80px; right: -80px;
  width: 220px; height: 220px; background: var(--orb-revival);
  border-radius: 50%; filter: blur(70px); opacity: 0.15; pointer-events: none;
}
.revival-card > * { position: relative; z-index: 1; }
.revival-emoji { font-size: 32px; margin-bottom: 20px; }
.revival-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(26px, 4vw, 38px); margin: 0 0 16px; font-weight: 400;
}
.revival-card > p { color: var(--text-2); font-size: 16px; line-height: 1.7; max-width: 520px; margin: 0 auto 32px; }

/* ── Final CTA ─────────────────────────────────────────────────────────── */
.final-cta { text-align: center; padding: 120px 20px; position: relative; z-index: 2; }
.final-cta .radial {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--soft-fill-12), transparent 70%);
  pointer-events: none; z-index: 0;
}
.final-cta h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 5vw, 52px); margin: 0 0 20px; font-weight: 400;
  position: relative; z-index: 1;
}
.final-cta p { color: var(--text-2); font-size: 18px; max-width: 480px; margin: 0 auto 40px; position: relative; z-index: 1; }
.final-cta .btn { position: relative; z-index: 1; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line);
  padding: 40px; text-align: center;
  color: var(--text-3); font-size: 13px; position: relative; z-index: 2;
}
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--text-2); text-decoration: none; }
.footer p { margin: 0; }
