/* ===========================================================================
   FUNNEL LAYOUT — landing sections, quiz shell, result page.
   Ported from the Claude Design prototype's index.html <style> block +
   Landing/Quiz/Result.jsx inline styles.
   =========================================================================== */

html, body { margin: 0; background: var(--bg-page); }
#app { min-height: 100vh; }
button { font: inherit; }

/* ---------- View routing ---------- */
.view { display: none; }
#view-landing.is-active { display: block; }
#view-quiz.is-active { display: flex; }
#view-channeling.is-active { display: flex; }
#view-result.is-active { display: block; }

.ic-sec { padding: 3.25rem 1.4rem; }
.ic-wrap { width: 100%; max-width: 620px; margin: 0 auto; }
.ic-wrap--wide { max-width: 1120px; }
.ic-wrap--mid { max-width: 760px; }

/* Subtle scattered gold/orchid dust on light sections */
.ic-dust { position: relative; }
.ic-dust::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(circle, rgba(201,162,75,0.11) 1.1px, transparent 1.7px),
    radial-gradient(circle, rgba(191,116,199,0.08) 1px, transparent 1.6px),
    radial-gradient(circle, rgba(201,162,75,0.07) 1px, transparent 1.5px);
  background-size: 96px 96px, 150px 150px, 210px 210px;
  background-position: 0 0, 48px 70px, 120px 30px;
}
.ic-dust > * { position: relative; z-index: 1; }

/* Twinkling gold aura behind cards */
@keyframes ic-card-glow {
  0%, 100% { box-shadow: 0 8px 24px rgba(74,60,130,0.12), 0 0 22px rgba(217,185,104,0.42); }
  50%      { box-shadow: 0 10px 30px rgba(74,60,130,0.14), 0 0 54px 4px rgba(240,205,120,0.85); }
}
.ic-glow { animation: ic-card-glow 3.2s var(--ease-soft) infinite; }
.ic-glow.d1 { animation-delay: 0.7s; }
.ic-glow.d2 { animation-delay: 1.4s; }
.ic-glow.d3 { animation-delay: 2.1s; }

/* Scroll-reveal: headings & key lines fade + rise, staggered */
.has-io .js-reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease-soft), transform 0.7s var(--ease-soft); }
.has-io .js-reveal.is-in { opacity: 1; transform: none; }
.has-io .ic-starmark { transform: none; opacity: 0; }
.has-io .ic-starmark.is-in { opacity: 1; animation: ic-star-twinkle-on 900ms var(--ease-soft) both; }
@keyframes ic-star-twinkle-on {
  0%   { opacity: 0; transform: scale(0.2) rotate(-40deg); filter: brightness(2.2); }
  55%  { opacity: 1; transform: scale(1.3) rotate(12deg); filter: brightness(1.5); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); filter: none; }
}

#ic-fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 6; }

.ic-on-dark { --checklist-color: var(--text-on-dark); --checklist-marker: var(--gold-400); }
.ic-quiz-dark { --progress-label: var(--gold-200); --progress-sub: var(--text-on-dark-muted); --progress-track: rgba(255,255,255,0.14); }

@media (prefers-reduced-motion: reduce) {
  .has-io .js-reveal { opacity: 1; transform: none; transition: none; }
  .has-io .ic-starmark { opacity: 1; }
  .has-io .ic-starmark.is-in { animation: none; }
  #ic-fx { display: none; }
  .ic-glow { animation: none; box-shadow: 0 8px 24px rgba(74,60,130,0.12), 0 0 44px 3px rgba(240,205,120,0.7); }
}

/* ---------- Star / divider glyphs ---------- */
.ic-star-divider { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0.5rem 0 1.5rem; color: var(--gold-500); }
.ic-star-divider__line { height: 1px; width: 46px; }
.ic-star-divider__line--l { background: linear-gradient(90deg, transparent, var(--gold-400)); }
.ic-star-divider__line--r { background: linear-gradient(90deg, var(--gold-400), transparent); }
.ic-starmark { display: flex; margin-bottom: 0.7rem; color: var(--gold-500); }
.ic-starmark--center { justify-content: center; }
.ic-starmark svg { filter: drop-shadow(0 1px 4px rgba(201,162,75,0.5)); }

/* ---------- Hero ---------- */
.ic-hero { padding-bottom: 0; position: relative; overflow: hidden; background: linear-gradient(175deg, #241750 0%, #221650 45%, #20144c 100%); color: var(--text-on-dark); }
.ic-hero::before { content: ''; position: absolute; inset: 0; background: var(--gradient-aura); opacity: 0.35; }
.ic-hero-grid { display: grid; gap: 2rem; position: relative; }
.ic-hero-copy { text-align: center; }
.ic-hero-eyebrow { margin: 0; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-200); }
.ic-hero-copy h1 { color: #fff; font-size: clamp(2.3rem, 5.5vw, 3.6rem); margin: 1rem 0 0.8rem; line-height: 1.03; }
.ic-hero-lead { color: var(--text-on-dark-muted); font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.55; max-width: 38ch; margin-left: auto; margin-right: auto; }
.ic-hero-cta-inner { margin-top: 1.6rem; max-width: 420px; margin-left: auto; margin-right: auto; }
.ic-hero-cta-note { text-align: center; margin: 0.75rem 0 0; font-size: 0.85rem; color: var(--text-on-dark-muted); font-weight: 600; }
.ic-hero-photo img { width: 100%; display: block; }

/* ---------- What you'll discover ---------- */
.ic-discover-grid { display: grid; gap: 1rem; margin-top: 1.75rem; }
.ic-discover-card { height: 100%; background: var(--surface-card); border: 1px solid var(--border-blush); border-radius: var(--radius-lg); padding: 1.5rem 1.4rem; }
.ic-discover-card__h { margin: 0; font-family: var(--font-display); font-size: 1.4rem; color: var(--violet-600); font-weight: 600; }
.ic-discover-card__b { margin: 0.5rem 0 0; font-size: 0.98rem; line-height: 1.55; }

/* ---------- About Claire ---------- */
.ic-about-grid { display: grid; gap: 1.75rem; align-items: center; }
.ic-about-photo { text-align: center; }
.ic-about-photo img { width: 200px; height: 200px; object-fit: cover; border-radius: 50%; display: inline-block; box-shadow: var(--shadow-md); border: 3px solid var(--gold-400); }

/* ---------- Result info cards ---------- */
.ic-info-grid { display: grid; gap: 1rem; }

/* CTA note under buttons */
.ic-cta-note { text-align: center; margin: 0.75rem 0 0; font-size: 0.85rem; color: var(--text-muted); font-weight: 600; letter-spacing: 0.02em; }

@media (min-width: 680px) {
  .ic-sec { padding: 4rem 2rem; }
  .ic-info-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 760px) {
  .ic-discover-grid { grid-template-columns: repeat(3, 1fr); }
  .ic-about-grid { grid-template-columns: 260px 1fr; }
  .ic-about-photo, .ic-about-text { text-align: left; }
}
@media (min-width: 920px) {
  .ic-sec { padding: 5rem 2.5rem; }
  .ic-hero { padding-bottom: 5rem; }
  .ic-hero-grid { grid-template-columns: 1.02fr 0.98fr; align-items: center; }
  .ic-hero-copy { text-align: left; }
  .ic-hero-lead, .ic-hero-cta-inner { margin-left: 0; margin-right: 0; }
}

/* ===========================================================================
   QUIZ SHELL
   =========================================================================== */
/* display is intentionally NOT set here — .view sets display:none by default
   and #view-quiz.is-active sets display:flex when active (higher specificity
   via the ID). Setting display:flex on this class too would fight that rule
   at equal specificity and win on source order, leaving the view stuck
   visible even when .is-active is removed. */
.quiz-shell {
  position: relative;
  min-height: 100vh;
  background: radial-gradient(130% 70% at 50% 8%, rgba(191,116,199,0.24) 0%, rgba(95,78,161,0.08) 42%, rgba(95,78,161,0) 70%), linear-gradient(180deg, #2A1F57 0%, #241A47 45%, #1B1338 100%);
  color: var(--text-on-dark);
  padding: clamp(1.5rem, 4vw, 3rem) 1.4rem 3rem;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.quiz-inner { position: relative; z-index: 1; width: 100%; max-width: 580px; margin: 0 auto; }
.quiz-starfield { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.quiz-starfield span { position: absolute; animation: ic-twinkle 3s ease-in-out infinite; }
.quiz-back-btn {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: 0.9rem;
  color: var(--text-on-dark-muted); padding: 0.3rem 0;
}
.quiz-back-btn.is-hidden { visibility: hidden; }
.quiz-progress-wrap { margin: 1rem 0 1.75rem; }
.quiz-question { color: #fff; font-size: clamp(1.55rem, 6.5vw, 2rem); line-height: 1.2; margin-bottom: 1.5rem; }
.quiz-options { display: flex; flex-direction: column; gap: 0.85rem; }

/* Opt-in gate */
.optin-head { text-align: center; margin-top: 1.5rem; }
.optin-head h2 { margin-top: 1rem; color: #fff; font-size: clamp(2rem, 8vw, 2.5rem); }
.optin-head p { margin: 0 auto; max-width: 36ch; color: var(--text-on-dark-muted); }
.optin-form { margin-top: 1.75rem; display: flex; flex-direction: column; gap: 1rem; }
.optin-submit-wrap { margin-top: 0.5rem; }
.optin-note { text-align: center; margin: 0.75rem 0 0; font-size: 0.85rem; color: var(--text-on-dark-muted); }

/* Channeling transition */
/* display intentionally omitted — see the note above .quiz-shell; the same
   cascade-order trap applies here. */
.channeling {
  position: relative; min-height: 100vh; background: var(--gradient-night); color: var(--text-on-dark);
  flex-direction: column; align-items: center; justify-content: center; overflow: hidden; padding: 2rem;
}
.channeling::before { content: ''; position: absolute; inset: 0; background: var(--gradient-aura); opacity: 0.7; }
.channeling-orb { position: relative; width: 200px; height: 200px; display: grid; place-items: center; }
.channeling-orb__ring { position: absolute; width: 100%; height: 100%; animation: ic-swirl-rotate 9s linear infinite; }
.channeling-orb__particle { position: absolute; left: 50%; top: 50%; color: var(--gold-400); }
.channeling-orb__particle span { display: block; animation: ic-particle-drift 2.4s var(--ease-soft) infinite; }
.channeling-orb__core {
  width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,228,176,0.85) 0%, rgba(217,185,104,0.35) 45%, rgba(191,116,199,0) 72%);
  animation: ic-swirl-rotate-rev 6s linear infinite, ic-twinkle 2.4s var(--ease-soft) infinite;
}
.channeling-text {
  position: relative; margin-top: 2.5rem; text-align: center;
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem); color: var(--gold-200);
  max-width: 22ch; line-height: 1.4;
  animation: ic-conjure-text 2.2s var(--ease-soft) infinite;
}

/* ===========================================================================
   RESULT PAGE
   =========================================================================== */
.result-banner { position: relative; overflow: hidden; background: var(--gradient-night); color: var(--text-on-dark); text-align: center; }
.result-banner::before { content: ''; position: absolute; inset: 0; background: var(--gradient-aura); opacity: 0.8; }
.result-eyebrow { position: relative; margin: 0; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-200); animation: ic-name-rise 600ms var(--ease-soft) both; }
.result-seal-wrap { position: relative; display: flex; justify-content: center; margin: 1.75rem 0 1.5rem; }
.result-seal { animation: ic-seal-in 900ms var(--ease-soft) both; }
.result-seal__ring { border-radius: 50%; padding: 7px; background: var(--gradient-gold); box-shadow: 0 0 44px rgba(217,185,104,0.55), var(--shadow-lg); }
.result-seal__inner { border-radius: 50%; padding: 5px; background: var(--night-800); }
.result-name { position: relative; color: #fff; font-size: clamp(2.4rem, 6vw, 3.4rem); margin: 0; animation: ic-name-rise 700ms var(--ease-soft) 520ms both; }

.result-h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); text-align: center; }
.result-copy { font-size: 1.05rem; line-height: 1.62; }
.result-foundation { font-family: var(--font-display); font-style: italic; font-size: clamp(1.4rem, 2.4vw, 1.8rem); color: var(--accent-strong); text-align: center; line-height: 1.35; margin: 2rem auto; max-width: 30ch; }
.result-imagine-card { background: var(--blush-100); border: 1px solid var(--border-blush); border-radius: var(--radius-lg); padding: 1.75rem; }
.result-imagine-card p { margin: 0; font-size: 1.02rem; line-height: 1.6; }
.result-imagine-card p + p { margin-top: 0.9rem; }
.result-waitlist-line { margin-top: 1.75rem; text-align: center; font-weight: 700; color: var(--violet-600); font-size: 1.1rem; }
.result-cta-wrap { margin-top: 1.25rem; text-align: center; }
.result-cta-inner { max-width: 420px; margin-inline: auto; }
.result-confirm { margin: 1rem auto 0; font-size: 0.9rem; font-style: italic; color: var(--text-muted); max-width: 42ch; line-height: 1.5; }
.result-retake { margin-top: 1.75rem; text-align: center; }
.result-retake button { background: none; border: none; color: var(--text-muted); font-family: var(--font-body); font-weight: 700; font-size: 0.85rem; cursor: pointer; text-decoration: underline; }

/* ===========================================================================
   WAITLIST CONFIRMATION MODAL — reuses .card--night (components.css), the
   same purple/night-sky treatment as the hero, quiz shell and result banner.
   =========================================================================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  display: none; align-items: center; justify-content: center;
  padding: 1.4rem;
  background: rgba(22,16,46,0.6);
}
.modal-overlay.is-open { display: flex; }
.modal-card {
  position: relative; width: 100%; max-width: 420px;
  padding: 2.5rem 2rem 2rem; text-align: center;
  animation: ic-modal-in 420ms var(--ease-soft) both;
}
@keyframes ic-modal-in {
  0%   { opacity: 0; transform: scale(0.92) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-starmark { display: flex; justify-content: center; margin-bottom: 1rem; color: var(--gold-400); }
.modal-title {
  margin: 0 0 1.5rem; font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.3rem, 1vw + 1.1rem, 1.6rem); color: #fff; line-height: 1.4;
}
.modal-close {
  position: absolute; top: 0.85rem; right: 0.95rem;
  background: none; border: none; cursor: pointer;
  font-size: 1.5rem; line-height: 1; color: var(--text-on-dark-muted); padding: 0.25rem;
}
.modal-close:hover { color: #fff; }
@media (prefers-reduced-motion: reduce) {
  .modal-card { animation: none; }
}
