/*
 * SelfSignal Breeze-style funnel — styles.
 * Dark, premium, mobile-first. Desktop shows a centered phone-like shell.
 */

/* ---- CTA signal waveform (v2) — grows as sections complete ---------- */
.funnel-cta {
  position: relative;
}
.cta-wave {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  opacity: 0.5;
  pointer-events: none;
}
.cta-wave i {
  display: block;
  width: 3px;
  border-radius: 3px;
  background: #06231d;
  height: calc(4px + var(--signal, 0) * 16px);
}
.cta-wave i:nth-child(2) {
  height: calc(4px + var(--signal, 0) * 8px);
}
.cta-wave i:nth-child(3) {
  height: calc(4px + var(--signal, 0) * 22px);
}
.cta-wave i:nth-child(4) {
  height: calc(4px + var(--signal, 0) * 10px);
}
.cta-wave i:nth-child(5) {
  height: calc(4px + var(--signal, 0) * 5px);
}
.funnel-cta:disabled .cta-wave {
  opacity: 0.25;
}
.funnel-cta:disabled .cta-wave i {
  background: var(--muted);
}

@keyframes ss-pulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.03); }
  100% { transform: scale(1); }
}
.option-card.selected,
.plan-card.selected {
  animation: ss-pulse 0.18s ease;
}

/* ---- Immersive 2-option illusion question (v2) --------------------- */
.visual-immersive {
  justify-content: center;
  gap: 20px;
}
.illusion-card {
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: #05070d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  max-height: 54vh;
}
.illusion-card img {
  width: 100%;
  height: 100%;
  max-height: 54vh;
  object-fit: cover;
  display: block;
}
.visual-immersive .funnel-title {
  text-align: center;
  font-size: clamp(24px, 6.5vw, 34px);
}
.visual-immersive .pill-row {
  flex-direction: column;
  gap: 12px;
}
.visual-immersive .pill-row .option-card {
  width: 100%;
}

/* ---- Audio atmosphere (v2) ----------------------------------------- */
.audio-atmosphere {
  position: relative;
  background:
    radial-gradient(60% 40% at 20% 8%, rgba(42, 51, 82, 0.9), transparent 60%),
    radial-gradient(55% 40% at 82% 26%, rgba(27, 37, 66, 0.85), transparent 60%),
    linear-gradient(180deg, #0a0f1e, var(--bg));
}
.audio-atmosphere .lightning {
  position: absolute;
  inset: 0;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  animation: ss-flash 9s infinite;
}
.audio-atmosphere > *:not(.lightning) {
  position: relative;
  z-index: 1;
}
@keyframes ss-flash {
  0%, 93%, 100% { opacity: 0; }
  93.5% { opacity: 0.1; }
  94% { opacity: 0; }
  94.6% { opacity: 0.06; }
  95.2% { opacity: 0; }
}
.audio-warning {
  background: rgba(21, 26, 40, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  text-align: center;
}
.audio-warning p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
.audio-play-btn {
  box-shadow: 0 0 0 14px rgba(102, 117, 232, 0.15);
}

/* ---- Result tease (v2) -------------------------------------------- */
.tease-free-card {
  background: var(--panel);
  border: 1px solid rgba(95, 215, 194, 0.3);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-align: center;
}
.tease-free-card .archetype {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
}
.tease-free-card .teaser {
  color: var(--text);
}
.result-tease .locked,
.visual-immersive ~ .locked,
.funnel-body > .locked {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-radius: var(--radius-sm);
  padding: 15px 16px;
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  color: var(--muted);
}
.funnel-body > .locked::after {
  content: "🔒";
  font-size: 14px;
}

/* ---- Loader testimonial (v2) ------------------------------------- */
.calc-testimonial {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.ct-quote {
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 6px;
}
.ct-person {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 2px;
}

/* ---- Trial timeline (v2) ----------------------------------------- */
.trial-timeline {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.trial-timeline .tl-head {
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 12px;
}
.tl-row {
  display: flex;
  gap: 14px;
  padding: 7px 0;
  align-items: baseline;
}
.tl-day {
  flex: 0 0 66px;
  color: var(--accent);
  font-weight: 800;
  font-size: 13px;
}
.tl-text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

:root {
  --bg: #080d18;
  --panel: #151a28;
  --panel-2: #242334;
  --text: #ffffff;
  --muted: #a9adbf;
  --accent: #5fd7c2;
  --accent-dark: #006b55;
  --purple: #6675e8;
  --blue: #5d9cff;
  --warning: #f5c24b;
  --danger: #ff6b8a;
  --white-card: #ffffff;
  --dark-text: #24234b;

  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-pill: 999px;
  --shell-max: 480px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", "Nunito Sans", "Inter", system-ui, -apple-system,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.funnel-app {
  min-height: 100svh;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(102, 117, 232, 0.18), transparent 60%),
    radial-gradient(90% 50% at 50% 120%, rgba(95, 215, 194, 0.1), transparent 60%),
    var(--bg);
  color: var(--text);
  overflow-x: hidden;
  max-width: 100%;
}

.funnel-shell {
  width: 100%;
  max-width: var(--shell-max);
  margin: 0 auto;
  min-height: 100svh;
  position: relative;
  overflow-x: hidden;
}

@media (min-width: 560px) {
  .funnel-shell {
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
  }
}

.funnel-screen {
  min-height: 100svh;
  padding: 22px 18px calc(120px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  animation: screen-in 0.32s ease;
  width: 100%;
  min-width: 0;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Top bar: back + progress + sound -------------------------------- */
.funnel-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  min-height: 40px;
}

.funnel-back {
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  font-size: 20px;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 0.15s ease;
}

.funnel-back:hover {
  background: rgba(255, 255, 255, 0.12);
}

.funnel-back[hidden] {
  visibility: hidden;
}

.sound-toggle {
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  font-size: 18px;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 0.15s ease;
}

.sound-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ---- Progress (sectioned) -------------------------------------------- */
.progress {
  flex: 1;
  min-width: 0;
}

.progress-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}

.progress-dots {
  display: flex;
  gap: 6px;
}

.progress-dot {
  flex: 1;
  height: 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.progress-dot .fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}

.progress-dot.done .fill {
  width: 100%;
}

/* ---- Body -------------------------------------------------------------- */
.funnel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.funnel-eyebrow {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin: 0;
}

.funnel-title {
  font-size: clamp(28px, 7.5vw, 46px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
  overflow-wrap: anywhere;
}

.funnel-subtitle {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
  margin: -4px 0 0;
  overflow-wrap: break-word;
}

.funnel-body-text {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
  margin: 0;
}

.funnel-note {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.funnel-illustration {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: var(--radius-md);
}

/* ---- Option cards ----------------------------------------------------- */
.option-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.option-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-width: 0;
  text-align: left;
  padding: 18px 18px;
  border-radius: var(--radius-md);
  background: var(--panel);
  border: 1.5px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease,
    border-color 0.15s ease;
}

.option-card:active {
  transform: scale(0.985);
}

.option-card .check {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  display: grid;
  place-items: center;
  font-size: 15px;
  color: transparent;
  transition: all 0.15s ease;
}

/* Selected = white card, dark text, mint check (Breeze pattern). */
.option-card.selected {
  background: var(--white-card);
  color: var(--dark-text);
  border-color: var(--white-card);
}

.option-card.selected .check {
  background: var(--accent);
  border-color: var(--accent);
  color: #06231d;
}

/* ---- Relate grid & yes/no/unsure ------------------------------------- */
.statement-card {
  background: var(--panel-2);
  border-radius: var(--radius-md);
  padding: 20px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.choice-grid .option-card {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-height: 96px;
  justify-content: center;
}

.pill-row {
  display: flex;
  gap: 12px;
}

.pill-row .option-card {
  justify-content: center;
  text-align: center;
}

/* ---- Visual / audio question ----------------------------------------- */
.media-frame {
  width: 100%;
  border-radius: var(--radius-md);
  background: var(--panel);
  border: 1.5px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 200px;
}

.media-frame img {
  width: 100%;
  display: block;
}

.audio-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 26px;
}

.audio-play-btn {
  width: 74px;
  height: 74px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--accent);
  color: #06231d;
  font-size: 28px;
  cursor: pointer;
}

.waveform {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 40px;
}

.waveform span {
  width: 4px;
  border-radius: var(--radius-pill);
  background: var(--muted);
  animation: wave 1.1s ease-in-out infinite;
}

.waveform.playing span {
  background: var(--accent);
}

@keyframes wave {
  0%,
  100% {
    height: 30%;
  }
  50% {
    height: 100%;
  }
}

.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  text-decoration: underline;
  font-size: 15px;
  cursor: pointer;
  padding: 6px;
}

/* ---- Info / encouragement -------------------------------------------- */
.info-illustration {
  width: 140px;
  height: 140px;
  margin: 8px auto 4px;
  border-radius: var(--radius-pill);
  background: radial-gradient(circle at 40% 30%, var(--purple), var(--accent-dark));
  display: grid;
  place-items: center;
  font-size: 58px;
}

/* ---- Testimonial ------------------------------------------------------ */
.testimonial-card {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.testimonial-stars {
  color: var(--warning);
  font-size: 20px;
  letter-spacing: 2px;
}

.testimonial-quote {
  font-size: 19px;
  line-height: 1.5;
  font-weight: 600;
}

.testimonial-person {
  color: var(--muted);
  font-weight: 700;
}

.demo-disclaimer {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}

/* ---- Calculating ------------------------------------------------------ */
.calc-rows {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

.calc-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-row-head {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  color: var(--muted);
}

.calc-row.active .calc-row-head,
.calc-row.done .calc-row-head {
  color: var(--text);
}

.calc-bar {
  height: 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.calc-bar .fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  border-radius: var(--radius-pill);
  transition: width 0.3s linear;
}

.calc-review {
  margin-top: 26px;
  text-align: center;
  background: var(--panel);
  border-radius: var(--radius-md);
  padding: 18px;
}

.calc-review .score {
  font-size: 34px;
  font-weight: 800;
}

/* Loading pop-up modal over blurred screen */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 14, 0.72);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 40;
  animation: screen-in 0.25s ease;
}

.popup-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---- Email capture ---------------------------------------------------- */
.result-badge {
  align-self: flex-start;
  background: rgba(95, 215, 194, 0.14);
  color: var(--accent);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.locked-result {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-align: center;
}

.locked-result .lock-icon {
  font-size: 30px;
}

.locked-result .archetype {
  font-size: 24px;
  font-weight: 800;
  margin: 8px 0 4px;
}

.locked-result .teaser {
  color: var(--muted);
  filter: blur(0.3px);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field input[type="email"],
.field input[type="text"] {
  width: 100%;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  background: var(--panel);
  color: var(--text);
  font-size: 17px;
}

.field input::placeholder {
  color: var(--muted);
}

.field-error {
  color: var(--danger);
  font-size: 14px;
  min-height: 18px;
}

.reassurance {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* ---- Plan selection --------------------------------------------------- */
.unlock-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.unlock-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text);
  font-size: 16px;
}

.unlock-list li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 800;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  min-width: 0;
}

.plan-card {
  position: relative;
  border-radius: var(--radius-md);
  background: var(--panel);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 22px 14px;
  font-size: 26px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.plan-card.selected {
  background: var(--white-card);
  color: var(--dark-text);
  border-color: var(--white-card);
}

.plan-card .plan-note {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.plan-card.selected .plan-note {
  color: var(--accent-dark);
}

.plan-info-box {
  background: rgba(102, 117, 232, 0.12);
  border: 1px solid rgba(102, 117, 232, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}

.plan-disclosure {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}

/* ---- Sticky CTA ------------------------------------------------------- */
.funnel-cta-wrap {
  position: sticky;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  margin-top: 18px;
  padding-top: 6px;
}

.funnel-cta {
  width: 100%;
  min-height: 66px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #06231d;
  font-size: 21px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(95, 215, 194, 0.28);
  transition: transform 0.12s ease, opacity 0.15s ease;
}

.funnel-cta:active {
  transform: scale(0.99);
}

.funnel-cta:disabled {
  background: var(--panel-2);
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
}

/* Intro hero variant */
.intro-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  text-align: center;
}

.intro-hero .funnel-title {
  font-size: clamp(32px, 9vw, 52px);
}

@media (max-width: 480px) {
  .funnel-screen {
    padding-inline: 14px;
  }
  .funnel-title,
  .intro-hero .funnel-title {
    font-size: clamp(30px, 10vw, 40px);
    letter-spacing: -0.02em;
  }
  .funnel-subtitle,
  .funnel-body-text {
    font-size: 15.5px;
  }
  .option-card {
    padding: 16px;
    gap: 12px;
    font-size: 16px;
  }
  .plan-grid {
    grid-template-columns: 1fr;
  }
  .intro-glow {
    width: 130px;
    height: 130px;
  }
}

.intro-glow {
  width: 160px;
  height: 160px;
  margin: 0 auto;
  border-radius: var(--radius-pill);
  background: radial-gradient(circle at 40% 30%, var(--purple), var(--accent-dark));
  filter: blur(2px);
  opacity: 0.9;
}

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

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
