/* Reseta os padrões e esconde a barra de rolagem horizontal */
html {
    height: 100%;
}

body,
html {
    overflow-x: hidden;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #111; /* Fundo escuro para destacar o vídeo */
    margin: 0;
    min-height: 100%;
}

/* Define a altura do scroll para manter o vídeo como fundo fixo da página. */
.scroll-bound {
    min-height: 220vh;
    position: relative;
}

/* Mantém o vídeo preso como pano de fundo da página inteira */
.sticky-container {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #000;
    transition:
        transform 2s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 2s ease-in-out;
    will-change: transform, opacity;
    transform: translate3d(0, 0, 0);
}

#museum-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Garante que o vídeo não fique esticado */
    pointer-events: none;
}

/* --- ESTADO DE ZOOM IN --- */
.sticky-container.zoomed {
    transform: scale(30); /* Amplia 30x na direção da obra de arte */
    opacity: 0; /* Fica completamente preta */
}

/* --- ESTADO DE DESOOM (abertura da próxima página) --- */
.sticky-container.unzoom {
    animation: unzoomOut 1.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes unzoomOut {
    0% {
        transform: scale(30);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- INTERFACE ESPACIAL (MENU) --- */
.menu-overlay {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none; /* Desativa cliques enquanto invisível */
    transition: opacity 0.5s ease;
    z-index: 10;
}

/* Classe injetada pelo JS quando o scroll chega ao fim */
.menu-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.hotspot {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.hotspot__icon {
    width: clamp(72px, 7.5vw, 96px);
    height: clamp(72px, 7.5vw, 96px);
    flex-shrink: 0;
    padding: clamp(9px, 1.2vw, 12px);
    background: #8b6f47;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    object-fit: contain;
    transition: all 0.3s ease;
    transition:
        transform 0.25s ease,
        background 0.3s ease;
}

.hotspot__icon:hover {
    background: var(--accent-color);
    transform: scale(1.1);
    transition: all 0.3s ease;
}

.tooltip {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(-10px);
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    backdrop-filter: blur(8px);
    border-radius: 6px;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    opacity: 0;
    transition:
        opacity 0.35s ease,
        transform 0.35s ease;
    pointer-events: none;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hotspot:hover .tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.hotspot:active .hotspot__icon {
    transform: scale(0.96);
}

/* --- LOGO WATERMARK --- */
.logo-watermark {
    position: fixed;
    bottom: 12px;
    right: 5px;
    z-index: 100;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.logo-watermark img {
    width: 80px;
    height: auto;
    display: block;
    pointer-events: none;
}

.logo-watermark:hover {
    opacity: 1;
}

/* --- MENSAGENS DE DICA (HINTS) --- */
.scroll-hint,
.click-hint {
    position: fixed;
    z-index: 50;
    pointer-events: none;
}

.scroll-hint {
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
    transition:
        opacity 0.35s ease,
        transform 0.35s ease;
}

.scroll-hint__card {
    max-width: min(460px, 84vw);
    padding: 18px 22px;
    border-radius: 16px;
    border: 1px solid rgba(255, 227, 177, 0.55);
    background: linear-gradient(
        140deg,
        rgba(14, 14, 14, 0.84),
        rgba(75, 49, 24, 0.75)
    );
    backdrop-filter: blur(10px);
    box-shadow:
        0 20px 44px rgba(0, 0, 0, 0.5),
        0 0 26px rgba(197, 141, 74, 0.34),
        inset 0 0 0 1px rgba(255, 240, 218, 0.16);
}

.click-hint__card {
    max-width: min(500px, 88vw);
    padding: 16px 22px;
    border-radius: 16px;
    border: 1px solid rgba(255, 227, 177, 0.55);
    background: linear-gradient(
        140deg,
        rgba(14, 14, 14, 0.84),
        rgba(75, 49, 24, 0.75)
    );
    backdrop-filter: blur(10px);
    box-shadow:
        0 20px 44px rgba(0, 0, 0, 0.5),
        0 0 26px rgba(197, 141, 74, 0.34),
        inset 0 0 0 1px rgba(255, 240, 218, 0.16);
    text-align: center;
}

.scroll-hint__label {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 0.76rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(255, 232, 191, 0.97);
}

.click-hint__label {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 0.74rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(255, 232, 191, 0.95);
}

.scroll-hint p {
    margin: 0;
    color: #fff7eb;
    font-size: clamp(1.1rem, 2.2vw, 1.45rem);
    line-height: 1.45;
    letter-spacing: 0.02em;
    font-weight: 600;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.45);
    text-wrap: balance;
}

.click-hint p {
    color: #fff7eb;
    font-size: clamp(1rem, 2vw, 1.22rem);
    letter-spacing: 0.03em;
    font-weight: 600;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.45);
    margin: 0;
}

.scroll-hint.hidden {
    opacity: 0;
    transform: translateY(-50%) translateX(-18px);
}

.click-hint {
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-30px);
    opacity: 0;
    transition:
        opacity 0.35s ease,
        transform 0.35s ease;
}

.click-hint.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(20px);
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateY(-50%) translateX(-130%);
    }
    25% {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
    75% {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-50%) translateX(-130%);
    }
}

@keyframes slideInFromTop {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-100%);
    }
    25% {
        opacity: 1;
        transform: translateX(-50%) translateY(20px);
    }
    75% {
        opacity: 1;
        transform: translateX(-50%) translateY(20px);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-100%);
    }
}

@media (max-width: 1024px) {
    .scroll-bound {
        min-height: 200vh;
    }

    .hotspot {
        gap: 10px;
    }

    .tooltip {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .logo-watermark img {
        width: 72px;
    }
}

@media (max-width: 768px) {
    .scroll-bound {
        min-height: 180vh;
    }

    .sticky-container.zoomed {
        transform: scale(22);
    }

    .hotspot {
        gap: 8px;
    }

    .hotspot__icon {
        width: 48px;
        height: 48px;
        padding: 6px;
    }

    .tooltip {
        display: none;
    }

    .logo-watermark {
        bottom: 10px;
        right: 10px;
    }

    .logo-watermark img {
        width: 64px;
    }

    .scroll-hint {
        left: 12px;
    }

    .scroll-hint__card {
        padding: 14px 16px;
        border-radius: 12px;
    }

    .click-hint {
        width: calc(100vw - 20px);
    }

    .click-hint__card {
        padding: 13px 14px;
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .scroll-bound {
        min-height: 165vh;
    }

    .sticky-container.zoomed {
        transform: scale(18);
    }

    .hotspot__icon {
        width: 42px;
        height: 42px;
        padding: 5px;
    }

    .hotspot[data-x="18"] {
        left: 14% !important;
    }

    .hotspot[data-x="82"] {
        left: 86% !important;
    }

    .hotspot[data-y="75"] {
        top: 72% !important;
    }

    .hotspot[data-y="76"] {
        top: 73% !important;
    }

    .logo-watermark img {
        width: 56px;
    }

    .scroll-hint {
        left: 10px;
    }

    .scroll-hint__card {
        max-width: min(320px, 88vw);
        padding: 12px 14px;
    }

    .scroll-hint__label {
        margin-bottom: 4px;
        font-size: 0.67rem;
        letter-spacing: 0.15em;
    }

    .click-hint.visible {
        transform: translateX(-50%) translateY(12px);
    }

    .click-hint__label {
        margin-bottom: 4px;
        font-size: 0.66rem;
        letter-spacing: 0.15em;
    }
}

@media (hover: none) and (pointer: coarse) {
    .tooltip {
        display: none;
    }
}
