/* ==============================
   Digital Runner · AI Act Checkup
   ============================== */

:root {
  --dr-yellow: #c8cc2a;
  --dr-yellow-soft: #e5e88a;
  --dr-yellow-bg: #f5f6d4;
  --dr-black: #0a0a0a;
  --dr-dark: #1a1a1a;
  --dr-gray-900: #2a2a2a;
  --dr-gray-700: #52525b;
  --dr-gray-500: #71717a;
  --dr-gray-300: #d4d4d8;
  --dr-gray-200: #e4e4e7;
  --dr-gray-100: #f4f4f5;
  --dr-gray-50: #fafafa;
  --dr-white: #ffffff;
  --dr-accent-blue: #3b82f6;
  --dr-green: #16a34a;
  --dr-yellow-warn: #eab308;
  --dr-red: #dc2626;

  /* Font Digital Runner - Degular via Adobe Typekit (kit wpk2xpe) */
  --font-sans: 'degular-text', 'degular', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --font-display: 'degular-display', 'degular', 'degular-text', system-ui, sans-serif;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--dr-black);
  background: var(--dr-white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ============ SCREENS ============ */
.screen { display: none; min-height: 100vh; }
.screen.active { display: block; }

/* ============ TOPBAR ============ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1px solid var(--dr-gray-200);
  background: var(--dr-white);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar--form { padding: 16px 40px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--dr-black);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand-mark { width: 30px; height: 30px; object-fit: contain; display: block; }

.tag {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  background: var(--dr-black);
  color: var(--dr-yellow);
  border-radius: 999px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ============ HERO ============ */
.hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 40px 40px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}

.pill {
  display: inline-block;
  background: var(--dr-yellow-bg);
  color: var(--dr-black);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
  border: 1px solid var(--dr-yellow-soft);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.hl {
  background: linear-gradient(180deg, transparent 60%, var(--dr-yellow) 60%);
  padding: 0 4px;
}

.lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--dr-gray-700);
  margin-bottom: 32px;
  max-width: 560px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 24px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.btn--primary {
  background: var(--dr-black);
  color: var(--dr-yellow);
}
.btn--primary:hover {
  background: var(--dr-gray-900);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn--ghost {
  background: transparent;
  color: var(--dr-black);
  border: 1.5px solid var(--dr-gray-300);
}
.btn--ghost:hover:not(:disabled) {
  border-color: var(--dr-black);
  background: var(--dr-gray-50);
}
.btn--yellow {
  background: var(--dr-yellow);
  color: var(--dr-black);
}
.btn--yellow:hover {
  background: var(--dr-yellow-soft);
  transform: translateY(-1px);
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.hero-stats {
  display: flex;
  gap: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--dr-gray-200);
}
.hero-stats > div {
  display: flex;
  flex-direction: column;
}
.hero-stats strong {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--dr-black);
}
.hero-stats span {
  font-size: 13px;
  color: var(--dr-gray-500);
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.hero-card {
  background: var(--dr-white);
  border: 1px solid var(--dr-gray-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.hero-card::before {
  content: '';
  position: absolute;
  inset: -18px -18px auto auto;
  width: 90px;
  height: 90px;
  background: var(--dr-yellow);
  border-radius: 50%;
  z-index: -1;
  opacity: 0.55;
}
.hero-card__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 500;
}
.hero-card__row + .hero-card__row {
  border-top: 1px solid var(--dr-gray-100);
}
.hero-card__row .score {
  margin-left: auto;
  font-family: var(--font-display);
  font-weight: 700;
}
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot--green { background: var(--dr-green); }
.dot--yellow { background: var(--dr-yellow-warn); }
.dot--red { background: var(--dr-red); }

.hero-card__bar {
  margin-top: 20px;
  height: 8px;
  background: var(--dr-gray-100);
  border-radius: 999px;
  overflow: hidden;
}
.hero-card__fill {
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, var(--dr-yellow), var(--dr-yellow-warn));
  border-radius: 999px;
}
.hero-card__label {
  margin-top: 8px;
  font-size: 12px;
  color: var(--dr-gray-500);
  font-weight: 500;
}

/* ============ FAQ ============ */
.faq {
  background: var(--dr-gray-50);
  padding: 80px 0;
  border-top: 1px solid var(--dr-gray-200);
}
.faq-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}
.faq h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
  text-align: center;
}
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.faq-card {
  background: var(--dr-white);
  border: 1px solid var(--dr-gray-200);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.2s ease;
}
.faq-card:hover {
  border-color: var(--dr-yellow);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.faq-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--dr-black);
}
.faq-card p {
  font-size: 14.5px;
  color: var(--dr-gray-700);
  line-height: 1.6;
}
.faq-card strong { color: var(--dr-black); }

/* ============ FOOTER ============ */
.footer {
  padding: 40px;
  text-align: center;
  border-top: 1px solid var(--dr-gray-200);
  color: var(--dr-gray-500);
  font-size: 13px;
}
.footer a { color: var(--dr-black); font-weight: 600; text-decoration: none; }
.footer a:hover { color: var(--dr-yellow); }
.footer-disclaimer {
  margin-top: 12px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  font-size: 12px;
  color: var(--dr-gray-500);
}

/* ============ PROGRESS ============ */
.progress-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 240px;
}
.progress-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--dr-gray-700);
  min-width: 40px;
}
.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--dr-gray-100);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--dr-yellow);
  border-radius: 999px;
  width: 14%;
  transition: width 0.3s ease;
}

/* ============ FORM ============ */
.form-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 60px 40px 40px;
}
.step {
  animation: fadeIn 0.35s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.step-tag {
  display: inline-block;
  background: var(--dr-black);
  color: var(--dr-yellow);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.step-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  line-height: 1.15;
}
.step-desc {
  color: var(--dr-gray-700);
  font-size: 15px;
  margin-bottom: 32px;
  line-height: 1.55;
}

.question {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--dr-gray-100);
}
.question:last-child { border-bottom: none; }

.question-label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--dr-black);
  margin-bottom: 6px;
  line-height: 1.4;
}
.question-hint {
  font-size: 13.5px;
  color: var(--dr-gray-500);
  margin-bottom: 14px;
  line-height: 1.5;
}

.option-list {
  display: grid;
  gap: 8px;
}
.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--dr-gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  background: var(--dr-white);
}
.option:hover {
  border-color: var(--dr-gray-500);
  background: var(--dr-gray-50);
}
.option input {
  margin-top: 3px;
  accent-color: var(--dr-black);
  cursor: pointer;
}
.option-content {
  flex: 1;
}
.option-title {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--dr-black);
  line-height: 1.4;
}
.option-sub {
  font-size: 13px;
  color: var(--dr-gray-500);
  margin-top: 2px;
  line-height: 1.4;
}
.option.selected {
  border-color: var(--dr-black);
  background: var(--dr-yellow-bg);
}
.option.selected .option-title { font-weight: 600; }

.text-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--dr-gray-200);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.15s ease;
  background: var(--dr-white);
}
.text-input:focus {
  outline: none;
  border-color: var(--dr-black);
}

.form-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--dr-gray-200);
}

/* ============ RESULTS ============ */
.results-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 40px;
}

.results-hero {
  text-align: center;
  padding: 48px 32px;
  background: linear-gradient(135deg, var(--dr-yellow-bg), var(--dr-yellow-soft));
  border-radius: var(--radius-lg);
  margin-bottom: 40px;
  border: 1px solid var(--dr-yellow-soft);
  position: relative;
  overflow: hidden;
}
.results-hero::before {
  content: '';
  position: absolute;
  inset: -60px -60px auto auto;
  width: 200px;
  height: 200px;
  background: var(--dr-yellow);
  border-radius: 50%;
  opacity: 0.35;
}

.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}
.risk-badge--green { background: var(--dr-green); color: white; }
.risk-badge--yellow { background: var(--dr-yellow-warn); color: white; }
.risk-badge--orange { background: #ea580c; color: white; }
.risk-badge--red { background: var(--dr-red); color: white; }

/* Verdict card - legal verdict block */
.verdict {
  border-radius: var(--radius);
  padding: 32px 28px;
  border: 2px solid;
  position: relative;
}
.verdict--red { background: #fef2f2; border-color: #dc2626; }
.verdict--orange { background: #fff7ed; border-color: #ea580c; }
.verdict--yellow { background: #fefce8; border-color: #ca8a04; }
.verdict--green { background: #f0fdf4; border-color: #16a34a; }

.verdict__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.verdict--red .verdict__label { color: #b91c1c; }
.verdict--orange .verdict__label { color: #c2410c; }
.verdict--yellow .verdict__label { color: #a16207; }
.verdict--green .verdict__label { color: #15803d; }

.verdict__badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
  color: white;
}
.verdict--red .verdict__badge { background: #dc2626; }
.verdict--orange .verdict__badge { background: #ea580c; }
.verdict--yellow .verdict__badge { background: #ca8a04; }
.verdict--green .verdict__badge { background: #16a34a; }

.verdict__headline {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--dr-black);
  margin: 0 0 20px 0;
  letter-spacing: -0.01em;
}

.verdict__basis,
.verdict__inforce {
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
  margin: 0 0 14px 0;
}
.verdict__basis strong,
.verdict__inforce strong {
  color: var(--dr-black);
}

.verdict__disclaimer {
  font-size: 12px;
  line-height: 1.5;
  color: #6b7280;
  padding-top: 16px;
  border-top: 1px dashed rgba(0,0,0,0.15);
  font-style: italic;
}

@media (max-width: 640px) {
  .verdict {
    padding: 24px 20px;
  }
  .verdict__headline {
    font-size: 22px;
  }
}

.results-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.results-hero p {
  font-size: 16px;
  color: var(--dr-gray-700);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.result-section {
  margin-bottom: 40px;
}
.result-section h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.result-section h2::before {
  content: '';
  width: 5px;
  height: 24px;
  background: var(--dr-yellow);
  border-radius: 3px;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.score-card {
  background: var(--dr-white);
  border: 1px solid var(--dr-gray-200);
  border-radius: var(--radius);
  padding: 20px;
}
.score-card__label {
  font-size: 13px;
  color: var(--dr-gray-500);
  font-weight: 500;
  margin-bottom: 6px;
}
.score-card__value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--dr-black);
  line-height: 1;
  margin-bottom: 10px;
}
.score-card__bar {
  height: 6px;
  background: var(--dr-gray-100);
  border-radius: 999px;
  overflow: hidden;
}
.score-card__fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}

.checklist {
  list-style: none;
  display: grid;
  gap: 10px;
}
.checklist li {
  padding: 14px 18px 14px 44px;
  background: var(--dr-white);
  border: 1px solid var(--dr-gray-200);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  line-height: 1.5;
  position: relative;
}
.checklist li::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 18px;
  width: 18px;
  height: 18px;
  background: var(--dr-yellow);
  border-radius: 50%;
  display: flex;
}
.checklist li::after {
  content: '';
  position: absolute;
  left: 21px;
  top: 22px;
  width: 8px;
  height: 4px;
  border-left: 2px solid var(--dr-black);
  border-bottom: 2px solid var(--dr-black);
  transform: rotate(-45deg);
}
.checklist li strong { display: block; margin-bottom: 3px; }

.info-box {
  background: var(--dr-gray-50);
  border-left: 4px solid var(--dr-yellow);
  padding: 20px 24px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}
.info-box h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}
.info-box p {
  font-size: 14.5px;
  color: var(--dr-gray-700);
  line-height: 1.6;
}

/* Lead capture */
.lead-form {
  background: var(--dr-black);
  color: white;
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-top: 48px;
  position: relative;
  overflow: hidden;
}
.lead-form::before {
  content: '';
  position: absolute;
  inset: auto -40px -40px auto;
  width: 200px;
  height: 200px;
  background: var(--dr-yellow);
  border-radius: 50%;
  opacity: 0.9;
}
.lead-form-inner { position: relative; z-index: 1; }
.lead-form h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.lead-form p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 24px;
  max-width: 520px;
  line-height: 1.6;
}
.lead-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
}

/* ===== DOCS SECTION ===== */
.docs-section {
  margin-top: 48px;
}
.docs-lead {
  color: var(--dr-gray-700);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 24px;
  max-width: 760px;
}
.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.doc-card {
  position: relative;
  display: block;
  border: 2px solid var(--dr-gray-200);
  border-radius: var(--radius);
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}
.doc-card:hover {
  border-color: var(--dr-black);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.doc-card input[type="radio"] {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 20px;
  height: 20px;
  accent-color: var(--dr-black);
  cursor: pointer;
  z-index: 2;
}
.doc-card:has(input:checked) {
  border-color: var(--dr-black);
  background: linear-gradient(180deg, #fafbdb 0%, white 60%);
}
.doc-card:has(input:checked)::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--dr-yellow);
}
.doc-card__body {
  padding: 24px 20px 20px;
}
.doc-card__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--dr-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.doc-card h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--dr-black);
  margin: 0 0 8px;
  line-height: 1.25;
}
.doc-card p {
  font-size: 13.5px;
  color: var(--dr-gray-700);
  line-height: 1.55;
  margin: 0 0 14px;
}
.doc-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--dr-gray-200);
  padding-top: 12px;
}
.doc-card ul li {
  font-size: 12.5px;
  color: var(--dr-gray-700);
  padding: 4px 0 4px 16px;
  position: relative;
  line-height: 1.4;
}
.doc-card ul li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--dr-yellow-warn);
  font-weight: 700;
}

/* ===== LEAD FORM GRID (nuovo) ===== */
.lead-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.lead-form-grid input {
  padding: 14px 16px;
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.08);
  color: white;
  font-family: inherit;
  font-size: 15px;
  width: 100%;
}
.lead-form-grid input::placeholder { color: rgba(255,255,255,0.5); }
.lead-form-grid input:focus {
  outline: none;
  border-color: var(--dr-yellow);
  background: rgba(255,255,255,0.12);
}
.lead-consent {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0 4px;
  cursor: pointer;
}
.lead-consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--dr-yellow);
  flex-shrink: 0;
}
.lead-consent span {
  font-size: 12.5px;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
}
.lead-submit-btn {
  grid-column: 1 / -1;
  padding: 15px 24px;
  font-size: 15px;
  font-weight: 700;
}
.lead-form input {
  padding: 14px 16px;
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.08);
  color: white;
  font-family: inherit;
  font-size: 15px;
}
.lead-form input::placeholder { color: rgba(255,255,255,0.5); }
.lead-form input:focus {
  outline: none;
  border-color: var(--dr-yellow);
  background: rgba(255,255,255,0.12);
}
.lead-form .btn--yellow { padding: 14px 24px; }

.actions-row {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.disclaimer-box {
  margin-top: 40px;
  padding: 20px;
  background: var(--dr-gray-50);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--dr-gray-500);
  line-height: 1.6;
  text-align: center;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 40px 24px; }
  .hero-visual { order: -1; }
  .hero-card { max-width: 320px; }
  .topbar { padding: 16px 24px; }
  .topbar--form { padding: 12px 20px; flex-direction: column; gap: 12px; align-items: stretch; }
  .progress-wrap { min-width: 100%; }
  .form-wrap { padding: 32px 24px; }
  .results-wrap { padding: 32px 20px; }
  .faq-wrap { padding: 0 24px; }
  .lead-form-row { grid-template-columns: 1fr; }
  .lead-form-grid { grid-template-columns: 1fr; }
  .docs-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .hero-stats strong { font-size: 24px; }
  .lead-form { padding: 32px 24px; }
  .results-hero { padding: 32px 20px; }
}

@media print {
  .topbar, .form-nav, .lead-form, .actions-row { display: none !important; }
}

/* ============ AUTO-ADVANCE + STEP TRANSITIONS (2026-07) ============ */

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* Option pressed = about to auto-advance. Adds a clear pulsing outline
   + a check tick top-right, so mobile users clearly see "I'm about to move on". */
.option.option--activating {
  border-color: var(--brand-yellow, #c8cc2a);
  box-shadow: 0 0 0 3px rgba(200, 204, 42, 0.35);
  animation: option-pulse 0.5s ease-out;
  position: relative;
}
.option.option--activating::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-yellow, #c8cc2a) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a0a0a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/14px 14px no-repeat;
  animation: tick-pop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes option-pulse {
  0%   { box-shadow: 0 0 0 0    rgba(200, 204, 42, 0.55); }
  60%  { box-shadow: 0 0 0 8px  rgba(200, 204, 42, 0.10); }
  100% { box-shadow: 0 0 0 3px  rgba(200, 204, 42, 0.35); }
}
@keyframes tick-pop {
  0%   { transform: scale(0);   opacity: 0; }
  100% { transform: scale(1);   opacity: 1; }
}

/* Microcopy under the questions announcing the auto-advance */
.auto-advance-status {
  min-height: 24px;
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--brand-yellow-dark, #7a7d19);
  text-align: center;
  transition: opacity 0.2s ease;
}
.auto-advance-status:empty { min-height: 0; margin: 0; }

/* Step transitions: horizontal fade+slide, direction-aware */
@keyframes step-out-left  { from { opacity: 1; transform: translateX(0); }   to { opacity: 0; transform: translateX(-24px); } }
@keyframes step-in-right  { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes step-out-right { from { opacity: 1; transform: translateX(0); }   to { opacity: 0; transform: translateX(24px); } }
@keyframes step-in-left   { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: translateX(0); } }

#form-content.step-anim-out-left  { animation: step-out-left  180ms ease-in    forwards; }
#form-content.step-anim-in-right  { animation: step-in-right  240ms ease-out   forwards; }
#form-content.step-anim-out-right { animation: step-out-right 180ms ease-in    forwards; }
#form-content.step-anim-in-left   { animation: step-in-left   240ms ease-out   forwards; }

/* Respect users who ask for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .option.option--activating { animation: none; }
  .option.option--activating::after { animation: none; }
  #form-content.step-anim-out-left,
  #form-content.step-anim-in-right,
  #form-content.step-anim-out-right,
  #form-content.step-anim-in-left { animation: none; }
}

/* Highlight breve della prossima domanda quando si fa scroll a essa */
.question--highlight {
  animation: question-flash 0.9s ease-out;
}
@keyframes question-flash {
  0%   { background: rgba(200, 204, 42, 0.20); }
  100% { background: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .question--highlight { animation: none; }
}
