/* LUMA STARTUP IDENT */
body.ident-active {
    overflow: hidden;
}

body.ident-active [data-luma-ident-content] {
    visibility: hidden;
}

/* Cost / confirm dialogs in the map iframe need the stage visible. */
body.ident-active.ident-paused [data-luma-ident-content] {
    visibility: visible;
}

/* Reveal map under the fading ident — avoid a dark shell flash between fade and remove. */
body.ident-active.ident-exiting [data-luma-ident-content] {
    visibility: visible;
}

body.ident-active.ident-paused .luma-ident {
    opacity: 0;
    pointer-events: none;
}

.luma-ident {
    position: fixed;
    inset: 0;
    z-index: 20000; /* token-oneoff: ident splash */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000; /* token-oneoff: letterbox */
    opacity: 1;
    pointer-events: all;
}

.luma-ident.is-exiting {
    animation: lumaIdentFadeOut 0.65s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
}

/* Reduced-motion / pause-friendly static hold — still masks map thrashing. */
.luma-ident.is-static .luma-ident-letterbox-top,
.luma-ident.is-static .luma-ident-letterbox-bottom,
.luma-ident.is-static .luma-ident-glow,
.luma-ident.is-static .luma-ident-logo,
.luma-ident.is-static .luma-ident-product,
.luma-ident.is-static .luma-ident-line,
.luma-ident.is-static .luma-ident-context {
    animation: none !important;
}

.luma-ident.is-static .luma-ident-letterbox-top,
.luma-ident.is-static .luma-ident-letterbox-bottom {
    height: 0;
}

.luma-ident.is-static .luma-ident-glow {
    opacity: 0.35;
    transform: translate(-50%, -58%) scale(1.1);
}

.luma-ident.is-static .luma-ident-logo {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 0 24px rgba(255, 255, 255, 0.12));
}

.luma-ident.is-static .luma-ident-product,
.luma-ident.is-static .luma-ident-context {
    opacity: 1;
    transform: translateY(0);
}

.luma-ident.is-static .luma-ident-line {
    width: 120px;
    opacity: 1;
}

.luma-ident.is-static.is-exiting {
    animation: none;
    opacity: 0;
    transition: opacity 0.35s var(--luma-ease-out);
}

.luma-ident-letterbox-top,
.luma-ident-letterbox-bottom {
    position: absolute;
    left: 0;
    right: 0;
    height: 0;
    background: #000; /* token-oneoff: letterbox */
    z-index: 2; /* token-oneoff: local stacking */
    animation: lumaLetterbox 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.luma-ident-letterbox-top {
    top: 0;
}

.luma-ident-letterbox-bottom {
    bottom: 0;
    animation-delay: 0.05s;
}

.luma-ident-stage {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--luma-space-5);
}

.luma-ident-glow {
    position: absolute;
    width: 280px;
    height: 120px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -58%);
    background: radial-gradient(ellipse, rgba(0, 163, 224, 0.35) 0%, rgba(0, 163, 224, 0.08) 45%, transparent 70%); /* token-oneoff: gradient */
    opacity: 0;
    animation: lumaIdentGlow 2.1s ease-out forwards;
    pointer-events: none;
}

.luma-ident-logo {
    height: 56px;
    width: auto;
    opacity: 0;
    transform: scale(0.94);
    filter: drop-shadow(0 0 24px rgba(255, 255, 255, 0.12));
    animation: lumaIdentLogo 1.15s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

.luma-ident-product {
    margin: 18px 0 0; /* token-oneoff: off-scale spacing */
    font-size: var(--luma-font-lg);
    font-weight: var(--luma-weight-semibold);
    letter-spacing: 0.45em;
    text-indent: 0.45em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72); /* token-oneoff: glass */
    opacity: 0;
    transform: translateY(8px);
    animation: lumaIdentProduct 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.75s forwards;
}

.luma-ident-line {
    width: 0;
    height: 1px;
    margin-top: 22px; /* token-oneoff: off-scale spacing */
    background: linear-gradient(90deg, transparent, rgba(0, 163, 224, 0.7), transparent); /* token-oneoff: gradient */
    animation: lumaIdentLine 0.8s ease-out 0.55s forwards;
}

@keyframes lumaLetterbox {
    0% { height: 0; }
    18% { height: 11vh; }
    72% { height: 11vh; }
    100% { height: 0; }
}

@keyframes lumaIdentGlow {
    0% { opacity: 0; transform: translate(-50%, -58%) scale(0.8); }
    35% { opacity: 1; }
    100% { opacity: 0.35; transform: translate(-50%, -58%) scale(1.1); }
}

@keyframes lumaIdentLogo {
    0% { opacity: 0; transform: scale(0.94); filter: blur(6px) drop-shadow(0 0 24px rgba(255, 255, 255, 0.12)); }
    100% { opacity: 1; transform: scale(1); filter: blur(0) drop-shadow(0 0 24px rgba(255, 255, 255, 0.12)); }
}

@keyframes lumaIdentProduct {
    0% { opacity: 0; transform: translateY(8px); letter-spacing: 0.2em; text-indent: 0.2em; }
    100% { opacity: 1; transform: translateY(0); letter-spacing: 0.45em; text-indent: 0.45em; }
}

@keyframes lumaIdentLine {
    from { width: 0; opacity: 0; }
    to { width: 120px; opacity: 1; }
}

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

@media (prefers-reduced-motion: reduce) {
    .luma-ident:not(.is-static) .luma-ident-letterbox-top,
    .luma-ident:not(.is-static) .luma-ident-letterbox-bottom,
    .luma-ident:not(.is-static) .luma-ident-glow,
    .luma-ident:not(.is-static) .luma-ident-logo,
    .luma-ident:not(.is-static) .luma-ident-product,
    .luma-ident:not(.is-static) .luma-ident-line,
    .luma-ident:not(.is-static) .luma-ident-context {
        animation: none !important;
    }

    .luma-ident:not(.is-static) .luma-ident-logo,
    .luma-ident:not(.is-static) .luma-ident-product,
    .luma-ident:not(.is-static) .luma-ident-context {
        opacity: 1;
        transform: none;
        filter: drop-shadow(0 0 24px rgba(255, 255, 255, 0.12));
    }

    .luma-ident:not(.is-static) .luma-ident-line {
        width: 120px;
        opacity: 1;
    }

    .luma-ident:not(.is-static).is-exiting {
        animation: none;
        opacity: 0;
        transition: opacity 0.35s var(--luma-ease-out);
    }
}
