/* =============================================================
   Blink Quiz Platform — style.css
   Tokens + componentes compartilhados por todos os quizzes.
   Mobile-first. Zero emoji. Ícones SVG em sprite.
   ============================================================= */

:root {
  --brand-50:  #f0f9ff;
  --brand-100: #e0f2fe;
  --brand-300: #7dd3fc;
  --brand-500: #0ea5e9;
  --brand-600: #0284c7;
  --brand-700: #0369a1;
  --brand-900: #0c4a6e;
  --accent-500: #14b8a6;
  --accent-600: #0d9488;
  --ink-900: #0f172a;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-300: #cbd5e1;
  --ink-100: #f1f5f9;
  --ink-50:  #f8fafc;
  --paper:   #ffffff;
  --lvl-0: #16a34a; --lvl-1: #65a30d; --lvl-2: #f59e0b; --lvl-3: #dc2626;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-full: 999px;
  --sh-1: 0 1px 2px rgba(15, 23, 42, .06);
  --sh-2: 0 4px 14px rgba(15, 23, 42, .10);
  --sh-3: 0 18px 40px rgba(15, 23, 42, .18);
  --tap: 48px;
}

[data-quiz-theme="idade-visual"] { --brand-500: #7c3aed; --brand-600: #6d28d9; --brand-700: #5b21b6; --accent-500: #ec4899; }
[data-quiz-theme="fadiga-digital"] { --brand-500: #f97316; --brand-600: #ea580c; --brand-700: #c2410c; --accent-500: #eab308; }
[data-quiz-theme="pre-cirurgico"] { --brand-500: #0891b2; --brand-600: #0e7490; --brand-700: #155e75; --accent-500: #14b8a6; }
[data-quiz-theme="pediatrico-escolar"] { --brand-500: #db2777; --brand-600: #be185d; --brand-700: #9d174d; --accent-500: #f59e0b; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font-body); color: var(--ink-900); background: var(--ink-50); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; min-height: 100vh; line-height: 1.5; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); text-decoration: underline; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.app { display: flex; flex-direction: column; min-height: 100vh; max-width: 520px; margin: 0 auto; background: var(--paper); position: relative; }
.app-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 10px; background: var(--paper); position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--ink-100); }
.brand-mark { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-style: italic; font-size: 20px; font-weight: 600; color: var(--brand-700); letter-spacing: -.01em; }
.brand-mark svg { color: var(--brand-500); }
.close-btn { width: 40px; height: 40px; display: grid; place-items: center; background: transparent; border: 1px solid var(--ink-100); border-radius: var(--r-full); cursor: pointer; color: var(--ink-500); transition: background .15s, color .15s; }
.close-btn:hover { background: var(--ink-50); color: var(--ink-900); }
.progress-shell { padding: 8px 18px 0; background: var(--paper); }
.progress-track { height: 6px; background: var(--ink-100); border-radius: var(--r-full); overflow: hidden; }
.progress-track > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand-500), var(--accent-500)); border-radius: var(--r-full); transition: width .35s ease; }

.screen { display: none; flex: 1; padding: 28px 22px 40px; animation: fadeIn .25s ease; }
.screen.active { display: flex; flex-direction: column; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-600); margin-bottom: 8px; }
h1, h2, h3 { margin: 0 0 12px; color: var(--ink-900); letter-spacing: -.015em; }
h1 { font-size: 28px; font-weight: 700; line-height: 1.2; }
h1 em { font-family: var(--font-display); font-style: italic; font-weight: 500; color: var(--brand-600); }
h2 { font-size: 22px; font-weight: 700; line-height: 1.25; }
h3 { font-size: 17px; font-weight: 600; }
p { margin: 0 0 14px; color: var(--ink-700); font-size: 16px; line-height: 1.6; }
p.lead-text { font-size: 17px; color: var(--ink-700); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 12px 22px; font-size: 16px; font-weight: 600; border: none; border-radius: var(--r-full); cursor: pointer; transition: transform .1s ease, box-shadow .2s ease, background .2s ease; white-space: nowrap; text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, var(--brand-500), var(--brand-600)); color: #fff; box-shadow: var(--sh-2); }
.btn-primary:hover:not(:disabled) { box-shadow: var(--sh-3); }
.btn-ghost { background: transparent; color: var(--ink-500); font-weight: 500; }
.btn-ghost:hover { color: var(--ink-900); background: var(--ink-50); }
.btn-secondary { background: var(--ink-100); color: var(--ink-900); }
.btn-secondary:hover { background: var(--ink-300); }
.btn-full { display: flex; width: 100%; }
.cta-row { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 24px; }

.option-list { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 6px; }
.option-card { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: var(--paper); border: 1.5px solid var(--ink-100); border-radius: var(--r-md); cursor: pointer; transition: border-color .15s, background .15s, transform .1s; text-align: left; font-size: 16px; color: var(--ink-900); width: 100%; }
.option-card:hover { border-color: var(--brand-300); background: var(--brand-50); }
.option-card.selected { border-color: var(--brand-500); background: var(--brand-50); box-shadow: 0 0 0 3px rgba(14, 165, 233, .15); }
.option-card .opt-icon { flex-shrink: 0; width: 40px; height: 40px; display: grid; place-items: center; background: var(--brand-100); color: var(--brand-600); border-radius: var(--r-sm); }
.option-card.selected .opt-icon { background: var(--brand-500); color: #fff; }
.option-card .opt-text { flex: 1; }
.option-card .opt-label { font-weight: 600; }
.option-card .opt-hint { font-size: 13px; color: var(--ink-500); margin-top: 2px; }
.option-card[data-checked="true"] { border-color: var(--brand-500); background: var(--brand-50); }
.option-card .opt-check { width: 22px; height: 22px; border: 1.5px solid var(--ink-300); border-radius: 6px; flex-shrink: 0; display: grid; place-items: center; }
.option-card[data-checked="true"] .opt-check { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }

.onboarding { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; flex: 1; justify-content: center; }
.slide-icon { width: 96px; height: 96px; background: var(--brand-100); color: var(--brand-600); display: grid; place-items: center; border-radius: var(--r-full); margin-bottom: 8px; }
.pagination-dots { display: flex; gap: 8px; margin: 16px 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-300); transition: all .2s; }
.dot.active { background: var(--brand-500); width: 24px; border-radius: var(--r-full); }

.q-body { display: flex; flex-direction: column; gap: 20px; flex: 1; }
.q-text { font-size: 20px; font-weight: 600; color: var(--ink-900); line-height: 1.3; margin: 0; }
.q-help { display: flex; align-items: flex-start; gap: 8px; padding: 12px 14px; background: var(--brand-50); border-left: 3px solid var(--brand-500); color: var(--brand-900); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: 14px; line-height: 1.5; }
.q-help svg { flex-shrink: 0; margin-top: 2px; color: var(--brand-600); }

.test-visual { display: grid; place-items: center; padding: 18px; background: var(--ink-50); border-radius: var(--r-md); min-height: 200px; }
.test-visual.dark { background: var(--ink-900); }
.landolt-0 img { transform: rotate(0deg); }
.landolt-1 img { transform: rotate(90deg); }
.landolt-2 img { transform: rotate(180deg); }
.landolt-3 img { transform: rotate(-90deg); }
.landolt-4 img { transform: rotate(-45deg); }
.landolt-5 img { transform: rotate(45deg); }
.landolt-6 img { transform: rotate(135deg); }
.landolt-7 img { transform: rotate(-135deg); }

.answers { display: flex; flex-direction: column; gap: 10px; }
.answer-btn { display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 14px 18px; background: var(--paper); border: 1.5px solid var(--ink-100); border-radius: var(--r-md); cursor: pointer; font-size: 16px; font-weight: 500; color: var(--ink-900); text-align: left; transition: border-color .1s, background .1s, transform .1s; }
.answer-btn:hover { border-color: var(--brand-300); background: var(--brand-50); }
.answer-btn:active { transform: scale(.99); }
.ans-icon { color: var(--brand-600); display: grid; place-items: center; }

.direction-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.dir-btn { min-height: 64px; display: grid; place-items: center; background: var(--paper); border: 1.5px solid var(--ink-100); border-radius: var(--r-md); cursor: pointer; color: var(--ink-700); transition: all .1s; }
.dir-btn:hover { border-color: var(--brand-500); color: var(--brand-600); background: var(--brand-50); }
.dir-btn.placeholder { background: transparent; border: none; cursor: default; }

.scale-row { display: flex; gap: 6px; flex-wrap: wrap; }
.scale-btn { flex: 1; min-width: 40px; min-height: var(--tap); background: var(--paper); border: 1.5px solid var(--ink-100); border-radius: var(--r-sm); cursor: pointer; font-size: 15px; font-weight: 600; color: var(--ink-700); }
.scale-btn:hover { border-color: var(--brand-500); color: var(--brand-600); }
.scale-btn.selected { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
.scale-caps { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-500); margin-top: 6px; }

.num-input { width: 100%; padding: 14px 16px; font-size: 18px; border: 1.5px solid var(--ink-100); border-radius: var(--r-md); background: var(--paper); }
.num-input:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(14, 165, 233, .15); }

.lead-form { display: flex; flex-direction: column; gap: 14px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 14px; font-weight: 500; color: var(--ink-700); }
.form-field input[type="text"], .form-field input[type="tel"], .form-field input[type="email"], .form-field input[type="password"], .form-field input[type="date"] { padding: 14px 16px; font-size: 16px; border: 1.5px solid var(--ink-100); border-radius: var(--r-md); background: var(--paper); }
.form-field input:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(14, 165, 233, .15); }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--ink-500); line-height: 1.4; }
.checkbox-row input { margin-top: 2px; flex-shrink: 0; width: 18px; height: 18px; accent-color: var(--brand-500); }

.result-hero { padding: 24px 22px; border-radius: var(--r-md); color: #fff; margin-bottom: 18px; display: flex; gap: 16px; align-items: center; }
.result-hero.level-0 { background: linear-gradient(135deg, #22c55e, #16a34a); }
.result-hero.level-1 { background: linear-gradient(135deg, #84cc16, #65a30d); }
.result-hero.level-2 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.result-hero.level-3 { background: linear-gradient(135deg, #ef4444, #dc2626); }
.result-icon-wrap { width: 64px; height: 64px; display: grid; place-items: center; background: rgba(255,255,255,.18); border-radius: var(--r-full); flex-shrink: 0; }
.result-hero .eyebrow { color: rgba(255,255,255,.85); margin: 0; }
.result-hero h1 { color: #fff; margin: 4px 0 0; font-size: 22px; }
.result-hero .lvl-label { font-size: 30px; font-weight: 700; letter-spacing: -.015em; margin-top: 2px; }
.result-msg { background: var(--ink-50); padding: 18px; border-radius: var(--r-md); color: var(--ink-700); font-size: 15px; line-height: 1.55; margin-bottom: 18px; }
.disclaimer { font-size: 12px; color: var(--ink-500); line-height: 1.5; padding: 12px; background: var(--ink-50); border-radius: var(--r-sm); margin-top: 14px; }

.success-wrap { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 40px 20px; flex: 1; justify-content: center; }
.success-icon { width: 96px; height: 96px; background: linear-gradient(135deg, var(--brand-500), var(--accent-500)); color: #fff; display: grid; place-items: center; border-radius: var(--r-full); margin-bottom: 10px; }

/* ===== DESKTOP SPLIT (quiz individual) ===== */
@media (min-width: 900px) {
  .app { max-width: 1100px; display: grid; grid-template-columns: 380px 1fr; min-height: 100vh; }
  .app-aside { background: linear-gradient(160deg, var(--brand-700), var(--brand-900)); color: #fff; padding: 36px 32px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
  .app-aside, .app-aside p, .app-aside li, .app-aside span, .app-aside small { color: #fff; }
  .app-aside a { color: var(--brand-100); }
  .app-aside .aside-logo { max-width: 180px; margin-bottom: 28px; filter: brightness(0) invert(1); opacity: .95; }
  .app-aside .aside-tagline { font-size: 18px; margin: 0 0 24px; line-height: 1.45; color: rgba(255,255,255,.92); }
  .app-aside .aside-list { display: flex; flex-direction: column; gap: 14px; list-style: none; padding: 0; margin: 0; }
  .app-aside .aside-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: rgba(255,255,255,.88); }
  .app-aside .aside-list svg { color: var(--brand-300); flex-shrink: 0; margin-top: 2px; }
  .app-aside .aside-footer { margin-top: auto; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.15); font-size: 12px; color: rgba(255,255,255,.7); }
  .app-aside .aside-footer strong { display: block; color: #fff; font-weight: 600; margin-bottom: 2px; }
  .app-main { display: flex; flex-direction: column; min-height: 100vh; max-width: 620px; width: 100%; }
  .app-header, .progress-shell { display: flex; }
}
@media (max-width: 899px) { .app-aside { display: none; } }

/* ===== LOGO ASSETS ===== */
.logo-img { height: 32px; width: auto; display: block; }
.logo-img-lg { height: 44px; }
.header-logo { display: flex; align-items: center; gap: 10px; }

/* ===== HUB: header + hero ===== */
.site-header { background: var(--paper); border-bottom: 1px solid var(--ink-100); padding: 16px 22px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 40; }
.site-header .header-logo img { height: 36px; }
.site-header-cta { font-size: 14px; color: var(--brand-700); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.site-header-cta:hover { text-decoration: underline; }

.hero { background: linear-gradient(135deg, var(--brand-700) 0%, var(--brand-900) 100%); color: #fff; padding: 48px 22px 70px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle at 80% 20%, rgba(20, 184, 166, .20) 0, transparent 50%), radial-gradient(circle at 20% 80%, rgba(125, 211, 252, .15) 0, transparent 50%); pointer-events: none; }
.hero-inner { position: relative; max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; }
@media (min-width: 860px) { .hero-inner { grid-template-columns: 1.15fr 1fr; padding: 20px 0; } }
.hero-text .eyebrow { background: rgba(255,255,255,.15); color: #fff; display: inline-block; padding: 5px 12px; border-radius: var(--r-full); font-size: 12px; font-weight: 600; letter-spacing: .06em; margin-bottom: 16px; }
.hero-text h1 { color: #fff; font-size: 34px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; margin-bottom: 14px; }
.hero-text h1 em { font-family: var(--font-display); font-style: italic; font-weight: 500; color: var(--brand-300); }
.hero-text p { color: rgba(255,255,255,.88); font-size: 17px; line-height: 1.55; max-width: 520px; margin-bottom: 22px; }
.hero-stats { display: flex; gap: 22px; margin-top: 22px; flex-wrap: wrap; }
.hero-stat .n { font-size: 26px; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.hero-stat .l { font-size: 12px; color: rgba(255,255,255,.7); text-transform: uppercase; letter-spacing: .05em; }
.hero-portrait { position: relative; border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.35); aspect-ratio: 4/5; max-width: 380px; margin-left: auto; }
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-portrait-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px; background: linear-gradient(transparent, rgba(12, 74, 110, .92)); color: #fff; font-size: 14px; }
.hero-portrait-caption strong { display: block; font-size: 15px; font-weight: 600; }
@media (max-width: 859px) { .hero-portrait { max-width: 320px; margin: 0 auto; aspect-ratio: 4/3; } }

/* ===== HUB: body ===== */
.hub { max-width: 1100px; margin: 0 auto; padding: 0 22px 60px; }
.hub-section { margin-top: 56px; }
.hub-section h2 { font-size: 24px; margin-bottom: 6px; }
.hub-section .section-kicker { font-size: 14px; color: var(--ink-500); margin-bottom: 22px; }

.hub-grid { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: -40px; position: relative; z-index: 2; }
@media (min-width: 640px) { .hub-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .hub-grid { grid-template-columns: 1fr 1fr 1fr; } }

.quiz-card { display: flex; flex-direction: column; padding: 22px; background: var(--paper); border: 1px solid var(--ink-100); border-radius: var(--r-md); text-decoration: none; transition: transform .15s, box-shadow .2s, border-color .15s; color: var(--ink-900); }
.quiz-card:hover { border-color: var(--brand-300); box-shadow: var(--sh-3); transform: translateY(-3px); text-decoration: none; color: var(--ink-900); }
.quiz-card .qc-icon { width: 48px; height: 48px; display: grid; place-items: center; background: var(--brand-100); color: var(--brand-600); border-radius: var(--r-sm); margin-bottom: 14px; }
.quiz-card h3 { font-size: 18px; margin-bottom: 6px; color: var(--ink-900); }
.quiz-card p { font-size: 14px; color: var(--ink-500); margin-bottom: 14px; }
.quiz-card .qc-meta { display: flex; gap: 14px; font-size: 12px; color: var(--ink-500); margin-top: auto; padding-top: 10px; border-top: 1px solid var(--ink-100); }
.quiz-card .qc-meta span { display: inline-flex; align-items: center; gap: 4px; }

.about-grid { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; }
@media (min-width: 760px) { .about-grid { grid-template-columns: 280px 1fr; gap: 36px; } }
.about-photo { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-2); aspect-ratio: 1/1; max-width: 280px; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-text h3 { font-size: 22px; margin-bottom: 10px; }
.about-text p { font-size: 15px; line-height: 1.65; }
.about-credentials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.about-credentials .cred { background: var(--brand-50); color: var(--brand-700); padding: 6px 12px; border-radius: var(--r-full); font-size: 12px; font-weight: 600; }

.units-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 720px) { .units-grid { grid-template-columns: 1fr 1fr; } }
.unit-card { border-radius: var(--r-md); overflow: hidden; background: var(--paper); box-shadow: var(--sh-1); border: 1px solid var(--ink-100); }
.unit-card img { width: 100%; height: 180px; object-fit: cover; display: block; }
.unit-card .unit-body { padding: 16px 18px; }
.unit-card h4 { font-size: 16px; margin: 0 0 4px; }
.unit-card p { font-size: 13px; color: var(--ink-500); margin: 0; }

.conversion-banner { background: linear-gradient(135deg, var(--brand-600), var(--accent-600)); color: #fff; padding: 32px 24px; border-radius: var(--r-lg); margin-top: 48px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; box-shadow: var(--sh-2); }
.conversion-banner h3 { color: #fff; font-size: 22px; margin: 0 0 4px; }
.conversion-banner p { color: rgba(255,255,255,.9); margin: 0; font-size: 15px; }
.conversion-banner .btn { background: #fff; color: var(--brand-700); }
.conversion-banner .btn:hover { background: var(--ink-50); }

/* ===== SITE FOOTER ===== */
.site-footer { background: var(--ink-900); color: rgba(255,255,255,.75); padding: 40px 22px 24px; margin-top: 80px; }
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; margin-bottom: 30px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.site-footer .footer-logo { height: 40px; margin-bottom: 14px; filter: brightness(0) invert(1); opacity: .95; }
.site-footer h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 10px; }
.site-footer p { color: rgba(255,255,255,.7); font-size: 14px; line-height: 1.6; margin: 0 0 8px; }
.site-footer a { color: rgba(255,255,255,.85); text-decoration: none; display: block; margin-bottom: 6px; font-size: 14px; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 18px; text-align: center; font-size: 12px; color: rgba(255,255,255,.5); }
