/* ═══════════════════════════════════════════════════════════════════
   Illuminosity Healing — Live-Event Capture
   Shared base tokens + the public capture page.
   Brand source of truth: illuminosity-healing/brand/palette.md
   Rendered natively in Wendee's approved identity so the capture page
   reads as part of illuminosityhealing.com — warm, editorial, squared.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* Purples — the brand's spine */
  --primary:        #3D1152;   /* deep purple: headlines, text, dark bgs */
  --primary-dark:   #260A33;
  --primary-light:  #6A3D85;   /* deep amethyst — eyebrows on cream (7.0:1 AAA) */
  --purple-deep:    #1A0628;
  --purple-pale:    #B79DC4;
  --primary-rgb:    61, 17, 82;

  /* Gold — primary accent */
  --gold:           #DAA900;
  --gold-light:     #F5C84F;
  --gold-pale:      #FBF3CC;
  --gold-deep:      #C89B00;   /* button hover floor */
  --gold-rgb:       218, 169, 0;

  /* Warm pop — rare */
  --salmon-red:     #B83318;   /* darkened Pantone 7597 for small-text safety */

  /* Creams & neutrals */
  --cream:          #FCFAF6;
  --cream-warm:     #F5EFE2;
  --frame-bg:       #EFEAE0;
  --ink:            var(--primary);
  --muted:          #6B5F8A;
  --line:           rgba(61, 17, 82, 0.12);
  --error:          #B0281A;
  --ok:             #4A7C59;

  /* Type */
  --display: 'Saira Condensed', 'Arial Narrow', system-ui, sans-serif;
  --sans:    'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  /* Wendee's brand is squared — matches the FGF forms she approved */
  --radius: 0px;

  /* Moon/diamond ornament used across the site */
  --moon-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z' fill='%23fff'/></svg>");
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

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

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ─── The capture stage: a single centered column, phone-first ───────── */
.capture-stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 5vw, 48px) clamp(18px, 5vw, 32px);
  position: relative;
  overflow: hidden;
}

/* Signature: a faint gold mandala arc bleeding from the top-right,
   lifted from the homepage's .about::before treatment. Quiet, brand-true. */
.capture-stage::before {
  content: "";
  position: absolute;
  top: -160px; right: -180px;
  width: 460px; height: 460px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, transparent 46%, rgba(var(--gold-rgb), 0.10) 47%, rgba(var(--gold-rgb), 0.10) 48%, transparent 49%),
    radial-gradient(circle at center, transparent 62%, rgba(var(--gold-rgb), 0.07) 63%, rgba(var(--gold-rgb), 0.07) 64%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.capture-stage::after {
  content: "";
  position: absolute;
  bottom: -170px; left: -170px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, transparent 52%, rgba(var(--primary-rgb), 0.05) 53%, rgba(var(--primary-rgb), 0.05) 54%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.capture-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ─── Brand lockup ───────────────────────────────────────────────────── */
.brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 18px;
}
.logo-mark {
  width: 64px; height: 64px;
  object-fit: contain;
  display: block;
  margin-bottom: 12px;
}
.brand-name {
  font-family: var(--display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--primary);
  line-height: 1;
  /* optical: absorb the trailing tracking so it stays centered */
  text-indent: 0.32em;
}
.brand-tagline {
  font-family: var(--sans);
  font-style: italic;
  font-weight: 400;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--primary-light);
  margin-top: 7px;
}

/* ─── Gold hairline + diamond ornament ───────────────────────────────── */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 20px 0 22px;
  width: 100%;
  max-width: 200px;
}
.ornament .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to var(--dir, right), transparent, rgba(var(--gold-rgb), 0.85));
}
.ornament .line.left  { --dir: left; }
.ornament .line.right { --dir: right; }
.ornament .diamond {
  width: 11px; height: 11px;
  flex: 0 0 auto;
  background-color: var(--gold);
  -webkit-mask: var(--moon-mask) no-repeat center / contain;
  mask: var(--moon-mask) no-repeat center / contain;
  transform: rotate(-18deg);
}

/* ─── Welcome copy ───────────────────────────────────────────────────── */
.welcome-eyebrow {
  font-family: var(--display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: 12px;
}
.welcome-headline {
  font-family: var(--sans);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(27px, 8vw, 34px);
  line-height: 1.14;
  color: var(--primary);
  letter-spacing: 0.005em;
}
.welcome-sub {
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 14px;
  max-width: 34ch;
}

/* ─── RSVP event-detail card (populated by app.js for workshop/retreat;
       hidden for capture-type events — Tier 3 fills this in) ─────────── */
.event-detail {
  width: 100%;
  margin-top: 22px;
  padding: 18px 20px;
  background: var(--cream-warm);
  border: 1px solid rgba(var(--gold-rgb), 0.35);
  text-align: left;
}
.event-detail .ev-name {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 16px;
  color: var(--primary);
  margin-bottom: 6px;
}
.event-detail .ev-line {
  font-size: 14px;
  color: var(--primary-light);
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.event-detail .ev-line + .ev-line { margin-top: 3px; }

/* ─── Form ───────────────────────────────────────────────────────────── */
.capture-form {
  width: 100%;
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}
.field { display: flex; flex-direction: column; }
.field label {
  font-family: var(--display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 7px;
}
.field input {
  width: 100%;
  min-height: 52px;
  padding: 13px 16px;
  font-family: var(--sans);
  font-size: 16px;              /* ≥16px: no iOS zoom on focus */
  color: var(--primary);
  background: #fff;
  border: 1.5px solid rgba(var(--primary-rgb), 0.22);
  border-radius: var(--radius);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field input::placeholder { color: rgba(var(--primary-rgb), 0.38); }
.field input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(var(--gold-rgb), 0.22);
}

/* Honeypot — visually + semantically hidden, off-screen (bots fill it) */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ─── The one gold button (her CTA pattern: gold, purple text, arrow) ── */
.btn-join {
  width: 100%;
  min-height: 54px;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--gold);
  border: 1.5px solid var(--gold);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}
.btn-join .arrow { transition: transform 0.2s ease; }
.btn-join:hover:not(:disabled) { background: var(--gold-light); border-color: var(--gold-light); }
.btn-join:hover:not(:disabled) .arrow { transform: translateX(4px); }
.btn-join:active:not(:disabled) { transform: translateY(1px); }
.btn-join:disabled { opacity: 0.62; cursor: default; }

/* ─── Error + consent ────────────────────────────────────────────────── */
.form-error {
  color: var(--error);
  font-size: 13.5px;
  line-height: 1.45;
  min-height: 1px;
}
.form-error:empty { display: none; }

.consent {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 2px;
}

/* ─── Status line (offline queue: "saved on your phone…") ─────────────── */
.save-status {
  margin-top: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.save-status .spinner {
  width: 15px; height: 15px;
  flex: 0 0 auto;
  border: 2px solid rgba(var(--gold-rgb), 0.35);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: illu-spin 0.8s linear infinite;
}
@keyframes illu-spin { to { transform: rotate(360deg); } }

/* ─── Thank-you state ────────────────────────────────────────────────── */
.thankyou {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}
.thankyou .check {
  width: 62px; height: 62px;
  margin-bottom: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
}
.thankyou .check svg { width: 30px; height: 30px; }
.thankyou-headline {
  font-family: var(--sans);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(28px, 8vw, 36px);
  color: var(--primary);
  line-height: 1.1;
  margin-bottom: 14px;
}
.thankyou-body {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 32ch;
}
.thankyou-signoff {
  margin-top: 22px;
  font-family: var(--sans);
  font-style: italic;
  font-size: 18px;
  color: var(--primary-light);
}

/* ─── No-event screen ────────────────────────────────────────────────── */
.admin-signin {
  margin-top: 26px;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.admin-signin a {
  color: var(--primary-light);
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--gold-rgb), 0.5);
  padding-bottom: 2px;
}
.admin-signin a:hover { color: var(--gold-deep); }

/* ─── Focus visibility (quality floor) ───────────────────────────────── */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ─── Reduced 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;
  }
  .save-status .spinner { animation: none; border-top-color: var(--gold); }
}

/* ─── Small phones ───────────────────────────────────────────────────── */
@media (max-width: 380px) {
  .capture-stage { padding: 20px 16px; }
  .brand-name { font-size: 20px; letter-spacing: 0.28em; text-indent: 0.28em; }
}
