/* ============================================================
   RESET
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    height: 100%;
}
body {
    height: 100%;
    overflow: hidden;
    font-family: "Inter", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}
button {
    cursor: pointer;
    border: none;
    background: none;
    font: inherit;
    color: inherit;
}
input,
textarea,
select {
    font: inherit;
}
label {
    cursor: pointer;
}
a {
    color: inherit;
}

/* ============================================================
   CSS CUSTOM PROPERTIES — LIGHT THEME (default)
   ============================================================ */
:root[data-theme="light"] {
    --bg: #f0ebe0;
    --navy: #1a2040;
    --text: #2c2820;
    --muted: #8a8075;
    --border: #ddd6cc;
    --card: rgba(255, 255, 255, 0.65);
    --card-sel: rgba(184, 145, 58, 0.12);
    --gold: #b8913a;
    --gold-h: #9a7830;
    --glow: rgba(184, 145, 58, 0.28);
    --orb-1: rgba(196, 154, 60, 0.32);
    --orb-2: rgba(0, 91, 187, 0.22);
    --orb-3: rgba(0, 51, 153, 0.14);
    color-scheme: light;
}

/* ============================================================
   CSS CUSTOM PROPERTIES — DARK THEME
   ============================================================ */
:root[data-theme="dark"] {
    --bg: #111318;
    --navy: #f0ede6;
    --text: #ddd8d0;
    --muted: #7a7570;
    --border: rgba(255, 255, 255, 0.09);
    --card: rgba(255, 255, 255, 0.055);
    --card-sel: rgba(224, 178, 78, 0.14);
    --gold: #e0b24e;
    --gold-h: #c89a38;
    --glow: rgba(224, 178, 78, 0.22);
    --orb-1: rgba(224, 178, 78, 0.28);
    --orb-2: rgba(0, 100, 220, 0.22);
    --orb-3: rgba(100, 180, 255, 0.12);
    color-scheme: dark;
}

/* ============================================================
   ANIMATED MESH-GRADIENT BACKGROUND
   ============================================================ */
.bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: var(--bg);
    overflow: hidden;
    transition: background 0.45s ease;
}

.orb {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
    pointer-events: none;
}

.orb-1 {
    width: 65vmax;
    height: 65vmax;
    top: -22vmax;
    left: -12vmax;
    background: radial-gradient(circle, var(--orb-1) 0%, transparent 68%);
    animation: driftOrb1 20s ease-in-out infinite alternate;
}

.orb-2 {
    width: 52vmax;
    height: 52vmax;
    bottom: -14vmax;
    right: -6vmax;
    background: radial-gradient(circle, var(--orb-2) 0%, transparent 68%);
    animation: driftOrb2 24s ease-in-out infinite alternate;
}

.orb-3 {
    width: 42vmax;
    height: 42vmax;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--orb-3) 0%, transparent 68%);
    animation: driftOrb3 28s ease-in-out infinite alternate;
}

@keyframes driftOrb1 {
    from {
        transform: translate(0, 0) scale(1);
    }
    to {
        transform: translate(9vw, 7vh) scale(1.14);
    }
}
@keyframes driftOrb2 {
    from {
        transform: translate(0, 0) scale(1);
    }
    to {
        transform: translate(-8vw, -6vh) scale(1.1);
    }
}
@keyframes driftOrb3 {
    from {
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        transform: translate(calc(-50% + 7vw), calc(-50% - 5vh)) scale(1.16);
    }
}

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */
.theme-btn {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 100;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition:
        border-color 0.3s,
        background 0.3s,
        transform 0.2s,
        box-shadow 0.3s;
    overflow: hidden;
}
.theme-btn:hover {
    transform: scale(1.1);
    border-color: var(--gold);
    box-shadow: 0 2px 14px var(--glow);
}
.theme-btn:active {
    transform: scale(0.93);
}

.icon-sun,
.icon-moon {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        opacity 0.32s ease,
        transform 0.32s ease;
}

/* Dark mode → show sun (to switch to light) */
[data-theme="dark"] .icon-sun {
    opacity: 1;
    transform: rotate(0deg);
}
[data-theme="dark"] .icon-moon {
    opacity: 0;
    transform: rotate(-90deg);
}
/* Light mode → show moon (to switch to dark) */
[data-theme="light"] .icon-sun {
    opacity: 0;
    transform: rotate(90deg);
}
[data-theme="light"] .icon-moon {
    opacity: 1;
    transform: rotate(0deg);
}

/* ============================================================
   SHELL / LAYOUT
   ============================================================ */
.shell {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100dvh;
    padding: 0 16px;
}

.inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 820px;
    height: 100dvh;
    padding: 24px 0 28px;
}

/* ============================================================
   HEADER
   ============================================================ */
.q-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    margin-bottom: 18px;
}

.q-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color 0.4s;
}

/* ============================================================
   STEP DOTS
   ============================================================ */
.step-dots {
    display: flex;
    align-items: center;
    gap: 7px;
}

.dot {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 99px;
    background: var(--border);
    transition:
        width 0.38s cubic-bezier(0.34, 1.2, 0.64, 1),
        background 0.38s ease,
        opacity 0.38s ease;
}
.dot--active {
    width: 22px;
    background: var(--gold);
}
.dot--done {
    background: var(--gold);
    opacity: 0.5;
}

/* ============================================================
   STAGES CONTAINER
   ============================================================ */
.stages {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 0;
}

/* ============================================================
   STAGE
   ============================================================ */
.stage {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 0 6px;
}
.stage.active {
    display: flex;
}

/* ── Direction-aware enter transitions ── */
[data-dir="fwd"] .stage.active {
    animation: enterFwd 0.42s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}
[data-dir="bwd"] .stage.active {
    animation: enterBwd 0.42s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}

@keyframes enterFwd {
    from {
        opacity: 0;
        transform: translateX(48px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes enterBwd {
    from {
        opacity: 0;
        transform: translateX(-48px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ── Individual element stagger on stage enter ── */
.stage.active .stage-illo {
    animation: illoIn 0.5s 0s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}
.stage.active .heading {
    animation: cardIn 0.4s 0.04s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}
/* Cards stagger (covers both .grid--2 and .grid--3 children) */
.stage.active .card:nth-child(1) {
    animation: cardIn 0.4s 0.06s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}
.stage.active .card:nth-child(2) {
    animation: cardIn 0.4s 0.11s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}
.stage.active .card:nth-child(3) {
    animation: cardIn 0.4s 0.16s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}
.stage.active .card:nth-child(4) {
    animation: cardIn 0.4s 0.21s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}
.stage.active .card:nth-child(5) {
    animation: cardIn 0.4s 0.26s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}
.stage.active .card:nth-child(6) {
    animation: cardIn 0.4s 0.31s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}
.stage.active .card:nth-child(7) {
    animation: cardIn 0.4s 0.36s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}
/* Form group children stagger (step 4) */
.stage.active .form-group > *:nth-child(1) {
    animation: cardIn 0.4s 0.08s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}
.stage.active .form-group > *:nth-child(2) {
    animation: cardIn 0.4s 0.13s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}
.stage.active .form-group > *:nth-child(3) {
    animation: cardIn 0.4s 0.18s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}
.stage.active .form-group > *:nth-child(4) {
    animation: cardIn 0.4s 0.23s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}
.stage.active .form-group > *:nth-child(5) {
    animation: cardIn 0.4s 0.28s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}

@keyframes illoIn {
    from {
        opacity: 0;
        transform: translateY(-14px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================================
   ILLUSTRATION — floating animation
   ============================================================ */
.stage-illo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stage-illo svg {
    animation: float 4s ease-in-out infinite;
    filter: drop-shadow(0 6px 18px var(--glow));
    transition: filter 0.4s;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-7px);
    }
}

/* ============================================================
   HEADING
   ============================================================ */
.heading {
    font-size: clamp(20px, 3.6vw, 30px);
    font-weight: 700;
    letter-spacing: -0.022em;
    line-height: 1.25;
    text-align: center;
    color: var(--navy);
    transition: color 0.4s;
    flex-shrink: 0;
}

/* ============================================================
   GRID
   ============================================================ */
.grid {
    display: grid;
    width: 100%;
    gap: 11px;
}
.grid--2 {
    grid-template-columns: 1fr 1fr;
}
.grid--3 {
    grid-template-columns: 1fr 1fr 1fr;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition:
        background 0.22s ease,
        border-color 0.22s ease,
        transform 0.22s cubic-bezier(0.34, 1.2, 0.64, 1),
        box-shadow 0.22s ease;
}

.card input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--gold);
    background: var(--card-sel);
    box-shadow: 0 4px 22px var(--glow);
}

.card:has(input:checked) {
    border-color: var(--gold);
    background: var(--card-sel);
    box-shadow:
        0 0 0 3px var(--glow),
        0 4px 20px rgba(0, 0, 0, 0.05);
}
.card:has(input:checked):hover {
    transform: translateY(-2px);
}

/* ── Radio dot ── */
.card-dot {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        border-color 0.22s,
        background 0.22s,
        box-shadow 0.22s;
}
.card-dot::after {
    content: "";
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    opacity: 0;
    transform: scale(0.4);
    transition:
        opacity 0.2s,
        transform 0.2s;
}

.card:has(input[type="radio"]:checked) .card-dot {
    border-color: var(--gold);
    background: var(--gold);
    box-shadow: 0 0 0 3px var(--glow);
}
.card:has(input[type="radio"]:checked) .card-dot::after {
    opacity: 1;
    transform: scale(1);
}

/* ── Checkbox dot ── */
.card-dot--check {
    border-radius: 6px;
}
.card-dot--check::after {
    width: 5px;
    height: 9px;
    border-radius: 0;
    background: transparent;
    border: 2.5px solid #fff;
    border-top: none;
    border-left: none;
    transform: scale(0.4) rotate(45deg);
    transition:
        opacity 0.2s,
        transform 0.2s;
}

.card:has(input[type="checkbox"]:checked) .card-dot--check {
    border-color: var(--gold);
    background: var(--gold);
    box-shadow: 0 0 0 3px var(--glow);
}
.card:has(input[type="checkbox"]:checked) .card-dot--check::after {
    opacity: 1;
    transform: scale(1) rotate(45deg);
}

/* ── Card text ── */
.card-text {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--text);
    transition: color 0.22s;
    display: flex;
    align-items: center;
    gap: 7px;
}

/* ── Custom "Свій варіант" row ── */
.custom-row {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card--custom {
    /* дашевая граница чтобы отличалась визуально */
    border-style: dashed;
}
.card--custom:has(input:checked) {
    border-style: solid;
}

/* Обёртка для анимации высоты */
.custom-field-wrap {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.custom-row:has(input:checked) .custom-field-wrap {
    grid-template-rows: 1fr;
}
.custom-field-wrap > .custom-field {
    min-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition:
        opacity 0.25s ease 0.05s,
        transform 0.25s ease 0.05s;
}
.custom-row:has(input:checked) .custom-field-wrap > .custom-field {
    opacity: 1;
    transform: translateY(0);
}
.custom-field:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--glow);
}
.card:has(input:checked) .card-text {
    color: var(--gold);
}

/* ── Ripple ── */
.ripple {
    position: absolute;
    border-radius: 50%;
    width: 10px;
    height: 10px;
    background: var(--glow);
    pointer-events: none;
    animation: rippleOut 0.55s ease-out forwards;
}
@keyframes rippleOut {
    from {
        transform: scale(1);
        opacity: 0.7;
    }
    to {
        transform: scale(80);
        opacity: 0;
    }
}

/* ============================================================
   FORM — FIELDS
   ============================================================ */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 11px;
    width: 100%;
    max-width: 480px;
}

.field {
    width: 100%;
    padding: 13px 16px;
    font-size: 15px;
    font-weight: 400;
    color: var(--text);
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    outline: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition:
        border-color 0.25s,
        box-shadow 0.25s,
        background 0.25s;
    -webkit-appearance: none;
}
.field::placeholder {
    color: var(--muted);
}
.field:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--glow);
    background: var(--card-sel);
}

/* ── Country / phone row ── */
.phone-grid {
    display: grid;
    grid-template-columns: minmax(190px, 220px) 1fr;
    gap: 11px;
    width: 100%;
}

.country-select-wrap {
    position: relative;
}
.country-select-wrap::after {
    content: "▾";
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: var(--gold);
    font-size: 13px;
    font-weight: 700;
    pointer-events: none;
}

.country-field {
    padding-right: 34px;
    font-weight: 600;
}

.phone-field {
    min-width: 0;
}

.phone-note {
    font-size: 12px;
    line-height: 1.4;
    color: var(--muted);
    transition: color 0.25s;
}

.field--textarea {
    min-height: 92px;
    line-height: 1.45;
    resize: vertical;
}

/* ── Legacy phone wrapper ── */
.phone-wrap {
    display: flex;
    align-items: center;
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition:
        border-color 0.25s,
        box-shadow 0.25s;
}
.phone-wrap:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--glow);
}

.phone-prefix {
    padding: 13px 10px 13px 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--gold);
    border-right: 1.5px solid var(--border);
    white-space: nowrap;
    user-select: none;
    -webkit-user-select: none;
    flex-shrink: 0;
    transition:
        color 0.4s,
        border-color 0.4s;
}

.phone-wrap .field.phone-field {
    border: none;
    border-radius: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: transparent;
    box-shadow: none;
}
.phone-wrap .field.phone-field:focus {
    border: none;
    box-shadow: none;
    background: transparent;
}

/* ── Contact-method chips ── */
.chips {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.chip {
    display: flex;
    align-items: stretch;
    cursor: pointer;
}
.chip input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.chip span {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--card);
    color: var(--muted);
    transition:
        border-color 0.2s,
        background 0.2s,
        color 0.2s,
        box-shadow 0.2s,
        transform 0.15s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    white-space: nowrap;
}
.chip:hover span {
    transform: translateY(-2px);
}

/* Brand hover colours */
.chip--wa:hover span {
    border-color: #25d366;
    color: #25d366;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.22);
    background: rgba(37, 211, 102, 0.08);
}
.chip--tg:hover span {
    border-color: #2aabee;
    color: #2aabee;
    box-shadow: 0 4px 16px rgba(42, 171, 238, 0.22);
    background: rgba(42, 171, 238, 0.08);
}
.chip--vb:hover span {
    border-color: #7360f2;
    color: #7360f2;
    box-shadow: 0 4px 16px rgba(115, 96, 242, 0.22);
    background: rgba(115, 96, 242, 0.08);
}
.chip--call:hover span {
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 4px 16px var(--glow);
    background: var(--card-sel);
}

/* Brand selected colours */
.chip--wa:has(input:checked) span {
    border-color: #25d366;
    background: #25d366;
    color: #fff;
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.38);
}
.chip--tg:has(input:checked) span {
    border-color: #2aabee;
    background: #2aabee;
    color: #fff;
    box-shadow: 0 4px 18px rgba(42, 171, 238, 0.38);
}
.chip--vb:has(input:checked) span {
    border-color: #7360f2;
    background: #7360f2;
    color: #fff;
    box-shadow: 0 4px 18px rgba(115, 96, 242, 0.38);
}
.chip--call:has(input:checked) span {
    border-color: var(--gold);
    background: var(--gold);
    color: #fff;
    box-shadow: 0 4px 18px var(--glow);
}

/* Mobile: 2x2 grid */
@media (max-width: 480px) {
    .chips {
        grid-template-columns: repeat(2, 1fr);
    }

    .phone-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   ERROR MESSAGE
   ============================================================ */
.error-msg {
    flex-shrink: 0;
    height: 18px;
    margin: 5px 0 3px;
    font-size: 13px;
    font-weight: 500;
    color: #c0392b;
    text-align: center;
    opacity: 0;
    transform: translateY(5px);
    transition:
        opacity 0.25s,
        transform 0.25s;
    pointer-events: none;
}
.error-msg.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   BOTTOM BAR
   ============================================================ */
.q-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}

/* ── Progress ── */
.progress-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.progress-bar {
    flex: 1;
    height: 5px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
    transition: background 0.4s;
}
.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold-h), var(--gold), #e2c060);
    border-radius: 99px;
    box-shadow: 0 0 14px var(--glow);
    transition:
        background 0.4s,
        box-shadow 0.4s;
    /* width is animated via JS (requestAnimationFrame) */
}

.progress-pct {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    min-width: 33px;
    text-align: right;
    transition: color 0.4s;
    font-variant-numeric: tabular-nums;
}

/* ── Navigation group ── */
.nav-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.enter-hint {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    transition: color 0.4s;
}

/* ── Back button ── */
.btn-back {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    flex-shrink: 0;
    transition:
        border-color 0.25s,
        background 0.25s,
        transform 0.2s,
        box-shadow 0.25s,
        visibility 0s;
}
.btn-back:hover {
    border-color: var(--gold);
    transform: scale(1.08);
    box-shadow: 0 2px 14px var(--glow);
}
.btn-back:active {
    transform: scale(0.93);
}

/* ── Next / Submit button ── */
.btn-next {
    height: 42px;
    padding: 0 26px;
    border-radius: 999px;
    background: var(--gold);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    box-shadow: 0 2px 18px var(--glow);
    transition:
        background 0.25s,
        transform 0.2s,
        box-shadow 0.25s,
        opacity 0.25s;
}
.btn-next:hover {
    background: var(--gold-h);
    transform: translateY(-1px);
    box-shadow: 0 4px 24px var(--glow);
}
.btn-next:active {
    transform: scale(0.95);
}
.btn-next:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* ============================================================
   SUCCESS SCREEN
   ============================================================ */
.success-screen {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    transition: background 0.4s;
}
.success-screen.visible {
    display: flex;
}

.confetti-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 2;
}

.success-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 48px 44px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: 24px;
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.12);
    animation: successCardIn 0.6s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}
@keyframes successCardIn {
    from {
        opacity: 0;
        transform: scale(0.82) translateY(22px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.success-illo {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Animated checkmark ── */
.checkmark-circle {
    stroke-dasharray: 276.5;
    stroke-dashoffset: 276.5;
    animation: drawCircle 0.72s 0.18s ease-out forwards;
}
.checkmark-check {
    stroke-dasharray: 80;
    stroke-dashoffset: 80;
    animation: drawCheck 0.48s 0.88s ease-out forwards;
}
@keyframes drawCircle {
    to {
        stroke-dashoffset: 0;
    }
}
@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

.success-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.022em;
    color: var(--navy);
    transition: color 0.4s;
}
.success-sub {
    font-size: 15px;
    line-height: 1.55;
    color: var(--muted);
    transition: color 0.4s;
}

/* ============================================================
   CONFETTI
   ============================================================ */
.confetti-piece {
    position: absolute;
    top: -10px;
    border-radius: 2px;
    animation: confettiFall linear forwards;
}
@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg) scaleX(1);
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: translateY(105vh) rotate(540deg) scaleX(-1);
        opacity: 0;
    }
}

/* ============================================================
   RESPONSIVE — TABLET ≤ 700px
   ============================================================ */
@media (max-width: 700px) {
    .grid--3 {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================================
   RESPONSIVE — MOBILE ≤ 480px
   ============================================================ */
@media (max-width: 480px) {
    .inner {
        padding: 18px 0 20px;
    }
    .q-header {
        margin-bottom: 12px;
    }
    .heading {
        font-size: 19px;
    }
    .stage {
        gap: 12px;
    }
    .stage-illo svg {
        width: 90px;
        height: 90px;
    }

    .grid--2,
    .grid--3 {
        grid-template-columns: 1fr 1fr;
        gap: 9px;
    }
    .card {
        padding: 12px 13px;
    }
    .card-text {
        font-size: 13px;
    }

    .enter-hint {
        display: none;
    }

    /* Remove heavy blur on mobile for performance */
    .card,
    .btn-back,
    .theme-btn,
    .phone-wrap,
    .field {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

/* ============================================================
   RESPONSIVE — VERY SMALL ≤ 360px
   ============================================================ */
@media (max-width: 360px) {
    .grid--2,
    .grid--3 {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .heading {
        font-size: 17px;
    }
    .stage {
        gap: 9px;
    }
    .stage-illo svg {
        width: 70px;
        height: 70px;
    }
    .card {
        padding: 10px 12px;
    }
    .inner {
        padding: 14px 0 16px;
    }
}

/* ============================================================
   INTRO SCREEN
   ============================================================ */

/* Hide quiz until intro is dismissed */
.shell.quiz-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px) scale(0.98);
}
.shell.quiz-visible {
    animation: quizReveal 0.55s cubic-bezier(0.34, 1.15, 0.64, 1) forwards;
}
@keyframes quizReveal {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Intro base */
.intro {
    position: fixed;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 24px;
    animation: introEnter 0.7s cubic-bezier(0.34, 1.1, 0.64, 1) both 0.05s;
}
@keyframes introEnter {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.intro.intro--exit {
    animation: introExit 0.45s ease forwards;
    pointer-events: none;
}
@keyframes introExit {
    to {
        opacity: 0;
        transform: translateY(-32px) scale(0.97);
    }
}

/* Inner two-column grid */
.intro-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px 56px;
    align-items: center;
    max-width: 900px;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* ── Left: content ── */
.intro-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
}

.intro-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gold);
    background: var(--card);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 99px;
    backdrop-filter: blur(6px);
    animation: itemIn 0.5s ease both 0.2s;
}

.intro-title {
    font-size: clamp(34px, 5vw, 54px);
    font-weight: 800;
    line-height: 1.12;
    color: var(--navy);
    letter-spacing: -0.02em;
    animation: itemIn 0.55s ease both 0.32s;
}

.intro-accent {
    background: linear-gradient(
        135deg,
        #005bbb 0%,
        #4a9fe8 20%,
        var(--gold) 45%,
        #ffd700 60%,
        var(--gold) 80%,
        #005bbb 100%
    );
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation:
        itemIn 0.55s ease both 0.32s,
        accentShimmer 6s linear infinite 1.2s;
}
@keyframes accentShimmer {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 300% center;
    }
}

.intro-sub {
    font-size: clamp(15px, 2vw, 17px);
    color: var(--muted);
    line-height: 1.65;
    max-width: 400px;
    animation: itemIn 0.5s ease both 0.44s;
}

/* Colored badge pills */
.intro-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    animation: itemIn 0.5s ease both 0.54s;
}
.i-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition:
        transform 0.18s,
        box-shadow 0.18s;
}
.i-badge:hover {
    transform: translateY(-2px);
}
.i-badge--green {
    background: rgba(22, 163, 74, 0.13);
    color: #15a050;
    border: 1px solid rgba(22, 163, 74, 0.3);
    box-shadow: 0 2px 10px rgba(22, 163, 74, 0.12);
}
.i-badge--blue {
    background: rgba(0, 91, 187, 0.12);
    color: #0059b8;
    border: 1px solid rgba(0, 91, 187, 0.25);
    box-shadow: 0 2px 10px rgba(0, 91, 187, 0.1);
}
.i-badge--gold {
    background: rgba(184, 145, 58, 0.13);
    color: var(--gold);
    border: 1px solid rgba(184, 145, 58, 0.3);
    box-shadow: 0 2px 10px var(--glow);
}
[data-theme="dark"] .i-badge--green {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    border-color: rgba(74, 222, 128, 0.22);
}
[data-theme="dark"] .i-badge--blue {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.22);
}

/* CTA button */
.intro-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 32px;
    background: linear-gradient(
        135deg,
        #c49a30 0%,
        #e8c050 40%,
        #d4a830 70%,
        #b8832a 100%
    );
    background-size: 300% 300%;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow:
        0 6px 28px var(--glow),
        0 2px 8px rgba(0, 0, 0, 0.12);
    transition:
        transform 0.2s,
        box-shadow 0.2s;
    position: relative;
    overflow: hidden;
    animation:
        itemIn 0.55s cubic-bezier(0.34, 1.4, 0.64, 1) both 0.64s,
        btnGradient 4s ease infinite 1s;
}
@keyframes btnGradient {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}
.intro-cta::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.22) 50%,
        transparent 100%
    );
    transform: translateX(-100%);
    animation: ctaShimmer 3.5s ease-in-out infinite 1.8s;
}
@keyframes ctaShimmer {
    0%,
    100% {
        transform: translateX(-100%);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
    }
}
.intro-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px var(--glow);
    background: var(--gold-h);
}
.intro-cta:active {
    transform: translateY(-1px);
}
.intro-cta svg {
    transition: transform 0.22s;
}
.intro-cta:hover svg {
    transform: translateX(5px);
}

/* Shared entrance keyframe */
@keyframes itemIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Right: illustration ── */
.intro-illo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: illoIn 0.7s cubic-bezier(0.34, 1.2, 0.64, 1) both 0.15s;
}
@keyframes illoIn {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(16px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
.intro-illo {
    width: 100%;
    max-width: 480px;
    height: auto;
    animation: illoFloat 5s ease-in-out infinite 1s;
    overflow: visible;
}
@keyframes illoFloat {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Pulse rings on circles */
.illo-ring-ua-1 {
    animation: ringFade 3s ease-out infinite;
}
.illo-ring-ua-2 {
    animation: ringFade 3s ease-out infinite 0.8s;
}
.illo-ring-eu-1 {
    animation: ringFade 3.2s ease-out infinite 0.4s;
}
.illo-ring-eu-2 {
    animation: ringFade 3.2s ease-out infinite 1.1s;
}
@keyframes ringFade {
    0% {
        opacity: 0.35;
    }
    100% {
        opacity: 0;
    }
}

/* Travelling pulse dot on the path */
.path-pulse {
    animation: pulseDash 6s ease-in-out infinite;
}
@keyframes pulseDash {
    0% {
        stroke-dashoffset: 220;
        opacity: 0;
    }
    8% {
        opacity: 0.9;
    }
    92% {
        opacity: 0.9;
    }
    100% {
        stroke-dashoffset: -220;
        opacity: 0;
    }
}

/* Path nodes */
.node-2 {
    animation: nodePulse 2.8s ease-in-out infinite;
}
@keyframes nodePulse {
    0%,
    100% {
        r: 5.5;
        opacity: 1;
    }
    50% {
        r: 7;
        opacity: 0.7;
    }
}

/* EU stars twinkle */
.eu-stars {
    animation: starGlow 3s ease-in-out infinite alternate;
}
@keyframes starGlow {
    from {
        opacity: 0.8;
    }
    to {
        opacity: 1;
    }
}

.egypt-oasis {
    transform-origin: 402px 160px;
}

.egypt-shadow {
    animation: oasisShadow 5.4s ease-in-out infinite;
}

.egypt-dune {
    filter: drop-shadow(0 8px 18px rgba(215, 167, 44, 0.18));
}

.egypt-dune-shade {
    animation: duneGlow 4.8s ease-in-out infinite;
}

.palm-trunk,
.palm-trunk-detail,
.palm-leaf {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.palm-trunk {
    stroke: #8e5a2b;
    stroke-width: 4.5;
}

.palm-trunk-detail {
    stroke: rgba(113, 67, 28, 0.45);
    stroke-width: 1.4;
    stroke-dasharray: 3 9;
}

.palm-crown {
    transform-box: fill-box;
    transform-origin: 50% 100%;
}

.palm-crown-left {
    animation: palmSwayLeft 6.8s ease-in-out infinite;
}

.palm-crown-right {
    animation: palmSwayRight 7.2s ease-in-out infinite 0.45s;
}

.palm-leaf {
    stroke: #9ccb59;
    stroke-width: 4;
}

.leaf-1,
.leaf-4,
.leaf-6,
.leaf-9 {
    animation: frondLift 5.6s ease-in-out infinite;
}

.leaf-2,
.leaf-5,
.leaf-7,
.leaf-10 {
    animation: frondLift 6.2s ease-in-out infinite 0.5s;
}

.leaf-3,
.leaf-8 {
    animation: frondLift 5.9s ease-in-out infinite 0.95s;
}

@keyframes oasisShadow {
    0%,
    100% {
        opacity: 0.18;
        transform: scaleX(0.98);
    }
    50% {
        opacity: 0.3;
        transform: scaleX(1.04) translateY(1px);
    }
}

@keyframes duneGlow {
    0%,
    100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.85;
    }
}

@keyframes palmSwayLeft {
    0%,
    100% {
        transform: rotate(-3deg);
    }
    50% {
        transform: rotate(4deg) translateY(-1px);
    }
}

@keyframes palmSwayRight {
    0%,
    100% {
        transform: rotate(3deg);
    }
    50% {
        transform: rotate(-4deg) translateY(-1px);
    }
}

@keyframes frondLift {
    0%,
    100% {
        opacity: 0.9;
    }
    50% {
        opacity: 1;
    }
}

/* Sparkle twinkle */
.sp-1 {
    animation: spTwinkle 3.1s ease-in-out infinite;
}
.sp-2 {
    animation: spTwinkle 2.7s ease-in-out infinite 0.6s;
}
.sp-3 {
    animation: spTwinkle 3.4s ease-in-out infinite 1.2s;
}
.sp-5 {
    animation: spTwinkle 2.9s ease-in-out infinite 0.3s;
}
.sp-8 {
    animation: spTwinkle 4s ease-in-out infinite 0.9s;
}
@keyframes spTwinkle {
    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.4);
    }
}

/* ── Floating particles ── */
.intro-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.intro-particles span {
    position: absolute;
    border-radius: 50%;
    animation: particleFloat linear infinite;
    bottom: -20px;
    --drift: 30px;
}
.intro-particles span:nth-child(odd) {
    --drift: 35px;
}
.intro-particles span:nth-child(even) {
    --drift: -35px;
}
.intro-particles span:nth-child(1) {
    left: 4%;
    width: 6px;
    height: 6px;
    background: rgba(255, 215, 0, 0.75);
    animation-duration: 14s;
    animation-delay: 0s;
}
.intro-particles span:nth-child(2) {
    left: 10%;
    width: 4px;
    height: 4px;
    background: rgba(0, 91, 187, 0.65);
    animation-duration: 18s;
    animation-delay: -4s;
}
.intro-particles span:nth-child(3) {
    left: 18%;
    width: 5px;
    height: 5px;
    background: rgba(184, 145, 58, 0.85);
    animation-duration: 12s;
    animation-delay: -8s;
}
.intro-particles span:nth-child(4) {
    left: 28%;
    width: 3px;
    height: 3px;
    background: rgba(255, 215, 0, 0.55);
    animation-duration: 16s;
    animation-delay: -2s;
}
.intro-particles span:nth-child(5) {
    left: 37%;
    width: 7px;
    height: 7px;
    background: rgba(0, 51, 153, 0.55);
    animation-duration: 20s;
    animation-delay: -6s;
}
.intro-particles span:nth-child(6) {
    left: 45%;
    width: 4px;
    height: 4px;
    background: rgba(184, 145, 58, 0.75);
    animation-duration: 13s;
    animation-delay: -10s;
}
.intro-particles span:nth-child(7) {
    left: 54%;
    width: 5px;
    height: 5px;
    background: rgba(255, 215, 0, 0.65);
    animation-duration: 17s;
    animation-delay: -1s;
}
.intro-particles span:nth-child(8) {
    left: 63%;
    width: 3px;
    height: 3px;
    background: rgba(0, 91, 187, 0.55);
    animation-duration: 15s;
    animation-delay: -5s;
}
.intro-particles span:nth-child(9) {
    left: 71%;
    width: 6px;
    height: 6px;
    background: rgba(184, 145, 58, 0.85);
    animation-duration: 19s;
    animation-delay: -9s;
}
.intro-particles span:nth-child(10) {
    left: 80%;
    width: 4px;
    height: 4px;
    background: rgba(255, 215, 0, 0.7);
    animation-duration: 11s;
    animation-delay: -3s;
}
.intro-particles span:nth-child(11) {
    left: 87%;
    width: 5px;
    height: 5px;
    background: rgba(0, 51, 153, 0.6);
    animation-duration: 22s;
    animation-delay: -7s;
}
.intro-particles span:nth-child(12) {
    left: 93%;
    width: 3px;
    height: 3px;
    background: rgba(184, 145, 58, 0.65);
    animation-duration: 14s;
    animation-delay: -11s;
}
.intro-particles span:nth-child(13) {
    left: 22%;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.45);
    animation-duration: 16s;
    animation-delay: -13s;
}
.intro-particles span:nth-child(14) {
    left: 67%;
    width: 6px;
    height: 6px;
    background: rgba(255, 215, 0, 0.5);
    animation-duration: 21s;
    animation-delay: -15s;
}
@keyframes particleFloat {
    0% {
        bottom: -20px;
        opacity: 0;
        transform: translateX(0) rotate(0deg) scale(0.6);
    }
    6% {
        opacity: 1;
    }
    88% {
        opacity: 0.75;
    }
    100% {
        bottom: 108%;
        opacity: 0;
        transform: translateX(var(--drift)) rotate(400deg) scale(0.8);
    }
}

/* ── RESPONSIVE ── */
@media (max-width: 800px) {
    .intro-inner {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
        max-width: 480px;
    }
    .intro-content {
        align-items: center;
    }
    .intro-sub {
        max-width: 100%;
    }
    .intro-trust {
        align-items: flex-start;
        text-align: left;
    }
    .intro-illo-wrap {
        order: -1;
    }
    .intro-illo {
        max-width: 340px;
    }
}
@media (max-width: 480px) {
    .intro {
        padding: 20px 16px;
    }
    .intro-illo {
        max-width: 280px;
    }
    .intro-title {
        font-size: 30px;
    }
    .intro-cta {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        font-size: 15px;
    }
}
