/* ============================================================
   Guestlist — shared foundation for the static public pages.

   Linked BEFORE each page's inline <style>, so page-local rules
   always win on a tie. Put tokens + cross-page primitives here;
   leave layout and page-specific components in the page.

   Bump the ?v= query in each <link> when this file changes —
   firebase.json sets no Cache-Control for CSS, so a deploy can
   otherwise serve a stale base.css against fresh HTML.
   ============================================================ */

:root {
  /* ---- base: warm near-black (R>B) ---- */
  --bg: #0a0908;
  --bg-2: #12100d;
  --surface-1: #16130f;
  --surface-2: #1e1a15;
  --surface-3: #272119;

  /* ---- champagne gold: pulled from the logo wordmark ---- */
  --gold-100: #f7eeda;
  --gold-200: #efe0bf;
  --gold-300: #e6ce96;
  --gold-400: #d6b76b;
  --gold-500: #c9a227;
  --gold-600: #a6821b;
  --gold-700: #6e5511;

  /* ---- violet: supporting only. Never body text, never white on it. ---- */
  --violet-300: #c9a7fb;
  --violet-400: #a855f7;
  --violet-600: #6d28d9;

  /* ---- radii ---- */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* ---- type ----
     Bodoni is a Didone: its hairline serifs optically vanish on a
     near-black ground at small sizes. Hard floor of 32px — anything
     below that is Montserrat. Never antialias it thinner. */
  --font-display: "Bodoni Moda", "Bodoni MT", Didot, "Times New Roman", serif;
  --font-ui: "Montserrat", sans-serif;

  --fs-display: clamp(40px, 6.4vw, 72px);
  --fs-h1: clamp(34px, 5vw, 56px);
  --fs-h2: clamp(26px, 4vw, 40px);
  --fs-h3: 18px;
  --fs-body-lg: 16.5px;
  --fs-body: 15px;
  --fs-sm: 13px;
  --fs-kicker: 12px;

  /* ============================================================
     COMPAT ALIASES — every page still refers to these names.
     Repointing them here is what moves the whole site at once.
     ============================================================ */
  --primary: var(--gold-400);
  --primary-2: var(--gold-500);
  --accent: var(--violet-400);

  /* Text that sits ON a --primary fill. White passed on the old
     purple (5.7:1) but is 1.94:1 on gold — unreadable. Near-black
     on gold is 10.27:1. Every such site reads this token rather
     than hardcoding a colour, so the whole site flips together. */
  --on-primary: #0a0908;

  --text: #f5f1e8;
  --muted: #b8afa0;
  --soft: #928979;
  --success: #10b981;

  --card: rgba(22, 19, 15, 0.86);
  --card-border: rgba(214, 183, 107, 0.14);
  --line: rgba(214, 183, 107, 0.14);
  --line-strong: rgba(214, 183, 107, 0.28);
  --line-neutral: rgba(245, 241, 232, 0.10);

  --shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  --shadow-primary: 0 18px 44px rgba(201, 162, 39, 0.22);
  --radius: var(--r-lg);

  --page-bg:
    radial-gradient(circle at 18% 8%, rgba(201, 162, 39, 0.16), transparent 30%),
    radial-gradient(circle at 82% 14%, rgba(168, 85, 247, 0.10), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(201, 162, 39, 0.10), transparent 30%),
    linear-gradient(180deg, #0a0908 0%, #12100d 48%, #0a0908 100%);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-ui);
  background: var(--page-bg);
  color: var(--text);
}

/* Fine grain over the whole page. Replaces the blurred colour glows —
   reads as printed stock rather than plastic. pointer-events:none so it
   never intercepts a click; sits above the modal purely visually. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Scroll reveal. The .reveal class is added by JS at init and never written
   into the markup — if the script fails, content simply stays visible rather
   than being stranded at opacity:0 forever. */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.3, 1),
              transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

.hidden {
  display: none !important;
}

::selection {
  background: var(--primary);
  color: var(--on-primary);
}

/* ---- eyebrow / kicker ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-300);
  font-size: var(--fs-kicker);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* ---- button ---- */
.button {
  appearance: none;
  border: none;
  text-decoration: none;
  width: 100%;
  min-height: 56px;
  border-radius: 18px;
  font-weight: 700;
  font-size: var(--fs-body);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: var(--on-primary);
  box-shadow: var(--shadow-primary);
}

.button.secondary {
  background: rgba(245, 241, 232, 0.05);
  color: var(--text);
  border: 1px solid var(--line-strong);
}

.button.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
}

/* ---- loader ---- */
.spinner {
  width: 52px;
  height: 52px;
  border-radius: var(--r-pill);
  border: 4px solid rgba(245, 241, 232, 0.10);
  border-top-color: var(--gold-400);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- focus ---- */
:focus-visible {
  outline: 2px solid var(--gold-300);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* ---- motion ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  /* Deliberate exception: the blanket rule above freezes the loader
     mid-rotation, which reads as a crashed page. Rotation at this
     size is not a vestibular trigger — slow it, don't stop it. */
  .spinner {
    animation-duration: 1.4s !important;
    animation-iteration-count: infinite !important;
  }
}
