/* =================================================================
   ARCANE POPUP - RESPONSIVE DESIGN
   Based on RESPONSIVE-DESIGN-GUIDE.md principles
   ================================================================= */

/* CSS Variables for Popup */
:root {
    --popup-brown: #543e1e;
    --popup-beige: #f5f0e8;
    --popup-page: #fff8d9;
    --popup-green: #2b6015;
    --popup-dark-brown: #3a2918;
    --popup-scrollbar-track: #f5f0e8;
}

/* =================================================================
   POPUP OVERLAY & CONTAINER
   ================================================================= */

.arcane-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    z-index: 2000;
}

.arcane-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(85vw, 90vw, 95vw);  /* Fluid width */
    height: clamp(70vh, 80vh, 85vh);  /* Fluid height */
    background: var(--popup-brown);
    border-radius: clamp(10px, 1.5vw, 15px);
    box-shadow: 
        0 20px 60px rgba(0,0,0,0.5),
        inset 0 0 30px rgba(0,0,0,0.3);
    padding: clamp(10px, 1.5vw, 15px);
    z-index: 2001;
    display: flex;
    position: relative;
}

/* Arcane tabs inside container's brown border area */
.arcane-tabs {
    position: absolute;
    left: clamp(12px, 1.5vw, 20px);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 1.5vh, 18px);
    z-index: 2002;
    width: clamp(80px, 10vw, 120px);
}

.arcane-tab {
    background: var(--popup-beige);
    border: 2px solid #9b1f35;
    color: var(--popup-brown);
    padding: clamp(10px, 1.2vh, 14px) clamp(14px, 1vw, 18px);
    border-radius: clamp(8px, 1vw, 12px) 0 0 clamp(8px, 1vw, 12px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    transform-origin: left center;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(0.9rem, 1.5vh, 1.1rem);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.arcane-tab:hover {
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.arcane-tab[aria-selected="true"] {
    background: #9b1f35;
    color: var(--popup-beige);
    border-color: var(--popup-beige);
    transform: translateX(3px);
}

/* Slightly adjust for very large screens */
@media screen and (min-width: 2560px) {
    .arcane-tabs {
        left: clamp(20px, 2.5vw, 30px);
        gap: clamp(15px, 2vh, 22px);
    }
    .arcane-tab {
        padding: clamp(12px, 1.5vh, 16px) clamp(16px, 1.2vw, 20px);
    }
}

.arcane-pages-wrapper {
    width: calc(100% - clamp(50px, 6vw, 80px));
    margin-left: auto;
    height: 100%;
    background: var(--popup-beige);
    border-radius: clamp(6px, 1vw, 8px);
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
    position: relative;
}

.arcane-scroll {
    display: flex;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: none;
    scroll-behavior: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--popup-brown) var(--popup-scrollbar-track);
}

.arcane-scroll::-webkit-scrollbar {
    display: block;
    height: clamp(8px, 1vw, 12px);
}

.arcane-scroll::-webkit-scrollbar-track {
    background: var(--popup-scrollbar-track);
    border-radius: 6px;
}

.arcane-scroll::-webkit-scrollbar-thumb {
    background: var(--popup-brown);
    border-radius: 6px;
    border: 2px solid var(--popup-scrollbar-track);
}

.arcane-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--popup-dark-brown);
}

.arcane-page {
    width: 600%;
    height: 100%;
    padding: clamp(15px, 2vh, 25px);
    background: var(--popup-beige);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    scroll-snap-align: none;
}

/* =================================================================
   TYPOGRAPHY - FLUID SIZING
   ================================================================= */

.arcaneTitle1,
.arcaneTitle2,
.arcArt,
.arcVideoTitle {
    font-family: 'Libre Baskerville', serif;
    font-size: clamp(3.5rem, 12vh, 10rem);
    color: #9b1f35;
    line-height: 1.1;
}

.arcanePurposeTitle,
.arcObjectiveTitle,
.arcApproachTitle,
.arcDurationTitle,
.arcProcessTitle,
.arcSistersTitle,
.arcWeaponsTitle {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.5rem, 5vh, 5rem);
    color: #9b1f35;
    line-height: 1.3;
    white-space: nowrap;
}

.arcaneDescription,
.arcObjectiveDescription,
.arcApproachDescription,
.arcDurationDescription,
.arcProcessDescription,
.arcSistersDescription,
.arcWeaponsDescription {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1rem, 2.5vh, 5rem);
    color: #9b1f35;
    line-height: 1.5;
    margin-top: clamp(10px, 1.5vh, 20px);
}

/* =================================================================
   INTRO SECTION
   ================================================================= */

   .titSeqVi{
    position: absolute;
    left: 0%;
    top: 0%;
    width: auto;
    height: 100%;
    z-index: 10;
}

.arcaneTitle1{
    position: absolute;
    left: 40vw;
    top: 15%;
}

.arcaneTitle2{
    position: absolute;
    left: 40vw;
    top: 30%;
    text-align: right;
}

.arcanePurposeTitle{
    position: absolute;
    left: 88vw;
    top: 7%;
}

.arcaneDescription{
    position: absolute;
    left: 88.2vw;
    top: 15%;
    width: 50vw;
}

.titSeqHammer{
    position: absolute;
    left:100vw;
    bottom: 0%;
    width: auto;
    height: 80%;
    z-index: 10;
}

.titSeqShark{
    position: absolute;
    left: 135.5vw;
    top: -3%;
    width: 13%;
    height: auto;
    z-index: 10;
}

.arcObjectiveTitle{
    position: absolute;
    left: 142.5vw;
    top: 50%;
}

.arcObjectiveDescription{
    position: absolute;
    left: 142.7vw;
    top: 58%;
    width: 50vw;
}

.arcApproachTitle{
    position: absolute;
    left: 175vw;
    top: 7%;
}

.arcApproachDescription{
    position: absolute;
    left: 175.2vw;
    top: 15%;
    width: 50vw;
}

.titSeqWatch{
    position: absolute;
    left: 200vw;
    top: 20%;
    width: auto;
    height: 60%;
    z-index: 10;
}

.titSeqGauntlet{
    position: absolute;
    left: 230vw;
    top: 1%;
    width: 10%;
    height: auto;
    z-index: 10;
}

.arcDurationTitle{
    position: absolute;
    left: 220vw;
    top: 50%;
}

.arcDurationDescription{
    position: absolute;
    left: 220.2vw;
    top: 58%;
    width: 50vw;
}

/* =================================================================
   ART SECTION
   ================================================================= */

.titSeqHammer2{
    position: absolute;
    left: 0vw;
    top: 0%;
    width: auto;
    height: 100%;
    z-index: 10;
}

.arcArt{
    position: absolute;
    left: 50vw;
    top: 35%;
}

.titSeqWatchProg{
    position: absolute;
    left: 82vw;
    top: 0%;
    width: auto;
    height: 100%;
    z-index: 10;
}

.arcProcessTitle{
    position: absolute;
    left: 98vw;
    top: 7%;
}

.arcProcessDescription{
    position: absolute;
    left: 98.2vw;
    top: 15%;
    width: 50vw;
}

.titSeqViProg{
    position: absolute;
    left: 36vw;
    top: 0%;
    width: auto;
    height: 100%;
    z-index: 10;   
    scale: 150%; 
}

.arcSistersTitle{
    position: absolute;
    left: 50vw;
    top: 7%;
}

.arcSistersDescription{
    position: absolute;
    left: 50.2vw;
    top: 15%;
}

.titSeqJinxProg{
    position: absolute;
    left: 80vw;
    top: 0%;
    width: auto;
    height: 100%;
    z-index: 10;
    scale: 150%;
}

.titSeqSharkProg{
    position: absolute;
    left: 95vw;
    top: 0%;
    width: auto;
    height: 100%;
    z-index: 10;
    scale: 150%;
}

.arcWeaponsTitle{
    position: absolute;
    left: 120vw;
    top: 7%;
}

.arcWeaponsDescription{
    position: absolute;
    left: 120.2vw;
    top: 15%;
    width: 50vw;
}

.titSeqHammerProg{
    position: absolute;
    left: 160vw;
    top: 0%;
    width: auto;
    height: 100%;
    z-index: 10;
    scale: 150%;
}

.titSeqGauntletProg{
    position: absolute;
    left: 180vw;
    top: 0%;
    width: auto;
    height: 100%;
    z-index: 10;
    scale: 150%;
}

/* =================================================================
   VIDEO SECTION
   ================================================================= */

.arcane-video-container {
    position: absolute;
    left: 75vw;
    top: 50%;
    transform: translate(-50%, -50%);
    width: clamp(60%, 70%, 80%);
    max-width: 800px;
    z-index: 12;
}

.arcane-video {
    width: 100%;
    height: auto;
    border-radius: clamp(6px, 1vw, 8px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
}

.arcVideoTitle{
    position: absolute;
    left: 10vw;
    top: 25%;
}

.titSeqJinx{
    position: absolute;
    left: 110vw;
    top: 0%;
    width: auto;
    height: 100%;
    z-index: 10;
}

/* =================================================================
   CLOSE BUTTON
   ================================================================= */

.close-arcane-btn {
    font-family: 'Libre Baskerville', serif;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: clamp(30px, 4vw, 40px);
    cursor: pointer;
    color: var(--popup-brown);
    z-index: 2004;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    transition: all 0.3s;
}

.close-arcane-btn:hover {
    color: var(--popup-brown);
    transform: rotate(90deg);
}

/* =================================================================
   RESPONSIVE BREAKPOINTS
   ================================================================= */

/* Large Desktop (1920px+) */
@media screen and (min-width: 1920px) {

    .arcane-page:nth-child(1) {
    background: var(--popup-page);
    width: 310%;
    }

    .arcane-page:nth-child(2) {
    background: var(--popup-page);
    width: 210%;
    }

    .arcane-page:nth-child(3) {
    background: var(--popup-page);
    width: 175%;
    }

}

/* Extra Large Desktop (2560px+) */
@media screen and (min-width: 2560px) {

    .arcane-page:nth-child(1) {
        background: var(--popup-page);
        width: 315%;
    }

    .arcane-page:nth-child(2) {
        background: var(--popup-page);
        width: 500%;
    }

    .arcane-page:nth-child(3) {
        background: var(--popup-page);
        width: 200%;
    }

    .arcane-page {
        width: 650%;
    }

    .titSeqWatch{

        left: 205vw;

    }

    .titSeqGauntlet{

        left: 240vw;

    }

    .arcDurationTitle{

        left: 230vw;

    }

    .arcDurationDescription{

        left: 230.2vw;

    }

    .arcane-video-container {
        left: 85vw;
        width: 85%;
        max-width: 1600px;
    }

    .titSeqJinx{
        position: absolute;
        left: 125vw;
        top: 0%;
        width: auto;
        height: 100%;
    }

}

/* Medium Desktop (1024px - 1439px) */
@media screen and (max-width: 1439px) {
    .arcane-container {
        width: 92vw;
        height: 82vh;
    }
}

/* Tablet (768px - 1023px) */
@media screen and (max-width: 1023px) {
    .arcane-container {
        width: 95vw;
        height: 85vh;
    }
}

/* Mobile (below 768px) */
@media screen and (max-width: 767px) {
    .arcane-container {
        width: 95vw;
        height: 90vh;
        padding: 10px;
    }
    
    .close-arcane-btn {
        font-size: 30px;
        top: 5px;
        right: 10px;
    }
}

/* =================================================================
   TOUCH DEVICE OPTIMIZATION
   ================================================================= */

@media (hover: none) and (pointer: coarse) {
    .close-arcane-btn:hover {
        transform: none;
    }
    
    .close-arcane-btn {
        padding: 10px;
    }
}

/* =================================================================
   PERFORMANCE
   ================================================================= */

@media (prefers-reduced-motion: reduce) {
    .close-arcane-btn {
        transition: none;
    }
}

/* =================================================================
   UTILITY CLASSES
   ================================================================= */

.page-content {
    margin: 0 auto;
    color: #2a2a2a;
}

/* Individual page styles */
/* .arcane-page:nth-child(1) {
    background: var(--popup-page);
    width: 310%;
}

.arcane-page:nth-child(2) {
    background: var(--popup-page);
    width: 500%;
}

.arcane-page:nth-child(3) {
    background: var(--popup-page);
    width: 175%;
} */