/* ============================================================
   TOKENS
   ============================================================ */
:root {
  --bg: #fbfaf7;
  --bg-soft: #f2eee3;
  --bg-card: #ffffff;
  --text: #1a1a1f;
  --text-muted: #6a675f;
  --border: #e6e1d0;
  --border-strong: #cec8b4;
  --accent: #c94e00;
  --accent-hover: #a23f00;
  --accent-soft: #fff2e6;
  --accent-contrast: #ffffff;
  --danger: #c92a2a;
  --focus: #1f5bff;

  --radius: 16px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(26, 26, 31, 0.04);
  --shadow: 0 10px 32px rgba(26, 26, 31, 0.06);
  --shadow-lg: 0 24px 64px rgba(26, 26, 31, 0.08);

  --max: 1120px;
  --max-narrow: 760px;

  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16161a;
    --bg-soft: #1e1e22;
    --bg-card: #232329;
    --text: #f5f4ef;
    --text-muted: #a5a29a;
    --border: #2d2d34;
    --border-strong: #3d3d46;
    --accent: #ff7a2b;
    --accent-hover: #ff9652;
    --accent-soft: #3a1d0b;
    --accent-contrast: #16161a;
    --danger: #ff6b6b;
    --focus: #7aa2ff;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 10px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.5);
  }
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
button { font-family: inherit; }

/* ============================================================
   A11Y — SKIP LINK, FOCUS
   ============================================================ */
.skip-link {
  position: absolute;
  top: -40px;
  left: 12px;
  padding: 10px 16px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  z-index: 999;
  transition: top 0.2s;
}
.skip-link:focus-visible {
  top: 12px;
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}
.btn:focus-visible { outline-offset: 4px; }
.quiz-option:focus-visible { outline-offset: 3px; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3 {
  color: var(--text);
  letter-spacing: -0.025em;
  margin: 0;
  font-weight: 800;
  text-wrap: balance;
}
h1 { font-size: clamp(34px, 5.2vw, 56px); line-height: 1.08; }
h2 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.15; margin-bottom: 20px; font-weight: 700; }
h3 { font-size: 19px; line-height: 1.35; margin-bottom: 8px; font-weight: 700; }

p { margin: 0 0 14px; color: var(--text); }
.muted { color: var(--text-muted); }
.center { text-align: center; }
.section-lead {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 18px;
  max-width: 640px;
}
.center .section-lead { margin-left: auto; margin-right: auto; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow { max-width: var(--max-narrow); }
@media (max-width: 560px) {
  .container { padding: 0 20px; }
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}
.logo {
  font-weight: 800;
  font-size: 19px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  margin-right: 24px;
}
.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 4px;
  transition: color 0.15s;
}
.nav a:hover { color: var(--text); }
@media (max-width: 720px) {
  .nav { display: none; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 14px 26px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  letter-spacing: -0.01em;
  min-height: 48px;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
  background: var(--border-strong);
  cursor: not-allowed;
  transform: none;
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--bg-soft); }
.btn-sm {
  padding: 10px 20px;
  font-size: 14px;
  min-height: 44px;
}
.btn-lg {
  padding: 18px 34px;
  font-size: 17px;
  min-height: 56px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 88px 0 96px;
}
.hero-inner {
  text-align: left;
}
.hero h1 {
  margin-bottom: 24px;
}
.lead {
  font-size: 19px;
  color: var(--text-muted);
  margin: 0 0 36px;
  line-height: 1.55;
  max-width: 620px;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.hero-note { color: var(--text-muted); font-size: 15px; }

@media (max-width: 720px) {
  .hero { padding: 56px 0 64px; }
  .lead { font-size: 18px; }
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 80px 0; }
.section-soft { background: var(--bg-soft); }
@media (max-width: 720px) { .section { padding: 56px 0; } }

/* CHIPS */
.chips {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chips li {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
}

/* CARDS GRID */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 12px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-muted); margin: 0; }
@media (max-width: 720px) { .cards-grid { grid-template-columns: 1fr; } }

/* BENEFITS */
.benefits {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 48px;
  margin-top: 16px;
}
.benefit {
  padding-left: 20px;
  border-left: 3px solid var(--accent);
}
.benefit h3 { margin-bottom: 6px; }
.benefit p { color: var(--text-muted); margin: 0; }
@media (max-width: 720px) { .benefits { grid-template-columns: 1fr; gap: 28px; } }

/* STEPS */
.steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 12px 0 40px;
}
.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: var(--accent);
  color: var(--accent-contrast);
  border-radius: 12px;
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 16px;
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--text-muted); margin: 0; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* LISTS */
.param-list, .bullet-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}
.param-list li, .bullet-list li {
  position: relative;
  padding: 14px 0 14px 32px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 17px;
}
.param-list li:last-child, .bullet-list li:last-child { border-bottom: none; }
.param-list li::before, .bullet-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

/* ============================================================
   QUIZ
   ============================================================ */
.quiz-section { background: var(--bg-soft); }
.quiz-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
  margin-top: 28px;
}
.quiz-progress {
  margin-bottom: 28px;
}
.quiz-progress-bar {
  height: 6px;
  background: var(--bg-soft);
  border-radius: 999px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 999px;
}
.quiz-progress-text {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.quiz-body {
  min-height: 240px;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-question {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 18px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.quiz-hint {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quiz-options.cols-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.quiz-options.cols-2 .quiz-option {
  min-height: 48px;
  padding: 12px 14px;
  font-size: 15px;
  gap: 10px;
}
.quiz-options.cols-2 .quiz-check {
  width: 18px;
  height: 18px;
  border-width: 1.5px;
}
.quiz-options.cols-2 .quiz-option[aria-checked="true"] .quiz-check:not(.radio)::after,
.quiz-options.cols-2 .quiz-option.selected .quiz-check:not(.radio)::after {
  width: 5px;
  height: 9px;
  border-width: 0 2px 2px 0;
}
@media (max-width: 400px) {
  .quiz-options.cols-2 {
    grid-template-columns: 1fr;
  }
}

/* custom radio/checkbox button */
.quiz-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
  user-select: none;
}
.quiz-option:hover {
  border-color: var(--border-strong);
  background: var(--bg-soft);
}
.quiz-option[aria-checked="true"],
.quiz-option.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
}
.quiz-check {
  width: 22px; height: 22px;
  border: 2px solid var(--border-strong);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
  background: var(--bg-card);
}
.quiz-check.radio { border-radius: 50%; }
.quiz-option[aria-checked="true"] .quiz-check,
.quiz-option.selected .quiz-check {
  background: var(--accent);
  border-color: var(--accent);
}
.quiz-option[aria-checked="true"] .quiz-check.radio::after,
.quiz-option.selected .quiz-check.radio::after {
  content: "";
  width: 8px; height: 8px;
  background: var(--accent-contrast);
  border-radius: 50%;
}
.quiz-option[aria-checked="true"] .quiz-check:not(.radio)::after,
.quiz-option.selected .quiz-check:not(.radio)::after {
  content: "";
  width: 6px; height: 11px;
  border: solid var(--accent-contrast);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

/* fields */
.quiz-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}
.quiz-field label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.quiz-field .label-hint {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 13px;
}
.quiz-field input {
  min-height: 52px;
  padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--bg-card);
  transition: border-color 0.15s;
}
.quiz-field input::placeholder { color: var(--text-muted); opacity: 1; }
.quiz-field input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.quiz-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 20px;
  padding: 14px 0;
  font-size: 15px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1.55;
  min-height: 44px;
}
.quiz-checkbox input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.quiz-error {
  color: var(--danger);
  font-size: 14px;
  margin-top: 16px;
  min-height: 22px;
  font-weight: 600;
}

.quiz-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.quiz-actions .btn { min-width: 130px; }
.quiz-actions.hidden-back #quiz-back { visibility: hidden; }

.thank-you {
  text-align: center;
  padding: 20px 0;
}
.thank-you-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 20px;
}
.thank-you h3 {
  font-size: 26px;
  margin-bottom: 12px;
}
.thank-you p {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 28px;
}
.thank-you-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 560px) {
  .quiz-card { padding: 24px 20px; }
  .quiz-question { font-size: 20px; }
  .quiz-actions .btn { min-width: 0; flex: 1; }
  .quiz-option { padding: 14px 16px; min-height: 52px; }
}

/* ============================================================
   FAQ
   ============================================================ */
.faq {
  margin-top: 16px;
  border-top: 1px solid var(--border);
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 24px 48px 24px 0;
  font-size: 18px;
  font-weight: 700;
  position: relative;
  min-height: 48px;
  transition: color 0.15s;
  letter-spacing: -0.01em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 14px;
  height: 14px;
  border-right: 2.5px solid var(--text-muted);
  border-bottom: 2.5px solid var(--text-muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s;
}
.faq-item[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
  border-color: var(--accent);
}
.faq-item[open] summary { color: var(--text); }
.faq-item summary:hover { color: var(--accent); }
.faq-body {
  padding: 0 0 24px;
}
.faq-body p {
  color: var(--text-muted);
  margin: 0;
  font-size: 17px;
}

/* ============================================================
   FINAL CTA
   ============================================================ */
.final-cta {
  padding: 96px 0;
  background: var(--bg-soft);
}
.final-cta h2 { margin-bottom: 16px; }
.final-cta .section-lead { margin-bottom: 32px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 40px;
  font-size: 15px;
  color: var(--text-muted);
  background: var(--bg);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 28px;
  align-items: center;
}
.footer-col { min-width: 0; }
.logo-footer { display: block; margin-bottom: 6px; font-size: 17px; }
.footer-nav {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}
.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 4px;
}
.footer-nav a:hover { color: var(--text); }
.footer-copy { text-align: right; }
@media (max-width: 720px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-copy { text-align: center; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .quiz-body { animation: none; }
}
