/* ─── Brand Visibility Score — Styles ─────────────────────────────── */

:root {
  --bs-accent: #f15b46;
  --bs-accent-hover: #d94a37;
  --bs-teal: #11acc5;
  --bs-gold: #eac11e;
  --bs-green: #2ecc71;
  --bs-dark-bg: #1a1a2e;
  --bs-dark-surface: #12122a;
  --bs-dark-card: rgba(255, 255, 255, 0.04);
  --bs-dark-border: rgba(255, 255, 255, 0.1);
  --bs-dark-text: #f0f0f0;
  --bs-dark-muted: #8888a0;
  --bs-radius: 12px;
  --bs-radius-lg: 16px;
  --bs-transition: 0.3s ease;
  --bs-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ─── Reset ───────────────────────────────────────────────────────── */

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

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

body {
  font-family: var(--bs-font);
  background: var(--bs-dark-bg);
  color: var(--bs-dark-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Quiz Wrapper ────────────────────────────────────────────────── */

.quiz-wrapper {
  max-width: 640px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ─── Progress Bar ────────────────────────────────────────────────── */

.quiz-progress {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.quiz-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--bs-accent);
  border-radius: 0 2px 2px 0;
  transition: width var(--bs-transition);
}

/* ─── Quiz Header ─────────────────────────────────────────────────── */

.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  min-height: 56px;
}

.quiz-back {
  background: none;
  border: none;
  color: var(--bs-dark-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-back:hover {
  color: var(--bs-dark-text);
  background: rgba(255, 255, 255, 0.06);
}

.quiz-back.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.quiz-counter {
  font-size: 14px;
  color: var(--bs-dark-muted);
  font-weight: 500;
}

/* ─── Screen Container ────────────────────────────────────────────── */

.quiz-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.quiz-screen {
  position: absolute;
  inset: 0;
  padding: 0 20px 40px;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity var(--bs-transition), transform var(--bs-transition);
  pointer-events: none;
  overflow-y: auto;
}

.quiz-screen.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  position: relative;
}

.quiz-screen.is-exiting {
  opacity: 0;
  transform: translateX(-40px);
}

.quiz-screen.is-entering-back {
  transform: translateX(-40px);
}

.quiz-screen.is-entering-back.is-active {
  transform: translateX(0);
}

/* ─── Welcome Screen ──────────────────────────────────────────────── */

.welcome-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 0 40px;
}

.welcome-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--bs-accent), var(--bs-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-subtitle {
  font-size: 18px;
  color: var(--bs-dark-text);
  margin-bottom: 12px;
  max-width: 480px;
}

.welcome-body {
  font-size: 15px;
  color: var(--bs-dark-muted);
  margin-bottom: 32px;
  max-width: 440px;
}

/* ─── Question Screen ─────────────────────────────────────────────── */

.question-content {
  padding: 20px 0;
}

.question-text {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  min-height: 93px;
  margin-bottom: 28px;
}

/* ─── Answer Cards ────────────────────────────────────────────────── */

.answer-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.answer-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  min-height: 72px;
  background: var(--bs-dark-card);
  border: 2px solid var(--bs-dark-border);
  border-radius: var(--bs-radius);
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.answer-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.answer-card:active {
  transform: translateY(0);
}

.answer-card.is-selected {
  border-color: var(--bs-accent);
  background: rgba(241, 91, 70, 0.1);
}

.answer-card.is-selected .answer-badge {
  background: var(--bs-accent);
  color: #fff;
  border-color: var(--bs-accent);
}

.answer-badge {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--bs-dark-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--bs-dark-muted);
  transition: all 0.15s ease;
  margin-top: 1px;
}

.answer-text {
  font-size: 16px;
  line-height: 1.5;
  color: var(--bs-dark-text);
  padding-top: 3px;
  text-align: left;
}

/* ─── SMS Consent ─────────────────────────────────────────────────── */

.sms-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  text-align: left;
}

.sms-consent input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--bs-accent);
  cursor: pointer;
}

.sms-consent-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--bs-dark-muted);
}

/* ─── Email Capture ───────────────────────────────────────────────── */

.email-content {
  padding: 40px 0;
  text-align: center;
}

.email-headline {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
}

.email-subtext {
  font-size: 16px;
  color: var(--bs-dark-muted);
  margin-bottom: 32px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.email-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 400px;
  margin: 0 auto;
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  font-size: 16px;
  font-family: var(--bs-font);
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid var(--bs-dark-border);
  border-radius: var(--bs-radius);
  color: var(--bs-dark-text);
  outline: none;
  transition: border-color 0.15s ease;
}

.form-input::placeholder {
  color: var(--bs-dark-muted);
}

.form-input:focus {
  border-color: var(--bs-accent);
}

.form-input.has-error {
  border-color: #e74c3c;
}

.form-error {
  font-size: 14px;
  color: #e74c3c;
  text-align: left;
  min-height: 0;
  overflow: hidden;
  transition: min-height 0.2s ease;
}

.form-error:not(:empty) {
  min-height: 20px;
}

.email-privacy {
  font-size: 13px;
  color: var(--bs-dark-muted);
  margin-top: 4px;
}

/* ─── Buttons ─────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--bs-font);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--bs-radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: var(--bs-accent);
  color: #fff;
  border-color: var(--bs-accent);
}

.btn-primary:hover {
  background: var(--bs-accent-hover);
  border-color: var(--bs-accent-hover);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  color: var(--bs-dark-text);
  border-color: var(--bs-dark-border);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.04);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 17px;
}

.btn-full {
  width: 100%;
}

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

/* ─── Results Screen ──────────────────────────────────────────────── */

.results-content {
  padding: 20px 0 60px;
}

/* Score gauge */
.score-hero {
  text-align: center;
  margin-bottom: 40px;
}

.score-gauge {
  width: 180px;
  height: 180px;
  margin: 0 auto 20px;
}

.gauge-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 8;
}

.gauge-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.5s ease-out;
}

.gauge-number {
  font-weight: 800;
  fill: var(--bs-dark-text);
}

.gauge-label {
  font-size: 12px;
  fill: var(--bs-dark-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.score-tier-name {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
}

.score-out-of {
  font-size: 14px;
  color: var(--bs-dark-muted);
  margin-bottom: 24px;
}

.score-summary {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(240, 240, 240, 0.85);
  text-align: left;
  white-space: pre-line;
  margin-bottom: 36px;
}

/* Framework section */
.framework-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bs-dark-border);
  border-radius: var(--bs-radius-lg);
  padding: 24px;
  margin-bottom: 36px;
}

.framework-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--bs-dark-muted);
  font-style: italic;
}

/* Dimension bars */
.dimensions-section {
  margin-bottom: 36px;
}

.dimensions-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
}

.dimension-item {
  margin-bottom: 20px;
}

.dimension-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.dimension-name {
  font-size: 15px;
  font-weight: 600;
}

.dimension-score {
  font-size: 15px;
  font-weight: 700;
}

.dimension-bar {
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 10px;
}

.dimension-bar-fill {
  height: 100%;
  border-radius: 5px;
  width: 0%;
  transition: width 1s ease-out;
}

.dimension-insight {
  font-size: 14px;
  line-height: 1.6;
  color: var(--bs-dark-muted);
}

/* Personalized insight */
.insight-section {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--bs-accent);
  border-radius: 0 var(--bs-radius) var(--bs-radius) 0;
  padding: 20px 24px;
  margin-bottom: 36px;
}

.insight-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--bs-accent);
  margin-bottom: 8px;
}

.insight-text {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(240, 240, 240, 0.9);
}

/* Quick win */
.quick-win-section {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--bs-teal);
  border-radius: 0 var(--bs-radius) var(--bs-radius) 0;
  padding: 20px 24px;
  margin-bottom: 48px;
}

.quick-win-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--bs-teal);
  margin-bottom: 8px;
}

.quick-win-text {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(240, 240, 240, 0.9);
}

/* CTAs — tiered layout */
.results-cta-primary {
  margin-bottom: 24px;
}

.results-cta-secondary {
  margin-bottom: 24px;
}

.results-cta-tertiary {
  margin-bottom: 36px;
}

/* Teal button (Blueprint offer) */
.btn-teal {
  background: var(--bs-teal);
  color: #fff;
}
.btn-teal:hover {
  background: #3bbfad;
  color: #fff;
}

/* Gold button (Newsletter) */
.btn-gold {
  background: #d4a843;
  color: #fff;
}
.btn-gold:hover {
  background: #c49a35;
  color: #fff;
}

/* Subtle text link below secondary CTA */
.cta-subtle-link {
  text-align: center;
  margin-top: 12px;
}

.cta-subtle-link a {
  color: var(--bs-dark-muted);
  text-decoration: underline;
  font-size: 14px;
  transition: color 0.15s ease;
}

.cta-subtle-link a:hover {
  color: var(--bs-dark-text);
}

/* Share section */
.share-section {
  text-align: center;
  padding: 24px 0;
  border-top: 1px solid var(--bs-dark-border);
}

.share-prompt {
  font-size: 15px;
  color: var(--bs-dark-muted);
  margin-bottom: 16px;
}

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.share-btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--bs-radius);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--bs-font);
  color: #fff;
}

.share-btn:hover {
  transform: translateY(-1px);
}

.share-btn-x {
  background: #000;
  border: 1px solid rgba(255,255,255,0.2);
}

.share-btn-linkedin {
  background: #0077b5;
}

.share-btn-copy {
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--bs-dark-border);
}

/* Share card preview modal */
.share-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.share-modal.is-open {
  display: flex;
}

.share-modal-content {
  max-width: 600px;
  width: 100%;
}

.share-modal-content canvas,
.share-modal-content img {
  width: 100%;
  border-radius: var(--bs-radius);
}

.share-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
}

/* ─── Loading spinner ─────────────────────────────────────────────── */

.btn-loading {
  position: relative;
  color: transparent !important;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ─── Landing Page ────────────────────────────────────────────────── */

.landing-page {
  overflow-x: hidden;
}

.landing-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px 60px;
  max-width: 720px;
  margin: 0 auto;
}

.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--bs-dark-border);
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  color: var(--bs-dark-muted);
  margin-bottom: 24px;
}

.landing-headline {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--bs-accent), var(--bs-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-subhead {
  font-size: 19px;
  color: rgba(240, 240, 240, 0.8);
  margin-bottom: 16px;
  max-width: 560px;
  line-height: 1.6;
}

.landing-subhead-secondary {
  font-size: 17px;
  color: var(--bs-dark-muted);
  margin-bottom: 40px;
  max-width: 540px;
  line-height: 1.6;
}

.landing-video {
  width: 100%;
  max-width: 560px;
  margin-bottom: 36px;
  border-radius: var(--bs-radius);
  overflow: hidden;
}

.landing-cta {
  margin-bottom: 20px;
}

/* ─── Landing Sections ───────────────────────────────────────────── */

.landing-section {
  padding: 80px 20px;
}

.landing-section-alt {
  background: rgba(255, 255, 255, 0.02);
}

.landing-section-inner {
  max-width: 720px;
  margin: 0 auto;
}

.landing-section-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  text-align: center;
}

.landing-section-subtitle {
  font-size: 17px;
  color: var(--bs-dark-muted);
  text-align: center;
  max-width: 540px;
  margin: 0 auto 48px;
  line-height: 1.6;
}

/* ─── Problem Section ────────────────────────────────────────────── */

.landing-prose {
  max-width: 600px;
  margin: 0 auto;
}

.landing-prose p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--bs-dark-muted);
  margin-bottom: 20px;
  text-align: center;
}

.landing-highlight {
  color: var(--bs-dark-text) !important;
  font-weight: 600;
  font-style: italic;
}

/* ─── Tier Teaser ────────────────────────────────────────────────── */

.landing-tier-teaser {
  font-size: 19px;
  line-height: 1.7;
  color: var(--bs-dark-muted);
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.landing-tier-teaser strong {
  color: var(--bs-dark-text);
}

/* ─── "This Is For You" ──────────────────────────────────────────── */

.landing-for-list {
  max-width: 560px;
  margin: 32px auto 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.landing-for-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(240, 240, 240, 0.85);
}

.landing-for-check {
  flex-shrink: 0;
  color: var(--bs-accent);
  font-weight: 700;
  font-size: 16px;
  margin-top: 2px;
}

/* ─── Final CTA Section ──────────────────────────────────────────── */

.landing-section-final {
  text-align: center;
  padding: 100px 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 100%);
}

.landing-final-headline {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 32px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  color: rgba(240, 240, 240, 0.9);
}

.landing-credibility {
  font-size: 13px;
  color: var(--bs-dark-muted);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
  opacity: 0.7;
}

/* ─── Responsive ──────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .welcome-title {
    font-size: 26px;
  }

  .question-text {
    font-size: 19px;
    min-height: 80px;
  }

  .email-headline {
    font-size: 22px;
  }

  .answer-card {
    padding: 14px 16px;
    gap: 12px;
  }

  .answer-text {
    font-size: 15px;
  }

  .score-gauge {
    width: 150px;
    height: 150px;
  }

  .score-tier-name {
    font-size: 24px;
  }

  .results-actions {
    flex-direction: column;
  }

  .landing-headline {
    font-size: 32px;
  }

  .landing-subhead {
    font-size: 17px;
  }

  .landing-section {
    padding: 60px 20px;
  }

  .landing-section-title {
    font-size: 26px;
  }

  .landing-final-headline {
    font-size: 22px;
  }

  .landing-tier-teaser {
    font-size: 17px;
  }
}

@media (min-width: 768px) {
  .quiz-wrapper {
    padding: 0 20px;
  }

  .welcome-content {
    padding: 80px 0 60px;
  }

  .welcome-title {
    font-size: 40px;
  }

  .question-text {
    font-size: 24px;
  }

  .landing-headline {
    font-size: 52px;
  }

  .landing-section-final {
    padding: 120px 20px;
  }
}
