/* ==================== PRELOADER ==================== */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0b1a0e;
    overflow: hidden;
    transition: opacity 0.7s ease, transform 0.75s ease;
}

#preloader.pl-exit {
    opacity: 0;
    transform: scale(1.05);
    pointer-events: none;
}

#preloader.pl-hidden {
    display: none !important;
}

/* Radial depth glow */
.pl-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 55% at 22% 42%, rgba(83, 181, 60, 0.11) 0%, transparent 100%),
        radial-gradient(ellipse 55% 50% at 78% 60%, rgba(22, 51, 32, 0.42) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

/* ==================== FLOATING GLASS PANELS ==================== */
.pl-panel {
    position: absolute;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.17);
    box-shadow:
        0 20px 52px rgba(0, 0, 0, 0.62),
        inset 0 1.5px 0 rgba(255, 255, 255, 0.24),
        inset 0 -1px 0 rgba(0, 0, 0, 0.18);
    opacity: 0;
    z-index: 2;
}

.pl-panel img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.10);
    transition: transform 10s ease;
}


/* Liquid glass sheen overlay */
.pl-glass-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        148deg,
        rgba(255, 255, 255, 0.19) 0%,
        rgba(255, 255, 255, 0.05) 32%,
        rgba(0, 0, 0, 0)         58%,
        rgba(0, 0, 0, 0.14)     100%
    );
    pointer-events: none;
    z-index: 1;
}

/* -- Panel 1: large landscape · left-center -- */
.pl-panel-1 {
    width: 315px;
    height: 192px;
    left: 3%;
    top: 13%;
    transform: translateX(-55px) scale(0.9);
    transition: opacity 0.8s ease 0.15s, transform 0.95s cubic-bezier(.22,.68,0,1.12) 0.15s;
}

/* -- Panel 2: portrait · top-right -- */
.pl-panel-2 {
    width: 178px;
    height: 260px;
    right: 3%;
    top: 4%;
    transform: translateY(-55px) scale(0.9);
    transition: opacity 0.8s ease 0.35s, transform 0.95s cubic-bezier(.22,.68,0,1.12) 0.35s;
}

/* -- Panel 3: portrait · bottom-left -- */
.pl-panel-3 {
    width: 178px;
    height: 242px;
    left: 3%;
    bottom: 5%;
    transform: translateY(55px) scale(0.9);
    transition: opacity 0.8s ease 0.55s, transform 0.95s cubic-bezier(.22,.68,0,1.12) 0.55s;
}

/* -- Panel 4: landscape · bottom-right -- */
.pl-panel-4 {
    width: 288px;
    height: 176px;
    right: 3%;
    bottom: 6%;
    transform: translateX(55px) scale(0.9);
    transition: opacity 0.8s ease 0.75s, transform 0.95s cubic-bezier(.22,.68,0,1.12) 0.75s;
}

/* -- Panel 5: landscape · bottom-center-left (below & left of card) -- */
.pl-panel-5 {
    width: 218px;
    height: 130px;
    left: 28%;
    bottom: 5%;
    transform: translateY(45px) scale(0.9);
    transition: opacity 0.8s ease 0.95s, transform 0.95s cubic-bezier(.22,.68,0,1.12) 0.95s;
}

/* -- Panel 6: portrait · between card and right column (vertically centered) -- */
.pl-panel-6 {
    width: 185px;
    height: 218px;
    right: 17%;
    top: 38%;
    transform: translateX(55px) scale(0.9);
    transition: opacity 0.8s ease 1.15s, transform 0.95s cubic-bezier(.22,.68,0,1.12) 1.15s;
}

/* Enter state (all panels) */
.pl-panel.pl-in {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

.pl-panel.pl-in img {
    transform: scale(1.0);
}

/* ==================== BRAND CARD ==================== */
.pl-brand {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 58px 80px 50px;
    min-width: 360px;
    text-align: center;
    background: rgba(10, 22, 14, 0.68);
    backdrop-filter: blur(36px);
    -webkit-backdrop-filter: blur(36px);
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 32px;
    box-shadow:
        0 36px 80px rgba(0, 0, 0, 0.68),
        inset 0 1.5px 0 rgba(255, 255, 255, 0.26),
        inset 0 -1px 0 rgba(0, 0, 0, 0.22);
    opacity: 0;
    transform: scale(0.84);
    transition: opacity 0.75s ease, transform 0.9s cubic-bezier(.22,.68,0,1.18);
}

/* Top-left glass sheen on card */
.pl-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 32px;
    background: linear-gradient(
        138deg,
        rgba(255, 255, 255, 0.16) 0%,
        rgba(255, 255, 255, 0.04) 44%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 0;
}

.pl-brand.pl-in {
    opacity: 1;
    transform: scale(1);
}

.pl-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 20px rgba(83, 181, 60, 0.36));
    animation: plLogoPulse 3.2s ease-in-out infinite;
}

.pl-name {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pl-name-main {
    font-family: 'Fraunces', serif;
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 22px rgba(83, 181, 60, 0.24);
}

.pl-name-sub {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.62rem, 1.3vw, 0.80rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

/* Loading bar */
.pl-bar-wrap {
    position: relative;
    z-index: 1;
    width: 180px;
    height: 3px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 8px;
}

.pl-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #53B53C, #71c98a, #53B53C);
    background-size: 200% auto;
    border-radius: 999px;
    animation: plBarFill 3.2s ease 1.6s forwards,
               plBarShimmer 2s linear 1.6s infinite;
}

/* ==================== KEYFRAMES ==================== */
@keyframes plBarFill {
    from { width: 0%; }
    to   { width: 100%; }
}

@keyframes plBarShimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

@keyframes plLogoPulse {
    0%, 100% { filter: drop-shadow(0 4px 18px rgba(83, 181, 60, 0.28)); }
    50%       { filter: drop-shadow(0 4px 30px rgba(83, 181, 60, 0.60)); }
}

/* ==================== EXIT ==================== */
#preloader.pl-exit .pl-panel,
#preloader.pl-exit .pl-brand {
    opacity: 0 !important;
    transform: scale(0.88) !important;
    transition: opacity 0.45s ease 0s, transform 0.50s ease 0s !important;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1100px) {
    .pl-panel-1 { width: 240px; height: 148px; }
    .pl-panel-2 { width: 148px; height: 215px; }
    .pl-panel-3 { width: 148px; height: 200px; }
    .pl-panel-4 { width: 230px; height: 142px; }
    .pl-panel-5 { width: 175px; height: 108px; left: 25%; bottom: 5%; }
    .pl-panel-6 { width: 152px; height: 182px; right: 15%; top: 38%; }
}

@media (max-width: 768px) {
    .pl-panel-1 { width: 165px; height: 102px; left: 2%; top: 7%; }
    .pl-panel-2 { width: 115px; height: 168px; right: 2%; top: 3%; }
    .pl-panel-3 { width: 115px; height: 155px; left: 2%; bottom: 3%; }
    .pl-panel-4 { width: 160px; height: 100px; right: 2%; bottom: 4%; }
    .pl-panel-5 { display: none; }
    .pl-panel-6 { display: none; }
    .pl-brand { padding: 36px 40px 30px; min-width: 0; }
    .pl-logo { width: 88px; height: 88px; }
}

@media (max-width: 480px) {
    .pl-panel-1 { width: 125px; height: 78px; }
    .pl-panel-2 { width: 90px; height: 130px; }
    .pl-panel-3 { width: 90px; height: 120px; }
    .pl-panel-4 { width: 120px; height: 76px; }
    .pl-brand { padding: 28px 24px 24px; }
    .pl-logo { width: 72px; height: 72px; }
    .pl-name-main { font-size: 1.35rem; }
    .pl-bar-wrap { width: 135px; }
}

@media (prefers-reduced-motion: reduce) {
    .pl-panel, .pl-brand, .pl-bar, .pl-logo {
        animation: none !important;
        transition: none !important;
    }
}
