/* ============================================================
   Birthwrite.CO — Launch Splash (v1: layout + color)
   Source of truth (motif): ../../brand-assets/ethereal-mirage-motif.md
   Spec: ./design-brief.md
   The background is a static "womb" composition (final — see design-brief.md §4).
   ============================================================ */

/* ---------- Self-hosted fonts ---------- */
@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 {
  /* --- Ethereal Mirage palette (canonical tokens) --- */
  --cool-periwinkle: #8E9BE8;
  --cool-cornflower: #7B8FD4;
  --cool-lavender:   #C9B8E0;
  --warm-peach:      #F8D4B0;
  --warm-coral:      #F89B7E;
  --ember-orange:    #FF6A2C;
  --cream:           #FDF6EE;
  --ink-violet:      #4A4763;

  /* --- Dark "womb" field (derived by lowering ink-violet's value; no true black) --- */
  --field-deep: #1d1a2b;
  --field-mid:  #2b2742;

  /* --- Text-on-dark roles --- */
  --on-dark:        var(--cream);
  --on-dark-soft:   rgba(253, 246, 238, 0.62);
  --on-dark-faint:  rgba(253, 246, 238, 0.42);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 300;
  line-height: 1.7;
  color: var(--on-dark);
  background-color: var(--field-deep);

  /* Static womb composition (see design-brief.md §4).
     Order: ember orb (low-centre) over cool diffuse light (upper) over the field. */
  background-image:
    radial-gradient(62% 52% at 50% 80%,
      rgba(255, 106, 44, 0.22) 0%,
      rgba(248, 155, 126, 0.10) 34%,
      transparent 70%),
    radial-gradient(55% 46% at 30% 22%,
      rgba(142, 155, 232, 0.16) 0%,
      transparent 64%),
    radial-gradient(120% 120% at 50% 48%,
      var(--field-mid) 0%,
      var(--field-deep) 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  /* Single viewport, no scroll. svh/dvh handle mobile browser chrome. */
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* ---------- Grain overlay (mandatory per motif §1.2) ---------- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.06;
  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");
}

/* ---------- Centered stage ---------- */
.stage {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(24px, 5vh, 48px);
  padding: clamp(32px, 7vw, 64px) clamp(24px, 6vw, 56px);
}

/* Wordmark — Roashe (uppercase-only face); ".co" carries the warm accent */
.brand {
  font-family: 'Roashe', serif;
  font-weight: normal;
  font-size: clamp(1.9rem, 5.2vw, 2.8rem);
  letter-spacing: 0.08em;
  line-height: 1;
  color: var(--on-dark);
}
.brand .tld { color: var(--warm-peach); }

/* Hero copy — Inter Light, sentence case, calm (never all-caps) */
.hero {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: clamp(1.35rem, 3.6vw, 2.35rem);
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--on-dark);
  max-width: 22ch;
  text-wrap: balance;
}

/* Contact block */
.contact {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.6vh, 14px);
  font-size: clamp(0.95rem, 2.1vw, 1.075rem);
  color: var(--on-dark-soft);
}
.contact a {
  color: var(--warm-peach);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.contact a:hover { color: var(--ember-orange); border-bottom-color: rgba(255, 106, 44, 0.55); }

/* ---------- Footer (simplified) ---------- */
.footer {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: clamp(16px, 3vh, 28px) 24px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--on-dark-faint);
}

/* ---------- Accessibility ---------- */
a:focus-visible,
.contact a:focus-visible {
  outline: 2px solid var(--warm-peach);
  outline-offset: 3px;
  border-radius: 2px;
}
