/* ── FONTS (self-hosted) ── */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/dm-sans.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/dm-sans-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Serif Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/dm-serif-display.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Serif Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/dm-serif-display-italic.woff2') format('woff2');
}

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

/* ── DESIGN TOKENS ── */
:root {
  --primary: #AD6055;
  --primary-hover: #A8574A;
  --primary-light: rgba(173, 96, 85, 0.08);
  --foreground: #3D2F25;
  --text-secondary: #7B6C60;
  --text-tertiary: #968A7C;
  --background: #F7F2EE;
  --surface: #FFFFFF;
  --surface-section: #EDE8E2;
  --border: #E1DBD4;
  --footer-bg: #1E1814;

  --font-serif: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --shadow-card: 0px 2px 8px rgba(61,47,37,0.06), 0px 1px 3px rgba(61,47,37,0.04);
  --shadow-elevated: 0px 4px 16px rgba(61,47,37,0.08), 0px 2px 6px rgba(61,47,37,0.04);
  --shadow-button: 0 2px 8px rgba(173,96,85,0.18);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* Identity colors — echo the in-app M/S system */
  --you: #D4899A;
  --you-soft: rgba(212, 137, 154, 0.18);
  --you-edge: rgba(212, 137, 154, 0.34);
  --partner: #8DA0B5;
  --partner-soft: rgba(141, 160, 181, 0.18);
  --partner-edge: rgba(141, 160, 181, 0.34);
}

/* ── ANIMATION SYSTEM ──
   Italic-accent reveal — italic <em>s inside h1/h2/h3 fade in slightly
   after the surrounding text settles, with a hairline underline that
   draws in beneath. Tied to the page's voice signature. */
.italic-reveal em {
  position: relative;
  opacity: 0.18;
  /* Fades run on `ease`, not var(--ease-out) — the settle curve front-loads
     opacity so hard the fade reads as a pop. The underline wipe keeps it. */
  transition: opacity 720ms 320ms ease,
              color 720ms 320ms ease;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  padding-bottom: 0.08em;
}
.italic-reveal.is-revealed em {
  opacity: 1;
  transition: opacity 720ms 320ms ease,
              background-size 700ms 760ms var(--ease-out);
  background-size: 100% 1px;
}
.italic-reveal.no-underline em {
  background-image: none;
  padding-bottom: 0;
}

/* Hairline draw-in utility — replaces a horizontal border with a line
   that draws from left to right on enter. */
.hairline-draw {
  position: relative;
}
.hairline-draw::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--border);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 720ms var(--ease-out);
}
.hairline-draw.is-revealed::after {
  transform: scaleX(1);
}

/* Identity-dot pulse — terracotta and dusty-blue dots pulse in slow
   alternating rhythm, never on the same beat. */
@keyframes id-pulse-you {
  0%, 100% { box-shadow: 0 0 0 0 rgba(173, 96, 85, 0); }
  50%      { box-shadow: 0 0 0 5px rgba(173, 96, 85, 0.16); }
}
@keyframes id-pulse-partner {
  0%, 100% { box-shadow: 0 0 0 0 rgba(141, 160, 181, 0); }
  50%      { box-shadow: 0 0 0 5px rgba(141, 160, 181, 0.18); }
}

/* ── TYPOGRAPHY ── */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--foreground);
  background: var(--background);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 { font-family: var(--font-serif); font-weight: 400; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

/* ── CONTAINER ── */
.container { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* ── NAV ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 242, 238, 0.85);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.nav-logo {
  display: inline-flex; align-items: center;
}
.nav-logo img { height: 26px; width: auto; display: block; }
.nav-logo:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 4px; }
.nav-right { display: flex; align-items: center; gap: 24px; }
.nav-link {
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  transition: color 200ms;
}
.nav-link:hover { color: var(--foreground); }
.nav-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.btn-pill {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff;
  font-family: var(--font-sans); font-size: 14px; font-weight: 500;
  padding: 8px 20px; border-radius: 9999px; border: none; cursor: pointer;
  box-shadow: var(--shadow-button);
  transition: background 200ms var(--ease-out), transform 150ms;
  letter-spacing: 0.2px;
}
.btn-pill:hover { background: var(--primary-hover); color: #fff; }
.btn-pill:focus-visible { outline: 2px solid var(--foreground); outline-offset: 3px; }
.btn-pill:active { transform: scale(0.97); }

/* ── PRIMARY CTA BUTTON ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--primary); color: #fff;
  font-family: var(--font-sans); font-size: 16px; font-weight: 500;
  padding: 14px 32px; border-radius: 16px; border: none; cursor: pointer;
  box-shadow: var(--shadow-button);
  transition: background 200ms var(--ease-out), transform 150ms;
  letter-spacing: 0.3px;
}
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-primary:focus-visible { outline: 2px solid var(--foreground); outline-offset: 3px; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary svg { width: 20px; height: 20px; }

/* ── FOOTER ── */
.footer {
  background: var(--footer-bg); color: #C4A88A; padding: 48px 0 32px;
}
.footer-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 28px;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: #C4A88A; font-size: 14px; font-weight: 500; }
.footer-links a:hover { color: #F5E0D8; }
.footer-links a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 2px; }
.footer-seo {
  max-width: 560px; text-align: center;
  font-size: 12px; line-height: 1.6; color: #A69585;
}
.footer-copy { font-size: 12px; color: #A69585; }

/* ── GRAIN OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.28;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.24 0 0 0 0 0.18 0 0 0 0 0.14 0 0 0 0.55 0'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>");
}

/* ── REDUCED MOTION ──
   Movement is removed; opacity cross-fades stay. A plain fade is
   vestibular-safe, and zeroing it turns every text reveal into a hard
   light-to-dark snap. Pages that animate position must pin their own
   transforms under this query (index.html does, next to its keyframes). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  /* Italic accents keep the ghost-to-ink fade; the underline is
     pre-drawn in both states so it never wipes. */
  .italic-reveal em {
    background-size: 100% 1px;
    transition-duration: 720ms !important;
  }
  .hairline-draw::after { transform: scaleX(1); }
}

/* ── WAITLIST MODAL ── */
.waitlist-dialog {
  position: fixed;
  inset: 0;
  margin: auto;                 /* re-centre: the global reset zeroes the dialog's default auto margins */
  width: calc(100% - 40px);
  max-width: 440px;
  max-height: calc(100% - 40px);
  overflow-y: auto;
  border: none;
  border-radius: 20px;
  padding: 0;
  background: var(--surface);
  color: var(--foreground);
  box-shadow: var(--shadow-elevated);
}
.waitlist-dialog::backdrop {
  background: rgba(30, 24, 20, 0.45);
  backdrop-filter: blur(2px);
}
.waitlist-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 36px 32px 32px;
  font-family: var(--font-sans);
}
.waitlist-form [hidden] { display: none !important; }
.waitlist-close {
  position: absolute;
  top: 12px; right: 14px;
  width: 34px; height: 34px;
  border: none; background: none;
  font-size: 26px; line-height: 1;
  color: var(--text-tertiary);
  cursor: pointer;
  border-radius: 8px;
}
.waitlist-close:hover { color: var(--foreground); }
.waitlist-close:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.waitlist-heading {
  font-family: var(--font-serif);
  font-size: 28px; font-weight: 400;
  line-height: 1.1;
}
.waitlist-intro {
  font-size: 15px; line-height: 1.55;
  color: var(--text-secondary);
}
.waitlist-fields { display: flex; flex-direction: column; gap: 6px; }
.waitlist-label {
  font-size: 13px; font-weight: 500;
  color: var(--text-secondary);
  margin-top: 8px;
}
.waitlist-input {
  font-family: var(--font-sans);
  font-size: 16px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--background);
  color: var(--foreground);
}
.waitlist-input:focus-visible {
  border: 2px solid var(--primary);
  padding: 10px 13px;               /* offsets the +1px border so the field doesn't shift */
  outline: 2px solid transparent;   /* keeps a visible focus ring in forced-colors mode */
  outline-offset: 1px;
}
.waitlist-hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}
.waitlist-turnstile { display: flex; justify-content: center; }
.waitlist-turnstile:empty { display: none; }
.waitlist-consent {
  font-size: 12px; line-height: 1.5;
  color: var(--text-tertiary);
  text-align: center;
}
.waitlist-consent a { color: var(--primary); text-decoration: underline; }
.waitlist-submit { justify-content: center; width: 100%; }
.waitlist-message {
  font-size: 15px; line-height: 1.5;
  color: var(--foreground);
}
.waitlist-message.is-error { color: var(--primary); }
