/* =============================================
   StoryBrand BrandScript Survey — Stylesheet
   ============================================= */

:root {
  --brand-dark:    #0d1b2a;
  --brand-navy:    #1b2d45;
  --brand-blue:    #1a6eb5;
  --brand-accent:  #f4a623;
  --brand-light:   #f5f7fa;
  --brand-white:   #ffffff;
  --text-primary:  #1a1a2e;
  --text-muted:    #6b7280;
  --radius:        12px;
  --shadow:        0 8px 32px rgba(0,0,0,0.12);
  --transition:    all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: var(--brand-light);
  color: var(--text-primary);
  min-height: 100vh;
}

/* ── LANDING PAGE ──────────────────────────── */
.landing {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: linear-gradient(145deg, var(--brand-dark) 0%, var(--brand-navy) 60%, #163352 100%);
  color: var(--brand-white);
  position: relative;
  overflow: hidden;
}

.landing::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244,166,35,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.landing::after {
  content: '';
  position: absolute;
  bottom: -150px; left: -150px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26,110,181,0.18) 0%, transparent 70%);
  pointer-events: none;
}

.landing-header {
  padding: 28px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 10;
}

.logo-img-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  height: 52px;
  width: auto;
  /* The logo has a white background — add a subtle glow so it pops on the dark header */
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.35));
  border-radius: 4px;
}

.landing-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px 80px;
  position: relative;
  z-index: 10;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(244,166,35,0.15);
  border: 1px solid rgba(244,166,35,0.35);
  color: var(--brand-accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 100px;
  margin-bottom: 28px;
}

.landing-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  max-width: 820px;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.landing-hero h1 em {
  font-style: normal;
  color: var(--brand-accent);
}

.landing-hero p.subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.7;
  color: rgba(255,255,255,0.78);
  max-width: 640px;
  margin-bottom: 48px;
}

.benefits-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 52px;
}

.benefit-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  padding: 8px 20px;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.88);
}

.benefit-chip .icon {
  width: 18px; height: 18px;
  background: var(--brand-accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem;
  color: var(--brand-dark);
  font-weight: 700;
  flex-shrink: 0;
}

.btn-start {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--brand-accent);
  color: var(--brand-dark);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 18px 44px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 4px 24px rgba(244,166,35,0.35);
  letter-spacing: 0.01em;
}

.btn-start:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 36px rgba(244,166,35,0.5);
  background: #f9b93a;
}

.btn-start svg { width: 20px; height: 20px; }

.time-note {
  margin-top: 18px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
}

.landing-footer {
  text-align: center;
  padding: 24px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
  position: relative;
  z-index: 10;
}

/* ── SURVEY WRAPPER ────────────────────────── */
.survey-wrapper {
  display: none;
  min-height: 100vh;
  background: var(--brand-light);
}

.survey-wrapper.active { display: block; }

/* Progress bar */
.progress-bar-wrap {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--brand-white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 0;
}

.progress-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  max-width: 800px;
  margin: 0 auto;
}

.progress-logo-img-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.progress-logo-img {
  height: 40px;
  width: auto;
  border-radius: 4px;
}

.progress-track-wrap {
  flex: 1;
  margin: 0 24px;
}

.progress-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 5px;
  text-align: right;
}

.progress-track {
  height: 6px;
  background: #e5e7eb;
  border-radius: 100px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-accent));
  border-radius: 100px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

/* Question card */
.question-screen {
  display: none;
  min-height: calc(100vh - 65px);
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.question-screen.active { display: flex; }

.question-card {
  background: var(--brand-white);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 52px 56px;
  max-width: 720px;
  width: 100%;
  animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.q-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin-bottom: 12px;
}

.q-step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-blue), #2a8fd4);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.q-element {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-accent);
  background: rgba(244,166,35,0.1);
  padding: 3px 12px;
  border-radius: 100px;
  display: inline-block;
  margin-bottom: 16px;
}

.q-title {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--brand-dark);
  margin-bottom: 12px;
}

.q-hint {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

.q-textarea {
  width: 100%;
  min-height: 140px;
  border: 2px solid #e5e7eb;
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--brand-light);
  resize: vertical;
  transition: var(--transition);
  outline: none;
  line-height: 1.6;
}

.q-textarea:focus {
  border-color: var(--brand-blue);
  background: var(--brand-white);
  box-shadow: 0 0 0 4px rgba(26,110,181,0.1);
}

.q-textarea::placeholder { color: #b0b8c4; }

.q-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
  gap: 12px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 2px solid #e5e7eb;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 100px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-back:hover {
  border-color: var(--brand-navy);
  color: var(--brand-navy);
}

.btn-next {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--brand-blue);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(26,110,181,0.3);
}

.btn-next:hover {
  background: #155fa0;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(26,110,181,0.4);
}

.btn-next:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* ── LEAD CAPTURE ──────────────────────────── */
.lead-screen {
  display: none;
  min-height: calc(100vh - 65px);
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.lead-screen.active { display: flex; }

.lead-card {
  background: var(--brand-white);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 52px 56px;
  max-width: 720px;
  width: 100%;
  animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lead-card h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--brand-dark);
  margin-bottom: 10px;
}

.lead-card p {
  font-size: 0.97rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 32px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand-navy);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.form-group input {
  border: 2px solid #e5e7eb;
  border-radius: var(--radius);
  padding: 13px 16px;
  font-size: 0.97rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--brand-light);
  transition: var(--transition);
  outline: none;
}

.form-group input:focus {
  border-color: var(--brand-blue);
  background: var(--brand-white);
  box-shadow: 0 0 0 4px rgba(26,110,181,0.1);
}

.form-group input::placeholder { color: #b0b8c4; }

.form-group.full { grid-column: 1 / -1; }

.btn-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--brand-blue), #2a8fd4);
  color: white;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 16px 32px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(26,110,181,0.3);
  margin-top: 28px;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(26,110,181,0.45);
}

.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.privacy-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 14px;
}

/* ── THANK YOU ─────────────────────────────── */
.thankyou-screen {
  display: none;
  min-height: calc(100vh - 65px);
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.thankyou-screen.active { display: flex; }

.thankyou-card {
  background: var(--brand-white);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 64px 56px;
  max-width: 600px;
  width: 100%;
  text-align: center;
  animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkmark-circle {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 28px;
  box-shadow: 0 8px 24px rgba(34,197,94,0.3);
}

.checkmark-circle svg { width: 40px; height: 40px; color: white; }

.thankyou-card h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--brand-dark);
  margin-bottom: 14px;
}

.thankyou-card p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 10px;
}

/* ── ERROR MESSAGE ─────────────────────────── */
.error-msg {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.88rem;
  margin-top: 12px;
}

.error-msg.show { display: block; }

/* ── RESPONSIVE ────────────────────────────── */
@media (max-width: 640px) {
  .question-card, .lead-card, .thankyou-card {
    padding: 32px 24px;
  }
  .form-row { grid-template-columns: 1fr; }
  .landing-header { padding: 20px 24px; }
  .q-actions { flex-direction: column-reverse; }
  .btn-back, .btn-next { width: 100%; justify-content: center; }
}
