/* GHOST marketing site — shared styles. Mirrors the app's design tokens
   (constants/ghost-theme.ts): dark premium background, soft accent glow,
   generous letter-spacing wordmark. No web fonts loaded — the system font
   stack already gives Apple devices SF Pro for free, which is the app's
   own font. */

:root {
  --bg: #050506;
  --bg-elevated: #0a0a0d;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.085);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text-primary: #f5f6f8;
  --text-secondary: rgba(245, 246, 248, 0.62);
  --text-tertiary: rgba(245, 246, 248, 0.38);

  --accent: #9db4ff;
  --accent-soft: rgba(157, 180, 255, 0.14);
  --accent-border: rgba(157, 180, 255, 0.35);

  --violet: #8a5cff;
  --ultraviolet: #b24bff;
  --icy-blue: #4fa7ff;
  --muted-pink: #e06bff;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-pill: 999px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

/* ---------- glow field backdrop (matches components/ghost/glow-field.tsx's mood) ---------- */
.glow-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.glow-field::before,
.glow-field::after {
  content: "";
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.16;
}
.glow-field::before {
  top: -20vmax;
  left: -10vmax;
  background: var(--violet);
}
.glow-field::after {
  bottom: -25vmax;
  right: -15vmax;
  background: var(--icy-blue);
  opacity: 0.12;
}

/* ---------- shared shell ---------- */
.shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

header.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
}

.wordmark {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--text-primary);
  text-decoration: none;
}

nav.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

nav.site-nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.2px;
}
nav.site-nav a:hover {
  color: var(--text-primary);
}

.pill-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--text-primary);
  text-decoration: none;
}

footer.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 96px;
  padding: 32px 0 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--text-primary);
}

.footer-copy {
  font-size: 12.5px;
  color: var(--text-tertiary);
}

/* ---------- landing page ---------- */
.hero {
  position: relative;
  z-index: 0;
  padding: 72px 0 56px;
  text-align: center;
}

.hero-word {
  font-size: clamp(48px, 10vw, 88px);
  font-weight: 800;
  letter-spacing: 6px;
  margin: 0;
  background: linear-gradient(180deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-headline {
  margin: 22px 0 0;
  font-size: clamp(24px, 4.4vw, 40px);
  font-weight: 800;
  letter-spacing: 0.2px;
  background: linear-gradient(100deg, var(--text-primary) 20%, var(--accent) 55%, var(--muted-pink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  margin: 14px 0 0;
  font-size: clamp(17px, 2.4vw, 21px);
  font-weight: 500;
  color: var(--text-secondary);
}

.hero-sub {
  max-width: 560px;
  margin: 20px auto 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-tertiary);
}

/* Hero banner — GHOST wordmark/headline/tagline are already baked into
   this image, so no text is duplicated underneath it. Natural aspect
   ratio only: width scales to the section, height is always derived from
   it (never forced), so nothing stretches, distorts, or crops on any
   viewport. */
.hero-banner {
  display: block;
  width: 100%;
  height: auto;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.badge-soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.badge-soon .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.section-label {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 96px 0 12px;
}

.section-title {
  text-align: center;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: 0.2px;
  margin: 0 0 48px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.feature-card {
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}

.feature-glyph {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 18px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.1px;
}

.feature-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.plus-panel {
  margin-top: 96px;
  padding: 40px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--accent-border);
  background: linear-gradient(160deg, rgba(157, 180, 255, 0.08), rgba(138, 92, 255, 0.05));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.plus-text h2 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 800;
}

.plus-text p {
  margin: 0;
  max-width: 440px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.plus-benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plus-benefits li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.plus-benefits li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.cta-band {
  position: relative;
  z-index: 0;
  margin-top: 96px;
  text-align: center;
  padding: 56px 24px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.cta-band h2 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3.6vw, 32px);
  font-weight: 800;
}

.cta-band p {
  margin: 0 0 28px;
  color: var(--text-tertiary);
  font-size: 14.5px;
}

/* ---------- legal pages (privacy / terms) ---------- */
.legal-page {
  padding-bottom: 40px;
}

.legal-header {
  padding: 48px 0 8px;
}

.legal-header h1 {
  font-size: clamp(30px, 5vw, 40px);
  font-weight: 800;
  margin: 0 0 8px;
}

.legal-updated {
  font-size: 13px;
  color: var(--text-tertiary);
}

.legal-body {
  max-width: 720px;
  margin: 40px auto 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-secondary);
}

.legal-body h2 {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 40px 0 12px;
}

.legal-body h2:first-child {
  margin-top: 0;
}

.legal-body p {
  margin: 0 0 14px;
}

.legal-body ul {
  margin: 0 0 14px;
  padding-left: 22px;
}

.legal-body li {
  margin-bottom: 8px;
}

.legal-body strong {
  color: var(--text-primary);
}

.legal-body a {
  color: var(--accent);
  text-decoration: underline;
}

/* ---------- screenshot showcase — CSS-only scroll-snap gallery.
   Doubles as an "elegant showcase" on wide viewports (several frames
   visible at once) and a swipeable carousel on mobile (one at a time,
   native touch scroll) — no JS required either way. ---------- */
.showcase {
  position: relative;
  z-index: 0;
  margin: 44px -24px 0;
  padding: 0 24px;
}

.showcase-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 20px calc(50% - 110px) 28px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.showcase-track::-webkit-scrollbar {
  display: none;
}

.phone-frame {
  flex: 0 0 auto;
  width: 220px;
  margin: 0;
  scroll-snap-align: center;
  border-radius: 28px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s ease;
}
.phone-frame:hover {
  transform: translateY(-4px);
}

.phone-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.phone-frame figcaption {
  text-align: center;
  padding: 12px 0 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

@media (min-width: 900px) {
  .showcase-track {
    padding-left: calc(50% - 380px);
    padding-right: calc(50% - 380px);
  }
  .phone-frame {
    width: 250px;
  }
}

/* ---------- how it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.step-card {
  padding: 26px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}

.step-number {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted-pink);
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.step-card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ---------- GHOST+ section ---------- */
.plus-section {
  position: relative;
  z-index: 0;
  margin-top: 96px;
  padding: 44px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--accent-border);
  background: linear-gradient(160deg, rgba(157, 180, 255, 0.08), rgba(224, 107, 255, 0.05));
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: center;
}

.plus-section img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 22px;
  border: 1px solid var(--border-strong);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.plus-price-row {
  display: flex;
  gap: 12px;
  margin: 18px 0 22px;
  flex-wrap: wrap;
}

.price-card {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--surface-strong);
}

.price-card .amount {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}

.price-card .period {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 600;
}

.plus-feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 20px;
}

.plus-feature-grid li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.plus-feature-grid li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--muted-pink));
  flex-shrink: 0;
}

/* ---------- privacy note ---------- */
.privacy-note {
  position: relative;
  z-index: 0;
  margin-top: 96px;
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  text-align: center;
}

.privacy-note p {
  max-width: 620px;
  margin: 0 auto;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-tertiary);
}

.gradient-cta {
  background: linear-gradient(100deg, var(--violet), var(--ultraviolet) 55%, var(--muted-pink));
  border: none;
  color: var(--text-primary);
}

@media (max-width: 640px) {
  nav.site-nav {
    gap: 16px;
  }
  .plus-panel {
    padding: 28px;
  }
  .plus-section {
    grid-template-columns: 1fr;
    padding: 28px;
  }
  .plus-section img {
    max-width: 220px;
    margin: 0 auto;
  }
}

/* ---------- decorative floating ghosts ----------
   Purely decorative: out of normal flow (absolute), never intercept clicks
   (pointer-events: none), and painted before their section's real content
   in the DOM so they sit visually behind it at the same stacking level —
   no z-index tug-of-war with existing content needed. Positioned with
   small, non-negative left/right percentages and modest fixed widths so
   they can never push the page into horizontal scroll. */
.ghost-decor {
  position: absolute;
  pointer-events: none;
  /* Negative, not 0: a positioned z-index:0 element paints AFTER static
     (non-positioned) siblings regardless of DOM order, which would put a
     ghost visually on top of real text/buttons. Each host section above
     establishes its own stacking context (position:relative + z-index:0),
     so z-index:-1 here is scoped to that section and reliably paints
     behind its real content without reaching back further than intended. */
  z-index: -1;
}

.ghost-decor img {
  display: block;
  width: 100%;
  height: auto;
}

/* Kept clear of the hero banner's own artwork/text: sized to sit in the
   section's top/bottom padding (above and below the banner image), and the
   banner is opaque + explicitly stacked above (z-index:1), so even where
   a ghost's box technically overlaps the image's rectangle, the image
   simply paints over it. */
.ghost-decor--hero-1 {
  width: 110px;
  top: 0;
  left: 2%;
}
.ghost-decor--hero-2 {
  width: 72px;
  bottom: 0;
  right: 4%;
}
.ghost-decor--showcase {
  width: 110px;
  top: -26px;
  right: 5%;
}
.ghost-decor--plus {
  width: 100px;
  top: 16px;
  right: 3%;
}
.ghost-decor--privacy {
  width: 70px;
  top: -14px;
  left: 5%;
}
.ghost-decor--cta {
  width: 90px;
  bottom: -14px;
  left: 4%;
}

/* Slow, gentle drift + subtle rotation — two variants with different
   keyframe shapes, and every instance below gets its own duration/delay,
   so nothing reads as synchronized. Disabled entirely for users who prefer
   reduced motion; ghosts still show, just perfectly still. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes ghost-drift-a {
    0%,
    100% {
      transform: translate(0, 0) rotate(0deg);
    }
    33% {
      transform: translate(8px, -16px) rotate(3deg);
    }
    66% {
      transform: translate(-6px, -8px) rotate(-2deg);
    }
  }
  @keyframes ghost-drift-b {
    0%,
    100% {
      transform: translate(0, 0) rotate(0deg);
    }
    40% {
      transform: translate(-10px, -14px) rotate(-3deg);
    }
    70% {
      transform: translate(6px, -20px) rotate(2deg);
    }
  }
  @keyframes ghost-glow-pulse {
    0%,
    100% {
      filter: drop-shadow(0 0 0 rgba(157, 180, 255, 0));
    }
    50% {
      filter: drop-shadow(0 0 26px rgba(157, 180, 255, 0.4));
    }
  }

  .ghost-decor--hero-1 img {
    animation:
      ghost-drift-a 14s ease-in-out infinite,
      ghost-glow-pulse 9s ease-in-out infinite 2s;
  }
  .ghost-decor--hero-2 img {
    animation: ghost-drift-b 11s ease-in-out infinite 1.2s;
  }
  .ghost-decor--showcase img {
    animation: ghost-drift-a 16s ease-in-out infinite 2.4s;
  }
  .ghost-decor--plus img {
    animation:
      ghost-drift-b 13s ease-in-out infinite 0.6s,
      ghost-glow-pulse 10s ease-in-out infinite 1s;
  }
  .ghost-decor--privacy img {
    animation: ghost-drift-a 12s ease-in-out infinite 3.1s;
  }
  .ghost-decor--cta img {
    animation:
      ghost-drift-b 15s ease-in-out infinite 1.8s,
      ghost-glow-pulse 8.4s ease-in-out infinite 5.2s;
  }
}

/* Fewer, smaller ghosts on mobile so the site stays clean. */
@media (max-width: 640px) {
  .ghost-decor--showcase,
  .ghost-decor--privacy {
    display: none;
  }
  .ghost-decor--hero-1 {
    width: 88px;
  }
  .ghost-decor--hero-2 {
    width: 60px;
  }
  .ghost-decor--plus {
    width: 64px;
  }
  .ghost-decor--cta {
    width: 56px;
  }
}
