﻿/* SHA TIN GROUP â€” Bold LoadLab preloader (espresso Â· gold Â· champagne) */

.loadlab-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(ellipse 70% 55% at 50% 42%, rgba(184, 134, 11, 0.28) 0%, transparent 62%),
        linear-gradient(160deg, #1C140E 0%, #3D2A16 48%, #2A1C10 100%);
    backdrop-filter: blur(10px);
}

.loadlab-overlay.active {
    display: flex;
    animation: loadlab-veil-in 0.35s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)) both;
}

.loadlab-container {
    position: relative;
    width: auto;
    text-align: center;
    padding: 0;
}

.loadlab-brand {
    font-family: var(--font-display, "Cormorant Garamond", Georgia, serif);
    font-size: clamp(2.4rem, 6vw, 3.4rem);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: 0.02em;
    color: #FFF9F0;
    margin: 0 0 8px;
}

.loadlab-brand em {
    font-style: italic;
    font-weight: 600;
    color: #E8C87A;
}

.loadlab-tag {
    margin: 0 0 36px;
    font-family: var(--font-ui, "Manrope", system-ui, sans-serif);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #D4A84B;
}

.loadlab-spinner {
    width: 112px;
    height: 112px;
    position: relative;
    margin: 0 auto;
}

.loadlab-spinner::before,
.loadlab-spinner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border-style: solid;
    border-color: transparent;
}

.loadlab-spinner::before {
    inset: 0;
    border-width: 4px;
    border-top-color: #B8860B;
    border-right-color: #E8C87A;
    animation: loadlab-spin 1.05s linear infinite;
}

.loadlab-spinner::after {
    inset: 14px;
    border-width: 4px;
    border-bottom-color: #D4A84B;
    border-left-color: #8B5A2B;
    animation: loadlab-spin 0.75s linear infinite reverse;
}

.loadlab-ring {
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    border: 2px solid rgba(232, 200, 122, 0.35);
    box-shadow: 0 0 0 10px rgba(184, 134, 11, 0.08);
    animation: loadlab-pulse 2s ease-in-out infinite;
}

.loadlab-core {
    position: absolute;
    inset: 34px;
    border-radius: 50%;
    background: linear-gradient(145deg, #E8C87A 0%, #B8860B 55%, #8B5A2B 100%);
    box-shadow: 0 8px 28px rgba(28, 20, 14, 0.45);
    animation: loadlab-core-pulse 1.6s ease-in-out infinite;
}

.loadlab-text {
    margin: 0 0 18px;
    color: #FFF9F0;
    font-family: var(--font-ui, "Manrope", system-ui, sans-serif);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    animation: loadlab-fade 1.8s ease-in-out infinite;
}

.loadlab-bar {
    width: min(280px, 100%);
    height: 5px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 2px;
    background: rgba(240, 217, 168, 0.16);
    border: 1px solid rgba(232, 200, 122, 0.35);
}

.loadlab-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    background: linear-gradient(90deg, #8B5A2B 0%, #B8860B 35%, #E8C87A 70%, #D4A84B 100%);
    animation: loadlab-progress 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.loadlab-dots {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 22px 0 0;
}

.loadlab-dots span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    animation: loadlab-bounce 1.35s ease-in-out infinite;
}

.loadlab-dots span:nth-child(1) { background: #B8860B; }
.loadlab-dots span:nth-child(2) { background: #E8C87A; animation-delay: 0.14s; }
.loadlab-dots span:nth-child(3) { background: #8B5A2B; animation-delay: 0.28s; }

@keyframes loadlab-veil-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes loadlab-spin {
    to { transform: rotate(360deg); }
}

@keyframes loadlab-pulse {
    0%, 100% { transform: scale(1); opacity: 0.45; }
    50% { transform: scale(1.08); opacity: 1; }
}

@keyframes loadlab-core-pulse {
    0%, 100% { transform: scale(0.92); opacity: 0.85; }
    50% { transform: scale(1); opacity: 1; }
}

@keyframes loadlab-bounce {
    0%, 80%, 100% { transform: scale(0.55); opacity: 0.35; }
    40% { transform: scale(1.15); opacity: 1; }
}

@keyframes loadlab-fade {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

@keyframes loadlab-progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.75;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: loadlab-spin 0.6s linear infinite;
}


/* ── Index fire-flash logo preloader ── */
body.is-preloading {
    overflow: hidden;
}

body.is-preloading > :not(#page-preloader):not(script) {
    visibility: hidden;
}

body.is-ready > :not(#page-preloader):not(script) {
    visibility: visible;
    animation: stg-index-reveal 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes stg-index-reveal {
    from { opacity: 0; filter: brightness(1.35); }
    to { opacity: 1; filter: brightness(1); }
}

.stg-flash {
    --flash-navy: #002147;
    --flash-gold: #F9E076;
    --flash-amber: #FFB020;
    --flash-orange: #FF6A00;
    --flash-red: #E03616;
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    background: #07050a;
    overflow: hidden;
    perspective: 900px;
    transition: opacity 0.28s ease, visibility 0.28s;
}

.stg-flash.is-done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.stg-flash__sky {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 50% 70%, rgba(224, 54, 22, 0.35) 0%, transparent 60%),
        radial-gradient(ellipse 55% 45% at 50% 40%, rgba(255, 106, 0, 0.28) 0%, transparent 55%),
        linear-gradient(180deg, #12080a 0%, #1a0a08 45%, #2a1008 100%);
    animation: stg-fire-sky 1.2s ease-out both;
    pointer-events: none;
}

.stg-flash__burst {
    position: absolute;
    left: 50%;
    top: 48%;
    width: min(90vw, 560px);
    height: min(90vw, 560px);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background:
        radial-gradient(circle,
            #fff 0%,
            var(--flash-gold) 12%,
            var(--flash-amber) 28%,
            var(--flash-orange) 48%,
            transparent 70%);
    opacity: 0;
    mix-blend-mode: screen;
    animation: stg-fire-burst 1.15s cubic-bezier(0.16, 1, 0.3, 1) both;
    pointer-events: none;
}

.stg-flash__embers {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
}

.stg-flash__embers span {
    position: absolute;
    bottom: 8%;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--flash-gold);
    box-shadow: 0 0 10px var(--flash-orange), 0 0 18px var(--flash-red);
    opacity: 0;
    animation: stg-fire-ember 1.6s ease-out infinite;
}

.stg-flash__embers span:nth-child(1)  { left: 18%; animation-delay: 0.05s; width: 4px; height: 4px; }
.stg-flash__embers span:nth-child(2)  { left: 28%; animation-delay: 0.2s; }
.stg-flash__embers span:nth-child(3)  { left: 38%; animation-delay: 0.35s; width: 5px; height: 5px; }
.stg-flash__embers span:nth-child(4)  { left: 46%; animation-delay: 0.12s; }
.stg-flash__embers span:nth-child(5)  { left: 52%; animation-delay: 0.28s; width: 7px; height: 7px; }
.stg-flash__embers span:nth-child(6)  { left: 58%; animation-delay: 0.42s; }
.stg-flash__embers span:nth-child(7)  { left: 66%; animation-delay: 0.18s; width: 4px; height: 4px; }
.stg-flash__embers span:nth-child(8)  { left: 74%; animation-delay: 0.5s; }
.stg-flash__embers span:nth-child(9)  { left: 22%; animation-delay: 0.6s; width: 3px; height: 3px; }
.stg-flash__embers span:nth-child(10) { left: 82%; animation-delay: 0.32s; width: 5px; height: 5px; }
.stg-flash__embers span:nth-child(11) { left: 42%; animation-delay: 0.7s; }
.stg-flash__embers span:nth-child(12) { left: 70%; animation-delay: 0.55s; width: 4px; height: 4px; }

.stg-flash__stage {
    position: relative;
    z-index: 2;
    padding: 24px;
    transform-style: preserve-3d;
    animation: stg-fire-flyin 0.95s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.stg-flash__logo {
    display: block;
    width: min(420px, 78vw);
    height: auto;
    position: relative;
    z-index: 2;
    filter:
        drop-shadow(0 0 18px rgba(255, 106, 0, 0.55))
        drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
    animation: stg-fire-glow 1.2s ease-in-out 0.55s both;
}

.stg-flash__flame {
    position: absolute;
    left: 50%;
    bottom: -8%;
    width: 120%;
    height: 55%;
    transform: translateX(-50%);
    background:
        radial-gradient(ellipse 40% 70% at 50% 100%, rgba(255, 240, 180, 0.95) 0%, transparent 55%),
        radial-gradient(ellipse 55% 80% at 35% 100%, rgba(255, 106, 0, 0.7) 0%, transparent 60%),
        radial-gradient(ellipse 55% 80% at 65% 100%, rgba(224, 54, 22, 0.65) 0%, transparent 60%);
    filter: blur(8px);
    opacity: 0;
    mix-blend-mode: screen;
    animation: stg-fire-base 1.1s ease-out 0.25s both;
    pointer-events: none;
    z-index: 1;
}

.stg-flash__veil {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    background:
        radial-gradient(circle at 50% 55%,
            #fff 0%,
            var(--flash-gold) 18%,
            var(--flash-orange) 40%,
            transparent 68%);
    mix-blend-mode: screen;
}

.stg-flash.is-finishing .stg-flash__veil {
    animation: stg-fire-exit-flash 0.7s ease-out both;
}

.stg-flash.is-finishing .stg-flash__stage {
    animation: stg-fire-burnout 0.72s cubic-bezier(0.4, 0, 1, 1) both;
}

.stg-flash.is-finishing .stg-flash__logo {
    animation: stg-fire-logo-burn 0.72s ease-in both;
}

.stg-flash.is-finishing .stg-flash__flame {
    animation: stg-fire-flare-up 0.72s ease-out both;
}

.stg-flash.is-finishing .stg-flash__embers span {
    animation: stg-fire-ember-exit 0.75s ease-out both;
}

.stg-flash.is-finishing .stg-flash__burst {
    animation: stg-fire-burst-exit 0.7s ease-out both;
}

.stg-flash.is-finishing .stg-flash__sky {
    animation: stg-fire-sky-out 0.7s ease-in both;
}

@keyframes stg-fire-sky {
    from { opacity: 0; filter: brightness(2.2); }
    to { opacity: 1; filter: brightness(1); }
}

@keyframes stg-fire-burst {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
    28% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
    100% { opacity: 0.2; transform: translate(-50%, -50%) scale(1.55); }
}

@keyframes stg-fire-flyin {
    0% {
        opacity: 0;
        transform: translateY(120px) scale(0.55) rotateX(28deg);
        filter: brightness(3) blur(10px);
    }
    55% {
        opacity: 1;
        transform: translateY(-10px) scale(1.06) rotateX(0deg);
        filter: brightness(1.45) blur(0);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
        filter: brightness(1) blur(0);
    }
}

@keyframes stg-fire-glow {
    0%, 100% {
        filter:
            drop-shadow(0 0 14px rgba(255, 106, 0, 0.45))
            drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
    }
    50% {
        filter:
            drop-shadow(0 0 28px rgba(255, 176, 32, 0.85))
            drop-shadow(0 0 48px rgba(224, 54, 22, 0.55))
            drop-shadow(0 12px 28px rgba(0, 0, 0, 0.4));
    }
}

@keyframes stg-fire-base {
    0% { opacity: 0; transform: translateX(-50%) scaleY(0.4); }
    40% { opacity: 0.95; transform: translateX(-50%) scaleY(1.15); }
    100% { opacity: 0.55; transform: translateX(-50%) scaleY(1); }
}

@keyframes stg-fire-ember {
    0% { opacity: 0; transform: translate(-50%, 0) scale(0.6); }
    15% { opacity: 1; }
    100% { opacity: 0; transform: translate(calc(-50% + var(--jx, 20px)), -70vh) scale(0.2); }
}

.stg-flash__embers span:nth-child(odd)  { --jx: -36px; }
.stg-flash__embers span:nth-child(even) { --jx: 42px; }
.stg-flash__embers span:nth-child(3n)   { --jx: -18px; }
.stg-flash__embers span:nth-child(4n)   { --jx: 28px; }

@keyframes stg-fire-exit-flash {
    0% { opacity: 0; }
    25% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes stg-fire-burnout {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    45% { transform: translateY(-18px) scale(1.08); opacity: 1; filter: brightness(1.8); }
    100% { transform: translateY(-90px) scale(1.25); opacity: 0; filter: brightness(3) blur(8px); }
}

@keyframes stg-fire-logo-burn {
    0% {
        filter:
            drop-shadow(0 0 14px rgba(255, 106, 0, 0.45))
            brightness(1) sepia(0) hue-rotate(0deg);
    }
    40% {
        filter:
            drop-shadow(0 0 30px rgba(255, 80, 0, 0.9))
            brightness(1.4) sepia(0.55) hue-rotate(-10deg);
    }
    100% {
        filter:
            drop-shadow(0 0 40px rgba(255, 40, 0, 1))
            brightness(2.4) sepia(1) hue-rotate(-20deg) blur(4px);
        opacity: 0;
    }
}

@keyframes stg-fire-flare-up {
    0% { opacity: 0.55; transform: translateX(-50%) scaleY(1); }
    35% { opacity: 1; transform: translateX(-50%) scaleY(2.2); }
    100% { opacity: 0; transform: translateX(-50%) scaleY(3.4) translateY(-40%); }
}

@keyframes stg-fire-ember-exit {
    0% { opacity: 1; transform: translate(-50%, 0) scale(1); }
    100% { opacity: 0; transform: translate(calc(-50% + var(--jx, 20px)), -85vh) scale(0.15); }
}

@keyframes stg-fire-burst-exit {
    0% { opacity: 0.25; transform: translate(-50%, -50%) scale(1.2); }
    40% { opacity: 0.95; transform: translate(-50%, -55%) scale(1.6); }
    100% { opacity: 0; transform: translate(-50%, -70%) scale(2.2); }
}

@keyframes stg-fire-sky-out {
    to { opacity: 0; filter: brightness(2.5); }
}

@media (max-width: 640px) {
    .stg-flash__logo { width: min(300px, 86vw); }
}

@media (prefers-reduced-motion: reduce) {
    body.is-ready > :not(#page-preloader):not(script) {
        animation: none !important;
        opacity: 1;
        filter: none;
    }
    .stg-flash__sky,
    .stg-flash__burst,
    .stg-flash__stage,
    .stg-flash__logo,
    .stg-flash__flame,
    .stg-flash__embers span {
        animation: none !important;
        opacity: 1;
        transform: none;
        filter: none;
    }
    .stg-flash__embers span,
    .stg-flash__flame { opacity: 0; }
    .stg-flash.is-finishing .stg-flash__veil,
    .stg-flash.is-finishing .stg-flash__stage,
    .stg-flash.is-finishing .stg-flash__logo,
    .stg-flash.is-finishing .stg-flash__flame,
    .stg-flash.is-finishing .stg-flash__embers span,
    .stg-flash.is-finishing .stg-flash__burst,
    .stg-flash.is-finishing .stg-flash__sky {
        animation: none !important;
    }
}
