/* ============================================================
   Zestio — Welkomst & onboarding gate (eerste keer / uitgelogd)
   Losgetrokken uit index.html. Volledig zelfstandige module.
   Toont een verplichte poort: nieuwe/uitgelogde gebruikers moeten
   eerst een account aanmaken of inloggen.
   ============================================================ */

.zwelcome-gate {
    position: fixed;
    inset: 0;
    /* Boven de app-content (nav/header z-index 100, fab 90) maar ONDER de
       login/register-modals (overlay 500 / modal 600). Zo verschijnen die
       modals bovenop de gate en blijft de gate eronder zichtbaar wanneer
       een modal zonder inloggen wordt gesloten — geen bypass mogelijk. */
    z-index: 400;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(120% 80% at 50% -10%, var(--accent-glow) 0%, transparent 60%),
        var(--bg-primary);
    padding: var(--safe-top) var(--safe-right, 0px) var(--safe-bottom) var(--safe-left, 0px);
    overflow: hidden;
    animation: zwelcomeFade 0.35s ease;
}

.zwelcome-gate.hidden { display: none; }

@keyframes zwelcomeFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.zwelcome-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

/* Tour overslaan-knop (alleen zichtbaar op de info-slides) */
.zwelcome-skip {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 15px;
    cursor: pointer;
    padding: 8px 12px;
    z-index: 5;
    transition: color 0.2s ease;
}
.zwelcome-skip:active { color: var(--accent); }
.zwelcome-skip.hidden { display: none; }

/* Slides */
.zwelcome-slides {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

.zwelcome-slide {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.zwelcome-illustration {
    font-size: 80px;
    line-height: 1;
    margin-bottom: 32px;
    animation: zwelcomeBounce 0.6s ease;
}

@keyframes zwelcomeBounce {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.zwelcome-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px;
    line-height: 1.2;
}

.zwelcome-desc {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 320px;
    margin: 0;
}

/* Footer met dots + volgende-knop */
.zwelcome-footer {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px calc(20px + var(--safe-bottom, 0px));
}
.zwelcome-footer.hidden { display: none; }

.zwelcome-dots { display: flex; gap: 8px; }

.zwelcome-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}
.zwelcome-dot.active {
    width: 24px;
    border-radius: 4px;
    background: var(--accent);
}

.zwelcome-next {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: var(--radius-lg);
    border: none;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.2s ease;
}
.zwelcome-next:active { transform: scale(0.96); }
.zwelcome-next svg { width: 20px; height: 20px; }

/* ---- Landingsscherm (adaptief licht/donker, brandbook-hero) ---- */
.zwelcome-auth {
    justify-content: flex-start;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: clamp(28px, 6vh, 60px) 28px calc(24px + var(--safe-bottom, 0px));
    text-align: center;
}

/* Ambient glow (rood -> transparant) die subtiel "ademt". Brandbook-cover. */
.zwelcome-glow {
    position: absolute;
    top: -140px;
    left: 50%;
    width: 540px;
    height: 540px;
    max-width: 150vw;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 64, 26, 0.24) 0%, rgba(245, 166, 35, 0.10) 38%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: zwelcomeBreathe 7s ease-in-out infinite;
}
@keyframes zwelcomeBreathe {
    0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}

.zwelcome-auth-top {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Hero: drie recept-kaartjes in een nette waaier — "verspreid -> georganiseerd". */
.zwelcome-stack {
    position: relative;
    width: 220px;
    height: 100px;
    margin: 0 auto 22px;
}
.zwelcome-stack-card {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 86px;
    height: 86px;
    margin: -43px 0 0 -43px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    animation: zwelcomeCardIn 0.6s ease both;
}
@keyframes zwelcomeCardIn { from { opacity: 0; } to { opacity: 1; } }
.zwelcome-stack-card-0 { transform: rotate(-11deg) translateX(-50px); animation-delay: 0.05s; }
.zwelcome-stack-card-1 { transform: rotate(0deg); z-index: 2; animation-delay: 0.16s; }
.zwelcome-stack-card-2 { transform: rotate(11deg) translateX(50px); animation-delay: 0.27s; }

.zwelcome-logo {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 10px;
}
.zwelcome-logo span {
    background: linear-gradient(135deg, #e8401a 0%, #f5a623 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.zwelcome-eyebrow {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    margin-bottom: 10px;
}

.zwelcome-auth .zwelcome-title { font-size: 27px; line-height: 1.15; margin-bottom: 14px; }
.zwelcome-auth .zwelcome-desc { font-size: 15px; max-width: 340px; }

.zwelcome-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
}
.zwelcome-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}
.zwelcome-chip-emoji { font-size: 15px; line-height: 1; }

.zwelcome-tagline {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    font-style: italic;
    margin-top: 22px;
    background: linear-gradient(135deg, #e8401a 0%, #f5a623 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.zwelcome-actions {
    flex-shrink: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 28px;
    position: relative;
    z-index: 1;
    padding-bottom: calc(16px + var(--safe-bottom, 0px));
}

.zwelcome-reward {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    margin: -2px 0 4px;
}

.zwelcome-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease;
    border: none;
}
.zwelcome-btn:active { transform: scale(0.98); }

.zwelcome-btn-primary {
    background: linear-gradient(135deg, #e8401a 0%, #f5a623 100%);
    color: #fff;
    box-shadow: 0 12px 32px -8px rgba(232, 64, 26, 0.55), var(--shadow-sm);
}

.zwelcome-btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border);
}

.zwelcome-legal {
    font-family: var(--font-body);
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-muted);
    text-align: center;
    margin: 4px 0 0;
}

/* ---- Conversie: gastaccount permanent maken ---- */

/* Hint bovenin de register-modal wanneer een placeholder converteert. */
.convert-hint {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-secondary);
    background: var(--accent-glow);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 16px;
}
.convert-hint.hidden { display: none; }

/* Kaart bovenaan het profiel voor gast-/placeholder-gebruikers. */
.convert-card {
    background: linear-gradient(135deg, var(--accent-glow), transparent), var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.convert-card-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.convert-card-text {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* Respecteer systeemvoorkeur: geen bewegende glow/kaarten. */
@media (prefers-reduced-motion: reduce) {
    .zwelcome-glow,
    .zwelcome-stack-card { animation: none; opacity: 1; }
}
