@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    overflow: hidden; /* Slide based, no scroll */
    color: #333;
    background-color: #fff;
}

/* Base Colors */
:root {
    --color-primary: #f0ebe5;     /* Cream background */
    --color-secondary: #ce745f;   /* Terracotta right sidebar/accents */
    --color-tertiary: #8a3a2d;    /* Dark red details */
    --black: #1a1a1a;
    --white: #ffffff;
}

/* Static Background Layout */
.background-layout {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -10;
}
.bg-top {
    position: absolute; top: 0; left: 0; width: 100%; height: 50%;
    background-color: var(--color-primary);
}
.bg-bottom {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 50%;
    background-color: var(--white);
}
.bg-right {
    position: absolute; top: 0; right: 0; width: 20vw; height: 100%;
    background-color: var(--color-secondary);
    overflow: hidden;
}

#sidebar-video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease;
    z-index: 1;
}

/* Fixed Header */
.header {
    position: fixed;
    top: 40px;
    left: 40px;
    right: 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 50;
    pointer-events: none; /* Let clicks pass through empty space */
}

.header > * {
    pointer-events: auto; /* Re-enable clicks on logo and nav */
}

.brand {
    display: flex;
    flex-direction: column;
}

.brand-logo {
    height: 70px; /* Adjusted to fit layout nicely */
    object-fit: contain;
}

.main-nav {
    display: flex;
    gap: 40px;
    margin-right: 20vw; /* Keep clear of yellow bar */
}

.main-nav a {
    text-decoration: none;
    color: #555;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--black);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    height: 2px;
    background-color: var(--black);
}

/* Right Sidebar (Social & Join Us) */
.social-sidebar {
    position: fixed;
    top: 0; right: 0; width: 20vw; height: 100vh;
    z-index: 40;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 40px 0 15vh;
    pointer-events: none;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 22px;
    pointer-events: auto;
    align-items: center;
}

.social-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.85);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    text-decoration: none;
    transition: background 0.4s ease, color 0.4s ease,
                transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 0.4s ease,
                box-shadow 0.4s ease;
}

.social-icon svg {
    width: 18px;
    height: 18px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-tertiary);
    border-color: transparent;
    transform: scale(1.18) translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.social-icon:hover svg {
    transform: scale(1.1);
}

/* Play Button */
.sidebar-play-btn {
    position: fixed;
    top: 35vh; /* Adjust height based on image */
    right: 20vw; /* Exactly on the dividing line */
    transform: translate(50%, -50%); /* Center exactly on the line */
    z-index: 55;
    pointer-events: auto;
    width: 80px; /* Made larger */
    height: 80px; /* Made larger */
    border-radius: 50%;
    border: none;
    background: var(--black);
    color: var(--white);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sidebar-play-btn svg {
    width: 32px;
    height: 32px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sidebar-play-btn:hover {
    background: var(--color-tertiary); /* Dark red on hover */
    color: var(--white);
    transform: translate(50%, -50%) scale(1.15); /* Keep centered while scaling */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.sidebar-play-btn:hover svg {
    transform: scale(1.1);
}

.sidebar-play-btn.is-playing {
    background: var(--color-tertiary);
    box-shadow: 0 0 0 6px rgba(138, 58, 45, 0.25); /* Subtle glow */
}

.join-us-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    transform: translateX(-40px); /* Hang out slightly */
}

.join-us-text {
    transform: rotate(270deg);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-right: -40px;
}

.arrows svg {
    display: block;
}

/* Slider Controls */
.slider-controls {
    position: fixed;
    top: 65%;
    right: 20vw;
    transform: translate(50%, -50%); /* Center on the border */
    display: flex;
    z-index: 60;
}

.slider-controls button {
    width: 60px;
    height: 60px;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s, transform 0.2s;
}

.slider-controls button:active {
    transform: scale(0.95);
}

.prev-btn {
    background-color: var(--color-secondary);
    color: var(--white);
}

.next-btn {
    background-color: var(--black);
    color: var(--white);
}

/* Slides Container */
.slides-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.slides-container::-webkit-scrollbar {
    display: none;
}

.slide {
    position: relative;
    width: 100vw; height: 100vh;
    scroll-snap-align: start;
    pointer-events: auto;
    overflow: hidden;
}

/* Huge Typography */
.huge-typography {
    position: absolute;
    top: 50%; left: 40%;
    transform: translate(-50%, -50%);
    width: 80%;
    text-align: left;
    z-index: 5;
    pointer-events: none;
}

.typo-top, .typo-bottom {
    font-size: 11vw;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 15px;
    white-space: nowrap;
}

.typo-top {
    color: var(--white);
    margin-bottom: 20px;
    animation: driftLeft 20s ease-in-out infinite;
}

.typo-bottom {
    color: #888888;
    animation: driftRight 20s ease-in-out infinite;
}

@keyframes driftLeft {
    0% { transform: translateX(3vw); }
    50% { transform: translateX(-3vw); }
    100% { transform: translateX(3vw); }
}

@keyframes driftRight {
    0% { transform: translateX(-3vw); }
    50% { transform: translateX(3vw); }
    100% { transform: translateX(-3vw); }
}

.underlined {
    position: relative;
    display: inline-block;
}

.typo-top .underlined::after {
    content: '';
    position: absolute;
    bottom: 10px; left: 0; width: 100%; height: 12px;
    background-color: var(--color-secondary);
    z-index: -1;
}

.typo-bottom .underlined::after {
    content: '';
    position: absolute;
    bottom: 10px; left: 0; width: 100%; height: 12px;
    background-color: var(--color-secondary);
    z-index: -1;
}

.typo-sub {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-tertiary);
    letter-spacing: 5px;
    margin-bottom: 15px;
    display: block;
}

/* Center Image (Model Carousel) */
.model-carousel {
    position: absolute;
    top: 50%; left: 55%;
    transform: translate(-50%, -50%);
    width: 50%; height: 95vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    pointer-events: none; /* Let background clicks pass through */
}

.model-item {
    position: absolute;
    bottom: 0;
    height: 100%;
    object-fit: contain;
    object-position: bottom center;
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    pointer-events: auto; /* Clickable */
    transform-origin: bottom center;
}

/* Layer 1: Front */
.model-item.pos-1 {
    transform: translateX(0) scale(1);
    z-index: 10;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.2)) blur(0px);
    opacity: 1;
}

/* Layer 2: Middle Background */
.model-item.pos-2 {
    transform: translateX(-15vw) scale(0.85);
    z-index: 5;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1)) blur(3px);
    opacity: 0.7;
}

/* Layer 3: Far Background */
.model-item.pos-3 {
    transform: translateX(-28vw) scale(0.7);
    z-index: 1;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.05)) blur(6px);
    opacity: 0.4;
}

.model-item:hover {
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.3)) blur(0px) brightness(1.1);
}

/* Bottom Left Info */
.bottom-info {
    position: absolute;
    bottom: 80px; left: 40px;
    width: 300px;
    z-index: 25;
}

.info-title {
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 15px;
    display: inline-block;
    position: relative;
}

.info-title::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0; width: 100%; height: 4px;
    background-color: var(--color-secondary);
}

.info-desc {
    font-size: 0.8rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
}

.sub-gallery {
    position: absolute;
    right: 21vw;           /* Just outside the 20vw terracota, in the white area */
    top: 72%;              /* Below the arrows at 65% */
    display: flex;
    flex-direction: row;
    gap: 10px;
    z-index: 50;
}

.sub-thumb {
    width: 64px;
    height: 86px;
    object-fit: cover;
    object-position: top center;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.sub-thumb:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 10px 22px rgba(0,0,0,0.18);
}

.sub-thumb.active {
    border-color: var(--color-secondary);
    box-shadow: 0 6px 18px rgba(206, 116, 95, 0.4);
    transform: translateY(-3px);
}

.explore-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--color-tertiary);
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 15px 25px;
    letter-spacing: 1px;
    width: 250px;
    transition: transform 0.3s;
}

.explore-btn:hover {
    transform: translateX(10px);
}

/* Bottom Right Indicator (Inside Yellow Area) */
.slide-indicator {
    position: absolute;
    bottom: 60px; right: 4vw;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 25;
}

.slide-num {
    font-size: 6rem;
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 3px var(--black);
    line-height: 1;
}

.slide-location {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 3px;
    line-height: 1.5;
    color: var(--black);
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    .huge-typography { left: 50%; width: 90%; }
    .typo-top, .typo-bottom { font-size: 13vw; }
    .model-wrapper { left: 50%; width: 70%; }
    .bg-right { width: 15vw; }
    .slider-controls { right: 15vw; }
    .social-sidebar { display: none; }
    .main-nav { display: none; }
}

@media (max-width: 768px) {
    .bg-right, .social-sidebar, .sidebar-play-btn { display: none; }
    
    .header { 
        display: block; 
        top: 20px; left: 20px; right: 20px; 
        height: 40px; /* Force height so we can absolutely position inside */
    }
    .brand-logo { height: 35px; }
    
    .menu-toggle-btn { 
        position: absolute !important; 
        top: 2px !important; /* Mathematically adjusted for visual center */
        right: 0 !important; 
        width: 35px !important; 
        height: 22px !important; 
    }
    
    .left-offcanvas-toggle {
        display: flex;
        position: fixed;
        left: 0; top: 50%;
        transform: translateY(-50%) rotate(180deg);
        writing-mode: vertical-rl;
        background-color: var(--color-secondary);
        color: var(--white);
        padding: 20px 8px;
        font-size: 0.75rem;
        font-weight: 800;
        letter-spacing: 4px;
        border-radius: 8px 0 0 8px; /* Due to rotation, this effectively rounds the right side */
        box-shadow: -2px 0 10px rgba(0,0,0,0.2);
        cursor: pointer;
        z-index: 45;
        align-items: center;
        justify-content: center;
    }
    
    .main-nav { 
        position: fixed;
        top: 0; 
        left: -280px; /* Hidden offscreen */
        width: 250px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(15px);
        padding: 80px 20px 20px 20px;
        display: flex; 
        flex-direction: column;
        overflow-x: hidden;
        gap: 20px;
        z-index: 60;
        transition: left 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        border-right: 1px solid rgba(0,0,0,0.1);
        box-shadow: 10px 0 30px rgba(0,0,0,0.1);
    }
    
    .main-nav.open {
        left: 0;
    }
    
    .main-nav a { 
        white-space: normal; 
        font-size: 1rem; 
        background: transparent;
        backdrop-filter: none;
        padding: 10px 0;
        border-radius: 0;
        border: none;
        border-bottom: 1px solid rgba(0,0,0,0.1);
        box-shadow: none;
        color: var(--black);
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    .main-nav a.active {
        background: transparent;
        color: var(--color-secondary);
        border-color: rgba(0,0,0,0.1);
    }
    .main-nav a.active::after { display: none; }
    
    /* Make the hamburger menu black on mobile since there is no terracotta background */
    .menu-toggle-btn span { background-color: var(--black) !important; }
    
    .huge-typography { 
        top: 22%; /* Push down to avoid logo */
        width: 100%; 
        text-align: center; 
        opacity: 0.9;
    }
    .typo-top, .typo-bottom { font-size: 15vw; line-height: 1; }
    
    .model-carousel { 
        width: 140%; 
        height: 75vh; /* Huge product image */
        top: 45%; 
        z-index: 15; /* Sit behind UI */
    }
    
    .sub-gallery { 
        top: 45%; 
        bottom: auto; 
        right: 20px; 
        transform: translateY(-50%); 
        flex-direction: column;
        justify-content: center;
        width: auto;
        z-index: 50;
    }
    .sub-thumb { width: 45px; height: 65px; margin-bottom: 10px; } 
    
    .bottom-info { 
        bottom: 0; 
        width: 100%; 
        left: 0; 
        transform: none; 
        text-align: center; 
        z-index: 50; 
        background: linear-gradient(to top, rgba(255, 255, 255, 1) 60%, rgba(255, 255, 255, 0) 100%);
        padding: 80px 5% 90px 5%;
        box-sizing: border-box;
    }
    .typo-sub { margin-bottom: 5px; font-size: 0.7rem; }
    .info-title { font-size: 1.5rem; margin-bottom: 10px; }
    .info-desc { margin-bottom: 15px; font-size: 0.75rem; }
    .info-title::after { left: 50%; transform: translateX(-50%); }
    .explore-btn { margin: 0 auto; padding: 10px 25px; font-size: 0.9rem; }
    
    .slider-controls { 
        right: 50%; 
        transform: translateX(50%); 
        bottom: 15px; 
        top: auto; 
    }
    
    .slider-controls button { width: 50px; height: 50px; }
    
    .slide-indicator { display: none; }
}

/* --- Menu Modal Overlay --- */
.menu-toggle-btn {
    position: fixed;
    right: 40px;
    top: 55px; /* Aligned vertically with logo/nav */
    width: 35px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 60;
}

.menu-toggle-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--white);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle-btn:hover span {
    background-color: var(--black);
}

.menu-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-backdrop {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(206, 116, 95, 0.95); /* Terracotta background #ce745f */
    backdrop-filter: blur(12px);
}

.close-modal-btn {
    position: absolute;
    top: 40px; right: 40px;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 4rem;
    font-weight: 300;
    cursor: pointer;
    z-index: 101;
    transition: transform 0.4s ease, color 0.4s ease;
}

.close-modal-btn:hover {
    transform: rotate(90deg);
    color: var(--color-tertiary);
}

.modal-content {
    position: relative;
    z-index: 101;
    display: flex;
    flex-direction: column;
    gap: 30px;
    text-align: center;
    transform: translateY(40px);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-link {
    text-decoration: none;
    color: var(--white);
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    position: relative;
    transition: color 0.3s;
}

.modal-link::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 4px;
    background-color: var(--color-tertiary);
    transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-link:hover {
    color: rgba(255, 255, 255, 0.7);
}

.modal-link:hover::after {
    width: 100%;
}
