:root {
    --accent: #90bacf;
    --dark-bg: #12161f;
    --dark-alt: #0b0e14; 
    --card-bg: #273145;
    --text-secondary: #FFFFFF; 
    --white: #FFFFFF;
    --transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--dark-bg);
    color: var(--white);
    font-family: 'Roboto Condensed', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Update the container to stack vertically */
.fixed-nav {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 10001;
}

.logo-link-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.main-logo {
    max-width: 120px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
    transition: transform 0.3s ease;
}

.back-link-text {
    color: var(--white);
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.logo-link-group:hover .main-logo {
    transform: scale(1.05);
}

.logo-link-group:hover .back-link-text {
    opacity: 1;
    color: var(--accent);
}

h1, h2, h3, h4 { font-family: 'Be Vietnam Pro', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: -0.02em; }

/* SCROLL PROGRESS BAR */
#scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    z-index: 9999;
    background: rgba(11, 14, 20, 0.5);
}
#scroll-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--dark-bg), var(--accent));
    box-shadow: 0 0 10px var(--accent);
    transition: width 0.1s ease-out;
}

/* --- Shared Section Styling --- */
section {
    padding: 100px 8%;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative; 
    opacity: 0;
    transform: translateY(40px);
    transition: var(--transition);
}
section:nth-child(even) { background-color: var(--dark-alt); }
section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(144, 186, 207, 0.2), transparent);
}
section.visible { opacity: 1; transform: translateY(0); }

/* --- HERO SECTION --- */
.hero { 
    display: grid; 
    grid-template-columns: 1.2fr 0.8fr; 
    gap: 50px; 
    align-items: center;
    position: relative;
    overflow: hidden;
    background: var(--dark-bg);
    border: none; 
}

.hero-bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%);
    object-fit: cover;

    z-index: 0;
    pointer-events: none;

    opacity: 1;
    animation: fadeVideo 1s ease forwards;
    animation-delay: 4s;
}

@keyframes fadeVideo {
    from {
        opacity: 1;
    }
    to {
        opacity: 0.15;
    }
}

/* --- HERO CARDS 2x2 LOGIC --- */
.hero-cards {
    display: grid;
    grid-template-columns: 1fr; /* Default for desktop sidebar */
    gap: 15px;
}

/* Subtle Looping Light Sweep */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        90deg, 
        transparent 0%, 
        rgba(144, 186, 207, 0.05) 50%, 
        transparent 100%
    );
    animation: sweep 3s ease-in-out 1.2s infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes sweep {
    0% { left: -150%; opacity: 0; }
    50% { opacity: 1; }
    100% { left: 150%; opacity: 0; }
}

.hero-content, .hero-nav-container {
    position: relative;
    z-index: 2;
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
    animation-delay: 4s;
    padding-top: 50px;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--accent);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 550px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

/* --- HERO JUMP TO NAVIGATION --- */
.hero-nav-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.jump-to-label {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--accent);
    font-weight: 700;
    opacity: 0.8;
}

.hero-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hero-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    opacity: 0;
    transform: translateX(40px);
    animation: slideInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: calc(var(--delay) * 0.15s + 0.4s);
}

.hero-card {
    background: rgba(39, 49, 69, 0.7);
    padding: 16px 20px;
    border-radius: 10px;
    border-right: 4px solid var(--accent);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.hero-card:hover {
    transform: translateX(-5px);
    background: var(--accent);
    border-right-color: var(--white);
}

.hero-card h4 {
    color: var(--white);
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.hero-card p {
    font-size: 0.75rem;
    margin-bottom: 0;
    opacity: 0.8;
}

.hero-card:hover h4, .hero-card:hover p {
    color: var(--dark-bg);
    opacity: 1;
}

@keyframes slideInRight {
    to { opacity: 1; transform: translateX(0); }
}

/* TAB SYSTEM */
.tabs-nav {
    display: flex;
    background: rgba(255,255,255,0.03);
    padding: 6px;
    border-radius: 50px;
    margin-bottom: 30px;
    width: fit-content;
    border: 1px solid rgba(255,255,255,0.05);
    margin-left: 0;
    margin-right: auto;
}
.tab-btn {
    padding: 10px 25px;
    border: none;
    background: transparent;
    color: var(--white);
    cursor: pointer;
    font-family: 'Be Vietnam Pro';
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
}
.tab-btn.active {
    background: var(--accent);
    color: var(--dark-bg);
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.6), 0 4px 15px rgba(144, 186, 207, 0.3);
    position: relative;
    overflow: hidden;
}
.tab-btn.active::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.25), transparent);
}

.tab-pane { 
    display: none; 
    animation: slideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards; 
}
.tab-pane.active { display: block; }

@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ACCORDION */
.accordion-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid rgba(144, 186, 207, 0.1);
}
.accordion-header {
    padding: 18px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.3s ease;
}
.accordion-header:hover { background: rgba(144, 186, 207, 0.1); }
.accordion-header .arrow { transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.accordion-item.open .arrow { transform: rotate(180deg); }

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
    background: rgba(0, 0, 0, 0.15);
}
.accordion-item.open .accordion-content {
    max-height: 1000px; 
    padding: 20px 25px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* INSIGHT SQUARES */
.insights-grid {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: flex-start;
}
.insight-square {
    background: var(--card-bg);
    width: calc(33.33% - 10px);  
    padding: 20px;
    border-radius: 12px;
    border-bottom: 4px solid var(--accent);
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    text-align: left;           
    transition: transform 0.3s ease;
}
.insight-square:hover { transform: translateY(-5px); }
.insight-square h4 { color: var(--accent); font-size: 0.75rem; margin-bottom: 8px; letter-spacing: 0.05em; }
.insight-square p { font-size: 0.85rem; line-height: 1.4; opacity: 0.9; }

/* APP DEVELOPMENT */
.app-dev { display: grid; grid-template-columns: 1fr 1.3fr; gap: 70px; align-items: flex-start; }
.app-mockup {
    width: 100%; max-width: 380px; margin: 0 auto;
    aspect-ratio: 9 / 16; background: #000;
    border: 10px solid #222; border-radius: 35px; overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6); position: relative;
}

/* BRAND CAMPAIGN */
#brand-campaign h2 {
    text-align: left;
    max-width: 60%;
    margin-left: 0;
    margin-bottom: 20px;
}

#brand-campaign .tab-container {
    max-width: 60%;
    margin: 0;
    text-align: left;
}

.carousel-view {
    position: relative; width: 100%; height: 550px;
    perspective: 1500px; margin: 40px 0;
    display: flex; justify-content: center;
    align-items: center;
}
.carousel-container {
    position: relative; width: 100%; height: 100%;
    transform-style: preserve-3d; display: flex; justify-content: center; align-items: center;
}
.carousel-controls { display: flex; gap: 20px; justify-content: center; margin-bottom: 50px; }

.mockup-card {
    position: absolute; width: 300px; height: 480px;
    background: var(--card-bg); border-radius: 8px; 
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex; flex-direction: column; overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.card-media { width: 100%; background: #000; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ratio-1-1 { aspect-ratio: 1 / 1; }
.ratio-16-9 { aspect-ratio: 16 / 9; }
.card-media video, .card-media img { width: 100%; height: 100%; object-fit: contain; }
.card-info { padding: 20px; flex-grow: 1; text-align: left; }
.card-info h4 { font-size: 0.9rem; margin-bottom: 8px; color: var(--white); }
.card-info p { font-size: 0.75rem; color: var(--text-secondary); line-height: 1.4; }

.mockup-card.hidden { opacity: 0; transform: translate3d(0, 0, -500px) scale(0.5); pointer-events: none; }
.mockup-card.active { transform: translate3d(0, 0, 150px) scale(1.1); z-index: 10; opacity: 1; filter: blur(0); border-color: var(--accent); }
.mockup-card.prev { transform: translate3d(-350px, 0, -100px) scale(0.9); z-index: 5; opacity: 0.5; filter: blur(4px); }
.mockup-card.next { transform: translate3d(350px, 0, -100px) scale(0.9); z-index: 5; opacity: 0.5; filter: blur(4px); }

.nav-btn {
    background: transparent; border: 2px solid var(--accent); color: var(--accent);
    width: 50px; height: 50px; border-radius: 50%; cursor: pointer;
    transition: var(--transition); display: flex; align-items: center; justify-content: center;
}
.nav-btn:hover { background: var(--accent); color: var(--dark-bg); box-shadow: 0 0 20px var(--accent); }

/* VIDEO PRODUCTION */
.video-production { display: grid; grid-template-columns: 1.5fr 1fr; gap: 60px; align-items: center; }
.video-stack-viewport { position: relative; width: 100%; aspect-ratio: 16 / 9; perspective: 1200px; }
.video-stack-container { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.video-item {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 20px; overflow: hidden; background: #000;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5); transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.3; transform: translateZ(-200px) scale(0.85); filter: blur(5px); pointer-events: none; z-index: 1;
}
.video-item.active { opacity: 1; transform: translateZ(0) scale(1); filter: blur(0); pointer-events: auto; z-index: 10; border: 1px solid rgba(144, 186, 207, 0.3); }
.video-item video { width: 100%; height: 100%; object-fit: cover; }

.v-nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%); background: rgba(18, 22, 31, 0.7);
    border: 1px solid var(--accent); color: var(--accent); width: 45px; height: 45px; border-radius: 50%;
    cursor: pointer; z-index: 20; transition: var(--transition); display: flex; align-items: center; justify-content: center;
}
.v-nav-btn.prev { left: -22px; }
.v-nav-btn.next { right: -22px; }
.video-content-group { display: none; }
.video-content-group.active { display: block; }

/* WEBSITE BUILDING */
.web-build { display: grid; grid-template-columns: 1fr 1.4fr; gap: 60px; align-items: flex-start; }
/* --- WEB VISUAL OVERLAY --- */
.web-visual {
    width: 100%;
    height: 400px;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid rgba(144, 186, 207, 0.2);
    position: relative; /* Required for absolute overlay */
    overflow: hidden;
    cursor: pointer;
}

.web-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.web-visual-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Dark overlay */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.3s ease;
}

.web-visual-overlay span {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--white);
    font-size: 0.9rem;
    padding: 10px 20px;
    border: 1px solid var(--accent);
    background: rgba(18, 22, 31, 0.8);
    border-radius: 4px;
}

/* Hover Effects */
.web-visual:hover img {
    transform: scale(1.05);
}

.web-visual:hover .web-visual-overlay {
    opacity: 1; /* Show overlay on hover */
}

/* Ensure expanded image logic works with the new structure */
#imageOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 10000;
    cursor: zoom-out;
    align-items: center;
    justify-content: center;
}
/* REFLECTION */
.reflection-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 50px;}
.reflect-card { background: var(--card-bg); padding: 30px; border-radius: 15px; text-align: left; border-bottom: 4px solid var(--accent); }
.reflect-card h3 {color: var(--accent); text-align: center}

#reflection {
    min-height: auto !important;
    padding-bottom: 60px;
}



footer { text-align: center; padding: 10px; color: var(--text-secondary); font-size: 0.8rem; }

/* --- RESPONSIVE MEDIA SCREENS --- */

@media screen and (max-width: 1100px) {
    .hero {
        min-height: auto !important;
        padding: 60px 6% !important;
        grid-template-columns: 1fr !important;
        gap: 40px;
    }

    .hero-content h1 { font-size: 2.2rem; }

    .hero-cards {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .hero-card {
        flex: 1 1 calc(50% - 20px);
    }

    section {
        grid-template-columns: 1fr !important;
        padding: 80px 6%;
    }
}

@media screen and (max-width: 768px) {
    
    .insights-grid { gap: 10px; }

    .insight-square {
        width: calc(50% - 5px);
        min-height: 80px;      
        padding: 12px;
    }

    .hero-card {
        flex: 1 1 100%;
    }

    .reflection-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    #brand-campaign .tab-container {
    max-width: 100%;
    }

    .reflection-grid { display: grid; grid-template-columns: repeat(1, 1fr);}

    .hero-content, .hero-nav-container {
    animation-delay: 0s;
    }  
}

@media screen and (max-width: 480px) {
    .hero-content h1 { font-size: 1.8rem; }

    .tabs-nav {
        flex-wrap: wrap;
        border-radius: 12px;
    }

    .tab-btn {
        padding: 6px 10px;
        font-size: 0.65rem;
    }

    .hero-content, .hero-nav-container {
    animation-delay: 0s;
    }
}