/* ========================================
   JEEVibe Reel Landing Page
   Design System: GTM Dev Handover v1.6 + Landing Page Spec v1.4
   Font: Poppins | Mobile-first
   ======================================== */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --purple: #6B46C1;
  --magenta: #D946EF;
  --yellow: #FDE68A;
  --green: #10B981;
  --soft-red: #FCA5A5;
  --soft-red-text: #7F1D1D;
  --black: #111111;
  --gray: #F3F4F6;
  --gray-text: #6B7280;
  --white: #FFFFFF;
  --pink-tint: #FDF2F8;
  --gradient: linear-gradient(135deg, var(--purple) 0%, var(--magenta) 100%);
  --card-shadow: 0 2px 8px rgba(0,0,0,0.06);
  --card-radius: 16px;
}

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

body {
  font-family: 'Poppins', sans-serif;
  background: var(--gray);
  color: var(--black);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ── Brand Hero (tall gradient panel with welcome copy) ── */
#brand-header {
  background: var(--gradient);
  padding: 22px 24px 28px;
  color: var(--white);
  /* On desktop, cap to the same phone-shaped column as the rest of the app */
  max-width: 520px;
  margin: 0 auto;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.brand-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  flex-shrink: 0;
}

.brand-logo {
  height: 28px;
  width: 28px;
  object-fit: contain;
}

.brand-name {
  font-weight: 800;
  font-size: 22px;
  color: var(--white);
  letter-spacing: -0.3px;
}

.brand-welcome {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 4px;
}

.brand-tagline {
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.2px;
}

/* ── Progress Bar (vertical steps, no connecting lines) ── */
#progress-bar {
  background: transparent;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 24px 18px;
  gap: 8px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.step-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #D6D3DC;
  background: var(--white);
  transition: all 0.3s ease;
  position: relative;
}

.progress-step.completed .step-dot,
.progress-step.active .step-dot {
  border-color: var(--purple);
}

.progress-step.active .step-dot::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--purple);
}

.progress-step.completed .step-dot {
  background: var(--purple);
}

.step-label {
  font-size: 13px;
  font-weight: 600;
  color: #9B97A8;
  text-align: center;
}

.progress-step.completed .step-label,
.progress-step.active .step-label {
  color: var(--purple);
}

/* Connecting lines between progress steps */
.progress-line {
  flex: 1;
  height: 2px;
  background: #E5E7EB;
  /* Vertically align with the dot center (dot is 18px, label below it pushes
     the dot up — line sits at the dot's vertical midpoint) */
  margin-top: 8px;
  border-radius: 1px;
  overflow: hidden;
  min-width: 12px;
}

.progress-fill {
  height: 100%;
  background: var(--purple);
  width: 0%;
  transition: width 0.5s ease;
}

/* Fill the line connecting two completed steps */
.progress-step.completed + .progress-line .progress-fill {
  width: 100%;
}

/* ── Main Container ── */
#funnel-container {
  padding-bottom: 32px;
  min-height: calc(100vh - 240px);
}

.section-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── Loading ── */
.loading-pulse {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient);
  margin: 80px auto 16px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
}

.loading-text, .profile-loading-text {
  text-align: center;
  color: var(--gray-text);
  font-size: 14px;
  font-weight: 500;
}

/* ── Question Card ── */
.question-card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 4px 18px rgba(107, 70, 193, 0.06);
  padding: 26px 22px;
  margin-bottom: 16px;
}

.chapter-tag {
  display: inline-block;
  background: var(--magenta);
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 100px;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.question-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.4;
  margin-bottom: 22px;
  letter-spacing: -0.2px;
}

/* Inline keyword highlight inside question-text */
.question-text .hl {
  color: var(--purple);
  font-weight: 800;
}

.answer-eyebrow {
  font-size: 12px;
  font-weight: 800;
  color: var(--magenta);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 14px;
}

/* ── Option Cards (lavender letter chip on left + clean white card) ── */
.option-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #FBFAFE;
  border: 1.5px solid #ECE7F6;
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 12px;
  min-height: 68px;
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

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

.option-card:hover {
  border-color: rgba(107, 70, 193, 0.45);
  background: #F5F1FC;
}

.option-card.disabled {
  pointer-events: none;
}

.option-card.disabled:not(.correct):not(.incorrect):not(.selected) {
  opacity: 0.5;
}

.option-card.selected {
  background: rgba(107, 70, 193, 0.08);
  border-color: var(--purple);
}

.option-card.correct {
  background: var(--green);
  border-color: var(--green);
  animation: correctPop 0.3s ease;
}

.option-card.correct .option-letter {
  background: rgba(255, 255, 255, 0.22);
  color: var(--white);
}

.option-card.correct .option-text {
  color: var(--white);
}

.option-card.incorrect {
  background: #FEE2E2;
  border-color: #F87171;
}

.option-card.incorrect .option-letter {
  background: rgba(185, 28, 28, 0.12);
  color: #B91C1C;
}

.option-card.incorrect .option-text {
  color: #B91C1C;
}

@keyframes correctPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(107, 70, 193, 0.10);
  color: var(--purple);
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.option-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--black);
  flex: 1;
  letter-spacing: -0.1px;
}

.option-check {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}

/* ── Insight Block ── */
.insight-block {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #E5E7EB;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.insight-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--black);
  line-height: 1.5;
  margin-bottom: 8px;
}

.insight-extended {
  font-size: 14px;
  font-weight: 400;
  color: var(--gray-text);
  line-height: 1.5;
}

/* ── CTA Button ── */
.cta-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 18px 24px;
  background: var(--gradient);
  color: var(--white);
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cta-button:active {
  transform: scale(0.98);
}

.cta-arrow {
  color: var(--yellow);
  font-size: 20px;
  animation: bounceArrow 2s ease-in-out infinite;
}

@keyframes bounceArrow {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

/* ── Priya Ma'am Card ── */
.priya-card {
  background: var(--pink-tint);
  border-radius: var(--card-radius);
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
  animation: slideUp 0.3s ease;
}

.priya-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--gradient);
}

.priya-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.priya-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 20px;
}

.priya-name {
  font-weight: 700;
  color: var(--purple);
  font-size: 14px;
  display: block;
  margin-bottom: 6px;
}

.priya-message {
  font-size: 14px;
  font-weight: 400;
  color: var(--black);
  line-height: 1.5;
}

/* ── Diagnostic Progress ── */
.diag-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.diag-progress-bar {
  flex: 1;
  height: 4px;
  background: #E5E7EB;
  border-radius: 2px;
  overflow: hidden;
}

.diag-progress-fill {
  height: 100%;
  background: var(--purple);
  width: 0%;
  transition: width 0.4s ease;
}

.diag-counter {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-text);
  white-space: nowrap;
}

/* ── Profile Reveal ── */
.profile-card {
  background: var(--white);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 32px 24px;
  text-align: center;
}

.profile-loading {
  padding: 40px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.profile-loading-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--gradient);
  animation: pulse 1.5s ease-in-out infinite;
}

.profile-loading-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-accuracy {
  margin-bottom: 24px;
}

.accuracy-number {
  font-size: 56px;
  font-weight: 800;
  color: var(--purple);
  line-height: 1;
}

.accuracy-percent {
  font-size: 32px;
  font-weight: 800;
  color: var(--purple);
}

.accuracy-label {
  font-size: 16px;
  font-weight: 500;
  color: var(--gray-text);
  margin-top: 4px;
}

/* Strengths & Gaps */
.profile-section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-align: left;
  margin-bottom: 10px;
}

.strengths-label { color: var(--green); }
.gaps-label { color: var(--purple); }

.profile-strengths, .profile-gaps {
  margin-bottom: 20px;
  text-align: left;
}

.strength-row, .gap-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 500;
}

.strength-row {
  background: rgba(16, 185, 129, 0.06);
  color: var(--black);
}

.strength-icon {
  color: var(--green);
  font-size: 16px;
  flex-shrink: 0;
}

.gap-row {
  background: rgba(107, 70, 193, 0.06);
  color: var(--black);
  animation: slideInLeft 0.4s ease both;
}

.gap-icon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--purple);
  flex-shrink: 0;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: translateX(0); }
}

.collapsed-message {
  font-size: 13px;
  color: var(--gray-text);
  font-weight: 400;
  text-align: left;
  margin-top: 8px;
  font-style: italic;
}

.profile-summary {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-text);
  text-align: center;
  margin-top: 16px;
  margin-bottom: 20px;
  line-height: 1.5;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Download Section ── */
#section-download {
  margin-top: 12px;
}

.download-card {
  background: var(--white);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 16px;
}

.download-headline {
  font-size: 24px;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 4px;
}

.download-subline {
  font-size: 16px;
  font-weight: 400;
  color: var(--gray-text);
  margin-bottom: 24px;
}

.store-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 12px;
}

.store-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--purple);
  text-decoration: underline;
  cursor: pointer;
}

/* ── Share ── */
.share-section {
  text-align: center;
  padding: 16px;
}

.share-prompt {
  font-size: 14px;
  color: var(--gray-text);
  margin-bottom: 10px;
}

.share-button {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--purple);
  background: var(--white);
  border: 1.5px solid var(--purple);
  border-radius: 8px;
  padding: 10px 20px;
  cursor: pointer;
}

/* ── Returning User ── */
.returning-card {
  text-align: center;
}

.returning-text {
  font-size: 14px;
  color: var(--gray-text);
  margin-bottom: 16px;
}

/* ── Error State ── */
.error-text {
  text-align: center;
  color: var(--gray-text);
  font-size: 16px;
  padding: 80px 0;
}

/* ── Responsive (already mobile-first) ── */
/* Small phones (iPhone SE, Galaxy S8 — under 375px) */
@media (max-width: 374px) {
  #brand-header { padding: 18px 20px 22px; }
  .brand-logo-mark { width: 38px; height: 38px; }
  .brand-logo { height: 24px; width: 24px; }
  .brand-name { font-size: 19px; }
  .brand-tagline { font-size: 15px; }
  #progress-bar { padding: 18px 18px 14px; }
  .step-dot { width: 16px; height: 16px; }
  .step-label { font-size: 11px; }
  .question-card { padding: 22px 18px; }
  .question-text { font-size: 17px; }
  .chapter-tag { padding: 6px 14px; font-size: 11px; }
  .option-text { font-size: 16px; }
  .option-letter { width: 32px; height: 32px; font-size: 14px; }
  .option-card { padding: 12px 14px; min-height: 60px; gap: 12px; }
  .priya-card { padding: 16px; }
}

/* Tablets and desktop */
@media (min-width: 640px) {
  .section-container { max-width: 520px; }
  .question-text { font-size: 21px; }
  .option-text { font-size: 18px; }
}
