/* ============================================================
   Landing Page Commitment Analyzer - Tool-Specific Styles
   ============================================================
   Shared brand system loaded from /shared/brand.css
   This file contains only styles specific to this tool.
   ============================================================ */

/* ════════════════════════════════════════════════════════════
   WELCOME SCREEN
   ════════════════════════════════════════════════════════════ */
.welcome-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.welcome-badge {
  display: inline-block;
  padding: 0.25rem 0.875rem;
  background: var(--primary-50);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid var(--primary-100);
}

.welcome-gauge-icon { margin-bottom: 1.5rem; }

.welcome-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  letter-spacing: -0.025em;
}

.welcome-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 1rem;
}

.welcome-description {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 540px;
}

.welcome-meta {
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.welcome-footer {
  margin-top: 3rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.welcome-footer strong { color: var(--text-secondary); }

/* Welcome form fields */
.welcome-field-group {
  width: 100%;
  max-width: 480px;
  margin-bottom: 1.25rem;
  text-align: left;
}

.welcome-field-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.welcome-field-group .form-input {
  width: 100%;
  font-size: 0.9375rem;
}

/* URL input */
.url-input-wrapper {
  position: relative;
}

.url-input-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.url-input {
  padding-left: 2.75rem !important;
}

.url-input.valid {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.url-input.invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.url-hint {
  font-size: 0.75rem;
  margin-top: 0.375rem;
  min-height: 1rem;
}
.url-hint.hint-valid { color: var(--green); }
.url-hint.hint-invalid { color: var(--red); }

/* Traffic type card selector */
.traffic-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.traffic-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-white);
  text-align: center;
}

.traffic-card:hover {
  border-color: var(--primary-light);
  background: var(--primary-50);
}

.traffic-card.selected {
  border-color: var(--primary);
  background: var(--primary-50);
  box-shadow: 0 0 0 3px var(--primary-100);
}

.traffic-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
}

.traffic-card.selected .traffic-card-icon {
  background: var(--primary-100);
  color: var(--primary);
}

.traffic-card-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}

.traffic-card-desc {
  font-size: 0.6875rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.traffic-card.selected .traffic-card-title { color: var(--primary-dark); }

/* Welcome error */
.welcome-error {
  width: 100%;
  max-width: 480px;
  padding: 0.75rem 1rem;
  background: var(--red-bg);
  color: var(--red);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
  text-align: center;
}

/* ════════════════════════════════════════════════════════════
   ANALYZING SCREEN
   ════════════════════════════════════════════════════════════ */
.analyzing-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.analyzing-spinner { margin-bottom: 1.5rem; }

.analyzing-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.015em;
}

.analyzing-url {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  word-break: break-all;
  max-width: 400px;
}

.analyzing-steps {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  width: 100%;
  text-align: left;
}

.analyzing-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  background: var(--bg-white);
  border: 1px solid var(--border);
  opacity: 0.4;
  transition: all 0.4s ease;
}

.analyzing-step.active {
  opacity: 1;
  border-color: var(--primary-light);
  background: var(--primary-50);
}

.analyzing-step.done {
  opacity: 1;
  border-color: var(--green);
  background: var(--green-bg);
}

.analyzing-step-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.analyzing-step-icon .step-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--primary-100);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: analyzeSpin 0.8s linear infinite;
}

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

.analyzing-step-icon .step-check {
  display: none;
  color: var(--green);
}

.analyzing-step-icon .step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.analyzing-step.active .step-spinner { display: block; }
.analyzing-step.active .step-dot { display: none; }

.analyzing-step.done .step-check { display: block; }
.analyzing-step.done .step-dot { display: none; }
.analyzing-step.done .step-spinner { display: none; }

.analyzing-step-text {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.analyzing-step.active .analyzing-step-text {
  color: var(--primary-dark);
  font-weight: 600;
}

.analyzing-step.done .analyzing-step-text {
  color: var(--green-text);
}

.analyzing-step-detail {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
  white-space: nowrap;
}

.analyzing-step.active .analyzing-step-detail { color: var(--primary); }
.analyzing-step.done .analyzing-step-detail { color: var(--green); }

/* ════════════════════════════════════════════════════════════
   ERROR SCREEN
   ════════════════════════════════════════════════════════════ */
.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  gap: 1rem;
}

.error-icon { margin-bottom: 0.5rem; }

.error-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.error-message {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

/* ════════════════════════════════════════════════════════════
   LEAD CAPTURE SCREEN
   ════════════════════════════════════════════════════════════ */
.lead-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.lead-teaser {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lead-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  letter-spacing: -0.025em;
}

.lead-gauge-preview {
  margin: 0 auto 0.75rem;
  width: 150px;
  height: 150px;
}

.lead-zone-label {
  font-size: 1rem;
  font-weight: 700;
  padding: 0.25rem 1rem;
  border-radius: var(--radius-full);
  display: inline-block;
}

.lead-page-summary {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  max-width: 480px;
  line-height: 1.5;
}

.lead-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  width: 100%;
}

.lead-option-card {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  position: relative;
}

.lead-option-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.lead-option-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.lead-option-full {
  border-color: var(--primary);
  box-shadow: var(--shadow), var(--shadow-glow);
}

.lead-recommended-badge {
  position: absolute;
  top: -10px;
  right: 16px;
  background: var(--primary);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.2rem 0.625rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lead-form { display: flex; flex-direction: column; gap: 0.625rem; }

.lead-privacy {
  font-size: 0.75rem !important;
  color: var(--text-muted) !important;
  margin-bottom: 0 !important;
  margin-top: 0.5rem;
}

/* ════════════════════════════════════════════════════════════
   RESULTS SCREEN
   ════════════════════════════════════════════════════════════ */
.results-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.results-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.25rem;
}

.results-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.results-page-info {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Result Cards */
.result-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 2rem;
  animation: fadeUp 0.4s ease both;
}

.result-card:nth-child(2) { animation-delay: 0.05s; }
.result-card:nth-child(3) { animation-delay: 0.1s; }
.result-card:nth-child(4) { animation-delay: 0.15s; }
.result-card:nth-child(5) { animation-delay: 0.2s; }

.result-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
}

.result-card-title svg { color: var(--primary); flex-shrink: 0; }

/* Score Card */
.score-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.score-card-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: center;
}

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

.score-info { display: flex; flex-direction: column; gap: 0.5rem; }

.score-zone-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.375rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 700;
}

.score-zone-badge.zone-green { background: var(--green-bg); color: var(--green-text); }
.score-zone-badge.zone-yellow { background: var(--yellow-bg); color: var(--yellow-text); }
.score-zone-badge.zone-red { background: var(--red-bg); color: var(--red-text); }

.score-verdict {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* Priority Actions */
.priority-card {
  border-color: var(--primary-100);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.03) 0%, rgba(168, 85, 247, 0.03) 100%);
}

.priority-list {
  list-style: none;
  counter-reset: priority;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.priority-item {
  counter-increment: priority;
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text);
}

.priority-item::before {
  content: counter(priority);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
}

/* Category Bars */
.category-bars { display: flex; flex-direction: column; gap: 1rem; }

.cat-bar-item { display: flex; flex-direction: column; gap: 0.375rem; }

.cat-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cat-bar-label {
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cat-bar-label-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.8125rem;
  line-height: 1;
}

.cat-bar-score {
  font-size: 0.8125rem;
  font-weight: 600;
}

.cat-bar-track {
  height: 10px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.cat-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  width: 0;
}

.cat-bar-zone {
  font-size: 0.75rem;
  font-weight: 500;
}

/* Findings & Recommendations (expandable per category) */
.findings-list { display: flex; flex-direction: column; gap: 0.75rem; }

.finding-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.finding-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.125rem;
  cursor: pointer;
  transition: background var(--transition);
  gap: 0.75rem;
}
.finding-header:hover { background: var(--primary-50); }

.finding-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.finding-zone-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.finding-category {
  font-size: 0.875rem;
  font-weight: 600;
}

.finding-score-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
}

.finding-chevron {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.finding-card.open .finding-chevron { transform: rotate(180deg); }

.finding-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.finding-card.open .finding-body { max-height: 800px; }

.finding-content {
  padding: 0 1.125rem 1.125rem;
}

.finding-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  margin-top: 1rem;
}

.finding-section-label:first-child { margin-top: 0; }

.finding-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.finding-point {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: 1.25rem;
  position: relative;
}

.finding-point::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.finding-point.finding-type::before { background: var(--text-muted); }
.finding-point.rec-type::before { background: var(--primary); }

/* CTA Card */
.result-cta-card {
  text-align: center;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.04) 0%, rgba(168, 85, 247, 0.04) 100%);
  border-color: var(--primary-100);
}

.result-cta-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.result-cta-card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Welcome */
  .welcome-title { font-size: 1.75rem; }
  .welcome-subtitle { font-size: 1.0625rem; }
  .welcome-description { font-size: 0.9375rem; }
  .welcome-field-group { max-width: 100%; }
  .traffic-cards { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .traffic-card { padding: 0.75rem 0.5rem; }
  .traffic-card-icon { width: 36px; height: 36px; }
  .traffic-card-desc { font-size: 0.625rem; }

  /* Analyzing */
  .analyzing-container { padding: 1.5rem; }
  .analyzing-title { font-size: 1.25rem; }
  .analyzing-step { padding: 0.625rem 0.75rem; gap: 0.5rem; }
  .analyzing-step-text { font-size: 0.8125rem; }

  /* Lead Capture */
  .lead-options { grid-template-columns: 1fr; }
  .lead-container {
    min-height: auto;
    justify-content: flex-start;
    padding: 2rem 1.25rem 3rem;
    gap: 1.25rem;
  }
  .lead-title { font-size: 1.5rem; margin-bottom: 0.75rem; }
  .lead-gauge-preview { width: 110px; height: 110px; margin-bottom: 0.5rem; }
  .lead-zone-label { font-size: 0.875rem; padding: 0.2rem 0.75rem; }
  .lead-option-card { padding: 1.25rem; }
  .lead-option-card h3 { font-size: 1rem; }
  .lead-option-card p { font-size: 0.8125rem; margin-bottom: 1rem; line-height: 1.5; }
  .lead-option-free { order: 2; }
  .lead-option-full { order: 1; }

  /* Results */
  .score-card-header { grid-template-columns: 1fr; text-align: center; }
  .score-gauge { width: 150px; height: 150px; margin: 0 auto; }
  .score-zone-badge { align-self: center; }
  .results-title { font-size: 1.5rem; }
  .results-subtitle { font-size: 0.875rem; }
  .result-card { padding: 1.25rem; }
  .score-verdict { font-size: 0.9375rem; text-align: center; }

  .cat-bar-label { font-size: 0.8125rem; }
  .cat-bar-score { font-size: 0.75rem; }

  .finding-header { padding: 0.75rem 0.875rem; align-items: flex-start; }
  .finding-header-left { gap: 0.375rem; }
  .finding-category { font-size: 0.8125rem; }
  .finding-score-badge { font-size: 0.625rem; white-space: nowrap; }
  .finding-zone-dot { margin-top: 0.25rem; }
  .finding-content { padding: 0 0.875rem 0.875rem; }
  .finding-point { font-size: 0.75rem; }

  .priority-item { font-size: 0.875rem; }
  .priority-item::before { width: 24px; height: 24px; font-size: 0.75rem; }

  .result-cta-card h2 { font-size: 1.0625rem; }
  .result-cta-card p { font-size: 0.8125rem; }

  .lead-form { gap: 0.5rem; }
  .lead-privacy { font-size: 0.6875rem !important; }
}

@media (max-width: 480px) {
  .welcome-container { padding: 1.5rem; }
  .traffic-cards { grid-template-columns: 1fr 1fr; }
  .traffic-card { padding: 0.625rem 0.5rem; }
  .traffic-card-title { font-size: 0.75rem; }
  .traffic-card-desc { display: none; }

  .lead-container { padding: 1.5rem 1rem 2.5rem; }
  .lead-title { font-size: 1.375rem; }

  .results-container { padding: 1.5rem 1rem 3rem; }
  .results-title { font-size: 1.25rem; }
  .result-card { padding: 1rem; }

  .analyzing-step-text { font-size: 0.75rem; }
  .analyzing-steps { gap: 0.625rem; }

  .error-container { padding: 1.5rem; }
  .error-title { font-size: 1.25rem; }
  .error-message { font-size: 0.875rem; }
}
