/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --bg-color: #0F0F0F;
    --text-color: #FFFFFF;
    --text-secondary: #9CA3AF;
    --accent-color: #FF4D00;
    --card-bg: #1A1A1A;
    --border-color: #333;
    --font-heading: 'Unbounded', sans-serif;
    --font-body: 'Inter', sans-serif;
    --container-width: 1200px;
}

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

/* Global Scroll Snap Logic */
html,
body {
    height: 100vh;
    overflow: hidden;
    /* Prevent default window scroll */
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body.no-scroll {
    overflow: hidden;
}

/* Main container is the scrollable area */
main {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    position: relative;
    width: 100%;
    scroll-padding-top: 80px;
    /* Snap offset for anchor jumps */
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
    object-fit: cover;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* Section Styling */
section {
    min-height: 100vh;
    height: auto;
    scroll-snap-align: start;
    display: block;
    /* Use block to ensure natural flow and prevent overlaps */
    padding: 100px 0 60px;
    /* Reduced padding slightly */
    position: relative;
    box-sizing: border-box;
}

.standard-solutions,
.solutions {
    min-height: 100vh;
    /* Keep 100vh for combined solutions block */
    padding: 120px 0 80px;
}

/* Ensure content can grow beyond viewport if needed */
section>.container {
    max-height: none;
}

/* Typography Utilities */
.orange-text {
    color: var(--accent-color);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.2;
}

.section-subtitle {
    text-align: center;
    font-size: 1.25rem;
    color: var(--text-color);
    margin-bottom: 40px;
}

.text-center {
    text-align: center;
}

.max-w-800 {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.spacer-40 {
    height: 40px;
}

.spacer-60 {
    height: 60px;
}

.spacer-80 {
    height: 80px;
}

.uppercase-sub {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* Header */
.header {
    position: fixed;
    /* Keep header at the top of the viewport */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    /* High z-index to stay on top */
    background: rgba(15, 15, 15, 0.95);
    /* Slightly more opaque */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.nav {
    display: flex;
    gap: 40px;
}

.nav a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav a:hover {
    color: var(--text-color);
}

.header-cta {
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 8px 24px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.header-cta:hover {
    background: var(--accent-color);
    color: white;
}

/* Burger Menu Styles */
.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 200;
}

.burger-btn span {
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* Burger Animation */
.burger-btn.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.burger-btn.active span:nth-child(2) {
    opacity: 0;
}

.burger-btn.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 150;
    display: flex;
    flex-direction: column;
    padding-top: 100px;
    align-items: center;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    pointer-events: none;
}

.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-links a {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 30px;
    text-align: center;
}

.mobile-cta {
    display: inline-block;
    margin-top: 20px;
    background: var(--accent-color);
    color: white;
    padding: 16px 32px;
    border-radius: 100px;
    font-weight: 500;
    font-size: 1.1rem;
    text-align: center;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
    background: radial-gradient(circle at center, rgba(30, 30, 30, 1) 0%, rgba(15, 15, 15, 1) 70%);
}

.hero-content {
    max-width: 900px;
}

.hero-sup {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero-accent {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 32px;
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 48px;
}

.main-cta {
    display: inline-block;
    background: var(--text-color);
    color: var(--accent-color);
    padding: 16px 40px;
    border-radius: 100px;
    font-size: 1rem;
    font-weight: 600;
    transition: transform 0.2s;
}

.main-cta:hover {
    transform: translateY(-2px);
}

/* Solutions Section */
.text-list {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    /* Default to left for list items */
}

.text-list.centered-list {
    align-items: center;
    text-align: center;
}

.text-list li {
    font-size: 1.1rem;
    position: relative;
    padding-left: 24px;
}

.text-list li::before {
    content: "— ";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.section-footer-text {
    text-align: center;
    margin-top: 40px;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.spacer-80 {
    height: 80px;
}

.problems-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 40px;
}

.problem-item h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.problem-item p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Work / Timeline Section */
.section-label {
    text-align: center;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    margin-bottom: 60px;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 40px;
}

/* Vertical Line Animation Logic - Segmented */
.timeline-item::after {
    content: '';
    position: absolute;
    top: 12px;
    /* Center of the dot */
    left: 24.5px;
    width: 3px;
    background: var(--accent-color);
    opacity: 0.8;
    height: 0;
    transition: height 0.7s linear;
    z-index: 1;
}

.timeline.animate-active .timeline-item::after {
    height: 100%;
    /* Reaches the center of the next dot */
}

.timeline-item:last-child::after {
    display: none;
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    padding-bottom: 60px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Staggered animation for items and their lines */
.timeline.animate-active .timeline-item:nth-child(1) {
    transition-delay: 0.1s;
    opacity: 1;
    transform: translateY(0);
}

.timeline.animate-active .timeline-item:nth-child(1)::after {
    transition-delay: 0.4s;
    /* Start line after item fades in */
}

.timeline.animate-active .timeline-item:nth-child(2) {
    transition-delay: 1.1s;
    opacity: 1;
    transform: translateY(0);
}

.timeline.animate-active .timeline-item:nth-child(2)::after {
    transition-delay: 1.4s;
}

.timeline.animate-active .timeline-item:nth-child(3) {
    transition-delay: 2.1s;
    opacity: 1;
    transform: translateY(0);
}

.timeline.animate-active .timeline-item:nth-child(3)::after {
    transition-delay: 2.4s;
}

.timeline.animate-active .timeline-item:nth-child(4) {
    transition-delay: 3.1s;
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 14px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-color);
    border: 4px solid var(--bg-color);
    box-sizing: content-box;
    z-index: 2;
}

.timeline-content h3 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-top: -28px;
    /* Adjusted from -10px for alignment with marker center */
    margin-bottom: 16px;
}

.timeline-list li {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--text-color);
}

.timeline-list li::before {
    content: "— ";
    color: var(--text-secondary);
    margin-right: 8px;
}

.timeline-note {
    margin-top: 24px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Master Section */
.master-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 60px;
    padding-left: 20px;
}

.master-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.master-image img {
    width: 100%;
    border-radius: 20px;
    filter: grayscale(20%);
}

.master-text p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.text-list.full-width {
    align-items: flex-start;
}

/* Gallery Section */
.gallery .section-subtitle {
    text-align: center;
    margin-bottom: 40px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.gallery-grid img {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 8px;
    transition: transform 0.3s;
}

/* Final CTA */
.cta-card {
    background: var(--accent-color);
    border-radius: 30px;
    padding: 80px 100px;
    /* Slightly more compact */
    text-align: center;
    color: white;
}

.cta-card h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 24px;
}

.cta-subtitle {
    font-size: 1.25rem;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.9);
}

.cta-note {
    font-size: 0.9rem;
    margin-bottom: 32px;
    opacity: 0.7;
}

.white-cta-button {
    display: inline-block;
    background: white;
    color: black;
    padding: 18px 48px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1.1rem;
}

#contact {
    min-height: auto !important;
    padding-bottom: 20px !important;
}

/* Footer */
.footer {
    scroll-snap-align: start;
    height: auto;
    padding: 40px 0 10px;
    /* Reduced padding further */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: var(--text-secondary);
    width: 100%;
}

.footer-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 24px;
}

.footer-block p {
    margin-bottom: 4px;
}

/* Global Animation Classes */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive & Mobile Logic */
@media (max-width: 1024px) {

    /* Hide Desktop Nav */
    .header .desktop-nav,
    .header .desktop-cta {
        display: none;
    }

    /* Show Burger Btn */
    .burger-btn {
        display: flex;
        margin-left: auto;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero-accent {
        font-size: 2rem;
    }

    .problems-grid {
        grid-template-columns: 1fr;
    }

    .master-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cta-card {
        padding: 40px 20px;
    }

    .cta-card h2 {
        font-size: 2rem;
    }

    .footer {
        padding: 20px 0;
        min-height: auto;
    }

    .footer-logo {
        font-size: 1.2rem;
        margin-bottom: 20px;
        display: inline-block;
    }

    /* On mobile, keep scroll snap but allow flow content */
    section {
        height: auto;
        min-height: 100vh;
        justify-content: flex-start;
        padding-top: 100px;
    }

    .solutions,
    .gallery,
    .work {
        height: auto;
        min-height: 100vh;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .header-container {
        justify-content: space-between;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .timeline-content h3 {
        font-size: 1.8rem;
    }

    .footer-container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding-bottom: 20px;
        /* Reduced breathing room at bottom */
    }

    .cta-card {
        padding: 60px 20px;
        /* More compact CTA on small phones */
    }
}

/* --- Lightbox Styles --- */
.lightbox {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    z-index: 1001;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--accent-color);
    text-decoration: none;
    cursor: pointer;
}

/* --- Lightbox Navigation --- */
.lightbox-prev,
.lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
    z-index: 1002;
    background: rgba(0, 0, 0, 0.3);
}

.lightbox-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.lightbox-prev {
    left: 0;
    border-radius: 3px 0 0 3px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(255, 77, 0, 0.8);
}

/* --- Button Animations --- */
.main-cta,
.white-cta-button,
.header-cta,
.mobile-cta {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.main-cta:hover,
.white-cta-button:hover,
.mobile-cta:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(255, 77, 0, 0.2);
}

/* Specific hover designed for white button on orange bg */
.white-cta-button:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.header-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 77, 0, 0.15);
}

/* Click effect */
.main-cta:active,
.white-cta-button:active,
.mobile-cta:active,
.header-cta:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* --- Image Hover Effects --- */
.gallery-grid img,
.master-image img {
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.3s ease;
}

.gallery-grid img:hover,
.master-image img:hover {
    transform: scale(1.03);
    filter: brightness(1.1);
    z-index: 2;
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}