/* ============================================================
   Birthwrite — Ethereal Mirage (v2, self-hosted fonts, lean)
   Source of truth: ethereal-mirage-motif.md
   ============================================================ */

/* ---------- Self-hosted fonts (no render-blocking import) ---------- */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-300.woff2') format('woff2');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Roashe';
  src: url('../fonts/roashe.woff2') format('woff2'),
       url('../fonts/roashe.woff') format('woff');
  font-weight: normal; font-style: normal; font-display: swap;
}

:root {
  /* Cool pole */
  --cool-periwinkle: #8E9BE8;
  --cool-cornflower: #7B8FD4;
  --cool-lavender:   #C9B8E0;
  --cool-bluegrey:   #B8C4D9;

  /* Warm pole */
  --warm-peach:  #F8D4B0;
  --warm-blush:  #F6C5CE;
  --warm-coral:  #F89B7E;
  --ember-orange:#FF6A2C;

  /* Neutrals */
  --cream:      #FDF6EE;
  --pale-rose:  #F4E3E1;
  --ink-violet: #4A4763;
  --ink-soft:   #6E6A85;

  /* Signature gradients */
  --gradient-aura: linear-gradient(135deg, #8E9BE8 0%, #FDF6EE 50%, #F8D4B0 100%);

  /* Spacing scale (8pt base) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 16px; --s-4: 24px;
  --s-5: 40px; --s-6: 64px; --s-7: 96px; --s-8: 160px;

  /* Radii */
  --r-sm: 16px; --r-md: 24px; --r-lg: 32px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink-violet);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

/* ---------- Grain overlay (mandatory per motif) ---------- */
.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  z-index: 1;
  background-repeat: repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: 'Roashe', 'Inter', serif;
  font-weight: normal;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--ink-violet);
}

h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }

p { color: var(--ink-soft); font-size: 1.0625rem; }
.lead { font-size: 1.25rem; color: var(--ink-violet); max-width: 48ch; }

a { color: var(--cool-cornflower); text-decoration: none; }
a:hover { color: var(--ember-orange); }

/* ---------- Layout primitives ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 var(--s-4); }
.narrow { max-width: 720px; margin: 0 auto; padding: 0 var(--s-4); }

section { padding: var(--s-7) 0; position: relative; }
@media (min-width: 768px) { section { padding: var(--s-8) 0; } }

.tint-cool { background: linear-gradient(160deg, var(--cool-lavender), var(--cream)); }
.tint-warm { background: linear-gradient(160deg, var(--cream), var(--warm-blush)); }
.tint-rose { background: var(--pale-rose); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-3) var(--s-4);
  background: rgba(253, 246, 238, 0.82);
  backdrop-filter: blur(12px);
}
.brand {
  font-family: 'Roashe', serif;
  font-size: 1.6rem; letter-spacing: 0.04em;
  color: var(--ink-violet);
}
.nav-links { display: flex; gap: var(--s-4); align-items: center; }
.nav-links a { color: var(--ink-soft); font-size: 0.95rem; letter-spacing: 0.02em; }
.nav-links a:hover, .nav-links a.active { color: var(--ink-violet); }
.nav-links a.nav-cta {
  color: var(--ember-orange); border: 1.5px solid var(--ember-orange);
  border-radius: var(--r-lg); padding: var(--s-2) var(--s-3);
}
.nav-links a.nav-cta:hover { background: var(--ember-orange); color: var(--cream); }
@media (max-width: 540px) {
  .nav { flex-wrap: wrap; gap: var(--s-2); }
  .nav-links { gap: var(--s-3); font-size: 0.9rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-lg);
  font-size: 1rem; letter-spacing: 0.02em;
  cursor: pointer; border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-ember {
  background: var(--ember-orange); color: var(--cream);
  box-shadow: 0 8px 30px rgba(255, 106, 44, 0.32);
}
.btn-ember:hover { transform: translateY(-2px); color: var(--cream); box-shadow: 0 12px 40px rgba(255, 106, 44, 0.4); }
.btn-ghost {
  background: transparent; color: var(--cool-cornflower);
  border: 1.5px solid var(--cool-cornflower);
}
.btn-ghost:hover { color: var(--ink-violet); border-color: var(--ink-violet); }

/* CTA + risk-reducer pinned directly under the button (swipe file P8) */
.cta-group { display: inline-flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); }
.center .cta-group { align-items: center; }
.risk { font-size: 0.85rem; color: var(--ink-soft); letter-spacing: 0.01em; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--gradient-aura);
  min-height: 88vh;
  display: flex; align-items: center;
}
.hero .wrap { position: relative; z-index: 2; display: grid; gap: var(--s-6); }
@media (min-width: 880px) {
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; align-items: center; }
}
.hero h1 { max-width: 14ch; }
.hero .lead { margin-top: var(--s-4); }
.hero-cta { margin-top: var(--s-5); }

/* on-motif image, soft feathered edges */
.motif-img {
  width: 100%; height: auto; display: block;
  border-radius: var(--r-lg);
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, #000 55%, transparent 100%);
          mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, #000 55%, transparent 100%);
}
.motif-figure { position: relative; }

/* ---------- Content blocks ---------- */
.eyebrow {
  font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--cool-cornflower); margin-bottom: var(--s-3);
}
.stack > * + * { margin-top: var(--s-4); }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Proof strip (zero-word-ish credibility, swipe file P4) ---------- */
.proof {
  background: var(--cream);
  padding: var(--s-5) 0;
  border-top: 1px solid rgba(184, 196, 217, 0.4);
  border-bottom: 1px solid rgba(184, 196, 217, 0.4);
}
.proof .wrap { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-6); justify-content: center; align-items: center; }
.proof-item { text-align: center; }
.proof-item .num { font-family: 'Roashe', serif; font-size: 1.9rem; color: var(--ember-orange); line-height: 1; }
.proof-item .lbl { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); margin-top: var(--s-2); }

.stat-row {
  display: grid; gap: var(--s-4); margin-top: var(--s-6);
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .stat-row { grid-template-columns: repeat(3, 1fr); } }
.stat {
  background: var(--cream); border-radius: var(--r-md);
  padding: var(--s-5); text-align: center;
}
.stat .num { font-family: 'Roashe', serif; font-size: 2.2rem; color: var(--ember-orange); }
.stat .placeholder { color: var(--ink-soft); font-style: italic; }

.option-grid { display: grid; gap: var(--s-5); margin-top: var(--s-6); }
@media (min-width: 760px) { .option-grid { grid-template-columns: 1fr 1fr; } }
.card {
  background: var(--cream); border-radius: var(--r-lg);
  padding: var(--s-6); box-shadow: 0 12px 50px rgba(74, 71, 99, 0.06);
}

/* ---------- Forms ---------- */
.field { margin-top: var(--s-4); }
.field label { display: block; font-size: 0.95rem; color: var(--ink-violet); margin-bottom: var(--s-2); }
.field input, .field textarea {
  width: 100%; padding: var(--s-3); font-family: inherit; font-size: 1rem;
  color: var(--ink-violet); background: var(--cream);
  border: 1.5px solid var(--cool-bluegrey); border-radius: var(--r-sm);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--cool-cornflower); }
.field textarea { min-height: 110px; resize: vertical; }

/* Calendly placeholder */
.embed-slot {
  margin-top: var(--s-5); padding: var(--s-8) var(--s-5);
  border: 1.5px dashed var(--cool-bluegrey); border-radius: var(--r-lg);
  text-align: center; color: var(--ink-soft); background: var(--cream);
}

/* ---------- Footer ---------- */
.footer {
  position: relative; overflow: hidden;
  background: var(--gradient-aura); color: var(--ink-violet);
  padding: var(--s-6) 0; text-align: center;
}
.footer .wrap { position: relative; z-index: 2; }
.footer .brand { font-size: 1.4rem; }
.footer p { color: var(--ink-violet); opacity: 0.8; margin-top: var(--s-2); font-size: 0.9rem; }
