/* DreamCatcher — marketing site
   Design language mirrors the app: night navy ground, sage teal + muted gold,
   Cormorant (serif display) + Inter (sans body), hand-drawn linework, paper grain. */

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; padding: 0; }

/* ── Tokens ────────────────────────────────────────────── */
:root {
  --bg:        #080B14;
  --bg-2:      #0D1520;
  --surface:   #0E1825;
  --surface-2: #122236;
  --teal:      #4A9EA8;
  --teal-lift: #5FB3BD;
  --teal-soft: rgba(74,158,168,.55);
  --teal-ghost:rgba(74,158,168,.14);
  --gold:      #C4A882;
  --gold-soft: rgba(196,168,130,.55);
  --gold-ghost:rgba(196,168,130,.16);
  --ink:       #ECE7DB;
  --ink-2:     #A9B4BD;
  --ink-3:     #6E7A86;
  --ink-4:     #485561;
  --line:      rgba(236,231,219,.10);
  --line-2:    rgba(236,231,219,.16);

  --serif: "Cormorant", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  --pad: clamp(20px, 5vw, 56px);
  --max: 1240px;
  --nav-h: 76px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ── Base ──────────────────────────────────────────────── */
body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(120% 80% at 50% -10%, #101a2b 0%, rgba(13,21,32,0) 55%),
    radial-gradient(100% 60% at 100% 100%, #0c1622 0%, rgba(8,11,20,0) 50%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Paper grain — fixed film over everything, very subtle */
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Layout ────────────────────────────────────────────── */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: clamp(80px, 12vw, 168px); position: relative; }
.section--tight { padding-block: clamp(56px, 8vw, 104px); }
section[id] { scroll-margin-top: calc(var(--nav-h) + 16px); }

/* ── Type ──────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--sans); font-weight: 400; font-size: 12px;
  letter-spacing: .28em; text-transform: uppercase; color: var(--teal);
  display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow--gold { color: var(--gold); }
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: .6; }
.eyebrow.no-rule::before { display: none; }

h1, h2, h3 { font-family: var(--serif); font-weight: 300; line-height: 1.02; letter-spacing: -.01em; }
.display {
  font-size: clamp(46px, 9vw, 128px); line-height: .96; letter-spacing: -.02em;
  font-weight: 300;
}
.h-xl { font-size: clamp(36px, 6vw, 78px); line-height: 1.0; }
.h-lg { font-size: clamp(30px, 4.4vw, 54px); }
.h-md { font-size: clamp(24px, 3vw, 36px); }
.serif-it { font-style: italic; }
.teal { color: var(--teal); }
.gold { color: var(--gold); }
em.accent { font-style: italic; color: var(--teal); }
em.accent-gold { font-style: italic; color: var(--gold); }

.lead { font-size: clamp(18px, 2vw, 23px); line-height: 1.62; color: var(--ink-2); font-weight: 300; max-width: 40ch; }
.lead--wide { max-width: 56ch; }
.body { font-size: 16.5px; line-height: 1.7; color: var(--ink-2); font-weight: 300; }
.kicker { font-size: 13px; letter-spacing: .04em; color: var(--ink-3); }
.balance { text-wrap: balance; }
.pretty { text-wrap: pretty; }

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 400; font-size: 14.5px; letter-spacing: .01em;
  padding: 14px 24px; border-radius: 999px; transition: all .35s var(--ease);
  white-space: nowrap;
}
.btn--primary { background: var(--ink); color: #0a0e16; }
.btn--primary:hover { background: #fff; transform: translateY(-2px); }
.btn--ghost { color: var(--ink); border: 1px solid var(--line-2); }
.btn--ghost:hover { border-color: var(--teal-soft); color: #fff; background: var(--teal-ghost); }
.btn--teal { background: var(--teal); color: #06121a; }
.btn--teal:hover { background: var(--teal-lift); transform: translateY(-2px); }
.btn .arr { transition: transform .35s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

/* App Store badge */
.appstore {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 22px 12px 18px; border-radius: 16px;
  background: var(--ink); color: #0a0e16; transition: all .35s var(--ease);
}
.appstore:hover { background: #fff; transform: translateY(-2px); }
.appstore svg { width: 26px; height: 26px; flex: none; }
.appstore > span { display: flex; flex-direction: column; }
.appstore .as-sm { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; opacity: .65; line-height: 1.2; }
.appstore .as-lg { font-family: var(--serif); font-size: 22px; line-height: 1.05; font-weight: 400; }

/* ── Nav ───────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(8,11,20,.72); backdrop-filter: blur(18px) saturate(1.2); border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .mark { width: 34px; height: 34px; flex: none; }
.brand .name { font-family: var(--serif); font-size: 23px; font-weight: 400; letter-spacing: .005em; }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a { font-size: 14px; color: var(--ink-2); transition: color .3s; position: relative; }
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 18px; }
.nav-toggle { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; }
.nav-toggle span { width: 20px; height: 1.5px; background: var(--ink); position: relative; transition: .3s; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; width: 20px; height: 1.5px; background: var(--ink); transition: .3s; }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }
.nav.open .nav-toggle span { background: transparent; }
.nav.open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
.nav.open .nav-toggle span::after { top: 0; transform: rotate(-45deg); }

/* ── Footer ────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); padding-block: clamp(56px, 8vw, 96px) 48px; position: relative; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 48px; }
.footer-brand .mark { width: 40px; height: 40px; margin-bottom: 20px; }
.footer-brand .tagline { font-family: var(--serif); font-style: italic; font-size: 21px; color: var(--ink-2); max-width: 24ch; line-height: 1.4; }
.footer h4 { font-family: var(--sans); font-weight: 400; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 18px; }
.footer ul { display: flex; flex-direction: column; gap: 12px; }
.footer ul a { font-size: 14.5px; color: var(--ink-2); transition: color .3s; }
.footer ul a:hover { color: var(--teal); }
.footer-base { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.footer-base p { font-size: 12.5px; color: var(--ink-3); }

/* ── Reveal on scroll ──────────────────────────────────── */
[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease), transform .9s var(--ease); will-change: opacity, transform; }
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none; }
  html { scroll-behavior: auto; }
}

/* ── Wavy divider ──────────────────────────────────────── */
.wavy { width: 100%; height: 16px; color: var(--line-2); }
.wavy svg { width: 100%; height: 100%; }

/* ── Generic cards / pills ─────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; letter-spacing: .01em; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--teal-ghost); color: var(--teal); background: rgba(74,158,168,.06);
}
.pill--gold { border-color: var(--gold-ghost); color: var(--gold); background: rgba(196,168,130,.06); }
.pill--ghost { border-color: var(--line-2); color: var(--ink-2); background: transparent; }
.pill .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.card {
  background: linear-gradient(160deg, rgba(18,28,42,.7), rgba(12,20,32,.5));
  border: 1px solid var(--line); border-radius: 20px; padding: 30px;
  position: relative; overflow: hidden;
}
.card--glow::before {
  content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, var(--teal-ghost), transparent 70%);
  top: -80px; right: -60px; pointer-events: none;
}

/* ── Reusable section header ───────────────────────────── */
.sec-head { max-width: 760px; }
.sec-head .eyebrow { margin-bottom: 26px; }
.sec-head p.lead { margin-top: 26px; }

/* ── Utility ───────────────────────────────────────────── */
.stack-sm > * + * { margin-top: 14px; }
.stack > * + * { margin-top: 22px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.muted-row { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--ink-3); font-size: 13.5px; }
.muted-row span { display: inline-flex; align-items: center; gap: 8px; }
.muted-row span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--teal); opacity: .8; }
.center { text-align: center; } .center .lead, .center .sec-head { margin-inline: auto; }

@media (max-width: 900px) {
  .nav-links, .nav .nav-actions .btn, .nav .nav-actions .appstore { display: none; }
  .nav-toggle { display: flex; }
  .nav.open { background: rgba(8,11,20,.96); backdrop-filter: blur(18px); height: auto; flex-direction: column; align-items: stretch; padding-bottom: 24px; }
  .nav.open .wrap { flex-direction: column; align-items: stretch; }
  .nav.open .nav-links { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 12px; }
  .nav.open .nav-links a { font-size: 22px; font-family: var(--serif); padding: 10px 0; }
  .nav.open .nav-actions { display: flex; margin-top: 16px; }
  .nav.open .nav-actions .btn, .nav.open .nav-actions .appstore { display: inline-flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Legal pages ───────────────────────────────────────── */
.legal-hero { padding-top: calc(var(--nav-h) + clamp(60px, 10vw, 120px)); padding-bottom: clamp(28px, 4vw, 48px); }
.legal-hero .eyebrow { margin-bottom: 22px; }
.legal-hero h1 { font-size: clamp(40px, 7vw, 84px); }
.legal-hero .updated { margin-top: 22px; font-size: 13px; color: var(--ink-3); letter-spacing: .02em; }
.legal-wrap { max-width: 760px; }
.legal-body { padding-bottom: clamp(60px, 9vw, 120px); }
.legal-body h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 3vw, 33px); margin: 52px 0 14px; letter-spacing: -.01em; }
.legal-body h2 .n { font-style: italic; color: var(--gold); font-size: .7em; margin-right: 12px; }
.legal-body h3 { font-family: var(--sans); font-weight: 500; font-size: 16px; color: var(--ink); margin: 26px 0 8px; letter-spacing: .01em; }
.legal-body p, .legal-body li { font-size: 15.5px; line-height: 1.72; color: var(--ink-2); font-weight: 300; }
.legal-body p { margin-bottom: 16px; max-width: 68ch; }
.legal-body ul { margin: 0 0 18px; padding-left: 4px; display: flex; flex-direction: column; gap: 10px; max-width: 68ch; }
.legal-body li { display: flex; gap: 12px; }
.legal-body li::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--teal); margin-top: 11px; }
.legal-body a { color: var(--teal); border-bottom: 1px solid var(--teal-ghost); }
.legal-body a:hover { color: var(--teal-lift); }
.legal-body b, .legal-body strong { color: var(--ink); font-weight: 500; }
.legal-body .lead-note { font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.5; color: var(--ink-2); border-left: 2px solid var(--teal-ghost); padding-left: 22px; margin: 0 0 8px; max-width: 60ch; }
.legal-body .intro { font-size: 17px; color: var(--ink-2); margin-bottom: 8px; }
.legal-toc { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 30px 0 8px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.legal-toc a { font-size: 12.5px; color: var(--ink-2); border: 1px solid var(--line-2); padding: 6px 13px; border-radius: 999px; transition: all .3s var(--ease); }
.legal-toc a:hover { color: var(--teal); border-color: var(--teal-ghost); }
.legal-body section { scroll-margin-top: calc(var(--nav-h) + 20px); }
