/* Home loader — same forest green + gold as the landing page */

html:has(.gg-load:not(.is-exit)) {
    overflow: hidden;
}

.gg-load {
    --gg-load-ink: #001a14;
    --gg-load-forest: #003B2E;
    --gg-load-gold: #FFD700;
    --gg-load-gold-soft: #ffe9a8;
    --gg-load-gold-deep: #b8860b;
    --gg-load-cream: #FFF7E6;
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    overflow: hidden;
    color: var(--gg-load-cream);
    background: var(--gg-load-ink);
    isolation: isolate;
}

.gg-load-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(900px 480px at 50% -8%, rgba(255, 215, 0, 0.16), transparent 55%),
        radial-gradient(ellipse 70% 50% at 12% 92%, rgba(11, 107, 58, 0.28), transparent 60%),
        radial-gradient(ellipse 50% 40% at 88% 80%, rgba(255, 215, 0, 0.08), transparent 62%),
        linear-gradient(180deg, #001a14 0%, #003B2E 42%, #00120e 100%);
}

.gg-load-stage {
    position: relative;
    z-index: 1;
    width: min(78vw, 260px);
    height: min(78vw, 250px);
    display: grid;
    place-items: center;
}

.gg-load-ring {
    position: absolute;
    width: 214px;
    height: 214px;
    border-radius: 50%;
    background: conic-gradient(
        from 20deg,
        transparent 0 62%,
        rgba(255, 215, 0, 0.15) 74%,
        #ffe9a8 88%,
        #FFD700 96%,
        transparent 100%
    );
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.55));
    animation: ggLoadSpin 5.2s linear infinite;
}

.gg-load-halo {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.38), rgba(255, 215, 0, 0.08) 46%, transparent 70%);
    animation: ggLoadHalo 2.4s ease-in-out infinite;
}

.gg-load-spark {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ffe9a8;
    box-shadow: 0 0 8px #FFD700;
    opacity: 0;
    animation: ggLoadRise 3.4s ease-in infinite;
}

.gg-load-s1 { left: 28%; bottom: 34%; animation-delay: 0.1s; }
.gg-load-s2 { left: 68%; bottom: 30%; animation-delay: 0.7s; width: 3px; height: 3px; }
.gg-load-s3 { left: 48%; bottom: 22%; animation-delay: 1.2s; }
.gg-load-s4 { left: 78%; bottom: 42%; animation-delay: 1.8s; width: 4px; height: 4px; }
.gg-load-s5 { left: 18%; bottom: 46%; animation-delay: 2.2s; width: 3px; height: 3px; }
.gg-load-s6 { left: 58%; bottom: 18%; animation-delay: 0.4s; }

.gg-load-float {
    position: relative;
    z-index: 2;
    width: 120px;
    height: 156px;
    animation: ggLoadFloat 2.6s ease-in-out infinite;
}

.gg-load-chick {
    position: absolute;
    left: 50%;
    bottom: 78px;
    width: 64px;
    transform: translateX(-50%);
    z-index: 3;
}

.gg-load-tuft {
    display: block;
    width: 0;
    height: 0;
    margin: 0 auto -2px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 10px solid #f6c445;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.6));
}

.gg-load-head {
    position: relative;
    width: 58px;
    height: 50px;
    margin: 0 auto;
    border-radius: 50% 50% 46% 46%;
    background:
        radial-gradient(circle at 34% 28%, #fff6c8, transparent 36%),
        radial-gradient(circle at 50% 60%, #f6c445, #d4920a 78%);
    box-shadow:
        inset -6px -8px 10px rgba(160, 90, 0, 0.28),
        0 8px 14px rgba(0, 0, 0, 0.18);
}

.gg-load-eye {
    position: absolute;
    top: 20px;
    width: 7px;
    height: 8px;
    border-radius: 50%;
    background: #1a1408;
    transform-origin: center;
    animation: ggLoadBlink 3.4s ease-in-out infinite;
}

.gg-load-eye::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: #fff;
}

.gg-load-eye-l { left: 14px; }
.gg-load-eye-r { right: 14px; animation-delay: 0.05s; }

.gg-load-beak {
    position: absolute;
    left: 50%;
    bottom: 8px;
    width: 10px;
    height: 7px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #ffb703, #e07a00);
    border-radius: 0 0 8px 8px;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.gg-load-egg {
    position: absolute;
    left: 50%;
    bottom: 8px;
    width: 96px;
    height: 118px;
    transform: translateX(-50%);
    border-radius: 50% 50% 48% 48% / 58% 58% 42% 42%;
    background:
        radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.85), transparent 22%),
        linear-gradient(165deg, #fff6d0 0%, #ffe08a 28%, #FFD700 52%, #e0a106 78%, #a16207 100%);
    box-shadow:
        inset -12px -16px 18px rgba(120, 70, 0, 0.28),
        inset 8px 10px 14px rgba(255, 255, 255, 0.45),
        0 18px 28px rgba(0, 0, 0, 0.28),
        0 0 26px rgba(255, 215, 0, 0.35);
    animation: ggLoadPulse 2.3s ease-in-out infinite;
    overflow: hidden;
}

.gg-load-shine {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 18px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    transform: rotate(-18deg);
    filter: blur(0.4px);
}

.gg-load-crack {
    position: absolute;
    left: 18%;
    right: 18%;
    top: 18px;
    height: 16px;
    background:
        linear-gradient(#fff8e0, #fff8e0) 0 6px / 18px 2px no-repeat,
        linear-gradient(#c98512, #c98512) 16px 0 / 2px 10px no-repeat,
        linear-gradient(#fff8e0, #fff8e0) 16px 8px / 22px 2px no-repeat,
        linear-gradient(#c98512, #c98512) 36px 2px / 2px 12px no-repeat,
        linear-gradient(#fff8e0, #fff8e0) 36px 10px / 24px 2px no-repeat;
    opacity: 0.9;
}

.gg-load-shadow {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 70px;
    height: 10px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.28);
    filter: blur(2px);
    animation: ggLoadShadow 2.6s ease-in-out infinite;
}

.gg-load-copy {
    position: relative;
    z-index: 1;
    width: min(92vw, 360px);
    text-align: center;
    padding: 0 16px;
}

.gg-load-brand {
    margin: 0;
    font-family: 'Cinzel', 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.35rem, 4.6vw, 1.85rem);
    font-weight: 700;
    letter-spacing: 0.16em;
    background: linear-gradient(115deg, #fff8e7 0%, #FFD700 48%, #b8860b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.gg-load-sub {
    margin: 6px 0 0;
    font-family: 'Manrope', 'Outfit', system-ui, sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.34em;
    color: rgba(255, 233, 168, 0.72);
}

.gg-load-status {
    margin: 16px 0 0;
    font-family: 'Manrope', 'Outfit', system-ui, sans-serif;
    font-size: 0.86rem;
    font-weight: 600;
    color: rgba(255, 247, 230, 0.88);
}

.gg-load-dots {
    display: inline-flex;
    gap: 3px;
    margin-left: 4px;
    vertical-align: baseline;
}

.gg-load-dots i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #FFD700;
    animation: ggLoadDot 1.1s ease-in-out infinite;
}

.gg-load-dots i:nth-child(2) { animation-delay: 0.16s; }
.gg-load-dots i:nth-child(3) { animation-delay: 0.32s; }

.gg-load-bar {
    width: min(240px, 70%);
    height: 3px;
    margin: 14px auto 0;
    border-radius: 999px;
    background: rgba(255, 215, 0, 0.18);
    overflow: hidden;
}

.gg-load-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #b8860b, #FFD700, #fff6d0);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.55);
    animation: ggLoadFill 1.55s ease forwards;
}

.gg-load.is-exit {
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.55s ease;
}

.gg-load.is-done {
    visibility: hidden;
}

@keyframes ggLoadSpin {
    to { transform: rotate(360deg); }
}

@keyframes ggLoadFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes ggLoadPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.08); }
}

@keyframes ggLoadHalo {
    0%, 100% { transform: scale(0.92); opacity: 0.7; }
    50% { transform: scale(1.06); opacity: 1; }
}

@keyframes ggLoadBlink {
    0%, 42%, 50%, 100% { transform: scaleY(1); }
    46% { transform: scaleY(0.12); }
}

@keyframes ggLoadRise {
    0% { transform: translateY(0) scale(0.6); opacity: 0; }
    18% { opacity: 0.95; }
    100% { transform: translateY(-90px) scale(1); opacity: 0; }
}

@keyframes ggLoadShadow {
    0%, 100% { transform: translateX(-50%) scaleX(1); opacity: 0.28; }
    50% { transform: translateX(-50%) scaleX(0.82); opacity: 0.16; }
}

@keyframes ggLoadDot {
    0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-2px); }
}

@keyframes ggLoadFill {
    to { width: 100%; }
}

@media (max-width: 480px) {
    .gg-load-ring { width: 176px; height: 176px; }
    .gg-load-stage { height: 210px; }
    .gg-load-float { transform: scale(0.9); }
    .gg-load-sub { letter-spacing: 0.22em; }
}

@media (prefers-reduced-motion: reduce) {
    .gg-load-ring,
    .gg-load-halo,
    .gg-load-spark,
    .gg-load-float,
    .gg-load-egg,
    .gg-load-eye,
    .gg-load-shadow,
    .gg-load-dots i {
        animation: none !important;
    }

    .gg-load-bar span {
        animation: none;
        width: 100%;
    }

    .gg-load-spark { opacity: 0.7; }
}
