/* Premium branded intro overlay
   Kratak 3D ulazni potpis brenda: logo + tekst, bez teškog loader osećaja.
   Verzija je namerno smanjena da intro izgleda elegantnije na desktopu i mobilnom. */

:root{
    --brand-intro-bg: #020817;
    --brand-intro-bg-deep: #010511;
    --brand-intro-blue: #0b66ff;
    --brand-intro-blue-soft: rgba(72, 133, 255, 0.46);
    --brand-intro-cyan: #6cd6ff;
    --brand-intro-cyan-soft: rgba(108, 214, 255, 0.42);
    --brand-intro-text: rgba(248, 252, 255, 0.98);
    --brand-intro-muted: rgba(224, 240, 255, 0.78);
}

html.brand-intro-active,
html.brand-intro-active body{
    overflow: hidden;
}

html.brand-intro-js:not(.brand-intro-seen) .brand-intro{
    display: grid;
}

html.brand-intro-seen .brand-intro{
    display: none !important;
}

.brand-intro{
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    place-items: center;
    min-height: 100svh;
    padding: clamp(22px, 4vw, 48px);
    overflow: hidden;
    isolation: isolate;
    color: var(--brand-intro-text);
    background:
        radial-gradient(circle at 50% 22%, rgba(108, 214, 255, 0.18), transparent 32%),
        radial-gradient(circle at 14% 14%, rgba(11, 102, 255, 0.25), transparent 28%),
        radial-gradient(circle at 84% 78%, rgba(6, 42, 124, 0.36), transparent 34%),
        linear-gradient(145deg, var(--brand-intro-bg), #061438 44%, var(--brand-intro-bg-deep));
    opacity: 1;
    transform: translateZ(0);
    transition:
        opacity 820ms cubic-bezier(0.22, 1, 0.36, 1),
        visibility 820ms cubic-bezier(0.22, 1, 0.36, 1);
}

.brand-intro::before,
.brand-intro::after{
    content: "";
    position: absolute;
    inset: auto;
    pointer-events: none;
    border-radius: 999px;
    filter: blur(20px);
    opacity: 0.9;
    z-index: -1;
}

.brand-intro::before{
    width: min(64vw, 760px);
    height: min(64vw, 760px);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background:
        radial-gradient(circle, rgba(108, 214, 255, 0.22), transparent 52%),
        radial-gradient(circle, rgba(11, 102, 255, 0.18), transparent 68%);
    animation: brandIntroAura 1600ms ease-out both;
}

.brand-intro::after{
    width: min(96vw, 1120px);
    height: 1px;
    left: 50%;
    top: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(108, 214, 255, 0.95), transparent);
    box-shadow: 0 0 32px rgba(108, 214, 255, 0.52);
    animation: brandIntroLine 1100ms ease-out both;
}

.brand-intro__backdrop{
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
    background-size: 58px 58px;
    mask-image: radial-gradient(circle at center, black 0%, transparent 72%);
    opacity: 0.38;
    transform: perspective(900px) rotateX(64deg) translateY(12%);
    transform-origin: center bottom;
    animation: brandIntroGrid 1200ms ease-out both;
}

.brand-intro__orb{
    position: absolute;
    width: clamp(140px, 22vw, 260px);
    aspect-ratio: 1;
    border-radius: 999px;
    background: radial-gradient(circle, var(--brand-intro-cyan-soft), rgba(11, 102, 255, 0.08) 42%, transparent 68%);
    filter: blur(18px);
    opacity: 0.62;
    pointer-events: none;
}

.brand-intro__orb--left{
    left: min(8vw, 110px);
    top: min(12vh, 120px);
    animation: brandIntroFloatLeft 1400ms ease-out both;
}

.brand-intro__orb--right{
    right: min(7vw, 96px);
    bottom: min(12vh, 120px);
    animation: brandIntroFloatRight 1400ms ease-out both;
}

.brand-intro__card{
    position: relative;
    width: min(100%, 620px);
    display: grid;
    justify-items: center;
    gap: clamp(8px, 1.2vw, 14px);
    padding: clamp(22px, 3.4vw, 44px) clamp(16px, 3vw, 38px);
    text-align: center;
    border-radius: clamp(24px, 4vw, 42px);
    border: 1px solid rgba(146, 220, 255, 0.32);
    background:
        linear-gradient(145deg, rgba(6, 20, 56, 0.80), rgba(2, 9, 27, 0.60)),
        radial-gradient(circle at 50% 0%, rgba(108, 214, 255, 0.18), transparent 48%);
    box-shadow:
        0 42px 120px rgba(0, 0, 0, 0.48),
        0 0 54px rgba(72, 133, 255, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 -1px 0 rgba(108, 214, 255, 0.12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transform-style: preserve-3d;
    animation: brandIntroCard 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.brand-intro__card::before,
.brand-intro__card::after{
    content: "";
    position: absolute;
    pointer-events: none;
    border-radius: inherit;
}

.brand-intro__card::before{
    inset: -1px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(108, 214, 255, 0.92), rgba(11, 102, 255, 0.48), rgba(108, 214, 255, 0.70));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0.76;
}

.brand-intro__card::after{
    inset: 12px;
    border: 1px solid rgba(108, 214, 255, 0.16);
    opacity: 0.95;
}

.brand-intro__logo-shell{
    position: relative;
    width: clamp(104px, 15vw, 180px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 32px;
    transform-style: preserve-3d;
    animation: brandIntroLogoShell 1150ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.brand-intro__logo-shell::before{
    content: "";
    position: absolute;
    inset: 12%;
    border-radius: 999px;
    background:
        radial-gradient(circle, rgba(108, 214, 255, 0.40), rgba(11, 102, 255, 0.18) 42%, transparent 72%);
    filter: blur(18px);
    transform: translateZ(-40px);
}

.brand-intro__logo-shell::after{
    content: "";
    position: absolute;
    inset: 8%;
    border-radius: 999px;
    border: 1px solid rgba(108, 214, 255, 0.28);
    box-shadow: inset 0 0 26px rgba(108, 214, 255, 0.13);
    animation: brandIntroRing 1500ms ease-out both;
}

.brand-intro__logo{
    position: relative;
    z-index: 2;
    width: min(100%, 168px);
    height: min(100%, 168px);
    object-fit: contain;
    filter:
        drop-shadow(0 22px 34px rgba(0, 0, 0, 0.42))
        drop-shadow(0 0 28px rgba(108, 214, 255, 0.34));
    transform: translateZ(72px);
}

.brand-intro__eyebrow{
    margin: clamp(2px, 0.8vw, 8px) 0 0;
    font-family: "Rajdhani", system-ui, sans-serif;
    font-size: clamp(0.74rem, 0.85vw, 0.92rem);
    font-weight: 700;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: rgba(174, 226, 255, 0.86);
    text-shadow: 0 0 22px rgba(108, 214, 255, 0.25);
    animation: brandIntroText 850ms 160ms ease-out both;
}

.brand-intro__title{
    margin: 0;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2rem, 5.8vw, 4.6rem);
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: -0.045em;
    color: var(--brand-intro-text);
    text-shadow:
        0 2px 0 rgba(255, 255, 255, 0.08),
        0 18px 46px rgba(0, 0, 0, 0.34),
        0 0 34px rgba(108, 214, 255, 0.22);
    animation: brandIntroText 850ms 240ms ease-out both;
}

.brand-intro__subtitle{
    max-width: 480px;
    margin: 0;
    font-family: "Rajdhani", system-ui, sans-serif;
    font-size: clamp(0.95rem, 1.55vw, 1.16rem);
    line-height: 1.32;
    font-weight: 600;
    letter-spacing: 0.015em;
    color: var(--brand-intro-muted);
    animation: brandIntroText 850ms 320ms ease-out both;
}

.brand-intro--leaving{
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.brand-intro--leaving .brand-intro__card{
    transform: perspective(1100px) translate3d(0, -18px, 0) rotateX(7deg) scale(0.975);
    transition: transform 820ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes brandIntroCard{
    from{
        opacity: 0;
        transform: perspective(1100px) translate3d(0, 26px, 0) rotateX(10deg) scale(0.965);
    }
    to{
        opacity: 1;
        transform: perspective(1100px) translate3d(0, 0, 0) rotateX(0) scale(1);
    }
}

@keyframes brandIntroLogoShell{
    0%{
        opacity: 0;
        transform: perspective(900px) rotateY(-24deg) rotateX(10deg) translateY(16px) scale(0.86);
    }
    100%{
        opacity: 1;
        transform: perspective(900px) rotateY(0) rotateX(0) translateY(0) scale(1);
    }
}

@keyframes brandIntroText{
    from{
        opacity: 0;
        transform: translateY(16px);
        filter: blur(4px);
    }
    to{
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes brandIntroAura{
    from{
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.74);
    }
    to{
        opacity: 0.9;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes brandIntroLine{
    from{
        opacity: 0;
        transform: translateX(-50%) scaleX(0.25);
    }
    to{
        opacity: 0.9;
        transform: translateX(-50%) scaleX(1);
    }
}

@keyframes brandIntroGrid{
    from{
        opacity: 0;
        transform: perspective(900px) rotateX(64deg) translateY(20%) scale(0.94);
    }
    to{
        opacity: 0.38;
        transform: perspective(900px) rotateX(64deg) translateY(12%) scale(1);
    }
}

@keyframes brandIntroRing{
    from{
        opacity: 0;
        transform: scale(0.76);
    }
    to{
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes brandIntroFloatLeft{
    from{
        opacity: 0;
        transform: translate3d(-28px, 18px, 0) scale(0.9);
    }
    to{
        opacity: 0.62;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes brandIntroFloatRight{
    from{
        opacity: 0;
        transform: translate3d(28px, -18px, 0) scale(0.9);
    }
    to{
        opacity: 0.62;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@media (max-width: 640px){
    .brand-intro{
        padding: 18px;
    }

    .brand-intro__card{
        border-radius: 28px;
    }

    .brand-intro__logo-shell{
        width: clamp(92px, 31vw, 138px);
    }

    .brand-intro__title{
        font-size: clamp(1.85rem, 10.4vw, 3.15rem);
    }

    .brand-intro__eyebrow{
        letter-spacing: 0.18em;
    }
}

@media (prefers-reduced-motion: reduce){
    .brand-intro,
    .brand-intro *,
    .brand-intro *::before,
    .brand-intro *::after{
        animation: none !important;
        transition-duration: 120ms !important;
    }
}
