/* ==============================================
   QUIZ FUNNEL — Financial Assessment
   Built by Black7 / demosite.today
   ============================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #DBEAFE;
    --accent: #10B981;
    --accent-dark: #059669;
    --warning: #F59E0B;
    --danger: #EF4444;
    --dark: #0F172A;
    --slate: #334155;
    --muted: #64748B;
    --light: #F8FAFC;
    --white: #FFFFFF;
    --border: #E2E8F0;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    --radius: 12px;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--light);
    color: var(--slate);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Trust Bar */
.trust-bar {
    background: var(--dark);
    color: rgba(255,255,255,0.8);
    text-align: center;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
}
.trust-bar span { color: var(--accent); font-weight: 700; }

/* Header */
header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--dark);
    text-decoration: none;
}
.logo span { color: var(--primary); }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: var(--slate); text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--primary); }

/* Language Switcher */
.lang-switcher {
    position: relative;
    display: inline-block;
}
.lang-btn {
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    color: var(--slate);
}
.lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    min-width: 160px;
    margin-top: 4px;
}
.lang-dropdown.open { display: block; }
.lang-option {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s;
}
.lang-option:hover { background: var(--light); }
.lang-option:first-child { border-radius: 8px 8px 0 0; }
.lang-option:last-child { border-radius: 0 0 8px 8px; }

/* Hero / Landing */
.hero {
    text-align: center;
    padding: 60px 24px 40px;
    max-width: 720px;
    margin: 0 auto;
}
.hero-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}
.hero h1 {
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 900;
    color: var(--dark);
    line-height: 1.15;
    margin-bottom: 16px;
}
.hero h1 em { font-style: normal; color: var(--primary); }
.hero p {
    font-size: 18px;
    color: var(--muted);
    max-width: 560px;
    margin: 0 auto 32px;
    line-height: 1.7;
}
.hero-personalized {
    font-size: 15px;
    color: var(--accent-dark);
    font-weight: 600;
    margin-bottom: 12px;
}
.btn-start {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 18px 48px;
    border: none;
    border-radius: var(--radius);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-lg);
}
.btn-start:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}
.hero-meta {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 24px;
    font-size: 13px;
    color: var(--muted);
}
.hero-meta span { display: flex; align-items: center; gap: 6px; }

/* Social Proof Bar */
.social-proof {
    background: var(--white);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}
.proof-item { text-align: center; }
.proof-num { font-size: 24px; font-weight: 800; color: var(--dark); }
.proof-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }

/* Quiz Container */
.quiz-wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 40px 24px 80px;
    display: none;
}
.quiz-wrap.active { display: block; }

/* Progress Bar */
.progress-wrap { margin-bottom: 32px; }
.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}
.progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

/* Question Card */
.q-card {
    background: var(--white);
    border-radius: 16px;
    padding: 40px 32px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    animation: fadeIn 0.4s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.q-card h2 { font-size: 22px; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.q-card .q-sub { font-size: 14px; color: var(--muted); margin-bottom: 24px; }

/* Answer Options */
.options { display: flex; flex-direction: column; gap: 12px; }
.option {
    background: var(--light);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 500;
    color: var(--slate);
}
.option:hover { border-color: var(--primary); background: var(--primary-light); }
.option.selected { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
.option-icon { font-size: 22px; width: 36px; text-align: center; flex-shrink: 0; }
.option-letter {
    width: 28px; height: 28px; border-radius: 50%; background: var(--white);
    border: 2px solid var(--border); display: flex; align-items: center;
    justify-content: center; font-size: 12px; font-weight: 700;
    color: var(--muted); flex-shrink: 0; transition: all 0.2s;
}
.option.selected .option-letter { background: var(--primary); border-color: var(--primary); color: white; }

/* Navigation */
.q-nav { display: flex; justify-content: space-between; margin-top: 24px; }
.btn-back {
    background: none; border: 2px solid var(--border); color: var(--muted);
    padding: 12px 24px; border-radius: var(--radius); font-size: 15px;
    font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.btn-back:hover { border-color: var(--slate); color: var(--slate); }
.btn-next {
    background: var(--primary); color: white; border: none; padding: 12px 32px;
    border-radius: var(--radius); font-size: 15px; font-weight: 600;
    cursor: pointer; transition: all 0.3s; opacity: 0.5; pointer-events: none;
}
.btn-next.enabled { opacity: 1; pointer-events: auto; }
.btn-next.enabled:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* Consent / Lead Capture */
.consent-wrap { display: none; max-width: 560px; margin: 0 auto; padding: 40px 24px 80px; }
.consent-wrap.active { display: block; }
.consent-card {
    background: var(--white); border-radius: 16px; padding: 40px 32px;
    box-shadow: var(--shadow-lg); border: 1px solid var(--border); animation: fadeIn 0.4s ease;
}
.consent-card h2 { font-size: 24px; font-weight: 800; color: var(--dark); margin-bottom: 8px; text-align: center; }
.consent-sub { font-size: 14px; color: var(--muted); text-align: center; margin-bottom: 24px; }
.offer-count-badge {
    display: block; text-align: center; margin-bottom: 24px; font-size: 18px;
    font-weight: 700; color: var(--accent-dark);
}
.offer-preview { display: flex; gap: 12px; margin-bottom: 24px; justify-content: center; flex-wrap: wrap; }
.offer-preview-card {
    background: var(--light); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px; text-align: center; flex: 1; min-width: 140px; max-width: 180px;
    filter: blur(3px); transition: filter 0.3s;
}
.offer-preview-card .offer-icon { font-size: 28px; margin-bottom: 8px; }
.offer-preview-card .offer-name { font-size: 13px; font-weight: 600; color: var(--dark); }
.analyzing { text-align: center; padding: 20px 0; }
.analyzing .spinner {
    width: 40px; height: 40px; border: 4px solid var(--border);
    border-top: 4px solid var(--primary); border-radius: 50%;
    animation: spin 0.8s linear infinite; margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--slate); margin-bottom: 6px; }
.form-group input {
    width: 100%; padding: 14px 16px; border: 2px solid var(--border);
    border-radius: var(--radius); font-size: 15px; font-family: inherit;
    transition: border-color 0.2s; color: var(--dark);
}
.form-group input:focus { outline: none; border-color: var(--primary); }
.form-group input::placeholder { color: var(--muted); }
.consent-checkbox { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0 16px; }
.consent-checkbox input[type="checkbox"] {
    width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); flex-shrink: 0; cursor: pointer;
}
.consent-checkbox label { font-size: 12px; color: var(--muted); line-height: 1.5; cursor: pointer; }
.consent-checkbox label a { color: var(--primary); }
.btn-submit {
    width: 100%; background: var(--accent); color: white; border: none;
    padding: 16px; border-radius: var(--radius); font-size: 17px;
    font-weight: 700; cursor: pointer; transition: all 0.3s; margin-top: 8px;
    opacity: 0.5; pointer-events: none;
}
.btn-submit.enabled { opacity: 1; pointer-events: auto; }
.btn-submit.enabled:hover { background: var(--accent-dark); }
.form-disclaimer { font-size: 11px; color: var(--muted); text-align: center; margin-top: 12px; line-height: 1.5; }

/* Results Page */
.results-wrap { display: none; max-width: 720px; margin: 0 auto; padding: 40px 24px 80px; }
.results-wrap.active { display: block; }
.results-header { text-align: center; margin-bottom: 32px; animation: fadeIn 0.5s ease; }
.results-badge {
    display: inline-block; background: linear-gradient(135deg, var(--accent), #34D399);
    color: white; padding: 8px 20px; border-radius: 20px; font-size: 13px;
    font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px;
}
.results-header h2 { font-size: 28px; font-weight: 800; color: var(--dark); margin-bottom: 8px; }
.results-header p { color: var(--muted); font-size: 16px; }
.offers-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 32px; }
.offer-card {
    background: var(--white); border-radius: 16px; padding: 28px 24px;
    box-shadow: var(--shadow-lg); border: 1px solid var(--border);
    text-align: center; animation: fadeIn 0.5s ease; transition: transform 0.3s, box-shadow 0.3s;
}
.offer-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }
.offer-card .offer-icon { font-size: 40px; margin-bottom: 12px; }
.offer-card h3 { font-size: 18px; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.offer-card .offer-tagline { font-size: 14px; color: var(--accent-dark); font-weight: 600; margin-bottom: 12px; }
.offer-card .offer-desc { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 16px; }
.offer-features { list-style: none; padding: 0; text-align: left; margin-bottom: 20px; }
.offer-features li {
    padding: 6px 0; display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--slate);
}
.offer-features li::before { content: '✓'; color: var(--accent); font-weight: 700; }
.btn-offer {
    display: inline-block; background: var(--primary); color: white;
    padding: 14px 32px; border: none; border-radius: var(--radius);
    font-size: 15px; font-weight: 700; cursor: pointer; transition: all 0.3s;
    text-decoration: none; width: 100%;
}
.btn-offer:hover { background: var(--primary-dark); transform: translateY(-1px); }
.offer-urgency { margin-top: 12px; font-size: 12px; color: var(--danger); font-weight: 600; }

/* Returning visitor banner */
.welcome-back {
    display: none; background: linear-gradient(135deg, var(--primary-light), #C7D2FE);
    border: 1px solid var(--primary); border-radius: var(--radius);
    padding: 16px 20px; margin: -20px auto 24px; max-width: 640px;
    text-align: center; font-size: 14px; color: var(--primary-dark); font-weight: 500;
}

/* Footer */
footer {
    text-align: center; padding: 40px 24px; font-size: 12px;
    color: var(--muted); border-top: 1px solid var(--border);
}
footer a { color: var(--muted); }

/* Mobile */
@media (max-width: 600px) {
    .hero { padding: 40px 20px 30px; }
    .hero h1 { font-size: 26px; }
    .q-card, .consent-card { padding: 28px 20px; }
    .social-proof { gap: 20px; }
    .hero-meta { flex-direction: column; gap: 8px; }
    .offers-grid { grid-template-columns: 1fr; }
    .nav-links { gap: 12px; }
    header { flex-wrap: wrap; gap: 12px; }
}

.hidden { display: none !important; }
