/* ==========================================================================
   CSS VARIABLES & SETUP
   ========================================================================== */
:root {
    /* Color Palette */
    --bg-primary: #fbf9f6;
    /* Warm Ivory */
    --bg-secondary: #f4f1ea;
    /* Cream */
    --bg-pearl: #fdfdfc;
    /* Pearl White */
    --bg-grey: #ebe9e4;
    /* Very Light Warm Grey */

    --text-main: #1f1e1d;
    /* Deep Charcoal */
    --text-muted: #5a5753;

    --accent: #d8c8bd;
    /* Muted Champagne */
    --accent-dark: #bba99c;

    /* Typography */
    --font-display: 'Playfair Display', serif;
    --font-ui: 'Manrope', sans-serif;

    /* Layout */
    --container-width: 1400px;
    --nav-height: 100px;
}

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

html {
    font-size: 16px;
    background-color: var(--bg-primary);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Prevent horizontal scroll on all pages */
}

body {
    font-family: var(--font-ui);
    overflow-x: hidden;
    line-height: 1.5;
}

input,
textarea,
select,
button {
    font-family: inherit;
    font-size: inherit;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.1;
}

/* ==========================================================================
   CUSTOM CURSOR
   ========================================================================== */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    mix-blend-mode: exclusion;
    /* Makes it pop */
    color: white;
    background-color: var(--text-main);
}

.custom-cursor.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

@media (max-width: 1024px) {
    .custom-cursor {
        display: none;
    }
}

/* ==========================================================================
   PRELOADER
   ========================================================================== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-primary);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

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

.preloader-logo {
    max-height: 80px;
    width: auto;
    margin: 0 auto 1.5rem auto;
    border-radius: 50%;
    display: block;
}

.preloader-title {
    font-size: 2.5rem;
    letter-spacing: 4px;
    margin-bottom: 0.5rem;
}

.preloader-subtitle {
    font-size: 0.85rem;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.preloader-progress-container {
    width: 200px;
    height: 1px;
    background-color: var(--bg-grey);
    margin: 0 auto 1.5rem auto;
    position: relative;
    overflow: hidden;
}

.preloader-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background-color: var(--text-main);
}

.preloader-text {
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 9000;
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, height 0.4s ease;
}

.main-nav.scrolled {
    background-color: rgba(251, 249, 246, 0.9);
    backdrop-filter: blur(10px);
    height: 80px;
    border-bottom: 1px solid var(--bg-grey);
}

.nav-brand {
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.nav-logo {
    max-height: 40px;
    width: auto;
    border-radius: 50%;
}

@media (max-width: 768px) {
    .nav-brand {
        font-size: 1.1rem;
        gap: 10px;
    }

    .nav-logo {
        max-height: 30px;
    }
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-links li a {
    font-size: 0.82rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 500;
    position: relative;
    white-space: nowrap;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 1px;
    background-color: var(--text-main);
    transition: width 0.3s ease;
}

.nav-links li a:hover::after {
    width: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.btn-quote {
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--text-main);
    border-radius: 40px;
    transition: all 0.3s ease;
}

.btn-quote:hover {
    background-color: var(--text-main);
    color: var(--bg-primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.mobile-menu-btn .line {
    width: 24px;
    height: 1px;
    background-color: var(--text-main);
    transition: 0.3s ease;
}

@media (max-width: 1200px) {

    .nav-links,
    .btn-quote {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--text-main);
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.btn-primary i {
    transition: transform 0.3s ease;
}

.btn-primary:hover i {
    transform: translateX(8px);
}

/* ==========================================================================
   HERO SECTION (3D PARALLAX)
   ========================================================================== */
.hero-section {
    position: relative;
    height: 100vh;
    /* Normal height, no pinning for parallax */
    background-color: var(--bg-primary);
    overflow: hidden;
}

.hero-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    max-width: 1600px;
    margin: 0 auto;
}

/* Left Side Content */
.hero-content-left {
    flex: 1;
    z-index: 2;
    padding-top: var(--nav-height);
}

.hero-header {
    margin-bottom: 2rem;
}

.hero-header h2 {
    font-size: 1.5rem;
    letter-spacing: 4px;
    margin-bottom: 0.5rem;
}

.hero-header p {
    font-size: 0.8rem;
    letter-spacing: 6px;
    color: var(--text-muted);
}

.hero-headline {
    font-size: clamp(3rem, 6vw, 6rem);
    line-height: 1;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    color: var(--text-main);
}

.hero-headline .line {
    display: block;
    overflow: hidden;
}

.hero-actions {
    margin-top: 2rem;
}

/* Right Side 3D Stack */
.hero-3d-stack {
    flex: 1;
    height: 70vh;
    position: relative;
    perspective: 1500px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.hero-card {
    position: absolute;
    width: 20vw;
    height: 40vh;
    min-width: 220px;
    min-height: 320px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    transform-style: preserve-3d;
    will-change: transform;
}

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-card.card-1 {
    z-index: 3;
}

.hero-card.card-2 {
    z-index: 2;
    transform: translate(15%, -15%) translateZ(-50px);
    opacity: 0.9;
}

.hero-card.card-3 {
    z-index: 1;
    transform: translate(-15%, 15%) translateZ(-100px);
    opacity: 0.8;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 5%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    z-index: 2;
}

@media (max-height: 700px) {
    .scroll-indicator {
        display: none;
    }
}

.scroll-indicator span {
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.hero-card {
    width: 40vw;
    height: 50vh;
}

.line-wrapper {
    width: 1px;
    height: 60px;
    background-color: var(--bg-grey);
    overflow: hidden;
}

.hero-actions {
    margin-bottom: 50px;
}

.line-fill {
    width: 100%;
    height: 100%;
    background-color: var(--text-main);
    transform: translateY(-100%);
}

@media (max-width: 900px) {
    .hero-container {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding-top: var(--nav-height);
    }

    .hero-content-left {
        padding-top: 0;
        margin-bottom: 2rem;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .scroll-indicator {
        left: 50%;
        transform: translateX(-50%);
        align-items: center;
        bottom: 2.5rem;
    }

    .hero-3d-stack {
        display: flex;
        height: 40vh;
        width: 100%;
        margin-top: 2rem;
        transform: scale(0.9);
    }
}

/* ==========================================================================
   SECTION 02: INTRODUCTION
   ========================================================================== */
.intro-section {
    padding: 15vw 5%;
    background-color: var(--bg-secondary);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.intro-content {
    width: 100%;
    max-width: 1200px;
    z-index: 2;
    position: relative;
}

.large-editorial-text {
    font-size: clamp(3rem, 8vw, 8rem);
    text-align: center;
    line-height: 1;
    white-space: nowrap;
    margin-bottom: 5rem;
}

.intro-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 4vw;
    max-width: 460px;
    position: relative;
    z-index: 2;
}

.intro-label {
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    line-height: 1.8;
    margin-bottom: 2.25rem;
    color: var(--text-muted);
}

.intro-description {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.4vw, 2.4rem);
    max-width: 460px;
    text-align: left;
    font-style: italic;
    line-height: 1.35;
    position: relative;
    z-index: 2;
}

.intro-images {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.img-mask {
    position: absolute;
    overflow: hidden;
    z-index: 1;
}

.img-left {
    top: 20%;
    left: 10%;
    width: 20vw;
    height: 30vw;
}

.img-right {
    bottom: 10%;
    right: 15%;
    width: 25vw;
    height: 35vw;
}

.img-mask img {
    width: 100%;
    height: 120%;
    /* for parallax */
}

@media (max-width: 1024px) and (min-width: 769px) {

    .intro-details,
    .intro-description {
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .intro-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        margin-top: 3rem;
        max-width: 100%;
        position: relative;
        z-index: 2;
    }

    .intro-label {
        margin-bottom: 0;
        font-size: 0.75rem;
    }

    .intro-description {
        text-align: left;
        max-width: 100%;
        font-size: clamp(1.3rem, 4.5vw, 1.75rem);
        position: relative;
        z-index: 2;
    }

    .img-left,
    .img-right {
        opacity: 0.25;
    }
}

/* ==========================================================================
   SECTION 03: CINEMATIC IMAGE REVEAL
   ========================================================================== */
.reveal-section {
    height: 200vh;
    background-color: var(--bg-primary);
}

.reveal-container {
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.reveal-img-wrapper {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    /* Use clip path for smoother animation without layout thrashing */
    clip-path: inset(25vh 35vw 25vh 35vw round 4px);
    position: relative;
}

/* Dark overlay for text readability */
.reveal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    /* Animated by JS */
    z-index: 1;
    pointer-events: none;
}

.reveal-img {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    transform: scale(1.2);
}

.reveal-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 2;
    opacity: 0;
    /* JS will fade this in */
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    /* No mix-blend-mode */
}

.reveal-text h2 {
    font-size: clamp(3rem, 8vw, 8rem);
    text-transform: uppercase;
}

/* ==========================================================================
   SECTION 04: PORTFOLIO PREVIEW (HORIZONTAL)
   ========================================================================== */
.portfolio-section {
    background-color: var(--bg-primary);
    position: relative;
    /* Height will be handled dynamically via JS pinning */
}

.portfolio-sticky-wrapper {
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-top: var(--nav-height);
}

.portfolio-header {
    padding: 0 5%;
    margin-bottom: 2rem;
}

.portfolio-header h2 {
    font-size: 2.5rem;
    text-transform: uppercase;
}

.portfolio-header p {
    font-size: 0.8rem;
    letter-spacing: 3px;
    margin-top: 0.5rem;
    color: var(--text-muted);
}

.portfolio-scroll-container {
    flex: 1;
    display: flex;
    align-items: center;
    padding-left: 5%;
}

.portfolio-track {
    display: flex;
    gap: 4vw;
    padding-right: 10vw;
    /* End padding */
}

.portfolio-item {
    width: 45vw;
    min-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pi-image-wrapper {
    width: 100%;
    aspect-ratio: 4/5;
    overflow: hidden;
}

.pi-image-wrapper img {
    width: 100%;
    height: 100%;
    /* Transition removed to prevent jitter with GSAP/ScrollTrigger if later animated. Hover effect relies on this though, but hover effect is purely CSS.
       Wait, GSAP animates the track, not the image. Let's keep it but ensure no transition on .portfolio-track */
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-item:hover .pi-image-wrapper img {
    transform: scale(1.05);
}

.pi-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    letter-spacing: 2px;
}

.pi-num {
    color: var(--text-muted);
}

.pi-title {
    font-size: 2rem;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .portfolio-item {
        width: 80vw;
        min-width: 280px;
    }
}

/* ==========================================================================
   SECTION 05: 3D PHOTO STACK
   ========================================================================== */
.stack-section {
    height: 300vh;
    background-color: var(--bg-secondary);
}

.stack-sticky-container {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.stack-header {
    position: absolute;
    top: 15%;
    text-align: center;
    z-index: 100;
    opacity: 0;
}

.stack-header h2 {
    font-size: clamp(2rem, 5vw, 5rem);
    text-transform: uppercase;
}

.stack-scene {
    position: relative;
    width: 40vw;
    height: 50vh;
    min-width: 300px;
    perspective: 2000px;
    transform-style: preserve-3d;
}

.stack-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    padding: 1vw;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform-origin: center;
    will-change: transform;
}

/* ==========================================================================
   SECTION 06: LEGACY
   ========================================================================== */
.legacy-section {
    height: 150vh;
    background-color: var(--bg-primary);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.legacy-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    mix-blend-mode: difference;
    color: #fff;
}

.legacy-year {
    font-family: var(--font-display);
    font-size: clamp(5rem, 15vw, 15rem);
    line-height: 0.8;
}

.legacy-timeline {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 2rem 0;
}

.timeline-line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.3);
}

.timeline-text {
    background-color: var(--text-main);
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    z-index: 1;
    border-radius: 20px;
}

.legacy-bg-images {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.l-bg {
    position: absolute;
    width: 40vw;
    height: 50vh;
    object-fit: cover;
    opacity: 0;
    /* JS controls */
}

.l-bg-1 {
    top: 10%;
    left: 10%;
}

.l-bg-2 {
    bottom: 10%;
    right: 10%;
}

/* ==========================================================================
   SECTION 07: SERVICES
   ========================================================================== */
.services-section {
    padding: 10vw 0;
    background-color: var(--bg-pearl);
    position: relative;
}

.services-list {
    display: flex;
    flex-direction: column;
}

.service-row {
    display: flex;
    align-items: center;
    padding: 3rem 0;
    border-bottom: 1px solid var(--bg-grey);
    cursor: pointer;
    position: relative;
    transition: padding-left 0.4s ease;
}

.service-row:first-child {
    border-top: 1px solid var(--bg-grey);
}

.service-row:hover {
    padding-left: 2rem;
}

.sr-num {
    font-size: 1rem;
    width: 100px;
    color: var(--text-muted);
}

.sr-title {
    font-size: clamp(2rem, 4vw, 4rem);
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.service-row:hover .sr-title {
    color: var(--accent-dark);
}

.service-hover-img {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 400px;
    pointer-events: none;
    opacity: 0;
    z-index: 10;
    overflow: hidden;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.service-hover-img.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.service-hover-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .service-hover-img {
        display: none;
    }

    .service-row {
        padding: 2rem 0;
    }
}

/* ==========================================================================
   SECTION 08: CINEMATIC STATEMENT
   ========================================================================== */
.statement-section {
    height: 100vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-primary);
    overflow: hidden;
}

.statement-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.15;
}

.statement-bg img {
    width: 100%;
    height: 120%;
}

.statement-content {
    z-index: 2;
    text-align: center;
}

.statement-text {
    font-size: clamp(3rem, 8vw, 8rem);
    line-height: 1.1;
    text-transform: uppercase;
}

.statement-text .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px);
}

/* ==========================================================================
   SECTION 09: TESTIMONIAL PREVIEW
   ========================================================================== */
.testimonial-section {
    height: 100vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.testimonial-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.testimonial-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(31, 30, 29, 0.7);
    /* Dark overlay */
}

.testimonial-bg img {
    width: 100%;
    height: 110%;
    /* For parallax */
}

.testimonial-container {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
    max-width: 1000px;
    padding: 0 5%;
}

.testimonial-slide .quote {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-style: italic;
    line-height: 1.4;
    margin-bottom: 3rem;
}

.client-info .name {
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
}

.client-info .type {
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--accent);
    margin-top: 0.5rem;
}

/* ==========================================================================
   SECTION 10: GET A QUOTE
   ========================================================================== */
.quote-section {
    padding: 10vw 0;
    background-color: var(--bg-primary);
}

.quote-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5vw;
}

.quote-text h2 {
    font-size: clamp(3rem, 6vw, 6rem);
    line-height: 1;
    position: sticky;
    top: 150px;
}

.premium-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.premium-form input,
.premium-form select,
.premium-form textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--bg-grey);
    padding: 1rem 0;
    font-family: var(--font-ui);
    font-size: 1rem;
    color: var(--text-main);
    transition: border-color 0.3s ease;
}

.premium-form input:focus,
.premium-form select:focus,
.premium-form textarea:focus {
    outline: none;
    border-bottom-color: var(--text-main);
}

.form-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    margin-top: 1rem;
    font-size: 1rem;
}

@media (max-width: 900px) {
    .quote-container {
        grid-template-columns: 1fr;
    }

    .quote-text h2 {
        position: relative;
        top: 0;
        margin-bottom: 3rem;
    }

    .premium-form {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer {
    background-color: var(--text-main);
    color: var(--bg-primary);
    padding-top: 10vw;
    position: relative;
    overflow: hidden;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    gap: 4rem;
    margin-bottom: 8vw;
}

.footer-info h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.footer-info .since {
    font-size: 0.8rem;
    letter-spacing: 4px;
    color: var(--accent);
    margin-bottom: 2rem;
}

.footer-info .tagline {
    font-size: 1.2rem;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    gap: 5rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links a {
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-contact {
    display: flex;
    flex-direction: column;
}

.footer-contact p {
    margin-bottom: 1rem;
    font-size: 0.92rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.78);
}

.footer-contact a {
    color: #FFFFFF !important;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-contact a:hover {
    color: var(--accent) !important;
}

.footer-contact-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.92rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 0.5rem;
}

.footer-contact-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-contact-label {
    font-family: var(--font-ui, 'Manrope', sans-serif);
    font-size: 0.76rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--accent, #C5A880);
    min-width: 58px;
}

.footer-contact-link {
    color: #FFFFFF !important;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.footer-contact-link:hover {
    color: var(--accent, #C5A880) !important;
    transform: translateX(3px);
}

.social-icons {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-icons a {
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--accent);
}

.footer-wordmark {
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-wordmark h1 {
    font-size: 15vw;
    line-height: 0.8;
    color: rgba(255, 255, 255, 0.05);
}

.footer-bottom {
    text-align: center;
    padding: 2rem 0;
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 900px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* ==========================================================================
   FLOATING ELEMENTS (WHATSAPP & CHATBOT)
   ========================================================================== */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 9900;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: pulse 2s infinite;
}

@media (max-width: 600px) {
    .whatsapp-btn {
        bottom: 30px;
        right: 16px;
        width: 42px;
        height: 42px;
        font-size: 1.3rem;
    }
}

.whatsapp-btn:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
    animation: none;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.chatbot-launcher {
    position: fixed;
    bottom: 90px;
    /* Above WhatsApp */
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: var(--text-main);
    color: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 9900;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.chatbot-launcher:hover {
    transform: scale(1.05);
    background-color: var(--text-muted);
}

.chatbot-window {
    position: fixed;
    bottom: 90px;
    right: 85px;
    /* To the left of launchers */
    width: 350px;
    background-color: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    z-index: 9950;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    pointer-events: none;
    transform-origin: bottom right;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.chatbot-window.active {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.chatbot-header {
    background-color: var(--text-main);
    color: var(--bg-primary);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cb-info {
    display: flex;
    flex-direction: column;
}

.cb-info strong {
    font-family: var(--font-display);
    font-size: 1.2rem;
}

.cb-info span {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.cb-close {
    background: none;
    border: none;
    color: var(--bg-primary);
    font-size: 1.2rem;
    cursor: pointer;
}

.chatbot-body {
    padding: 1.5rem;
    flex: 1;
    min-height: 250px;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: var(--bg-secondary);
}

.cb-message.bot {
    background-color: var(--bg-primary);
    padding: 1rem;
    border-radius: 8px;
    border-bottom-left-radius: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    max-width: 90%;
}

.cb-message.user {
    background-color: var(--text-main);
    color: var(--bg-primary);
    padding: 1rem;
    border-radius: 8px;
    border-bottom-right-radius: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    align-self: flex-end;
    max-width: 90%;
}

.cb-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.cb-quick-actions button {
    background: transparent;
    border: 1px solid var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.cb-quick-actions button:hover {
    background-color: var(--text-main);
    color: var(--bg-primary);
}

.chatbot-input {
    display: flex;
    padding: 1rem;
    background-color: var(--bg-primary);
    border-top: 1px solid var(--bg-grey);
}

.chatbot-input input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem;
    outline: none;
    font-family: var(--font-ui);
}

.chatbot-input button {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 0.5rem;
}

@media (max-width: 600px) {
    .chatbot-launcher {
        bottom: 75px;
        right: 16px;
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .chatbot-window {
        position: fixed;
        bottom: 130px;
        right: 12px;
        left: 12px;
        width: auto;
        max-height: 70vh;
        border-radius: 14px;
        transform: scale(0.92) translateY(16px);
        transform-origin: bottom right;
    }

    .chatbot-window.active {
        transform: scale(1) translateY(0);
    }

    .chatbot-body {
        min-height: 160px;
        max-height: calc(70vh - 130px);
    }
}

/* ── Typing indicator (bouncing dots) ─────────────────────── */
.cb-typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0.85rem 1rem !important;
    width: fit-content;
}

.cb-typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-muted, #888);
    animation: cb-bounce 1.2s infinite ease-in-out;
}

.cb-typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

.cb-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.cb-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes cb-bounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* ── Disabled input state while bot is typing ─────────────── */
.chatbot-input input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chatbot-input button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ==========================================================================
   MOBILE FIXES — max-width: 768px
   ========================================================================== */

@media (max-width: 768px) {

    /* ── Hero Section ───────────────────────────────────────── */
    .hero-section {
        height: auto;
        min-height: 100svh;
        padding-bottom: 3rem;
    }

    .hero-container {
        flex-direction: column;
        justify-content: flex-start;
        padding-top: calc(var(--nav-height) + 1.5rem);
        padding-bottom: 2rem;
        text-align: center;
        gap: 0;
    }

    .hero-content-left {
        padding-top: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 1.5rem;
    }

    .hero-header {
        margin-bottom: 1rem;
    }

    .hero-header h2 {
        font-size: 1rem;
        letter-spacing: 3px;
    }

    .hero-headline {
        font-size: clamp(2.2rem, 10vw, 3.5rem);
        margin-bottom: 1rem;
    }

    .hero-3d-stack {
        width: 90vw;
        height: 45vw;
        min-height: 200px;
        transform: none;
        margin-top: 0;
    }

    .hero-card {
        width: 42vw;
        height: 60vw;
        min-width: unset;
        min-height: unset;
        border-radius: 8px;
    }

    /* Move scroll indicator below the stack */
    .scroll-indicator {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        align-items: center;
        margin-top: 2rem;
    }

    /* ── Intro Section ──────────────────────────────────────── */
    .intro-section {
        padding: 12vw 5%;
    }

    /* Remove nowrap so text wraps on mobile */
    .large-editorial-text {
        white-space: normal;
        font-size: clamp(2rem, 10vw, 4rem);
        text-align: center;
        word-break: break-word;
        margin-bottom: 2.5rem;
        line-height: 1.1;
    }

    /* Hide side images on mobile to avoid overlap */
    .img-left,
    .img-right {
        display: none;
    }

    /* ── Reveal Section ─────────────────────────────────────── */
    .reveal-section {
        height: 150vh;
    }

    .reveal-text h2 {
        font-size: clamp(2rem, 9vw, 4rem);
    }

    /* ── Portfolio Section ──────────────────────────────────── */
    .portfolio-sticky-wrapper {
        height: auto;
        overflow: visible;
        padding-top: var(--nav-height);
    }

    .portfolio-scroll-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 1.5rem;
        /* Show scrollbar hint */
        scrollbar-width: thin;
    }

    .portfolio-track {
        gap: 5vw;
        padding-right: 5vw;
    }

    .portfolio-item {
        width: 78vw;
        min-width: 260px;
        flex-shrink: 0;
    }

    .pi-title {
        font-size: 1.4rem;
    }

    /* ── Stack Section ──────────────────────────────────────── */
    .stack-section {
        height: 200vh;
    }

    .stack-header {
        top: 5%;
        opacity: 1 !important;
        /* Always visible on mobile */
        width: 100%;
        padding: 0 5%;
    }

    .stack-header h2 {
        font-size: clamp(1.6rem, 7vw, 2.5rem);
    }

    .stack-scene {
        width: 78vw;
        height: 55vw;
        min-width: unset;
        margin-top: 6rem;
        /* Push below the header */
    }

    /* ── Legacy Section ─────────────────────────────────────── */
    .legacy-section {
        height: 80vh;
    }

    .legacy-year {
        font-size: clamp(3.5rem, 18vw, 8rem);
    }

    /* Hide background images on mobile — they overlap the text */
    .legacy-bg-images {
        display: none;
    }

    /* Use a subtle bg tint instead */
    .legacy-section {
        background-color: var(--bg-secondary);
    }

    .legacy-container {
        color: var(--text-main);
        mix-blend-mode: normal;
    }

    .timeline-line {
        background-color: rgba(31, 30, 29, 0.2);
    }

    .timeline-text {
        background-color: var(--bg-grey);
        color: var(--text-main);
    }

    /* ── Services Section ───────────────────────────────────── */
    .sr-title {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }

    .sr-num {
        width: 60px;
        font-size: 0.85rem;
    }

    /* ── Statement Section ──────────────────────────────────── */
    .statement-text {
        font-size: clamp(2.2rem, 10vw, 4.5rem);
    }

    /* ── Testimonial Section ────────────────────────────────── */
    .testimonial-slide .quote {
        font-size: clamp(1.2rem, 5.5vw, 1.8rem);
        margin-bottom: 2rem;
    }

    /* ── Quote / Form Section ───────────────────────────────── */
    .quote-section {
        padding: 12vw 0;
    }

    .quote-text h2 {
        font-size: clamp(2.2rem, 10vw, 3.5rem);
        margin-bottom: 2.5rem;
    }

    .premium-form {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* ── Footer ─────────────────────────────────────────────── */
    .footer-top {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .footer-links {
        gap: 2rem;
    }

    .footer-wordmark h1 {
        font-size: 20vw;
    }
}

/* Extra-small phones */
@media (max-width: 400px) {
    .hero-headline {
        font-size: clamp(2rem, 11vw, 3rem);
    }

    .large-editorial-text {
        font-size: clamp(1.8rem, 11vw, 3rem);
    }

    .hero-card {
        width: 44vw;
        height: 64vw;
    }
}