/* Legal Health Check — Design System */

:root {
  --bg:           #f4f2ed;
  --surface:      #ffffff;
  --primary:      #1e3a5f;
  --primary-dark: #152c48;
  --accent:       #2d7d6e;
  --gold:         #c8922a;
  --gold-hover:   #a97720;
  --text:         #111827;
  --muted:        #6b7280;
  --border:       #e4e1da;
  --red:          #b91c1c;
  --red-bg:       #fef2f2;
  --red-border:   #fecaca;
  --amber:        #b45309;
  --amber-bg:     #fffbeb;
  --amber-border: #fde68a;
  --green:        #15803d;
  --green-bg:     #f0fdf4;
  --green-border: #bbf7d0;
  --radius:       16px;
  --radius-sm:    10px;
  --shadow:       0 4px 24px rgba(30, 58, 95, 0.10);
  --shadow-lg:    0 8px 40px rgba(30, 58, 95, 0.15);
  --transition:   0.22s ease;
}

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

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Layout ── */
.page { min-height: 100vh; display: flex; flex-direction: column; }

.container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Header ── */
.site-header {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.logo-lockup { display: flex; align-items: center; gap: 12px; }

.logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.path-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(45, 125, 110, 0.1);
  border: 1px solid rgba(45, 125, 110, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ── Landing Page ── */
.landing-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 0 60px;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 520px;
}

.feature-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
  margin-bottom: 40px;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}

.feature-list li::before {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  min-width: 20px;
  background: var(--accent);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-size: 12px;
  background-repeat: no-repeat;
  background-position: center;
}

.btn-begin {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gold);
  color: white;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 16px 32px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 16px rgba(200, 146, 42, 0.35);
  margin-bottom: 16px;
}

.btn-begin:hover {
  background: var(--gold-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(200, 146, 42, 0.45);
}

.hero-note {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ── Form Section ── */
.form-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 0 60px;
}

.progress-wrap {
  padding: 20px 0 8px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.progress-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.progress-counter {
  font-size: 0.8rem;
  color: var(--muted);
}

.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* ── Question Card ── */
.question-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 32px;
  margin-top: 24px;
  animation: slideIn 0.25s ease;
}

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

.question-text {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.35;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.question-subtext {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
  min-height: 52px;
}

.option-btn:hover {
  border-color: var(--accent);
  background: rgba(45, 125, 110, 0.05);
}

.option-btn.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.option-icon {
  font-size: 0.85rem;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.option-btn:not(.selected) .option-icon {
  background: rgba(30, 58, 95, 0.1);
  color: var(--primary);
}

.card-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
}

.btn-back {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  padding: 8px 0;
  transition: color var(--transition);
}

.btn-back:hover { color: var(--primary); }
.btn-back:disabled { opacity: 0.3; cursor: default; }

.btn-next {
  background: var(--primary);
  color: white;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), opacity var(--transition);
}

.btn-next:hover { background: var(--primary-dark); }
.btn-next:disabled { opacity: 0.35; cursor: default; }

/* ── Email Gate ── */
.gate-section {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 40px 0 60px;
}

.gate-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 48px 40px;
  width: 100%;
  text-align: center;
}

.gate-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  display: block;
}

.gate-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 10px;
  letter-spacing: -0.03em;
}

.gate-sub {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 32px;
  line-height: 1.6;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.gate-form input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color var(--transition);
  -webkit-appearance: none;
}

.gate-form input:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
}

.btn-gold {
  width: 100%;
  background: var(--gold);
  color: white;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 15px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  margin-top: 4px;
}

.btn-gold:hover { background: var(--gold-hover); }

.gate-privacy {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin-top: 16px;
  line-height: 1.5;
}

/* ── Results ── */
.results-section {
  padding: 0 0 80px;
}

.results-header {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.results-greeting {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.results-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.results-sub {
  font-size: 1rem;
  color: var(--muted);
}

.results-summary-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.summary-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
}

.summary-chip.red   { background: var(--red-bg);   color: var(--red);   border: 1px solid var(--red-border); }
.summary-chip.amber { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-border); }
.summary-chip.green { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }

.result-cards { display: flex; flex-direction: column; gap: 20px; }

.result-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  border-left: 5px solid transparent;
  animation: slideIn 0.3s ease both;
}

.result-card.red   { border-left-color: var(--red); }
.result-card.amber { border-left-color: var(--amber); }
.result-card.green { border-left-color: var(--green); }

.result-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.result-cat-icon { font-size: 1.3rem; }

.result-cat-name {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.result-badge {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}

.result-badge.red   { background: var(--red-bg);   color: var(--red); }
.result-badge.amber { background: var(--amber-bg); color: var(--amber); }
.result-badge.green { background: var(--green-bg); color: var(--green); }

.result-headline {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
  line-height: 1.4;
}

.result-detail {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 18px;
}

.result-products {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.product-tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(30, 58, 95, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
}

.btn-result-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: 2px solid var(--accent);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}

.btn-result-cta:hover {
  background: var(--accent);
  color: white;
}

/* ── All Clear ── */
.all-clear {
  background: var(--green-bg);
  border: 2px solid var(--green-border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  margin-bottom: 20px;
}

.all-clear-icon { font-size: 2.5rem; margin-bottom: 12px; display: block; }
.all-clear h3 { font-size: 1.2rem; color: var(--green); margin-bottom: 8px; }
.all-clear p  { font-size: 0.92rem; color: var(--muted); }

/* ── Final CTA ── */
.final-cta {
  background: var(--primary);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  margin-top: 32px;
  color: white;
}

.final-cta h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.final-cta p {
  font-size: 0.95rem;
  opacity: 0.8;
  margin-bottom: 24px;
}

.btn-cta-primary {
  display: inline-block;
  background: var(--gold);
  color: white;
  text-decoration: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  border: none;
  cursor: pointer;
}

.btn-cta-primary:hover { background: var(--gold-hover); }

/* ── Footer ── */
.site-footer {
  padding: 24px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer p {
  font-size: 0.82rem;
  color: var(--muted);
}

.site-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

/* ── Utility ── */
.hidden { display: none !important; }

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ── Mobile ── */
@media (max-width: 520px) {
  .question-card { padding: 24px 20px; }
  .gate-card     { padding: 32px 24px; }
  .final-cta     { padding: 32px 24px; }
  .feature-list  { grid-template-columns: 1fr; }
  .result-badge  { margin-left: 0; }
  .result-card-header { flex-direction: column; align-items: flex-start; }
}
