/* ============================================================
   ESKECY — Explore
   assets/css/explore.css

   Two separate pages, shared look:
   - Explore page: dusk entrance
   - Studio page: shoppable room

   explore.js fades the page before navigation.
   ============================================================ */


/* ============================================================
   BASE / EXPLORE
   ============================================================ */

.explore {
    position: relative;
    width: 100%;
    background: #0a0a0a;
}


/* ============================================================
   SCENE
   ============================================================ */

.explore__scene {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    background: #0a0a0a;
    opacity: 1;
    transition: opacity 0.35s ease;
}

/* Fade out before navigating */
.explore.is-leaving .explore__scene {
    opacity: 0;
}


/* ============================================================
   BACKGROUND IMAGE
   ============================================================ */

.explore__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}


/* ============================================================
   VIGNETTE / OVERLAY
   ============================================================ */

.explore__vignette {
    position: absolute;
    inset: 0;

    background:
        radial-gradient(
            ellipse at 55% 46%,
            rgba(0, 0, 0, 0) 30%,
            rgba(0, 0, 0, 0.55) 100%
        ),
        linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.5) 0%,
            rgba(0, 0, 0, 0) 22%,
            rgba(0, 0, 0, 0) 70%,
            rgba(0, 0, 0, 0.45) 100%
        );

    pointer-events: none;
}


/* ============================================================
   CORNER BADGE
   ============================================================ */

.explore__badge {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 4;

    display: flex;
    align-items: center;
    gap: 0.5rem;

    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.18em;

    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;

    pointer-events: none;
}

.explore__badge-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;

    border-radius: 50%;
    background: #e8192c;
}


/* ============================================================
   DOOR HOTSPOT
   ============================================================ */

.explore__door {
    position: absolute;

    /*
     * Position is relative to the full scene.
     * Adjust these two values if the actual door in the
     * background image is slightly different.
     */
    top: 49%;
    left: 58%;

    width: clamp(90px, 11vw, 160px);
    aspect-ratio: 3 / 5;

    transform: translate(-50%, -50%);

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 5;

    background: none;
    border: none;
    padding: 0;

    cursor: pointer;
    text-decoration: none;
}


/* Door highlight ring */

.explore__door-ring {
    display: block;

    width: 82%;
    height: 92%;

    border-radius: 46% / 30%;

    transition:
        box-shadow 0.25s ease,
        transform 0.25s ease;
}


/* Door glow animation */

@keyframes explore-door-pulse {
    0%,
    100% {
        box-shadow:
            0 0 0 0 rgba(255, 197, 120, 0.5),
            0 0 42px 10px rgba(255, 197, 120, 0.3);
    }

    50% {
        box-shadow:
            0 0 0 14px rgba(255, 197, 120, 0),
            0 0 62px 20px rgba(255, 197, 120, 0.55);
    }
}


/* Keyboard accessibility */

.explore__door:focus-visible {
    outline: none;
}

.explore__door:focus-visible .explore__door-ring {
    box-shadow: 0 0 0 3px #e8192c;
}


/* ============================================================
   ENTER STUDIO PROMPT
   ============================================================ */

.explore__prompt {
    position: absolute;

    /*
     * Keep the prompt aligned with the door.
     */
    top: 68%;
    left: 58%;

    transform: translateX(-50%);

    z-index: 5;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    padding: 10px 18px 16px;
    margin: 0;

    color: #fff;
    text-align: center;

    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);

    background: none;
    border: none;

    cursor: pointer;
    text-decoration: none;
}


/* Prompt label */

.explore__prompt-label {
    font-family: var(--font-inter);
    font-weight: 900;
    font-size: 0.85rem;
    letter-spacing: 0.22em;

    color: #fff;
    text-transform: uppercase;

    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}


/* Prompt arrow */

.explore__prompt-arrow {
    width: 40px;
    height: 40px;

    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.6);

    display: flex;
    align-items: center;
    justify-content: center;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}


/* Chevron animation */

.explore__prompt-chevron {
    animation: explore-chevron-bounce 1.6s ease-in-out infinite;
}


/* Chevron bounce */

@keyframes explore-chevron-bounce {
    0%,
    100% {
        transform: translateY(0);
        opacity: 0.7;
    }

    50% {
        transform: translateY(-4px);
        opacity: 1;
    }
}


/* ============================================================
   PROMPT HOVER / FOCUS
   ============================================================ */

.explore__prompt:hover .explore__prompt-label,
.explore__prompt:focus-visible .explore__prompt-label {
    /*
     * Keep text visible on the dark background.
     */
    color: #fff;
    opacity: 0.75;
}

.explore__prompt:hover .explore__prompt-arrow,
.explore__prompt:focus-visible .explore__prompt-arrow {
    background: #e8192c;
    border-color: #e8192c;
    transform: scale(1.08);
}

.explore__prompt:hover .explore__prompt-chevron,
.explore__prompt:focus-visible .explore__prompt-chevron {
    animation-play-state: paused;
    transform: translateY(0);
}


/* ============================================================
   BACK TO ENTRANCE
   ============================================================ */

.explore__back {
    position: absolute;

    top: 2rem;
    right: 2rem;

    z-index: 6;

    width: 40px;
    height: 40px;

    border-radius: 50%;

    background: #111;
    border: none;

    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);

    transition:
        background 0.2s ease,
        transform 0.2s ease;

    text-decoration: none;
}

.explore__back:hover {
    background: #e8192c;
    transform: scale(1.05);
}


/* ============================================================
   SHOPPABLE HOTSPOTS
   ============================================================ */

.explore__hotspot {
    position: absolute;

    transform: translate(-50%, -50%);

    z-index: 6;
}


/* ============================================================
   HOTSPOT PIN
   ============================================================ */

.explore__pin {
    position: relative;

    width: 36px;
    height: 36px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.94);
    border: none;

    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);

    font-family: var(--font-inter);
    font-size: 20px;
    font-weight: 300;
    line-height: 1;

    color: #111;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}


/* Hotspot pulse */

.explore__pin::before {
    content: '';

    position: absolute;
    inset: -8px;

    border-radius: 50%;

    border: 1.5px solid rgba(255, 255, 255, 0.5);

    animation: explore-pin-pulse 2.4s ease-out infinite;

    pointer-events: none;
}


/* Hotspot pulse animation */

@keyframes explore-pin-pulse {
    0% {
        opacity: 0.9;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(1.7);
    }
}


/* Pin hover */

.explore__pin:hover {
    transform: scale(1.12);
}


/* Open hotspot */

.explore__hotspot.is-open .explore__pin {
    background: #e8192c;
    color: #fff;

    transform: rotate(45deg);
}

.explore__hotspot.is-open .explore__pin::before {
    display: none;
}


/* ============================================================
   PRODUCT CARD
   ============================================================ */

.explore__card {
    position: absolute;

    bottom: calc(100% + 14px);
    left: 50%;

    transform:
        translateX(-50%)
        translateY(6px);

    width: 236px;

    background: #fafafa;

    border-radius: 14px;

    padding: 14px;

    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);

    opacity: 0;
    pointer-events: none;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}


/* Open card */

.explore__hotspot.is-open .explore__card {
    opacity: 1;

    pointer-events: auto;

    transform:
        translateX(-50%)
        translateY(0);
}


/* ============================================================
   PRODUCT CARD CLOSE BUTTON
   ============================================================ */

.explore__card-close {
    position: absolute;

    top: 8px;
    right: 8px;

    width: 22px;
    height: 22px;

    border-radius: 50%;

    background: #111;
    border: none;

    color: #fafafa;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
}


/* ============================================================
   PRODUCT CARD BODY
   ============================================================ */

.explore__card-body {
    display: flex;

    gap: 12px;

    align-items: flex-start;
}


/* Product image */

.explore__card-thumb {
    width: 52px;
    height: 52px;

    flex: 0 0 auto;

    border-radius: 8px;

    object-fit: cover;

    background: #e8e8e4;
}


/* Product name */

.explore__card-name {
    font-family: var(--font-inter);

    font-weight: 900;

    font-size: 0.75rem;

    letter-spacing: -0.01em;

    text-transform: uppercase;

    color: #111;

    line-height: 1.3;
}


/* Product price */

.explore__card-price {
    font-family: var(--font-inter);

    font-size: 0.75rem;

    font-weight: 700;

    color: #e8192c;

    margin-top: 5px;
}

.explore__card-price .woocommerce-Price-amount {
    color: inherit;
}


/* ============================================================
   ADD TO CART BUTTON
   ============================================================ */

.explore__card-add {
    display: block;

    width: 100%;

    box-sizing: border-box;

    margin-top: 12px;

    padding: 10px 0;

    background: #111;
    color: #fafafa;

    border: none;

    border-radius: 999px;

    text-align: center;
    text-decoration: none;

    font-family: var(--font-inter);

    font-size: 0.6rem;

    letter-spacing: 0.14em;

    font-weight: 700;

    text-transform: uppercase;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}


/* Link version */

.explore__card-add--link {
    color: #fafafa !important;
}


/* Button hover */

.explore__card-add:hover {
    background: #e8192c;
    transform: translateY(-1px);
}


/* Loading state */

.explore__card-add.is-loading {
    opacity: 0.6;
    pointer-events: none;
}


/* ============================================================
   VIEW PRODUCT LINK
   ============================================================ */

.explore__card-view {
    display: block;

    text-align: center;

    margin-top: 8px;

    font-family: var(--font-inter);

    font-size: 0.6rem;

    letter-spacing: 0.1em;

    text-transform: uppercase;

    color: #888;

    text-decoration: none;

    transition: color 0.2s ease;
}

.explore__card-view:hover {
    color: #e8192c;
}


/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 1024px) {

    .explore__door {
        top: 49%;
        left: 58%;

        width: clamp(85px, 14vw, 140px);
    }

    .explore__prompt {
        top: 68%;
        left: 58%;
    }

    .explore__badge {
        top: 1.5rem;
        left: 1.5rem;
    }

    .explore__back {
        top: 1.5rem;
        right: 1.5rem;
    }
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 640px) {

    .explore__scene {
        /*
         * Prevent extremely short screens from compressing
         * the design too much.
         */
        min-height: 560px;
    }


    /* Background */

    .explore__bg {
        object-position: center center;
    }


    /* Badge */

    .explore__badge {
        top: 1.2rem;
        left: 1.2rem;

        font-size: 0.55rem;
        letter-spacing: 0.14em;
    }

    .explore__badge-dot {
        width: 7px;
        height: 7px;
        flex-basis: 7px;
    }


    /* Back button */

    .explore__back {
        top: 1.2rem;
        right: 1.2rem;

        width: 38px;
        height: 38px;
    }


    /* Door */

    .explore__door {
        top: 48%;
        left: 58%;

        width: 20%;
        max-width: 120px;
    }


    /* Enter Studio */

    .explore__prompt {
        top: 67%;
        left: 58%;

        padding: 8px 14px 14px;

        gap: 8px;
    }

    .explore__prompt-label {
        font-size: 0.7rem;
        letter-spacing: 0.17em;
    }

    .explore__prompt-arrow {
        width: 36px;
        height: 36px;
    }


    /* Product card */

    .explore__card {
        width: 208px;
        max-width: calc(100vw - 32px);
    }
}


/* ============================================================
   SMALL MOBILE
   ============================================================ */

@media (max-width: 400px) {

    .explore__door {
        width: 22%;
        left: 58%;
    }

    .explore__prompt {
        left: 58%;
    }

    .explore__prompt-label {
        font-size: 0.65rem;
    }

    .explore__card {
        width: 196px;
    }
}


/* ============================================================
   ACCESSIBILITY
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    .explore__scene,
    .explore__door-ring,
    .explore__prompt-label,
    .explore__prompt-arrow,
    .explore__card,
    .explore__pin,
    .explore__card-add,
    .explore__back {
        transition: none;
    }

    .explore__prompt-chevron,
    .explore__pin::before {
        animation: none;
    }
}