/* ==========================================================================
   WeDropLeads - Design System & Stylesheet
   Mobile-First (375px), Desktop (Max 520px Centered)
   Aesthetic: Flat, Clean, Premium Burgundy Brand
   ========================================================================== */

:root {
  /* Brand Palette (60% White, 30% Black, 10% Maroon) */
  --bg-gradient-start: #0a0b0e;
  --bg-gradient-end: #12141c;
  --mid-burgundy: #800020;
  --blush: #111115;
  --blush-hover: #1e1e24;
  --blush-active: #050508;
  --cream: #ffffff;
  --cream-card: #ffffff;
  --cream-subtle: #f8fafc;
  --ink: #0f172a;
  --ink-secondary: #475569;
  --ink-muted: #64748b;
  --border-light: #e2e8f0;
  --border-focus: #800020;
  --error-color: #dc2626;
  --success-color: #16a34a;
  
  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;

  /* Typography */
  --font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition-speed: 0.22s;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  font-family: var(--font-family);
  background: linear-gradient(145deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Confetti Canvas */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1000;
}

/* App Shell & Main Card */
.app-shell {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: auto;
}

.card {
  background-color: var(--cream-card);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
  width: 100%;
}

@media (min-width: 480px) {
  .card {
    padding: 32px 28px;
  }
}

/* Brand Header */
.brand-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* Flow Navigation & Progress Bar */
.flow-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-speed) var(--ease), color var(--transition-speed) var(--ease);
}

.back-btn:hover {
  background-color: var(--cream-subtle);
  color: var(--ink);
}

.back-btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.progress-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  background-color: var(--cream-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 20%;
  background-color: var(--mid-burgundy);
  border-radius: var(--radius-pill);
  transition: width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.progress-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-align: right;
}

/* Screen Transitions */
.screen {
  display: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.screen.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Live Urgency Pill */
.urgency-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--cream-subtle);
  border: 1px solid var(--border-light);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--mid-burgundy);
  margin-bottom: 18px;
}

.urgency-pill.waitlist-mode {
  background-color: #FFF2D6;
  border-color: #F8D98C;
  color: #8C5300;
}

.pill-dot {
  width: 8px;
  height: 8px;
  background-color: var(--mid-burgundy);
  border-radius: 50%;
  animation: pulse-dot 1.8s infinite ease-in-out;
}

.urgency-pill.waitlist-mode .pill-dot {
  background-color: #C97A00;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* Typography & Headlines */
.headline {
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 10px;
}

@media (min-width: 480px) {
  .headline {
    font-size: 1.85rem;
  }
}

.subheadline {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-secondary);
  margin-bottom: 22px;
}

.question-title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 20px;
}

/* 3 Proof Lines */
.proof-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.proof-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--ink);
}

.check-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: var(--mid-burgundy);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.check-icon svg {
  width: 14px;
  height: 14px;
}

/* Price Strip */
.price-strip {
  background-color: var(--cream-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
  border-left: 4px solid var(--mid-burgundy);
}

.price-figures {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.old-price {
  font-size: 1.05rem;
  text-decoration: line-through;
  color: var(--ink-muted);
  font-weight: 500;
}

.current-price {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--ink);
}

.price-note {
  font-size: 0.8rem;
  color: var(--ink-muted);
  font-weight: 500;
}

/* CTA & Buttons */
.cta-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 14px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition-speed) var(--ease),
              transform 0.12s var(--ease),
              box-shadow var(--transition-speed) var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--blush);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--blush-hover);
}

.btn-primary:focus-visible {
  outline: 3px solid var(--border-focus);
  outline-offset: 2px;
}

.cta-microcopy {
  font-size: 0.82rem;
  color: var(--ink-muted);
}

/* Option Buttons (Radio group for Q1-Q4) */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  background-color: var(--cream-subtle);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition-speed) var(--ease),
              background-color var(--transition-speed) var(--ease),
              transform 0.12s var(--ease);
}

.option-btn:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

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

.option-btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.option-btn.selected {
  background-color: #eff6ff;
  border-color: var(--border-focus);
  color: var(--ink);
  font-weight: 600;
}

.option-radio-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  background-color: #FFFFFF;
  flex-shrink: 0;
  position: relative;
  transition: border-color var(--transition-speed) var(--ease);
}

.option-btn.selected .option-radio-dot {
  border-color: var(--mid-burgundy);
}

.option-btn.selected .option-radio-dot::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--mid-burgundy);
}

/* Form Groups & Inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.required-mark {
  color: var(--error-color);
}

.optional-mark {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--ink-muted);
}

.label-with-hint {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.char-count {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background-color: var(--cream-subtle);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  min-height: 52px;
  transition: border-color var(--transition-speed) var(--ease), box-shadow var(--transition-speed) var(--ease);
}

.form-textarea {
  min-height: 72px;
  resize: vertical;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--border-focus);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-group.has-error .form-input,
.form-group.has-error .form-textarea {
  border-color: var(--error-color);
  background-color: #FFF5F5;
}

.field-error {
  font-size: 0.8rem;
  color: var(--error-color);
  font-weight: 500;
  min-height: 18px;
  display: block;
}

.phone-input-row {
  display: flex;
  gap: 8px;
}

.phone-input-row .form-select {
  max-width: 135px;
  flex-shrink: 0;
  font-size: 0.85rem;
  padding: 10px 8px;
}

/* Honeypot field (hidden from real users) */
.hp-wrap {
  display: none !important;
  visibility: hidden;
  height: 0;
  overflow: hidden;
}

.form-alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background-color: #FDE8E8;
  border: 1px solid #F8B4B4;
  color: #9B1C1C;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 16px;
}

/* Submit Spinner */
.btn-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(26, 10, 15, 0.25);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn.loading .btn-spinner {
  display: inline-block;
}

.btn.loading .btn-text {
  opacity: 0.7;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Reviewing Animated Step */
.reviewing-box {
  text-align: center;
  padding: 40px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.spinner-pulse {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 4px solid var(--cream-subtle);
  border-top-color: var(--mid-burgundy);
  animation: spin 0.85s linear infinite;
}

.reviewing-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
}

.reviewing-sub {
  font-size: 0.95rem;
  color: var(--ink-secondary);
  max-width: 380px;
  line-height: 1.45;
}

.btn-text-skip {
  background: none;
  border: none;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 8px 12px;
}

/* Result Screens */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #E6F4EA;
  color: #137333;
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.badge-icon {
  font-size: 0.95rem;
}

.badge-pill.waitlist-badge {
  background-color: #FFF2D6;
  color: #8C5300;
}

.badge-pill.neutral-badge {
  background-color: var(--cream-subtle);
  color: var(--ink-secondary);
}

/* Calculator Card */
.calculator-card {
  background-color: var(--cream-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  margin: 20px 0;
}

.calc-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 16px;
}

.calc-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mid-burgundy);
}

.calc-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}

.calc-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 18px;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.calc-field-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.slider-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--mid-burgundy);
}

.styled-slider {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-pill);
  background: #D9CCC5;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.styled-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--mid-burgundy);
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: transform 0.1s var(--ease);
}

.styled-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chip-btn {
  background-color: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all var(--transition-speed) var(--ease);
}

.chip-btn:hover {
  border-color: var(--mid-burgundy);
  color: var(--ink);
}

.chip-btn.active {
  background-color: var(--mid-burgundy);
  color: var(--cream);
  border-color: var(--mid-burgundy);
}

.price-input-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.input-with-symbol {
  display: flex;
  align-items: center;
  gap: 4px;
}

.currency-symbol {
  font-weight: 600;
  color: var(--ink);
}

.small-input {
  width: 80px;
  min-height: 40px;
  padding: 6px 8px;
  text-align: center;
  font-weight: 600;
}

.input-suffix {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.metric-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-card.highlight-metric {
  grid-column: span 2;
  background-color: #FDF1F4;
  border-color: #F7D0DC;
}

.metric-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.metric-val {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
}

.highlight-metric .metric-val {
  color: var(--mid-burgundy);
}

/* MANDATORY Disclaimer */
.calc-disclaimer {
  font-size: 0.8125rem; /* 13px */
  line-height: 1.45;
  color: var(--ink-muted);
  border-top: 1px solid var(--border-light);
  padding-top: 10px;
}

/* Booking Block */
.booking-block {
  border-top: 2px dashed var(--border-light);
  padding-top: 22px;
  margin-top: 20px;
  text-align: center;
}

.booking-spots-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mid-burgundy);
  margin-bottom: 8px;
}

.pulse-spot-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--mid-burgundy);
  animation: pulse-dot 1.5s infinite ease-in-out;
}

.booking-headline {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.booking-sub {
  font-size: 0.9rem;
  color: var(--ink-secondary);
  line-height: 1.4;
  margin-bottom: 16px;
}

/* Unqualified & Waitlist Cards */
.unqualified-card, .waitlist-confirm-box {
  background-color: var(--cream-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 16px;
}

.unqualified-msg, .waitlist-note {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-secondary);
}

/* Accessibility: prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
