/* =====================================================
   Hub4Max — Form Qualification
   Brand-aligned with Hub4Max Brand Book (dark, glass,
   electric blue + green + purple).
   ===================================================== */

:root {
    --bg: #050a14;
    --deep-blue: #0a1628;
    --electric-blue: #2563eb;
    --white: #ffffff;
    --green: #10b981;
    --orange: #f59e0b;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --gray-dark: #0f1729;
    --purple: #8b5cf6;
    --red: #ef4444;

    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-soft: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-border-hover: rgba(255, 255, 255, 0.12);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    --glass-blur: blur(20px);

    --shadow-glow-blue: 0 0 40px rgba(37, 99, 235, 0.25);
    --shadow-glow-green: 0 0 40px rgba(16, 185, 129, 0.25);

    --radius-card: 20px;
    --radius-btn: 14px;
    --radius-pill: 999px;

    --transition-fast: 200ms cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slide: 420ms cubic-bezier(0.16, 1, 0.3, 1);
    --container-max: 720px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--white);
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    position: relative;
}

/* ===== NOISE OVERLAY ===== */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
    opacity: 0.4;
}

/* ===== BACKGROUND ORBS / GRID ===== */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(37, 99, 235, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

.orb-1 {
    width: 460px;
    height: 460px;
    background: rgba(37, 99, 235, 0.18);
    top: -8%;
    left: -8%;
    animation: orbDrift1 25s ease-in-out infinite;
}

.orb-2 {
    width: 380px;
    height: 380px;
    background: rgba(16, 185, 129, 0.12);
    bottom: -6%;
    right: -10%;
    animation: orbDrift2 30s ease-in-out infinite;
}

.orb-3 {
    width: 320px;
    height: 320px;
    background: rgba(139, 92, 246, 0.12);
    top: 45%;
    left: 55%;
    animation: orbDrift3 22s ease-in-out infinite;
}

@keyframes orbDrift1 {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(60px, -40px); }
    50% { transform: translate(-30px, 50px); }
    75% { transform: translate(40px, 20px); }
}

@keyframes orbDrift2 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(-50px, 30px); }
    66% { transform: translate(40px, -60px); }
}

@keyframes orbDrift3 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(50px, -30px); }
}

/* ===== TOPBAR ===== */
.topbar {
    position: relative;
    z-index: 2;
    background: linear-gradient(180deg, rgba(10, 22, 40, 0.85) 0%, rgba(10, 22, 40, 0.55) 100%);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    padding: 16px 20px;
}

.topbar__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: space-between;
}

.topbar__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

/* ===== TICKER (breaking news style) ===== */
.ticker {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
    max-width: 560px;
    margin-left: auto;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.06), rgba(37, 99, 235, 0.04) 30%, transparent 100%);
    border: 1px solid rgba(239, 68, 68, 0.18);
    border-radius: 999px;
    padding: 4px 4px 4px 4px;
    height: 32px;
    overflow: hidden;
    position: relative;
}

.ticker__badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px 4px 10px;
    background: var(--red);
    color: var(--white);
    border-radius: 999px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    height: 22px;
    white-space: nowrap;
}

.ticker__pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.65);
    animation: tickerPulse 1.2s ease-out infinite;
    flex-shrink: 0;
}

@keyframes tickerPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
        transform: scale(1);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
        transform: scale(1.15);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
        transform: scale(1);
    }
}

.ticker__viewport {
    flex: 1;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.ticker__track {
    display: flex;
    align-items: center;
    gap: 14px;
    white-space: nowrap;
    width: max-content;
    animation: tickerScroll 38s linear infinite;
}

.ticker:hover .ticker__track {
    animation-play-state: paused;
}

.ticker__item {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-light);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ticker__sep {
    font-size: 6px;
    color: var(--electric-blue);
    line-height: 1;
    transform: translateY(-1px);
}

@keyframes tickerScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ===== LOGO (HUB4MAX angular type) ===== */
.logo {
    font-family: 'Clash Display', 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    transform: skewX(-5deg);
    display: inline-block;
    white-space: nowrap;
}

.logo .hub {
    -webkit-text-stroke: 1.5px var(--electric-blue);
    color: transparent;
}

.logo .four {
    color: var(--green);
    font-size: 150%;
    vertical-align: baseline;
    line-height: 0;
    position: relative;
    top: 0.05em;
    text-shadow: 0 0 24px rgba(16, 185, 129, 0.4),
        0 0 48px rgba(16, 185, 129, 0.18);
}

.logo .max {
    color: var(--white);
}

/* ===== BADGE HEX ICON ===== */
.badge-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    flex-shrink: 0;
}

.badge-icon .bi-outer {
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    background: linear-gradient(135deg, var(--electric-blue), var(--green), var(--purple));
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-icon .bi-inner {
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    background: linear-gradient(160deg, rgba(10, 22, 40, 0.96), var(--bg));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Clash Display', 'Inter', sans-serif;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.badge-icon .bi-inner .bi-4 {
    color: var(--green);
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.badge-icon.bi-32 .bi-outer {
    width: 32px;
    height: 32px;
    padding: 1.5px;
}

.badge-icon.bi-32 .bi-inner {
    width: 29px;
    height: 29px;
    font-size: 8px;
}

.badge-icon.bi-48 .bi-outer {
    width: 48px;
    height: 48px;
    padding: 2px;
}

.badge-icon.bi-48 .bi-inner {
    width: 44px;
    height: 44px;
    font-size: 12px;
}

.badge-icon.bi-64 .bi-outer {
    width: 64px;
    height: 64px;
    padding: 2px;
}

.badge-icon.bi-64 .bi-inner {
    width: 60px;
    height: 60px;
    font-size: 16px;
}

/* ===== PAGE LAYOUT ===== */
.page {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 56px 20px 24px;
    position: relative;
    z-index: 1;
}

/* ===== FORM CARD (glass) ===== */
.form-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-card);
    box-shadow: var(--glass-shadow);
    padding: clamp(20px, 4vw, 36px);
    position: relative;
    overflow: hidden;
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--electric-blue), var(--green), var(--purple));
    border-radius: var(--radius-card) var(--radius-card) 0 0;
    opacity: 0.7;
}

/* ===== PROGRESS ===== */
.progress {
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.progress__bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-pill);
    overflow: hidden;
    position: relative;
}

.progress__fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--electric-blue), var(--green));
    border-radius: var(--radius-pill);
    transition: width var(--transition-slide);
    box-shadow: 0 0 16px rgba(37, 99, 235, 0.5),
        0 0 32px rgba(16, 185, 129, 0.25);
}

.progress__label {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    text-align: right;
    font-size: 0.75rem;
    color: var(--gray);
    font-weight: 600;
    letter-spacing: 0.06em;
}

.progress__label strong {
    color: var(--white);
    font-weight: 700;
}

/* ===== STEP ===== */
.step {
    min-height: 280px;
    animation: slideIn var(--transition-slide);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question__title {
    font-family: 'Clash Display', 'Inter', sans-serif;
    font-weight: 700;
    font-size: clamp(1.25rem, 3.4vw, 1.625rem);
    color: var(--white);
    margin-bottom: 22px;
    line-height: 1.18;
    letter-spacing: -0.02em;
}

.question__title .optional {
    font-family: 'JetBrains Mono', monospace;
    color: var(--gray);
    font-weight: 500;
    font-size: 0.7em;
    letter-spacing: 0.04em;
}

/* ===== OPTIONS (radio cards) ===== */
.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    list-style: none;
}

.option {
    position: relative;
}

.option input[type='radio'],
.option input[type='checkbox'] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.option__label {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--glass-bg-soft);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 16px 18px;
    cursor: pointer;
    transition: border-color var(--transition-fast),
        background var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
    font-size: 0.95rem;
    color: var(--white);
    user-select: none;
    font-weight: 500;
}

.option__label:hover {
    border-color: rgba(37, 99, 235, 0.5);
    background: rgba(37, 99, 235, 0.06);
    transform: translateY(-1px);
}

.option__letter {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    background: rgba(37, 99, 235, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.7rem;
    color: var(--electric-blue);
    transition: background var(--transition-fast),
        color var(--transition-fast);
}

.option__text {
    flex: 1 1 auto;
    line-height: 1.35;
}

.option input:checked + .option__label {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(16, 185, 129, 0.1));
    border-color: transparent;
    box-shadow: 0 0 0 1px var(--electric-blue),
        0 8px 24px rgba(37, 99, 235, 0.18),
        0 0 32px rgba(16, 185, 129, 0.12);
    transform: translateY(-1px);
}

.option input:checked + .option__label .option__letter {
    background: linear-gradient(135deg, var(--electric-blue), var(--green));
    color: var(--white);
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.5);
}

.option input:focus-visible + .option__label {
    outline: 2px solid var(--electric-blue);
    outline-offset: 3px;
}

/* ===== TEXT INPUTS ===== */
.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field__group {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: var(--glass-bg-soft);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 4px 4px 4px 0;
    transition: border-color var(--transition-fast),
        background var(--transition-fast),
        box-shadow var(--transition-fast);
}

.field__group:focus-within {
    border-color: var(--electric-blue);
    background: rgba(37, 99, 235, 0.06);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18),
        0 8px 24px rgba(37, 99, 235, 0.12);
}

.field__prefix {
    display: flex;
    align-items: center;
    padding: 14px 14px 14px 18px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    color: var(--gray-light);
    font-weight: 600;
    border-right: 1px solid var(--glass-border);
    margin-right: 12px;
}

/* ===== COUNTRY PICKER (DDI + flag) ===== */
.country {
    position: relative;
    flex-shrink: 0;
    align-self: stretch;
    display: flex;
}

.country__trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    padding: 0 14px 0 16px;
    background: transparent;
    border: none;
    border-right: 1px solid var(--glass-border);
    margin-right: 12px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    color: var(--white);
    font-weight: 600;
    transition: background var(--transition-fast), color var(--transition-fast);
    border-radius: 12px 0 0 12px;
}

.country__trigger:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--white);
}

.country__trigger:focus-visible {
    outline: 2px solid var(--electric-blue);
    outline-offset: -2px;
    border-radius: 10px 0 0 10px;
}

.country__flag {
    font-size: 1.2rem;
    line-height: 1;
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
    display: inline-flex;
    align-items: center;
    filter: drop-shadow(0 0 6px rgba(37, 99, 235, 0.25));
}

.country__ddi {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--gray-light);
    font-weight: 600;
}

.country.is-open .country__ddi,
.country__trigger:hover .country__ddi {
    color: var(--white);
}

.country__chevron {
    color: var(--gray);
    transition: transform var(--transition-fast), color var(--transition-fast);
}

.country.is-open .country__chevron {
    transform: rotate(180deg);
    color: var(--electric-blue);
}

/* Menu */
.country__menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 50;
    width: 320px;
    max-width: 90vw;
    background: rgba(10, 22, 40, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55),
        0 0 32px rgba(37, 99, 235, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
    animation: countryMenuIn 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes countryMenuIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.country__search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--glass-border);
    color: var(--gray);
}

.country__search {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: var(--white);
    font-weight: 500;
}

.country__search::placeholder {
    color: var(--gray);
}

.country__list {
    max-height: 280px;
    overflow-y: auto;
    padding: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.country__list::-webkit-scrollbar {
    width: 6px;
}

.country__list::-webkit-scrollbar-track {
    background: transparent;
}

.country__list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 3px;
}

.country__option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: var(--white);
    text-align: left;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.country__option:hover {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.25);
}

.country__option.is-selected {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(16, 185, 129, 0.12));
    border-color: rgba(37, 99, 235, 0.4);
}

.country__option .country__flag {
    font-size: 1.15rem;
    flex-shrink: 0;
    filter: none;
}

.country__option .country__name {
    flex: 1;
    font-weight: 500;
    color: var(--white);
}

.country__option .country__ddi {
    color: var(--gray-light);
}

.country__option.is-selected .country__ddi {
    color: var(--green);
}

.country__option:focus-visible {
    outline: 2px solid var(--electric-blue);
    outline-offset: -2px;
}

.field__control {
    flex: 1;
    border: none;
    background: transparent;
    padding: 14px 18px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--white);
    outline: none;
    font-weight: 500;
}

.field__group .field__control {
    padding-left: 18px;
}

.field__group:has(.field__prefix) .field__control,
.field__group--with-country .field__control {
    padding-left: 0;
}

.field__control::placeholder {
    color: var(--gray);
    font-weight: 400;
}

.field__error {
    color: var(--red);
    font-size: 0.85rem;
    min-height: 1.2em;
    margin-top: 4px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.field__error:not(:empty)::before {
    content: '!';
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ===== ACTIONS / BUTTONS ===== */
.actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    flex: 1;
    padding: 16px 22px;
    border-radius: var(--radius-btn);
    border: 1px solid transparent;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform var(--transition-fast),
        box-shadow var(--transition-fast),
        background var(--transition-fast),
        border-color var(--transition-fast),
        opacity var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn:focus-visible {
    outline: 2px solid var(--electric-blue);
    outline-offset: 3px;
}

.btn--primary {
    background: linear-gradient(135deg, var(--electric-blue), var(--green));
    color: var(--white);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.32),
        0 0 40px rgba(16, 185, 129, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    border: none;
}

.btn--primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn--primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.42),
        0 0 50px rgba(16, 185, 129, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn--primary:hover:not(:disabled)::after {
    opacity: 1;
}

.btn--primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.btn--ghost {
    background: var(--glass-bg);
    color: var(--gray-light);
    border: 1px solid var(--glass-border);
    flex: 0 0 auto;
    min-width: 120px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.btn--ghost:hover {
    background: var(--glass-bg-soft);
    color: var(--white);
    border-color: var(--glass-border-hover);
    transform: translateY(-1px);
}

.btn--cta-secondary {
    background: rgba(245, 158, 11, 0.08);
    color: var(--orange);
    border: 1px solid rgba(245, 158, 11, 0.3);
    width: 100%;
    flex: none;
    margin-top: 16px;
}

.btn--cta-secondary:hover {
    background: rgba(245, 158, 11, 0.14);
    color: var(--orange);
    border-color: rgba(245, 158, 11, 0.5);
    transform: translateY(-1px);
}

/* ===== INTRO STEP ===== */
.intro__heading {
    font-family: 'Clash Display', 'Inter', sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 4vw, 2rem);
    line-height: 1.1;
    color: var(--white);
    margin-bottom: 18px;
    letter-spacing: -0.02em;
}

.intro__heading .grad-text {
    background: linear-gradient(135deg, var(--electric-blue), var(--green));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.intro__paragraph {
    color: var(--gray-light);
    font-size: 0.95rem;
    margin-bottom: 12px;
    line-height: 1.7;
}

.intro__paragraph strong {
    color: var(--white);
    font-weight: 600;
}

.intro__pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.intro__pillar {
    background: var(--glass-bg-soft);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.intro__pillar:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
}

.intro__pillar-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.intro__pillar-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--white);
}

.intro__bullet {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(16, 185, 129, 0.06));
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 14px;
    padding: 16px 18px;
    margin-top: 18px;
    color: var(--white);
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.5;
}

.intro__bullet svg {
    flex: 0 0 auto;
    margin-top: 2px;
}

.intro__bullet strong {
    color: var(--green);
    font-weight: 700;
}

/* ===== INTERMEDIATE STEP ===== */
.intermediate {
    text-align: center;
    padding: 12px 4px;
}

.intermediate__icon {
    margin: 0 auto 22px;
    display: flex;
    justify-content: center;
}

.intermediate__title {
    font-family: 'Clash Display', 'Inter', sans-serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 3.6vw, 1.85rem);
    color: var(--white);
    line-height: 1.18;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.intermediate__title .grad-text {
    background: linear-gradient(135deg, var(--electric-blue), var(--green));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.intermediate__subtitle {
    color: var(--gray-light);
    font-size: 0.95rem;
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ===== FINAL STEP (success) ===== */
.final {
    text-align: center;
    padding: 12px 4px;
}

.final__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(37, 99, 235, 0.12));
    border: 1px solid rgba(16, 185, 129, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 32px rgba(16, 185, 129, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.final__title {
    font-family: 'Clash Display', 'Inter', sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--white);
    line-height: 1.18;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.final__title .grad-text {
    background: linear-gradient(135deg, var(--electric-blue), var(--green));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.final__subtitle {
    color: var(--gray-light);
    font-size: 0.95rem;
    max-width: 460px;
    margin: 0 auto 24px;
    line-height: 1.65;
}

.final__metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 460px;
    margin: 0 auto 12px;
    text-align: left;
}

.final__metric {
    background: var(--glass-bg-soft);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 14px;
}

.final__metric-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--gray);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.final__metric-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
}

/* ===== REASSURANCE ===== */
.reassurance {
    text-align: center;
    margin-top: 32px;
    padding: 4px 12px;
}

.reassurance__title {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--gray-light);
    max-width: 460px;
    margin: 0 auto;
}

.reassurance__title strong {
    color: var(--white);
    font-weight: 600;
}

/* ===== MOBILE OPTIMIZATIONS ===== */
/* Card da pesquisa precisa estar visível na primeira dobra mobile */
@media (max-width: 640px) {
    /* Topbar mais compacta */
    .topbar {
        padding: 8px 12px;
    }
    .ticker {
        max-width: 240px;
        height: 28px;
        gap: 8px;
        padding: 3px;
    }
    .ticker__badge {
        font-size: 8px;
        padding: 3px 9px 3px 8px;
        height: 20px;
        letter-spacing: 0.1em;
        gap: 5px;
    }
    .ticker__pulse {
        width: 5px;
        height: 5px;
    }
    .ticker__item {
        font-size: 9.5px;
        letter-spacing: 0.06em;
    }
    .ticker__track {
        animation-duration: 28s;
    }

    /* Page com padding vertical reduzido pra subir o card */
    .page {
        padding: 14px 16px 12px;
    }

    /* Form card mais aproveitado */
    .form-card {
        padding: 18px 16px;
        border-radius: 16px;
    }
    .progress {
        margin-bottom: 18px;
        gap: 8px;
    }
    .progress__label {
        font-size: 0.7rem;
    }

    /* Step + título da pergunta */
    .step {
        min-height: 220px;
    }
    .question__title {
        font-size: clamp(1.1rem, 4.6vw, 1.4rem);
        margin-bottom: 16px;
        line-height: 1.22;
    }

    /* Inputs com tamanho mínimo confortável (44px touch target) */
    .field__group {
        border-radius: 12px;
    }
    .field__control {
        padding: 14px 16px;
        font-size: 16px; /* evita zoom auto do iOS */
    }

    /* Country picker */
    .country__trigger {
        padding: 0 10px 0 12px;
        gap: 6px;
        margin-right: 8px;
        font-size: 0.85rem;
    }
    .country__flag {
        font-size: 1.05rem;
    }
    .country__ddi {
        font-size: 0.82rem;
    }
    .country__menu {
        width: calc(100vw - 48px);
        max-width: 380px;
    }
    .country__list {
        max-height: 240px;
    }

    /* Options touch-friendly */
    .options {
        gap: 8px;
    }
    .option__label {
        padding: 14px 14px;
        font-size: 0.92rem;
        gap: 12px;
    }
    .option__letter {
        width: 26px;
        height: 26px;
        font-size: 0.65rem;
    }

    /* Botões empilhados (voltar pequeno em cima) ou row compacto */
    .actions {
        gap: 10px;
        margin-top: 22px;
    }
    .btn {
        padding: 14px 18px;
        font-size: 0.8rem;
        letter-spacing: 0.04em;
    }
    .btn--ghost {
        min-width: 88px;
        padding: 14px 14px;
    }

    /* Intro step compacto */
    .intro__heading {
        font-size: clamp(1.3rem, 5vw, 1.7rem);
        margin-bottom: 14px;
    }
    .intro__paragraph {
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: 10px;
    }
    .intro__pillars {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin: 14px 0;
    }
    .intro__pillar {
        padding: 10px 12px;
    }
    .intro__pillar-num {
        font-size: 0.7rem;
    }
    .intro__pillar-text {
        font-size: 0.8rem;
    }
    .intro__bullet {
        padding: 12px 14px;
        font-size: 0.85rem;
        margin-top: 14px;
    }

    /* Intermediate */
    .intermediate {
        padding: 6px 0;
    }
    .intermediate__icon {
        margin-bottom: 16px;
    }
    .intermediate__title {
        font-size: clamp(1.25rem, 5vw, 1.6rem);
    }
    .intermediate__subtitle {
        font-size: 0.9rem;
    }

    /* Final */
    .final {
        padding: 6px 0;
    }
    .final__icon {
        width: 64px;
        height: 64px;
        margin-bottom: 16px;
    }
    .final__icon svg {
        width: 32px;
        height: 32px;
    }
    .final__title {
        font-size: clamp(1.35rem, 5.5vw, 1.85rem);
    }
    .final__subtitle {
        font-size: 0.9rem;
        margin-bottom: 18px;
    }
    .final__metrics {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .final__metric {
        padding: 10px 12px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .final__metric-label {
        margin-bottom: 0;
    }
    .final__metric-value {
        font-size: 0.9rem;
    }

    /* Reassurance compacto */
    .reassurance {
        margin-top: 22px;
    }
    .reassurance__title {
        font-size: 0.82rem;
    }

    /* Reduz orbs no mobile (perf + foco) */
    .orb-1 { width: 280px; height: 280px; }
    .orb-2 { width: 240px; height: 240px; }
    .orb-3 { width: 220px; height: 220px; }
}

/* Tela bem pequena (ex.: iPhone SE) */
@media (max-width: 380px) {
    .ticker {
        max-width: 180px;
    }
    .ticker__badge {
        font-size: 7px;
        padding: 3px 7px 3px 6px;
        letter-spacing: 0.08em;
    }
    .ticker__item {
        font-size: 9px;
    }
    .form-card {
        padding: 16px 14px;
    }
    .country__trigger {
        padding: 0 8px 0 10px;
    }
    .btn {
        font-size: 0.75rem;
        padding: 13px 14px;
    }
}

/* ===== UTILITIES ===== */
[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
