/* ==============================================================================
   GOLDEN COMPASS — PRELOADER 
   ============================================================================== */

html.gc-intro-pending { overflow: hidden; }
html.gc-intro-pending .gc-preloader {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* ---------------------- 01. Branded preloader stage ---------------------- */
.gc-preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    isolation: isolate;
    display: grid;
    place-items: center;
    background: #0d1517;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}
.gc-preloader.is-playing { visibility: visible; opacity: 1; pointer-events: auto; }
.gc-preloader.is-exiting { visibility: visible; }
.gc-backdrop {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: radial-gradient(circle at 50% 43%, #323329 0, #171f1d 43%, #0d1517 77%);
}
.gc-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .17;
    background-image: linear-gradient(#ffffff09 1px, transparent 1px), linear-gradient(90deg, #ffffff09 1px, transparent 1px);
    background-size: 65px 65px;
    mask-image: radial-gradient(circle at center, black, transparent 70%);
}
.gc-preloader-inner { width: min(94vw, 720px); }
.gc-stage { width: 100%; aspect-ratio: 700 / 440; position: relative; overflow: hidden; }
.gc-ground-grid {
    position: absolute;
    inset: 45% 10% 5%;
    opacity: .3;
    background: repeating-linear-gradient(to bottom, transparent 0 25px, #d29e5933 26px 27px);
    transform: perspective(180px) rotateX(55deg);
}

.gc-drill-rig {
    position: absolute;
    z-index: 8;
    top: 5%;
    left: 50%;
    height: 68%;
    width: 32%;
    opacity: 0;
    transform: translate(-50%, -12%);
    filter: drop-shadow(0 0 12px #d49e592e);
}
.gc-drill-slide { transform: translateY(-55px); }
.gc-drill-head-rotor { transform-box: fill-box; transform-origin: center; }
.gc-buried-core {
    position: absolute;
    z-index: 4;
    left: 50%;
    top: 66%;
    width: 26%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%) scale(.8);
    opacity: 1;
    filter: drop-shadow(0 0 14px #efa85b66);
}
.gc-wheel, .gc-wheel-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.gc-wheel-ring { transform: scale(1.14); }
.gc-wheel-rotating { transform-box: fill-box; transform-origin: center; }
.gc-rock {
    position: absolute;
    z-index: 6;
    left: 0;
    width: 100%;
    height: 56%;
    top: 42%;
    overflow: visible;
    filter: drop-shadow(0 8px 18px #050809aa);
}
.gc-rock-left, .gc-rock-right, .gc-rock-keystone { transform-box: fill-box; transform-origin: center bottom; }
.gc-rock-fracture, .gc-rock-keystone-glow {
    opacity: 0;
    stroke-dasharray: 370;
    stroke-dashoffset: 370;
    filter: drop-shadow(0 0 6px #eea959);
}
.gc-fragment { transform-box: fill-box; transform-origin: center; opacity: 0; }
.gc-bore-axis {
    position: absolute;
    z-index: 7;
    left: calc(50% - 2px);
    top: 55%;
    width: 4px;
    height: 17%;
    opacity: 0;
    background: linear-gradient(#f6c68b, #f0a654, transparent);
    transform-origin: top;
    filter: drop-shadow(0 0 8px #ffb257);
}
.gc-contact-dust { position: absolute; z-index: 9; left: 50%; top: 59%; width: 0; height: 0; }
.gc-contact-dust i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #dfb77b; opacity: 0; }
.gc-contact-dust i:nth-child(1) { --dust-x: -48px; --dust-y: -20px; }
.gc-contact-dust i:nth-child(2) { --dust-x: 36px; --dust-y: -37px; }
.gc-contact-dust i:nth-child(3) { --dust-x: -32px; --dust-y: 12px; }
.gc-contact-dust i:nth-child(4) { --dust-x: 65px; --dust-y: 5px; }
.gc-contact-dust i:nth-child(5) { --dust-x: 13px; --dust-y: -48px; }
.gc-impact-glow {
    position: absolute;
    z-index: 5;
    left: 40%;
    top: 40%;
    width: 20%;
    height: 33%;
    opacity: 0;
    border-radius: 50%;
    background: #f1a8529c;
    filter: blur(30px);
}
.gc-impact-sparks { position: absolute; z-index: 9; left: 50%; top: 59%; width: 0; height: 0; }
.gc-impact-sparks i {
    position: absolute;
    height: 2px;
    width: 22px;
    opacity: 0;
    background: linear-gradient(90deg, #ffc37b, transparent);
    transform-origin: left center;
}
.gc-impact-sparks i:nth-child(1) { --angle: -150deg; --distance: 72px; }
.gc-impact-sparks i:nth-child(2) { --angle: -110deg; --distance: 90px; }
.gc-impact-sparks i:nth-child(3) { --angle: -48deg; --distance: 87px; }
.gc-impact-sparks i:nth-child(4) { --angle: 20deg; --distance: 89px; }
.gc-impact-sparks i:nth-child(5) { --angle: 145deg; --distance: 64px; }
.gc-impact-sparks i:nth-child(6) { --angle: 70deg; --distance: 73px; }
.gc-logo {
    position: absolute;
    z-index: 10;
    inset: 10% 10% 13%;
    opacity: 0;
    transform: translateY(8px) scale(.96);
}
.gc-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gc-bottom-rule {
    position: absolute;
    z-index: 10;
    left: 38%;
    right: 38%;
    bottom: 5%;
    height: 2px;
    opacity: 0;
    background: linear-gradient(to right, transparent, #eba457, transparent);
    box-shadow: 0 0 18px #dfa15f;
}
.gc-preloader-caption {
    margin: 0;
    text-align: center;
    color: #b3bbb7;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .24em;
    opacity: 0;
}
.gc-preloader-caption span { color: #dda15e; margin: 0 8px; }

/* ---------------------- 02. One shared, frame-synchronized motion ---------------------- */
/* All physical elements are animated together */
.gc-preloader.is-playing .gc-fragment-a { --dx: -76px; --dy: -78px; --rotation: -47deg; }
.gc-preloader.is-playing .gc-fragment-b { --dx: 95px; --dy: -62px; --rotation: 62deg; }
.gc-preloader.is-playing .gc-fragment-c { --dx: -101px; --dy: 36px; --rotation: -112deg; }
.gc-preloader.is-playing .gc-fragment-d { --dx: 112px; --dy: 40px; --rotation: 80deg; }
.gc-preloader.is-playing .gc-fragment-e { --dx: -122px; --dy: -26px; --rotation: 44deg; }
.gc-drill-rig, .gc-drill-slide, .gc-drill-head-rotor,
.gc-wheel-rotating, .gc-wheel-ring, .gc-buried-core,
.gc-rock-left, .gc-rock-right, .gc-rock-keystone,
.gc-rock-fracture, .gc-rock-keystone-glow, .gc-fragment,
.gc-bore-axis, .gc-impact-glow, .gc-contact-dust i,
.gc-impact-sparks i, .gc-logo, .gc-bottom-rule,
.gc-preloader-caption { will-change: transform, opacity; }
.gc-preloader.is-exiting { transition: opacity 260ms ease-in-out; opacity: 0; }

/* ---------------------- 03. Responsive and accessibility ---------------------- */
@media (max-width: 670px) {
    .gc-preloader-caption { font-size: 7px; letter-spacing: .15em; }
}
@media (prefers-reduced-motion: reduce) {
    .gc-preloader.is-exiting { transition: none; opacity: 0; visibility: hidden; }
}

/* ---------------------- 04. Visual material polish ---------------------- */
/* Styling only: no change to the approved V6 movement or reveal schedule. */
.gc-drill-rig {
    width: 35%;
    filter: drop-shadow(0 5px 12px #05080988) drop-shadow(0 0 10px #d49e5924);
}
.gc-rock {
    filter: drop-shadow(0 12px 15px #050809c0);
}
.gc-ground-grid {
    opacity: .22;
}
.gc-rock-fracture,
.gc-rock-keystone-glow {
    filter: drop-shadow(0 0 3px #ebad68) drop-shadow(0 0 7px #eea95966);
}

/* Exit wins over the head-time pending state, including on slow devices. */
html.gc-intro-pending .gc-preloader.is-exiting {
    opacity: 0;
    pointer-events: none;
}
