/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Nunito', sans-serif;
}

body {
    background-color: #ffffff;
    color: #C96D9B;
    overflow-x: hidden;
}

/* Fixed background element that stays stationary behind everything */
.fixed-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('image/background.jpg') no-repeat center center/cover;
    z-index: -2;
}

/* Pseudo-element over the fixed background to handle the instant white morph */
.fixed-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, var(--scroll-opacity, 0));
    z-index: 1;
}

/* Target state for instant white overlay morph */
.fixed-background.morph-to-white::before {
    background-color: rgba(255, 255, 255, 1);
}

/* Hero Section Styles */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 80px;
    color: #ffffff;
    z-index: 1;
}

/* Instantly transitions typography and links to main color */
.hero-section.morph-to-white-text {
    color: #C96D9B;
}

.hero-section.morph-to-white-text .nav-links a,
.hero-section.morph-to-white-text .logo span {
    color: #C96D9B;
}

/* Navigation Bar */
.navbar {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 0;
}

/* Rounded square follow block style - high visibility white mix */
.nav-glow-block {
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(255, 255, 255, 0.35); 
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.logo, .nav-links li, .btn-careers {
    position: relative;
    z-index: 1;
}

.logo {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    cursor: pointer;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 10px;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 1px;
    padding: 12px 20px;
    display: inline-block;
}

.btn-careers {
    background-color: #C96D9B;
    color: #fff;
    text-decoration: none;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 1px;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.btn-careers:hover {
    background-color: #d895b7;
}

/* Main Typography Content */
.hero-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-bottom: 60px;
}

.hero-content h1 {
    font-size: 72px;
    font-weight: 900;
    letter-spacing: 2px;
    line-height: 1.1;
    margin-bottom: 30px;
    text-transform: uppercase;
}

/* Video Container Base Floating State */
.video-container {
    position: fixed;
    bottom: 40px;
    right: 80px;
    width: 160px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.4);
    z-index: 10;
    transform-origin: bottom right;
    background-color: #000000;
    transition: width 0.5s ease, height 0.5s ease, transform 0.5s ease, border-radius 0.5s ease, top 0.5s ease, left 0.5s ease, bottom 0.5s ease, right 0.5s ease;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Changed from cover to contain to fit standard video formats beautifully inside the frame */
    pointer-events: none;
}

.video-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    display: none;
    z-index: 11;
    line-height: 1;
}

/* Full screen overlay state */
.video-container.expanded {
    bottom: 50% !important;
    right: 50% !important;
    top: auto !important;
    left: auto !important;
    transform: translate(50%, 50%) scale(1) !important;
    width: 80vw !important;
    max-width: 800px !important;
    height: 45vw !important;
    max-height: 450px !important;
    border-radius: 12px !important;
    border: none !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5) !important;
    z-index: 999;
}

.video-container.expanded video {
    pointer-events: auto;
}

.video-container.expanded .video-close-btn {
    display: block;
}

/* Page 2: About Section */
.about-section {
    width: 100%;
    height: 100vh;
    background-color: transparent;
    color: #8B2B6A;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 80px;
    position: relative;
    z-index: 2;
}

.about-container {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-content {
    text-align: left;
}

.about-content h2 {
    font-size: 48px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.about-content p {
    font-size: 18px;
    line-height: 1.8;
    font-weight: 400;
}

.about-image {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.03);
}
/* ==========================================================================
   Full Screen Loading Animation Wrapper
   ========================================================================== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff; /* Matches the body background color */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999; /* Higher than lightboxes and all components */
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Fade-out effect for smooth transition when loading is complete */
#loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* User Animation Configuration */
.container {
    --uib-size: 60px; /* Slightly scaled up for central presentation visibility */
    --uib-color: #C96D9B; /* Altered from black to match theme primary color */
    --uib-speed: .9s;
    position: relative;
    height: calc(var(--uib-size) / 2);
    width: var(--uib-size);
    filter: url('#uib-jelly-ooze');
    animation: rotate calc(var(--uib-speed) * 2) linear infinite;
    will-change: transform;
}

.container::before,
.container::after {
    content: '';
    position: absolute;
    top: 0%;
    left: 25%;
    width: 50%;
    height: 100%;
    background-color: var(--uib-color);
    border-radius: 100%;
    will-change: transform;
    transition: background-color 0.3s ease;
}

.container::before {
    animation: shift-left var(--uib-speed) ease infinite;
}

.container::after {
    animation: shift-right var(--uib-speed) ease infinite;
}

.svg {
    width: 0;
    height: 0;
    position: absolute;
}



@keyframes rotate {
    0%, 49.999%, 100% { transform: none; }
    50%, 99.999% { transform: rotate(90deg); }
}

@keyframes shift-left {
    0%, 100% { transform: translateX(0%); }
    50% { transform: scale(0.65) translateX(-75%); }
}

@keyframes shift-right {
    0%, 100% { transform: translateX(0%); }
    50% { transform: scale(0.65) translateX(75%); }
}


/* ==========================================================================
   Page 3: Portfolio Scroll & Envelope Styles
   ========================================================================== */

.page-three-track {
    position: relative;
    width: 100%;
    height: 250vh; 
    z-index: 5;
}

.portfolio-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #C96D9B; 
    color: #8B2B6A;
    display: flex;
    align-items: center;
    overflow: hidden;
    clip-path: polygon(0% 0%, 40% 0%, 50% 8%, 60% 0%, 100% 0%, 100% 100%, 0% 100%);
    transform: translateY(100vh);
    will-change: transform;
}

.portfolio-container {
    width: 100%;
    padding: 0 80px;
    margin-top: 6vh; 
}

.portfolio-slider {
    display: flex;
    gap: 40px; 
    width: max-content;
    will-change: transform;
    /* Implements a subtle transition to completely prevent stuttering upon quick-scrolling past limits */
    transition: transform 0.15s ease-out; 
}

.portfolio-card {
    width: calc((100vw - 160px - 80px) / 2.5);
    background: #FFECF7;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
}

.portfolio-text {
    padding: 20px;
    text-align: center;
    color: #ffffff;
}

.card-image {
    width: 100%;
    height: 380px; 
    background: #2a2a2a;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-info {
    padding: 30px;
    flex-grow: 1;
}

.card-info h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.card-info p {
    font-size: 15px;
    color: #b16692;
    line-height: 1.6;
}

/* ==========================================================================
   Page 4: Bento Masonry Gallery (Normal Flow Section)
   ========================================================================== */

.gallery-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-color: #C96D9B; 
    color: #ffffff;
    padding: 100px 80px;
    z-index: 6; 
}

.gallery-header {
    text-align: center;
    margin-bottom: 60px;
}

.gallery-header h2 {
    font-size: 48px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.gallery-header p {
    font-size: 16px;
    color: #888888;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-rows: 280px;
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    background: #161616;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 255, 255, 0.03);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.04);
}

.item-wide {
    grid-column: span 2;
}

.item-tall {
    grid-row: span 2;
}

/* ==========================================================================
   Page 4 Lightbox Overlay
   ========================================================================== */

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.85);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.lightbox-overlay.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #ffffff;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    user-select: none;
    transition: transform 0.2s ease;
}

.lightbox-close:hover {
    transform: scale(1.1);
}

/* ==========================================================================
   Footer Component
   ========================================================================== */

.main-footer {
    width: 100%;
    background-color: #3a222e; /* Updated from #000000 to custom main color */
    padding: 60px 80px 20px 80px;
    border-top: none;
    z-index: 6;
    color: rgba(255, 255, 255, 0.85);
}

.footer-grid-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr; /* Asymmetric focus favoring the map sizing */
    gap: 60px;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-title {
    font-size: 24px;
    font-weight: 900;
    color: #ffffff;
    text-transform: none;
    margin-bottom: 25px;
    letter-spacing: 0.5px;
}

.map-wrapper {
    width: 100%;
    height: 320px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    background-color: #e5e3df;
}

.contact-info-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.contact-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 18px;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 700;
}

.contact-info-list .icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-info-list .text a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.contact-info-list .text a:hover {
    color: #ffffff;
}

/* Inline Social Action Buttons row */
.social-icons-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.social-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background-color: #1f2326; /* Clean dark tone base */
    color: #ffffff;
    text-decoration: none;
    font-size: 18px;
    transition: transform 0.2s, background-color 0.2s;
}

.social-btn:hover {
    transform: translateY(-2px);
}

.social-btn.whatsapp {
    background-color: #25d366; /* Standout standard green badge brand alignment */
}

/* Copyright Row Anchor */
.bottom-copyright {
    width: 100%;
    max-width: 1400px;
    margin: 50px auto 0 auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    font-size: 13px;
    font-weight: 700;
}

/* Mobile responsive safeguards */
@media (max-width: 992px) {
    .footer-grid-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .main-footer {
        padding: 40px 20px 20px 20px;
    }

    .map-wrapper {
        height: 260px;
    }
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: #666666;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #ffffff;
}

/* ==========================================================================
   Responsive Mobile Adjustments (Phone-Safe Rules)
   ========================================================================== */

@media (max-width: 1024px) {
    .portfolio-card {
        width: calc((100vw - 160px - 40px) / 1.5);
    }
}

@media (max-width: 768px) {
    .hero-section { 
        padding: 20px; 
    }
    
    .navbar {
        justify-content: center;
    }
    
    .nav-links, .nav-glow-block, .btn-careers { 
        display: none !important; 
    }
    
    .hero-content h1 { 
        font-size: 36px; 
        line-height: 1.2;
    }
    
    /* Change fixed video loop container behavior to static layout positioning for mobile */
    .video-container { 
        position: relative !important;
        bottom: auto !important;
        right: auto !important;
        margin: 20px auto 0 auto !important;
        transform: none !important;
        width: 100% !important;
        max-width: 340px !important;
        height: 190px !important;
        border: 2px solid rgba(255, 255, 255, 0.8);
    }

    .video-container.expanded {
        position: fixed !important;
        width: 90vw !important;
        height: 50vw !important;
    }

    .about-section { 
        padding: 60px 20px; 
        height: auto;
    }
    
    .about-container { 
        grid-template-columns: 1fr; 
        gap: 30px; 
    }
    
    .about-content { 
        text-align: center; 
    }
    
    .about-content h2 { 
        font-size: 32px; 
    }
    
    .about-image { 
        display: none !important; /* Disposed destination anchor on mobile */
    }
    
    /* Convert horizontal custom page-track scroll engine to natural layout on mobile devices */
    .page-three-track {
        height: auto !important;
    }
    
    .portfolio-section {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        height: auto !important;
        transform: none !important;
        padding: 60px 0;
        clip-path: none !important; /* Prevents text clipping on small screen edges */
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .portfolio-container { 
        padding: 0 20px; 
        margin-top: 20px;
    }
    
    .portfolio-slider {
        gap: 20px;
        padding-bottom: 10px;
    }
    
    .portfolio-card { 
        width: 280px !important; 
        flex-shrink: 0;
    }
    
    .card-image { 
        height: 240px; 
    }

    .gallery-section { 
        padding: 60px 20px; 
    }
    
    .gallery-header h2 {
        font-size: 32px;
    }
    
    .gallery-grid { 
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        grid-auto-rows: 150px;
        gap: 12px;
    }
    
    .item-wide { 
        grid-column: span 2; 
    }
    
    .item-tall { 
        grid-row: span 2; 
    }
    
    .lightbox-overlay img {
        max-width: 95vw;
        max-height: 75vh;
    }
    
    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 36px;
    }

    .main-footer { 
        padding: 30px 20px; 
    }
    
    .footer-content { 
        flex-direction: column; 
        gap: 15px; 
        text-align: center; 
    }
}