* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none !important; /* Hide system cursor globally */
}

body, html {
    width: 100%;
    height: 100%;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    overflow: hidden; 
    transition: background-color 0.4s ease, color 0.4s ease;
}

body.bg-white { background-color: #ffffff; color: #000000; }
body.bg-black { background-color: #000000; color: #ffffff; }
body.bg-orange { background-color: #ff5e00; color: #ffffff; }
body.bg-red { background-color: #e50000; color: #ffffff; }
body.bg-blue { background-color: #0044ff; color: #ffffff; }

.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100vh;
    padding: 6vw 7vw; 
}

/* Nav Menu with Generous Spacing */
.nav-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2.8vh; /* Distinct, ample spacing between company rows */
}

.nav-item {
    font-family: Impact, "Arial Black", "Helvetica Neue", Helvetica, sans-serif;
    font-weight: 900;
    font-size: 8.8vw; 
    line-height: 0.95;
    text-transform: uppercase;
    text-decoration: none;
    color: inherit;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
    width: fit-content;
    transform-origin: left center;
    display: block;
    user-select: none;
}

.text-content {
    display: inline-block;
    color: inherit;
    transition: filter 0.3s ease;
}

/* Dim sibling companies when one is hovered */
.nav-menu:hover .nav-item {
    opacity: 0.25;
}

.nav-menu .nav-item:hover {
    opacity: 1;
    transform: scale(1.04) translateX(10px);
}

/* Images Playing Inside The Text */
.text-content.playing-images {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    
    /* Outline & shadow to make the images pop inside the letters */
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.65);
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.45));
    
    animation: textImagePan 3s ease-in-out infinite alternate;
}

body.bg-white .text-content.playing-images {
    -webkit-text-stroke: 1.5px rgba(0, 0, 0, 0.4);
}

@keyframes textImagePan {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

/* Custom Rainbow Cursor */
#custom-cursor {
    width: 32px;
    height: 32px;
    background-image: url('cursor-arrow.svg');
    background-size: contain;
    background-repeat: no-repeat;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s;
    animation: rainbowCursor 3s linear infinite;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)) drop-shadow(0 0 2px rgba(255,255,255,0.8));
}

#custom-cursor.hand {
    background-image: url('cursor-hand.svg');
}

@keyframes rainbowCursor {
    0% { filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)) hue-rotate(0deg); }
    100% { filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)) hue-rotate(360deg); }
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 3rem;
    margin-top: 2.5vh;
    padding-left: 0.5vw;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.social-icon {
    color: #1a1a1a;
    transition: transform 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon:hover {
    transform: scale(1.2) translateY(-3px);
    color: #000;
}

body.bg-black .social-icon,
body.bg-red .social-icon,
body.bg-blue .social-icon {
    color: #fff;
}
body.bg-black .social-icon:hover,
body.bg-red .social-icon:hover,
body.bg-blue .social-icon:hover {
    color: #f0f0f0;
}

/* Contact Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #ffffff;
    color: #000000;
    padding: 4vw 6vw;
    border-radius: 12px;
    text-align: center;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    cursor: none !important;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-content h2 {
    font-family: Impact, "Arial Black", sans-serif;
    font-size: 3rem;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-link {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #000000;
    text-decoration: none;
    transition: opacity 0.2s ease;
    cursor: none !important;
}

.contact-link:hover {
    opacity: 0.5;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2.5rem;
    font-weight: bold;
    color: #000000;
    cursor: none !important;
    transition: transform 0.2s ease;
}

.close-btn:hover {
    transform: scale(1.2);
}

/* 3D Interactive Book */
.book-wrapper {
    perspective: 3000px;
    width: 70vw;
    height: 75vh;
    max-width: 1200px;
    max-height: 800px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

/* Subtle resting tilt */
.book-wrapper:hover {
    transform: scale(1.02);
}

.book {
    width: 45%;
    height: 90%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.book.open {
    transform: translateX(50%) rotateY(5deg);
}

.book-leaf {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    transform-origin: left center;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
}

/* Hover hint on the cover */
.book-leaf:last-child:not(.flipped):hover {
    transform: rotateY(-8deg);
}

.book-page {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background: #fcfcfc;
    border-radius: 0 16px 16px 0;
    overflow: hidden;
    box-shadow: inset 10px 0 30px rgba(0,0,0,0.06), inset -2px 0 5px rgba(0,0,0,0.05), 3px 5px 15px rgba(0,0,0,0.1);
}

.book-page.back {
    transform: rotateY(180deg);
    border-radius: 16px 0 0 16px;
    box-shadow: inset -10px 0 30px rgba(0,0,0,0.06), inset 2px 0 5px rgba(0,0,0,0.05), -3px 5px 15px rgba(0,0,0,0.1);
    background: #f8f8f8;
}

.book-leaf.flipped {
    transform: rotateY(-180deg);
}

.book-content {
    padding: 3.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #111;
    font-size: 1.25rem;
    line-height: 1.6;
    text-align: left;
}

.book-content h1 {
    font-family: Impact, "Arial Black", sans-serif;
    font-size: 5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    text-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.book-content p {
    margin-bottom: 1.5rem;
}

.book-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Spine shading */
.book-spine-shade {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 12%;
    background: linear-gradient(to right, rgba(0,0,0,0.18), transparent);
    pointer-events: none;
}
.book-page.back .book-spine-shade {
    left: auto;
    right: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.18), transparent);
}

/* Update Modal Content to fit book */
.modal-content.book-modal {
    background: transparent;
    box-shadow: none;
    padding: 0;
    width: 100%;
    max-width: none;
    display: flex;
    justify-content: center;
}

.close-btn.book-close {
    color: #ffffff;
    top: 2rem;
    right: 3rem;
    position: fixed;
}

/* Statue Video Container */
.statue-container {
    position: fixed;
    right: 5vw;
    top: 45%;
    transform: translateY(-50%);
    width: 35vw;
    height: auto;
    max-height: 80vh;
    z-index: 5;
    pointer-events: auto;
    cursor: none !important;
    transition: filter 0.4s ease;
    
    /* Default assuming dark background for video (removes black) */
    mix-blend-mode: screen;
    filter: contrast(1.1);
}

/* When the page is white, a white statue on black bg disappears with 'screen'. 
   We invert it (making it a black statue on white bg) and use 'multiply' to drop the white! */
body.bg-white .statue-container {
    mix-blend-mode: multiply;
    filter: invert(1) contrast(1.1);
}

.statue-container.hovered {
    /* Removed drop-shadow and scale to prevent rectangle artifact */
    filter: contrast(1.2);
}

body.bg-white .statue-container.hovered {
    filter: invert(1) contrast(1.2);
}

#statue-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 768px) {
    .nav-menu {
        gap: 3.5vh;
    }
    .nav-item {
        font-size: 13vw;
    }
}
