/* ─── Reset & Variables ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --white: #FFFFFF;
  --grey: #F8F9FA;
  --text: #1A1A2E;
  --muted: #4A4A68;
  --accent: #1B4D3E;
  --accent-hover: #2A6B57;
  --accent-light: #F0F7F4;
  --border: #E2E4E9;
  --red: #B91C1C;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Layout ────────────────────────────────────────────────────────────────── */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
}
.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem;
}
.text-center { text-align: center; }

/* ─── Navigation ────────────────────────────────────────────────────────────── */
.nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-link {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
}
.nav-link:hover { color: var(--text); text-decoration: none; }
.nav-cta {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent);
  padding: 0.45rem 1.1rem;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.nav-cta:hover {
  background: var(--accent);
  color: white;
  text-decoration: none;
}

/* ─── Buttons ───────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-family: var(--font);
  font-size: 0.975rem;
  font-weight: 600;
  padding: 16px 32px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
  letter-spacing: -0.01em;
}
.btn-primary:hover {
  background: var(--accent-hover);
  text-decoration: none;
  color: white;
}

/* ─── Sections ──────────────────────────────────────────────────────────────── */
.section {
  padding: 80px 0;
}
.section-grey {
  background: var(--grey);
}
.section-title {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 1rem;
}
.section-sub {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

/* ─── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  padding: 96px 0 80px;
  background: var(--white);
}
.hero-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.hero-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 2.5rem;
  max-width: 600px;
}
.hero-note {
  margin-top: 0.875rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ─── Documents grid ────────────────────────────────────────────────────────── */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--border);
  margin-top: 3rem;
  background: var(--border);
}
.doc-card {
  background: var(--white);
  padding: 2rem;
}
.doc-icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}
.doc-card h3 {
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.doc-card p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ─── How it works ──────────────────────────────────────────────────────────── */
.steps-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-top: 3rem;
}
.step {
  flex: 1;
  padding: 0 2rem;
  text-align: center;
}
.step:first-child { padding-left: 0; }
.step:last-child { padding-right: 0; }
.step-num {
  display: block;
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 1rem;
}
.step h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.step p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
}
.step-divider {
  width: 1px;
  align-self: stretch;
  background: var(--border);
  flex-shrink: 0;
  margin-top: 1.5rem;
}

/* ─── Comparison ────────────────────────────────────────────────────────────── */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  margin-top: 3rem;
}
.compare-col {
  padding: 2.5rem;
}
.compare-col-right {
  border-left: 1px solid var(--border);
  background: var(--accent-light);
}
.compare-heading {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.compare-heading-accent {
  color: var(--accent);
}
.compare-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
.compare-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.925rem;
  line-height: 1.5;
}
.compare-list svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}
.compare-bad { color: var(--muted); }
.compare-bad svg { color: var(--red); }
.compare-good { color: var(--text); }
.compare-good svg { color: var(--accent); }

/* ─── Trust bar ─────────────────────────────────────────────────────────────── */
.trust-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
  background: var(--white);
}
.trust-list {
  list-style: none;
  display: flex;
  gap: 3rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.trust-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}
.trust-list svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
}

/* ─── FAQ ───────────────────────────────────────────────────────────────────── */
.faq-list {
  margin-top: 3rem;
  border: 1px solid var(--border);
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: none; }
.faq-toggle {
  width: 100%;
  background: var(--white);
  border: none;
  padding: 1.25rem 1.5rem;
  text-align: left;
  font-family: var(--font);
  font-size: 0.975rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: background 0.1s;
}
.faq-toggle:hover { background: var(--grey); }
.faq-arrow {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq-arrow.rotate { transform: rotate(180deg); }
.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: var(--white);
}
.faq-body.open { max-height: 400px; }
.faq-body p {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.925rem;
  color: var(--muted);
  line-height: 1.75;
}

/* ─── CTA section ───────────────────────────────────────────────────────────── */
.cta-section {
  border-top: 1px solid var(--border);
}

/* ─── Footer ────────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 2rem;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ─── Questionnaire ─────────────────────────────────────────────────────────── */
.q-wrap {
  min-height: calc(100vh - 60px);
  padding: 60px 0 80px;
  background: var(--white);
}
.q-header {
  margin-bottom: 2.5rem;
}
.q-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}
.q-header p {
  color: var(--muted);
  font-size: 0.95rem;
}

.progress-wrap { margin-bottom: 2.5rem; }
.progress-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.625rem;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.35s ease;
}
.progress-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.q-card { min-height: 220px; }
.question { display: none; }
.question.active { display: block; }
.q-label {
  display: block;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 1.25rem;
  line-height: 1.4;
}
.q-input, .q-select {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  transition: border-color 0.15s;
  appearance: none;
  -webkit-appearance: none;
}
.q-input:focus, .q-select:focus {
  outline: none;
  border-color: var(--accent);
}
.q-textarea { resize: vertical; min-height: 80px; }
.q-btn { width: 100%; }

/* Yes/No */
.yn-row {
  display: flex;
  gap: 1rem;
}
.btn-yn {
  flex: 1;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.975rem;
  font-weight: 500;
  padding: 0.875rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.btn-yn:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}
.btn-yn-active {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

/* Back link */
.back-link {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
}
.back-link:hover { color: var(--text); text-decoration: underline; }

/* Loading */
.q-loading {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ─── Spinner ───────────────────────────────────────────────────────────────── */
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}
.spinner-large {
  width: 36px;
  height: 36px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Center page (error, redirect) ─────────────────────────────────────────── */
.center-page {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
}
.center-page-inner { max-width: 520px; }
.center-page h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.center-page p { color: var(--muted); margin-bottom: 1.5rem; }

/* ─── Gen steps (loading) ───────────────────────────────────────────────────── */
.gen-steps {
  margin: 2rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.gen-step {
  font-size: 0.9rem;
  color: var(--muted);
  padding: 0 0 0 1rem;
  border-left: 2px solid var(--border);
  transition: border-color 0.3s, color 0.3s;
}
.gen-step.active {
  color: var(--text);
  border-left-color: var(--accent);
}

/* ─── Success page ──────────────────────────────────────────────────────────── */
.success-wrap { padding: 60px 0 80px; }
.success-header { margin-bottom: 3rem; }
.success-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}
.success-header p { color: var(--muted); }

.btn-download {
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* ─── Accordion (success docs) ──────────────────────────────────────────────── */
.docs-preview { margin-top: 3rem; }
.docs-preview h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text);
}
.accordion-item {
  border: 1px solid var(--border);
  border-bottom: none;
}
.accordion-item:last-child { border-bottom: 1px solid var(--border); }
.accordion-toggle {
  width: 100%;
  background: var(--white);
  border: none;
  padding: 1.1rem 1.25rem;
  text-align: left;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.1s;
}
.accordion-toggle:hover { background: var(--grey); }
.accordion-arrow {
  font-size: 0.7rem;
  color: var(--muted);
  transition: transform 0.2s;
}
.accordion-arrow.open { transform: rotate(180deg); }
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.accordion-body.open { max-height: 4000px; }
.doc-section {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}
.doc-section h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.doc-section p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ─── Shake ─────────────────────────────────────────────────────────────────── */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.shake { animation: shake 0.35s ease; }

/* ─── Mobile ────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero { padding: 56px 0 48px; }
  .hero-title { font-size: 1.75rem; }
  .section { padding: 56px 0; }

  .docs-grid { grid-template-columns: 1fr; }

  .steps-row { flex-direction: column; gap: 2.5rem; }
  .step { padding: 0; text-align: left; }
  .step-divider { width: 100%; height: 1px; align-self: stretch; margin-top: 0; }

  .compare-grid { grid-template-columns: 1fr; }
  .compare-col-right { border-left: none; border-top: 1px solid var(--border); }

  .trust-list { gap: 1.25rem; justify-content: flex-start; }

  .btn-primary { width: 100%; text-align: center; }

  .footer-inner { flex-direction: column; text-align: center; }

  .nav-link { display: none; }

  .yn-row { flex-direction: column; }
}
