/* ============================================================
   THE EXPERIENCER MAP — STYLES
   Mobile-first, dark-cosmic, GPU-friendly
   ============================================================ */

/* ---------- 1 · Tokens ---------- */
:root {
  /* Base palette */
  --bg:            #000000;       /* pure black — hero owns all the color */
  --bg-deep:       #000000;
  --bg-elev:       rgba(0, 0, 0, 0.55);
  --bg-card:       rgba(0, 0, 0, 0.55);

  /* Brand */
  --primary:       #4A90D9;     /* Seggy's brand blue */
  --primary-2:     #5AA8FF;     /* electric highlight */
  --primary-deep:  #2563B5;     /* pressed state */
  --glow-primary:  rgba(90, 168, 255, 0.55);
  --glow-soft:     rgba(74, 144, 217, 0.18);

  /* Accents */
  --purple:        #7C5BD9;
  --purple-bright: #9D7CFF;
  --gold:          #F5C36B;
  --gold-bright:   #FFD98C;
  --rose:          #FF6FA0;

  /* Text */
  --text:          #ECEEF6;
  --text-strong:   #FFFFFF;
  --text-dim:      rgba(236, 238, 246, 0.66);
  --text-faint:    rgba(236, 238, 246, 0.40);
  --text-ghost:    rgba(236, 238, 246, 0.20);

  /* Lines */
  --line:          rgba(120, 160, 240, 0.18);
  --line-strong:   rgba(120, 160, 240, 0.40);

  /* Type */
  --font-display:  'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --font-body:     'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:     'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Motion */
  --ease-out:      cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out:   cubic-bezier(0.65, 0, 0.35, 1);

  /* Spacing rhythm */
  --space-xs: 0.5rem;
  --space-s:  1rem;
  --space-m:  1.75rem;
  --space-l:  3rem;
  --space-xl: 5rem;

  /* Layout */
  --content-max: 720px;
  --content-wide: 980px;

  /* Safe area for mobile notch */
  --safe-top:    env(safe-area-inset-top, 0);
  --safe-bottom: env(safe-area-inset-bottom, 0);
}

/* ---------- 2 · Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
}

img, svg, canvas { display: block; max-width: 100%; }

a {
  color: var(--primary-2);
  text-decoration: none;
  transition: color 220ms var(--ease-out);
}
a:hover { color: var(--gold-bright); }

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

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

/* ---------- 3 · Atmospheric backdrop ----------
   Pure black behind the quiz/result/email screens. The hero image
   carries the only color moment on the site. The shooting-star canvas
   (cosmos__canvas) still paints stars on top of this black field. */
.cosmos {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #000;
}

.cosmos__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cosmos__noise {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' /></filter><rect width='100%25' height='100%25' filter='url(%23n)' /></svg>");
}

/* ---------- 4 · Layout shell ---------- */
.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  width: 100%;
  padding:
    calc(var(--safe-top) + var(--space-m))
    var(--space-m)
    calc(var(--safe-bottom) + var(--space-m));
}

.screen {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
}

.screen--wide { max-width: var(--content-wide); }

/* View transition base — controlled by JS */
.view {
  display: none;
}
.view.is-active {
  display: flex;
  flex-direction: column;
  flex: 1;
  animation: viewIn 700ms var(--ease-out);
}
@keyframes viewIn {
  from { opacity: 0; transform: translateY(18px); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

/* ---------- 5 · Header / footer ---------- */
.site-header {
  position: relative;
  z-index: 2;
  padding: var(--space-m);
  padding-top: calc(var(--safe-top) + var(--space-m));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-dim);
}

.brand__mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, var(--primary-2) 0%, var(--primary) 40%, transparent 70%),
    radial-gradient(circle at 70% 70%, var(--purple-bright) 0%, transparent 60%);
  box-shadow: 0 0 18px var(--glow-primary);
}

.brand__logo {
  height: clamp(34px, 4.4vw, 48px);
  width: auto;
  display: block;
  filter: drop-shadow(0 0 14px var(--glow-primary));
}

.site-footer {
  padding: var(--space-m);
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-faint);
  letter-spacing: 0.05em;
}

/* ---------- 6 · Type system ---------- */
.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--primary-2);
  margin-bottom: 1rem;
  position: relative;
}
.eyebrow::after {
  content: "";
  display: inline-block;
  width: 38px;
  height: 1px;
  background: linear-gradient(90deg, var(--primary-2), transparent);
  vertical-align: middle;
  margin-left: 0.7rem;
}

.display {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--text-strong);
  margin: 0 0 1.4rem;
  text-wrap: balance;
}

.display--xl {
  font-size: clamp(2.8rem, 9vw, 5.6rem);
}

.heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  line-height: 1.18;
  letter-spacing: -0.005em;
  color: var(--text-strong);
  margin: 0 0 1rem;
}

.subheading {
  font-size: 0.86rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.body-prose p {
  font-size: 1.04rem;
  line-height: 1.7;
  color: var(--text-dim);
  margin: 0 0 1.05rem;
}
.body-prose p:last-child { margin-bottom: 0; }

.lede p {
  font-size: 1.13rem;
  line-height: 1.65;
  color: var(--text);
}

/* ---------- 7 · Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 2.1rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 280ms var(--ease-out), box-shadow 280ms var(--ease-out), background 280ms var(--ease-out);
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08) inset,
    0 8px 30px var(--glow-primary),
    0 0 60px var(--glow-soft);
}
.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.35), transparent 50%);
  opacity: 0;
  transition: opacity 220ms var(--ease-out);
  pointer-events: none;
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.12) inset,
    0 14px 50px var(--glow-primary),
    0 0 100px var(--glow-soft);
}
.btn--primary:hover::before { opacity: 1; }
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  background: rgba(74, 144, 217, 0.08);
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn--ghost:hover {
  background: rgba(74, 144, 217, 0.16);
  border-color: var(--primary-2);
}

.btn__arrow {
  font-size: 1.1em;
  transition: transform 280ms var(--ease-out);
}
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ---------- 8 · Landing ---------- */
.intro {
  text-align: center;
  padding: var(--space-l) 0 var(--space-m);
}

.intro__hero {
  max-width: 640px;
  margin: 0 auto var(--space-l);
}

.intro__lede p {
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  line-height: 1.7;
  color: var(--text-dim);
  margin: 0 0 1.1rem;
}
.intro__lede p:first-child { color: var(--text); font-weight: 400; }

.intro__meta {
  margin-top: 1.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.guest-wall {
  margin-top: var(--space-xl);
  padding-top: var(--space-l);
  border-top: 1px solid var(--line);
  text-align: center;
}

.guest-wall__title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 2.4rem;
  letter-spacing: 0.02em;
}

.guest-wall__list {
  display: grid;
  gap: 2.2rem;
}

.guest-cat {
  text-align: left;
  max-width: 580px;
  margin: 0 auto;
}
.guest-cat__name {
  font-size: 0.74rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.guest-cat__people {
  color: var(--text-dim);
  font-size: 0.96rem;
  line-height: 1.6;
}

/* ---------- 9 · Question screen ---------- */
.q-screen {
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
  margin: auto 0;
}

.q-progress {
  position: relative;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: var(--space-s);
}
.q-progress__bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  box-shadow: 0 0 12px var(--glow-primary);
  transition: width 600ms var(--ease-out);
}
.q-progress__label {
  display: flex;
  justify-content: space-between;
  margin-top: 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.q-quote {
  border-left: 1px solid var(--line-strong);
  padding: 0.6rem 0 0.6rem 1.2rem;
  margin: 0 0 var(--space-m);
}
.q-quote__text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 0 0 0.55rem;
}
.q-quote__cite {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.q-quote__cite strong {
  color: var(--primary-2);
  font-weight: 500;
}

.q-text {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.6vw, 2.2rem);
  line-height: 1.22;
  letter-spacing: -0.005em;
  color: var(--text-strong);
  margin: 0 0 var(--space-m);
  text-wrap: balance;
}

.q-options {
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
}

.q-option {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
  text-align: left;
  padding: 1rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  font-size: 0.97rem;
  line-height: 1.45;
  transition:
    background 240ms var(--ease-out),
    border-color 240ms var(--ease-out),
    transform 220ms var(--ease-out),
    box-shadow 240ms var(--ease-out);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.q-option::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) 50%, var(--glow-soft), transparent 60%);
  opacity: 0;
  transition: opacity 240ms var(--ease-out);
  pointer-events: none;
}
.q-option:hover {
  border-color: var(--primary);
  background: rgba(74, 144, 217, 0.10);
  transform: translateX(4px);
  box-shadow: 0 0 30px var(--glow-soft);
}
.q-option:hover::before { opacity: 1; }
.q-option:hover .q-option__letter { color: var(--gold-bright); border-color: var(--gold); }

.q-option__letter {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--primary-2);
  letter-spacing: 0;
  transition: color 240ms, border-color 240ms;
  margin-top: 0.06em;
}

.q-option__text { flex: 1; }

.q-option.is-chosen {
  border-color: var(--gold);
  background: rgba(245, 195, 107, 0.10);
  box-shadow: 0 0 40px rgba(245, 195, 107, 0.25);
  transform: translateX(0);
}
.q-option.is-chosen .q-option__letter {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(245, 195, 107, 0.15);
}

/* ---------- 10 · Email capture ---------- */
.capture {
  text-align: center;
  max-width: 540px;
  margin: auto;
}
.capture__form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin: var(--space-m) 0 var(--space-s);
}
.capture__input {
  width: 100%;
  padding: 1rem 1.2rem;
  font: inherit;
  color: var(--text-strong);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 240ms, background 240ms, box-shadow 240ms;
}
.capture__input::placeholder { color: var(--text-faint); }
.capture__input:focus {
  outline: none;
  border-color: var(--primary-2);
  background: rgba(74, 144, 217, 0.08);
  box-shadow: 0 0 0 4px var(--glow-soft);
}
.capture__cta {
  width: 100%;
  margin-top: 0.4rem;
}
.capture__fine {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin: 0.6rem 0 0;
}
.capture__error {
  color: var(--rose);
  font-size: 0.85rem;
  margin-top: 0.4rem;
  min-height: 1.2em;
}

/* ---------- 11 · Result page ---------- */
.result {
  --accent: var(--primary-2);
}

.result__hero {
  text-align: center;
  padding: var(--space-l) 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--space-l);
}

.result__signature {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem 1.2rem;
  font-family: var(--font-mono);
  font-size: clamp(0.8rem, 2.2vw, 1.05rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.result__signature span { display: inline-block; }
.result__signature .dot {
  color: var(--text-faint);
  letter-spacing: 0;
}

.result__sigil {
  width: clamp(180px, 32vw, 260px);
  height: clamp(180px, 32vw, 260px);
  margin: 0 auto 1.6rem;
  filter: drop-shadow(0 0 30px var(--accent));
  animation: sigilDrift 14s var(--ease-in-out) infinite;
}
@keyframes sigilDrift {
  0%, 100% { transform: rotate(0deg) scale(1); opacity: 0.95; }
  50%      { transform: rotate(180deg) scale(1.04); opacity: 1; }
}

.result__name {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(3rem, 9vw, 5.6rem);
  line-height: 1;
  color: var(--text-strong);
  margin: 0 0 0.4rem;
  text-shadow: 0 0 40px var(--accent);
}
.result__tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-dim);
  letter-spacing: 0.01em;
  margin: 0;
}

.result__section {
  margin-bottom: var(--space-xl);
}

.result__section-eyebrow {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.match-card {
  position: relative;
  padding: 2rem 1.8rem;
  background:
    linear-gradient(160deg, rgba(74,144,217,0.08), transparent 70%),
    var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.match-card::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 70%;
  height: 140%;
  background: radial-gradient(ellipse at center, var(--glow-soft), transparent 60%);
  pointer-events: none;
}
.match-card__name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.7rem;
  color: var(--text-strong);
  margin: 0 0 0.3rem;
}
.match-card__title {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
}
.match-card__quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--text);
  margin: 0 0 1.2rem;
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
}
.match-card__body {
  color: var(--text-dim);
  margin: 0 0 1.4rem;
  line-height: 1.65;
}
.match-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 500;
}
.match-card__cta:hover { color: var(--gold-bright); }

.episodes {
  display: grid;
  gap: 1rem;
}
.episode {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 240ms, background 240ms, transform 240ms;
}
.episode:hover {
  border-color: var(--accent);
  background: rgba(74, 144, 217, 0.08);
  transform: translateX(4px);
}
.episode__num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-top: 0.15rem;
  flex: 0 0 auto;
}
.episode__title {
  flex: 1;
  font-size: 0.97rem;
  line-height: 1.45;
  color: var(--text);
}
.episode__title em {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-faint);
  font-style: normal;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.dimension-card {
  padding: 1.6rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 1rem;
}
.dimension-card__name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--text-strong);
  margin: 0 0 0.2rem;
}
.dimension-card__sub {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.dimension-card__body {
  color: var(--text-dim);
  line-height: 1.65;
  margin: 0 0 0.9rem;
}
.dimension-card__band {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  font-style: italic;
}

/* Share block */
.share-block {
  text-align: center;
  padding: var(--space-l) 1.6rem;
  background:
    linear-gradient(180deg, rgba(74,144,217,0.06), rgba(124,91,217,0.05));
  border: 1px solid var(--line);
  border-radius: 22px;
}
.share-block__sig {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.32em;
  color: var(--accent);
  margin: 0.5rem 0 1.5rem;
}
.share-block__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
}
.share-block__quote {
  margin-top: 1.6rem;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--text-faint);
  font-size: 0.95rem;
}

/* Community CTA */
.community {
  margin-top: var(--space-l);
  padding: var(--space-l) 1.8rem;
  background:
    radial-gradient(ellipse at top, rgba(124,91,217,0.18), transparent 70%),
    var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  text-align: center;
}
.community__name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  color: var(--text-strong);
  margin: 0 0 0.3rem;
}
.community__sub {
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.4rem;
}
.community__pitch {
  color: var(--text-dim);
  max-width: 540px;
  margin: 0 auto 1.6rem;
}
.community__perks {
  text-align: left;
  max-width: 380px;
  margin: 0 auto 1.8rem;
  list-style: none;
  padding: 0;
}
.community__perks li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.4rem;
  color: var(--text);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--line);
}
.community__perks li:last-child { border-bottom: none; }
.community__perks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

/* ---------- 12 · Card preview (visual only on result) ---------- */
.card-preview {
  display: block;
  margin: 0 auto var(--space-m);
  max-width: 320px;
  border-radius: 18px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 80px var(--glow-soft);
}

/* ---------- 13 · Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(16px); }
.is-revealed .reveal {
  animation: revealUp 900ms var(--ease-out) forwards;
  animation-delay: var(--reveal-delay, 0s);
}
@keyframes revealUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 14 · Particle burst on click ---------- */
.spark {
  position: fixed;
  pointer-events: none;
  z-index: 999;
}

/* ---------- 15 · Mobile tuning ---------- */
@media (max-width: 540px) {
  html, body { font-size: 16px; }
  .stage { padding: var(--space-s); padding-top: calc(var(--safe-top) + var(--space-s)); padding-bottom: calc(var(--safe-bottom) + var(--space-l)); }
  .q-option { padding: 0.95rem 1rem; }
  .match-card, .community { padding: 1.6rem 1.2rem; }
  .share-block { padding: 1.8rem 1rem; }


}

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

/* ============================================================
   THRESHOLD — landing with real hero image
   The image carries the visual story. Type stays minimal.
   ============================================================ */

.threshold {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  margin: calc(-1 * var(--space-m));
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
}

/* ---- Hero scene (image + interactive overlays) ---- */
.scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  /* parallax + breath variables, set by JS */
  --px: 0px;
  --py: 0px;
  --breath: 1;
}
.scene__layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.scene__hero {
  background: url('../assets/hero.jpg') center / cover no-repeat;
  transform: translate(var(--px), var(--py)) scale(var(--breath, 1));
  will-change: transform;
  filter: brightness(0.65) saturate(1.1);
}
@media (max-width: 540px) {
  .scene__hero {
    background-image: url('../assets/hero-mobile.jpg');
  }
}
.scene__stars, .scene__trail {
  mix-blend-mode: screen;
}
.scene__grain {
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23n)" opacity="0.06"/></svg>') repeat;
  opacity: 0.4;
  pointer-events: none;
}
.scene__edges {
  box-shadow: inset 0 0 200px 60px rgba(0, 0, 0, 0.8);
}

/* ---- Threshold logo ---- */
.threshold__logo {
  position: absolute;
  top: clamp(1.2rem, 3vw, 2rem);
  left: clamp(1.2rem, 3vw, 2rem);
  z-index: 10;
  text-decoration: none;
}
.threshold__logo img {
  height: clamp(26px, 3.5vw, 44px);
  width: auto;
  filter: brightness(1.1);
}
.threshold__logo--text {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: var(--text);
  letter-spacing: -0.02em;
}

/* ---- Threshold content overlay ---- */
.threshold__content {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--space-l) clamp(1.5rem, 5vw, 4rem);
  padding-bottom: clamp(2rem, 6vh, 5rem);
}
.threshold__bottom {
  max-width: 600px;
}
.threshold__line {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 1.2rem;
  text-shadow: 0 4px 40px rgba(0,0,0,0.6);
}
.threshold__line em {
  font-style: italic;
  color: var(--accent, #5AA8FF);
}
.threshold__continue {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: none;
  border: none;
  color: var(--text-soft);
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.3s, gap 0.3s;
  padding: 0;
}
.threshold__continue:hover {
  color: var(--text);
  gap: 0.9rem;
}
.threshold__continue__chevron {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.7;
}

/* ---- Below the fold ---- */
.below-fold {
  padding: var(--space-xl) clamp(1.5rem, 5vw, 4rem);
  max-width: 720px;
  margin: 0 auto;
}
.below-fold__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-m);
}
.below-fold__prose {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.7;
  color: var(--text-soft);
}
.below-fold__prose p {
  margin-bottom: 1.4em;
}

/* ---- Voices wall ---- */
.voices {
  margin-top: var(--space-xl);
  text-align: center;
}
.voices__title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--space-m);
}
.voices__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-s);
}
.voice {
  padding: var(--space-s);
}
.voice__cat {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
}
.voice__names {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.5;
}

/* ---- Final CTA at bottom ---- */
.threshold__final {
  margin-top: var(--space-xl);
  text-align: center;
  padding-bottom: var(--space-l);
}
.threshold__final-phrase {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text);
  margin-bottom: var(--space-m);
}

/* ---- Threshold body state ---- */
body.is-threshold .cosmos { display: none; }
body.is-threshold .site-header { display: none; }
body.is-threshold .site-footer { display: none; }
body.is-threshold .stage { padding: 0; }
/* ============================================================
   MOBILE THRESHOLD OVERRIDES — must come AFTER threshold styles
   ============================================================ */
@media (max-width: 540px) {
  .threshold__content {
    padding: var(--space-m) 2rem;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 3rem);
  }
  .threshold__line {
    font-size: 1.45rem;
    line-height: 1.22;
    margin-bottom: 0.9rem;
    padding-left: 0.15em;
  }
  .threshold__continue {
    padding-left: 0.15em;
  }
  .threshold__bottom {
    max-width: 100%;
  }
  .scene__hero {
    background-position: center 40%;
  }
}
