@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700&display=swap');

* { box-sizing: border-box; }

:root {
  --blue: #004f6e;
  --blue-dark: #00384f;
  --blue-soft: #e9f3f5;
  --red: #b22234;
  --gold: #c79830;
  --ink: #13252c;
  --muted: #65757c;
  --line: #dce5e8;
  --paper: #ffffff;
  --bg: #f3f6f5;
  --success: #1f8063;
}

html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: 'DM Sans', Arial, sans-serif;
  background:
    radial-gradient(circle at 8% 3%, rgba(0, 79, 110, .11), transparent 25rem),
    radial-gradient(circle at 92% 30%, rgba(199, 152, 48, .07), transparent 26rem),
    var(--bg);
}
button, input, select { font: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }

.page { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.topbar { height: 116px; display: flex; align-items: center; justify-content: space-between; }
.logo-link { width: 122px; height: 82px; overflow: hidden; display: block; }
.logo { width: 104px; display: block; transform: translateY(-12px); }
.topbar-label { color: var(--blue); font-size: .76rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }

.hero { padding: 40px 0 58px; text-align: center; }
.eyebrow, .step-kicker { color: var(--red); font-size: .72rem; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; }
.hero h1 { margin: 18px auto; color: var(--blue-dark); font: 600 clamp(2.6rem, 6vw, 5.4rem)/.98 'Manrope', sans-serif; letter-spacing: -.055em; }
.hero h1 em { color: var(--red); font-style: normal; }
.hero > p { max-width: 680px; margin: 0 auto; color: var(--muted); font-size: clamp(1rem, 2vw, 1.18rem); line-height: 1.7; }
.hero-proof { display: flex; justify-content: center; gap: 28px; margin-top: 28px; color: #536970; font-size: .88rem; }
.hero-proof i { display: inline-grid; width: 20px; height: 20px; margin-right: 5px; place-items: center; color: var(--success); background: #ddf1ea; border-radius: 50%; font-style: normal; }

.index-card { position: relative; max-width: 940px; min-height: 580px; margin: 0 auto; overflow: hidden; background: rgba(255,255,255,.98); border: 1px solid rgba(0,79,110,.1); border-radius: 30px; box-shadow: 0 30px 80px rgba(24, 56, 67, .12); }
.progress-wrap { padding: 24px 42px 0; }
.progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: .75rem; font-weight: 600; }
.progress-track { height: 4px; margin-top: 11px; overflow: hidden; background: #e9eeee; border-radius: 10px; }
.progress-track span { display: block; width: 25%; height: 100%; background: linear-gradient(90deg, var(--blue), #1284a4); border-radius: inherit; transition: width .4s ease; }
.form-step { display: none; padding: 48px 58px 44px; animation: enter .38s ease both; }
.form-step.active { display: block; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.step-heading { max-width: 680px; margin-bottom: 30px; }
.step-heading h2, .analysis-screen h2, .result-hero h2 { margin: 9px 0 7px; color: var(--blue-dark); font: 600 clamp(1.65rem, 3vw, 2.35rem)/1.15 'Manrope', sans-serif; letter-spacing: -.035em; }
.step-heading p { margin: 0; color: var(--muted); line-height: 1.55; }

.segment-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.subsegment-wrapper { margin-top: 20px; }
.subsegment-label { margin-bottom: 12px; color: #38505a; font-size: .92rem; font-weight: 700; }
.segment-option { position: relative; }
.segment-option input { position: absolute; opacity: 0; pointer-events: none; }
.segment-option span { display: flex; min-height: 68px; padding: 14px 16px; align-items: center; gap: 10px; color: #3f555d; background: #fbfcfc; border: 1px solid var(--line); border-radius: 15px; cursor: pointer; font-size: .88rem; font-weight: 600; transition: .2s ease; }
.segment-option b { font-size: 1.15rem; font-weight: 400; }
.segment-option span:hover { border-color: #9bb9c3; transform: translateY(-1px); }
.segment-option input:checked + span { color: var(--blue); background: var(--blue-soft); border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }

.fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: block; }
.field > span { display: block; margin: 0 0 7px 3px; color: #38505a; font-size: .82rem; font-weight: 700; }
.field small { color: #8a999f; font-weight: 400; }
.field input, .field select { width: 100%; height: 54px; padding: 0 17px; color: var(--ink); background: #fbfcfc; border: 1px solid var(--line); border-radius: 13px; outline: none; transition: .2s ease; }
.field input:focus, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,79,110,.08); }
.field input.invalid { border-color: var(--red); }
.other-segment { margin-top: 18px; }

.questions-list { display: grid; gap: 16px; }
.question-card { padding: 20px; background: #fbfcfc; border: 1px solid var(--line); border-radius: 17px; }
.question-card legend { width: 100%; margin-bottom: 13px; color: #29434c; font-weight: 700; line-height: 1.4; }
.question-card legend b { display: inline-grid; width: 25px; height: 25px; margin-right: 8px; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 50%; font-size: .72rem; }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: flex; min-height: 46px; padding: 10px 12px; align-items: center; color: #5d6d73; background: #fff; border: 1px solid #e0e7e9; border-radius: 10px; cursor: pointer; font-size: .82rem; line-height: 1.35; transition: .18s ease; }
.choice span::before { content: ''; width: 14px; height: 14px; flex: 0 0 14px; margin-right: 8px; border: 1px solid #b6c3c8; border-radius: 50%; }
.choice input:checked + span { color: var(--blue-dark); background: var(--blue-soft); border-color: var(--blue); }
.choice input:checked + span::before { border: 4px solid var(--blue); background: white; }
.question-card.invalid { border-color: var(--red); }
.privacy-check { display: flex; gap: 11px; margin: 22px 3px 0; align-items: flex-start; color: var(--muted); cursor: pointer; font-size: .78rem; line-height: 1.5; }
.privacy-check input { width: 17px; height: 17px; flex: 0 0 17px; margin-top: 1px; accent-color: var(--blue); }
.privacy-check.invalid { color: var(--red); }

.field-error { min-height: 18px; margin: 12px 0 0; color: var(--red); font-size: .78rem; font-weight: 600; }
.step-actions { display: flex; justify-content: space-between; gap: 14px; margin-top: 26px; }
.step-actions.single { justify-content: flex-end; }
.primary-btn, .ghost-btn, .restart-btn { min-height: 52px; padding: 0 24px; border-radius: 13px; cursor: pointer; font-weight: 700; transition: .2s ease; }
.primary-btn { color: white; background: var(--blue); border: 1px solid var(--blue); box-shadow: 0 12px 24px rgba(0,79,110,.16); }
.primary-btn:hover { background: var(--red); border-color: var(--red); transform: translateY(-1px); }
.primary-btn span { margin-left: 10px; }
.primary-btn:disabled { opacity: .65; cursor: wait; transform: none; }
.ghost-btn { color: var(--muted); background: white; border: 1px solid var(--line); }
.ghost-btn:hover { color: var(--blue); border-color: var(--blue); }

.analysis-screen { min-height: 570px; padding: 70px 50px; text-align: center; animation: enter .4s ease both; }
.analysis-orbit { position: relative; display: grid; width: 96px; height: 96px; margin: 0 auto 30px; place-items: center; color: white; background: var(--blue); border-radius: 50%; }
.analysis-orbit strong { font: 700 2.2rem 'Manrope'; }
.orbit-ring { position: absolute; inset: -10px; border: 2px solid transparent; border-top-color: var(--red); border-right-color: rgba(0,79,110,.2); border-radius: 50%; animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.analysis-list { width: min(420px, 100%); margin: 34px auto 0; text-align: left; }
.analysis-list div { display: flex; padding: 13px 0; align-items: center; gap: 12px; color: #9aa6aa; border-bottom: 1px solid #edf0f1; transition: .3s ease; }
.analysis-list i { width: 17px; height: 17px; border: 2px solid #cbd3d6; border-radius: 50%; }
.analysis-list div.active { color: var(--blue); font-weight: 700; }
.analysis-list div.active i { border-color: var(--blue); border-top-color: transparent; animation: spin .7s linear infinite; }
.analysis-list div.done { color: var(--success); }
.analysis-list div.done i { display: grid; place-items: center; color: white; background: var(--success); border: 0; }
.analysis-list div.done i::after { content: '✓'; font-size: .68rem; font-style: normal; }

.result-screen { animation: enter .45s ease both; }
.result-hero { padding: 54px 50px 44px; text-align: center; background: linear-gradient(145deg, #f4faf9, #eef4f5); border-bottom: 1px solid var(--line); }
.result-hero > p { color: var(--muted); }
.score-gauge { display: grid; width: 184px; height: 184px; margin: 28px auto 18px; place-items: center; border-radius: 50%; background: conic-gradient(var(--blue) var(--score), #dce6e8 0); }
.score-gauge::before { content: ''; grid-area: 1/1; width: 150px; height: 150px; background: white; border-radius: 50%; }
.score-gauge div { z-index: 1; grid-area: 1/1; }
.score-gauge strong { color: var(--blue-dark); font: 700 3.5rem/1 'Manrope'; }
.score-gauge span { color: var(--muted); }
.score-gauge small { display: block; margin-top: 5px; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; }
.score-reading { max-width: 590px; margin: 0 auto; line-height: 1.6; }
.result-section { padding: 42px 52px; }
.section-title { display: flex; margin-bottom: 24px; align-items: center; gap: 12px; }
.section-title > span { display: grid; width: 30px; height: 30px; place-items: center; color: var(--blue); background: var(--blue-soft); border-radius: 50%; font-size: .7rem; font-weight: 700; }
.section-title h3 { margin: 0; color: var(--blue-dark); font: 600 1.25rem 'Manrope'; }
.score-list { display: grid; gap: 16px; }
.score-row { display: grid; grid-template-columns: 130px 1fr 40px; align-items: center; gap: 14px; font-size: .86rem; }
.score-row > span { font-weight: 600; }
.score-row > strong { color: var(--blue); text-align: right; }
.mini-track { height: 8px; overflow: hidden; background: #e6ecee; border-radius: 8px; }
.mini-track i { display: block; width: var(--value); height: 100%; background: linear-gradient(90deg, var(--blue), #2b94aa); border-radius: inherit; }
.insight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 0 52px; }
.insight-card { min-height: 210px; padding: 26px; border-radius: 19px; }
.insight-card.strengths { background: #edf7f3; }
.insight-card.bottlenecks { background: #fbf1ef; }
.card-icon { display: grid; width: 31px; height: 31px; place-items: center; color: var(--success); background: white; border-radius: 50%; font-weight: 700; }
.bottlenecks .card-icon { color: var(--red); }
.insight-card h3 { margin: 13px 0 10px; font: 700 1rem 'Manrope'; }
.insight-card ul { margin: 0; padding-left: 18px; color: #50636a; font-size: .85rem; line-height: 1.6; }
.opportunities { display: grid; gap: 12px; }
.opportunity { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 18px; background: #fafcfc; border: 1px solid var(--line); border-radius: 14px; }
.opportunity > span { display: grid; width: 31px; height: 31px; place-items: center; color: white; background: var(--blue); border-radius: 50%; font-size: .75rem; font-weight: 700; }
.opportunity h4 { margin: 1px 0 4px; color: var(--blue-dark); font-size: .9rem; }
.opportunity p { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.consultive-box { margin: 0 52px 42px; padding: 28px; color: white; background: var(--blue-dark); border-radius: 20px; }
.consultive-box .step-kicker { color: #e7c779; }
.consultive-box > p { margin: 12px 0 22px; color: #d6e2e6; line-height: 1.7; }
.recommended-service { display: flex; padding-top: 17px; justify-content: space-between; gap: 18px; border-top: 1px solid rgba(255,255,255,.16); font-size: .82rem; }
.recommended-service span { color: #9fb5bd; }
.recommended-service strong { color: #fff; text-align: right; }
.next-steps { display: grid; grid-template-columns: 1.5fr 1fr; gap: 30px; padding: 40px 52px; align-items: center; background: #f4f7f7; border-top: 1px solid var(--line); }
.next-steps h3 { margin: 8px 0; color: var(--blue-dark); font: 600 1.45rem 'Manrope'; }
.next-steps p { margin: 0; color: var(--muted); line-height: 1.55; font-size: .88rem; }
.whatsapp-btn { display: flex; min-height: 58px; padding: 0 20px; align-items: center; justify-content: space-between; color: white; background: #16885e; border-radius: 14px; text-decoration: none; font-size: .88rem; font-weight: 700; box-shadow: 0 12px 25px rgba(22,136,94,.17); }
.whatsapp-btn:hover { background: #11744f; }
.restart-btn { display: block; margin: 24px auto; color: var(--muted); background: transparent; border: 0; text-decoration: underline; }
.submit-status { padding: 0 30px 24px; color: var(--muted); text-align: center; font-size: .75rem; }
footer { display: flex; padding: 44px 0 50px; justify-content: space-between; color: #718087; font-size: .72rem; }
footer span { color: var(--blue); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
footer p { margin: 0; }

@media (max-width: 720px) {
  .page { width: min(100% - 24px, 620px); }
  .topbar { height: 86px; }
  .logo-link { width: 96px; height: 66px; }
  .logo { width: 84px; transform: translateY(-9px); }
  .topbar-label { font-size: .62rem; }
  .hero { padding: 22px 4px 38px; }
  .hero h1 { margin-top: 13px; }
  .hero-proof { gap: 12px; flex-wrap: wrap; font-size: .75rem; }
  .index-card { min-height: 530px; border-radius: 22px; }
  .progress-wrap { padding: 19px 22px 0; }
  .form-step { padding: 34px 22px 28px; }
  .step-heading { margin-bottom: 24px; }
  .segment-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .segment-option span { min-height: 61px; padding: 11px; font-size: .77rem; }
  .segment-option b { font-size: 1rem; }
  .fields-grid { grid-template-columns: 1fr; gap: 13px; }
  .choice-grid { grid-template-columns: 1fr; }
  .question-card { padding: 16px; }
  .step-actions { position: sticky; bottom: 0; z-index: 3; margin: 22px -10px -12px; padding: 11px 10px 12px; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); }
  .primary-btn, .ghost-btn { padding: 0 16px; }
  .analysis-screen { min-height: 520px; padding: 58px 22px; }
  .result-hero { padding: 42px 22px 36px; }
  .result-section { padding: 34px 22px; }
  .score-row { grid-template-columns: 92px 1fr 36px; gap: 9px; font-size: .77rem; }
  .insight-grid { grid-template-columns: 1fr; padding: 0 22px; }
  .insight-card { min-height: auto; }
  .consultive-box { margin: 0 22px 34px; padding: 23px; }
  .recommended-service { flex-direction: column; gap: 6px; }
  .recommended-service strong { text-align: left; }
  .next-steps { grid-template-columns: 1fr; padding: 34px 22px; }
  footer { flex-direction: column; gap: 10px; text-align: center; }
}

@media (max-width: 390px) {
  .segment-grid { grid-template-columns: 1fr; }
  .step-actions { gap: 8px; }
  .primary-btn, .ghost-btn { font-size: .82rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
