/* ==========================================================================
   1. GLOBAL VARIABLES & RESET
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-dark: #000000;
    /* Light Mode Background */
    --snow-white: #FFFFFF;
    --terracotta: #BF5A1A;
    --text-maroon: #493121;
    --text-light: var(--text-maroon);
    --accent-brown: #7B6C62;
    --form-brown: #F2F2F2;
    --form-text: #493121;
    --transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    --image-scale: 1.8;
    --rotation-duration: 300s;
    /* Standardized slow rotation */

    --popup-max-width: 600px;
    --popup-padding: 2.5rem 2rem 2rem;
    --logo-size: 1500px;
    /* Massive 3x scaling */
    --logo-max-width: 150vw;
    /* Allow significant overflow for impact */
    --logo-max-height: 150vh;

    --z-index-background: 1;
    --z-index-landing-section: 10;
    --z-index-logo: 20;
    --z-index-popup: 1000;
    --z-index-popup-close: 1001;
    --navbar-height: 100px;
    --hero-gap: 2rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
    overflow: hidden;
    height: 100vh;
    height: -webkit-fill-available;
    width: 100vw;
    background-color: #000;
    color: var(--text-maroon);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Hide scrollbars globally but keep functionality */
* {
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

*::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}


/* Intro Splash Screen Styles */
/* ==========================================================================
   2. INTRO SPLASH SCREEN
   ========================================================================== */

.intro-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #F2F2F2;
    /* Light background */
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 1.8s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 1.8s cubic-bezier(0.22, 1, 0.36, 1),
        background-color 1.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.intro-splash.intro-push {
    transform: scale(1);
    filter: brightness(0.65);
}

.intro-splash.exit-active {
    background-color: transparent;
    pointer-events: none;
    transition: background-color 2.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.intro-splash.exit-active .intro-content {
    opacity: 0;
    transform: scale(1.1);
    filter: blur(4px);
    transition: opacity 1.5s cubic-bezier(0.22, 1, 0.36, 1),
        transform 1.5s cubic-bezier(0.22, 1, 0.36, 1),
        filter 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.intro-splash.fade-out {
    opacity: 0;
    visibility: hidden;
    transition: opacity 2s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 2s cubic-bezier(0.22, 1, 0.36, 1);
}

.intro-splash.fade-to-transparent {
    background-color: transparent;
    transition: background-color 1.5s ease-out;
}

.intro-content {
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    z-index: 2;
}

.intro-logo {
    max-width: clamp(300px, 60vw, 450px);
    width: 100%;
    height: auto;
    opacity: 0;
    transform: scale(0.95);
    filter: brightness(1.1);
    animation: logoEntry 1.8s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

@keyframes logoEntry {
    0% {
        opacity: 0;
        transform: scale(0.95);
        filter: blur(5px);
    }

    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

@keyframes headlineEntry {
    0% {
        opacity: 0;
        transform: scale(1.15);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes logoFadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(1.05);
    }
}



/* Success State Animations */
.modal-logo-fadein {
    width: 60px;
    height: auto;
    opacity: 0;
    filter: brightness(0);
    animation: logoFadeOnly 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes logoFadeOnly {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.thank-you-message {
    font-family: 'Space Mono', monospace;
    font-size: 1.125rem;
    color: var(--text-maroon);
    text-align: center;
    margin-top: 2rem;
    padding: 2rem;
    opacity: 0;
    z-index: 2;
}

.success-state .popup-content {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
        repeating-linear-gradient(45deg, #493121 0, #493121 20px, #3d2817 20px, #3d2817 40px);
    background-size: cover;
}

.thank-you-fadein {
    animation: thankYouFade 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.thank-you-fadeout {
    animation: thankYouFade 1.5s cubic-bezier(0.22, 1, 0.36, 1) reverse forwards;
}

@keyframes thankYouFade {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   3. LANDING SECTION (PHASE 1)
   ========================================================================== */

.sections-container {
    position: relative;
    width: 100%;
    height: 100vh;
    height: -webkit-fill-available;
    overflow-y: hidden;
    overflow-x: hidden;
    /* Prevent scroll until Phase 2 */
}

.unlocked.sections-container {
    overflow-y: auto;
}

.sections-container.unlocked {
    overflow-y: auto;
    height: auto;

}

.landing-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100%;
    height: -webkit-fill-available;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: visible;
    transform: translateX(0);
    background: transparent;
    overflow: hidden;
    touch-action: manipulation;
    -webkit-overflow-scrolling: touch;
    z-index: 10;
    cursor: pointer;
    /* Feedback for clickability */
    transition: opacity 2.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-page::before,
.welcome-page::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 150vmax;
    height: 150vmax;
    z-index: -1;
    background: url('../assets/landing_img.webp') no-repeat center center / cover;
    animation: slowBgRotate var(--rotation-duration) linear infinite;
    transform-origin: center center;
    pointer-events: none;
}

.landing-section.success-active {
    background-color: #000;
    /* Fallback */
}

.landing-section.success-active .background-video-container {
    opacity: 0;
    visibility: hidden;
    transition: opacity 2s ease, visibility 2s ease;
}

.landing-section.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    z-index: 10;
}

@keyframes backgroundFadeIn {
    0% {
        background: linear-gradient(180deg, #000000 0%, #000000 50%, #000000 100%);
        opacity: 0;
    }

    50% {
        background: linear-gradient(180deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
        opacity: 0.5;
    }

    100% {
        background: linear-gradient(180deg, #000000 0%, #1a1a1a 50%, #000000 100%);
        opacity: 1;
    }
}

@keyframes rotating {
    from {
        transform: rotate(0deg) scale(var(--image-scale));
    }

    to {
        transform: rotate(360deg) scale(var(--image-scale));
    }
}

@keyframes logoFadeIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.background-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    cursor: pointer;
}

/* Video Background */
.background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
}

.popup-title {

    font-size: 1.8rem !important;
}


@media (min-width: 1025px) {
    /* Logo container visibility handled by .landing-section states */
}

.background-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    z-index: -1;
}

.logo-container {
    position: relative;
    /* Anchor for all absolutely positioned children */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    pointer-events: auto;
    opacity: 0;
    user-select: none;
    -webkit-user-select: none;
    z-index: var(--z-index-logo);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-center-row {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 0;
    height: 0;
    z-index: 2;
}

.click-text,
.contact-text {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) !important;
    z-index: 10;
    pointer-events: none;
    width: max-content;
}

.click-text {
    left: min(-50px, -22vw);
    /* Moved closer to center from -480px/-38vw */
    /* Professional responsive offset */
    text-align: right;
    transform: translate(-100%, -50%) !important;
}

.contact-text {
    left: max(50px, 22vw);
    /* Moved closer to center from 480px/38vw */
    /* Professional responsive offset */
    text-align: left;
    transform: translate(0, -50%) !important;
}

.landing-section.show-logo .logo-container {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto;
    /* Ensure interactivity */
}

.landing-section .logo-container {
    display: flex;
    /* Changed from none to show on desktop */
}

/* welcome-page specifics */
.welcome-page {
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.welcome-page #welcomeLogoContainer {
    position: relative;
    /* Let flexbox handle centering */
    top: auto;
    left: auto;
    transform: none !important;
    opacity: 0;
    transition: opacity 2s cubic-bezier(0.4, 0, 0.2, 1);
}

.welcome-page #welcomeLogoContainer.revealed {
    opacity: 1;
}

.logo-container.success-layout {
    gap: 4rem;
    opacity: 0 !important;
    visibility: visible !important;
    display: grid !important;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    /* Ensure it is grid even if other rules try to hide it */
    transform: translate(-50%, -50%) !important;
    transition: opacity 2s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 1024px) {
    .logo-container.success-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
        width: 90% !important;
        text-align: center !important;
    }

    .logo-container.success-layout .click-text {
        order: 1 !important;
        font-size: 1.125rem !important;
        white-space: normal !important;
        max-width: none !important;
    }

    .logo-container.success-layout .logo-wrapper {
        order: 2 !important;
    }

    .logo-container.success-layout .join-text {
        order: 3 !important;
        font-size: 1.125rem !important;
        white-space: normal !important;
        max-width: none !important;
    }
}

.logo-container.success-layout.revealed {
    opacity: 1 !important;
}

.logo-container.success-layout .logo-image {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 1.5s ease, transform 1.5s ease;
}

.logo-container.success-layout.revealed .logo-image.logo-base {
    opacity: 1 !important;
    transform: scale(1) !important;
    animation: none !important;
}

.logo-container.success-layout .click-text,
.logo-container.success-layout .join-text {
    font-family: 'Space Mono', 'Courier New', monospace;
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    opacity: 0;
    transition: opacity 2s ease;
    color: #ffffff;
}

.logo-container.success-layout.revealed .click-text,
.logo-container.success-layout.revealed .join-text {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
}

/* Consolidated to top mobile media query */

.logo-image {
    position: absolute;
    width: var(--logo-size);
    height: var(--logo-size);
    filter: brightness(0) invert(1);
    border: none;
    outline: none;
    transform-origin: center;
    opacity: 0;
    /* Removed initial scale(0.3) for 'dont scale' native look */
    transform: scale(1);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
    z-index: 1;
    /* Behind absolute texts */
}

.logo-wrapper {
    display: none;
    /* Element removed from HTML but kept here for safety/cleanliness */
}

.logo-stack {
    position: relative;
    width: var(--logo-size);
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-stack .logo-base {
    position: relative;
    z-index: 2;
}


.contact-text {
    font-family: 'Space Mono', 'Courier New', monospace;
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.5s ease;
    letter-spacing: 0.05em;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    text-shadow: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.returning-visitor .contact-text {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.click-text,
.contact-text {
    font-family: 'Space Mono', 'Courier New', monospace !important;
    font-size: clamp(1.4rem, 3.5vw, 1.8rem) !important;
    /* Extra-bold for maximum impact */
    font-weight: 800 !important;
    color: #ffffff !important;
    white-space: nowrap !important;
    opacity: 0;
    transform: translateY(-10px);
    text-transform: none !important;
    letter-spacing: 0.05em !important;
    pointer-events: none;
    user-select: none;
    text-shadow: none !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: all 0.5s ease;
    text-align: center;
}

.join-text {
    position: absolute;
    bottom: 5rem;
    font-family: 'Space Mono', monospace !important;
    font-size: clamp(0.75rem, 0.9vw, 0.9rem) !important;
    /* Laptop/Desktop Responsive Scale */
    font-weight: 700 !important;
    color: rgba(255, 255, 255, 0.8) !important;
    letter-spacing: clamp(0.25em, 0.45vw, 0.45em) !important;
    /* Responsive Spacing */
    cursor: pointer;
    pointer-events: auto;
    z-index: 10;
    text-align: center;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.5s ease;
}

.join-text:hover {
    text-decoration: underline !important;
    text-underline-offset: 6px;
}

.landing-section.show-logo .click-text,
.landing-section.show-logo .contact-text,
.logo-container.revealed .click-text,
.logo-container.revealed .contact-text {
    visibility: visible !important;
    animation: textFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards !important;
}

.landing-section.show-logo .join-text,
.logo-container.revealed .join-text {
    visibility: visible !important;
    animation: textFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 1.1s forwards !important;
}

.returning-visitor .click-text,
.returning-visitor .join-text {
    font-size: 1.125rem;
    white-space: nowrap;
    transition: all 0.5s ease;
}

@media (max-width: 1024px) {

    .returning-visitor .click-text,
    .returning-visitor .join-text {
        white-space: normal;
        max-width: 180px;
        line-height: 1.2;
    }
}

.click-text,
.join-text {
    text-align: right;
}

.join-text {
    text-align: left;
}

/* Custom Premium Cursor: Magnetic Lens */
.cursor-lens {
    width: 25px;
    height: 25px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1),
        height 0.4s cubic-bezier(0.23, 1, 0.32, 1),
        background 0.4s ease,
        border 0.4s ease,
        transform 0.1s ease-out;
    /* Micro-lag for fluidity */
    transform: translate(-50%, -50%);
    display: none;
    /* Mobile/Initial Guard */
    opacity: 0;
    /* Hidden until hover */
}

/* Hover State: Expanded Lens */
.cursor-lens.active {
    width: 65px;
    height: 65px;
    border: 1px solid rgba(255, 255, 255, 1);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    opacity: 1 !important;
}

@keyframes textFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-8px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slowBgRotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.landing-section.show-logo .logo-image,
.logo-container.revealed .logo-image {
    animation: logoVideoAnimation 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards !important;
}

.landing-section.show-logo:first-child .logo-image {
    animation: logoVideoAnimation 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

@keyframes logoVideoAnimation {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.scroll-prompt {
    position: absolute;
    bottom: 3.5rem;
    /* Adjusted for elite balance */
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    /* Extra-bold for maximum impact */
    font-weight: 800;
    /* High-contrast solid white */
    color: #FFFFFF;
    letter-spacing: 0.45em;
    opacity: 0;
    transition: opacity 2s ease;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.2rem;
}

@media (max-width: 1024px) {
    .scroll-prompt {
        bottom: 2.5rem;
        /* Safe-area guard for modern phones */
    }
}

/* Vertical line animation removed as requested */

.success-active .scroll-prompt {
    opacity: 1;
}



@keyframes imageFadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes imageRotate {
    0% {
        transform: scale(var(--image-scale)) rotate(0deg);
    }

    100% {
        transform: scale(var(--image-scale)) rotate(360deg);
    }
}



/* ==========================================================================
   4. POPUP & FORM INTERACTION
   ========================================================================== */

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../assets/landing_img.webp') no-repeat center center;
    background-size: cover;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: var(--z-index-popup);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
    padding: 2rem;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    /* Wider landscape layout */
    min-width: 0;
    background-color: transparent;
    /* Container itself is transparent to hold the separate header and white card */
    box-shadow: none;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

.form-header-container {
    width: 100%;
    text-align: center;
    margin-bottom: 2.5rem;
}

.white-card-container {
    background-color: #ffffff;
    width: 100%;
    padding: 4rem 3rem;
    border-radius: 4px;
    /* Minimal rounding for premium feel */
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
}

.popup-container:focus {
    outline: none;
}

.popup-overlay.active .popup-container {
    transform: scale(1) translateY(0);
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    min-width: 44px;
    min-height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: var(--z-index-popup-close);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--form-text);
    transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
    border-radius: 50%;
    opacity: 0.7;
    box-sizing: border-box;
}

.popup-close:focus {
    outline: 2px solid var(--form-text);
    outline-offset: 2px;
}

.popup-close:hover {
    opacity: 1;
}

.popup-close:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: rotate(90deg);
}

.popup-close:active {
    transform: rotate(90deg) scale(0.95);
}

.popup-close svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2.5;
}

.popup-content {
    padding: var(--popup-padding);
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 2rem);
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    min-width: 0;
    box-sizing: border-box;
    width: 100%;
    position: relative;
    /* Ensure absolute positioning of hidden stages works relative to this */

    /* Global scrollbar hiding as requested */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.popup-content::-webkit-scrollbar {
    display: none;
}

/* Force no scroll during success/processing */
.popup-container.processing-state .popup-content,
.popup-container.success-state .popup-content {
    overflow: hidden !important;
}

.content-stage {
    transition: opacity 0.5s ease;
    width: 100%;
}

.content-stage.hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

/* Scrollbar styling removed to enforce hidden scrollbar */

.popup-title {
    font-family: 'Space Mono', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: 0.02em;
    text-transform: none;
    line-height: 1.3;
    max-width: 100%;
    /* Match width of popup-container */
    margin: 0 auto;
}

.popup-subtitle {
    font-family: 'Space Mono', monospace;
    font-size: 0.875rem;
    color: var(--form-text);
    text-align: center;
    margin-bottom: 2rem;
    opacity: 0.7;
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: 0.2px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.inscription-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.form-group {
    flex-direction: column;
    min-width: 0;
    box-sizing: border-box;
}

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

.form-group label {
    font-family: 'Space Mono', monospace;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--form-text);
    margin-bottom: 1rem;
    letter-spacing: 0.4px;
    opacity: 0.9;
}

.form-group input,
.form-group textarea {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 0.5rem 0;
    border: none;
    border-bottom: 1px solid #7B6C62;
    /* Thin minimal border */
    background: transparent;
    font-size: 1rem;
    font-family: 'Space Mono', monospace;
    color: var(--terracotta);
    transition: border-color 0.3s ease;
    min-height: 44px;
    letter-spacing: 0.2px;
    line-height: 1.5;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-bottom-color: var(--terracotta);
}

.form-group input.invalid,
.form-group textarea.invalid {
    border-bottom-color: #e74c3c;
}

.error-message {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: #ff0000;
    /* Pure red */
    margin-top: 0.25rem;
    height: 1.25rem;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.error-message.visible {
    opacity: 1;
    transform: translateY(0);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(61, 40, 23, 0.4);
    opacity: 1;
}

.form-group textarea {
    resize: vertical;
    min-height: 90px;
    padding-top: 0.5rem;
    line-height: 1.6;
}

.submit-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    margin-top: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 700;
    font-family: 'Space Mono', monospace;
    color: var(--text-maroon);
    /* Terracotta as per documentation */
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
    transition: opacity 0.2s ease, transform 0.2s ease;
    min-height: 44px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.submit-button:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.submit-button:active {
    transform: translateY(0) scale(0.98);
}

.submit-icon {
    width: 28px;
    height: auto;
    filter: brightness(0);
    opacity: 0.75;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.submit-button:hover .submit-icon {
    opacity: 1;
    transform: scale(1.05);
}

@media (max-width: 1024px) {
    .popup-container {
        max-width: 90vw;
        max-height: calc(100vh - 1rem);
        min-width: 0;
    }

    .popup-content {
        max-height: calc(100vh - 1rem);
        padding: 2rem 1.5rem 1.5rem;
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .popup-overlay {
        padding: 0.5rem;
    }

    .popup-container {
        max-width: 95vw;
        max-height: calc(100vh - 1rem);
        border-radius: 8px;
        min-width: 0;
    }

    .popup-content {
        padding: 1rem 1rem 1rem;
        max-height: 100vh;
        min-width: 0;
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE/Edge */
    }

    .popup-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
        line-height: 1.1;
    }

    .popup-subtitle {
        font-size: 0.8rem;
        margin-bottom: 1rem;
        line-height: 1.3;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .inscription-form {
        gap: 0.75rem;
    }

    .form-group label {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 0.85rem;
        padding: 0.35rem 0;
        min-height: 36px;
    }

    .form-group textarea {
        min-height: 60px;
        padding-top: 0.35rem;
    }

    .submit-button {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
        margin-top: 0.5rem;
        min-height: 40px;
    }

    /* Hide scrollbar */
    .popup-content::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 480px) {
    .popup-overlay {
        padding: 1.5rem;
    }

    .popup-container {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 8px;
        min-width: 0;
    }

    .popup-content {
        padding: 1rem 0.75rem 0.75rem;
        max-height: 100vh;
        min-width: 0;
    }

    .popup-title {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.8rem !important;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

    .popup-subtitle {
        font-size: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .inscription-form {
        gap: 0.5rem;
    }

    .form-row {
        gap: 0.5rem;
    }

    .form-group label {
        font-size: 0.7rem;
        margin-bottom: 0.1rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 0.8rem;
        min-height: 32px;
        padding: 0.25rem 0;
    }

    .form-group textarea {
        min-height: 50px;
    }

    .submit-button {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
        min-height: 36px;
    }

    .submit-icon {
        width: 24px;
    }

    /* Success Modal Overrides for Mobile */
    .modal-flow-content {
        padding: 1.5rem 1rem;
        min-height: auto;
    }

    .modal-logo-small {
        width: 80px;
        margin-bottom: 1.5rem;
    }

    .success-text {
        font-size: 1rem;
        line-height: 1.5;
    }
}

@media (max-height: 600px) {
    .popup-content {
        padding: 1rem 1.5rem 1rem;
    }

    .popup-title {
        font-size: 1.6rem !important;
        font-weight: 700 !important;
        margin-bottom: 1rem !important;
    }

    .popup-subtitle {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }

    .inscription-form {
        gap: 0.75rem;
    }

    .form-group textarea {
        min-height: 60px;
    }
}


@keyframes logoOverlayAnimation {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    100% {
        opacity: 0.4;
        transform: scale(1.05);
    }
}

.landing-section.show-logo .logo-overlay {
    animation: logoOverlayAnimation 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

/* Success Modal Styles */
.popup-container.processing-state,
.popup-container.success-state {
    /* Keeping original size (max-width: 600px) as requested */
    transition: none;
    /* No resizing transition needed if size doesn't change */
}

.modal-flow-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    /* More breathing room for a larger container */
    width: 100%;
    min-height: 300px;
    /* Ensure a consistent height for the center alignment */
    opacity: 1;
    transition: opacity 0.4s ease;
    box-sizing: border-box;
}

.modal-flow-content.fade-out {
    opacity: 0;
}

.modal-flow-content.fade-in {
    animation: slideInRight 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.modal-logo-small {
    width: 90px;
    height: auto;
    margin-bottom: 2rem;
    filter: invert(24%) sepia(21%) saturate(1001%) hue-rotate(346deg) brightness(96%) contrast(90%);
}

.modal-logo-big {
    width: 120px;
    height: auto;
    margin-bottom: 1.5rem;
    filter: invert(24%) sepia(21%) saturate(1001%) hue-rotate(346deg) brightness(96%) contrast(90%);
}

@keyframes pulseLogo {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.processing-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
}

.processing-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--form-brown);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin-bottom: 0;
    flex-shrink: 0;
}

.status-text {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--form-text);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.success-title {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-maroon);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

.success-text {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-maroon);
    font-size: 1.15rem;
    /* Matched register page success size */
    line-height: 1.8;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Legacy mobile overrides removed for professional consolidation */

@media (min-width: 1440px) {

    .click-text,
    .join-text {
        font-size: 1.5rem;
        letter-spacing: 1.2px;
    }

    .logo-container {
        gap: 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .background-image {
        animation: none !important;
    }
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #F2F2F2;
    }
}

/* Main Navbar */
/* ==========================================================================
   5. NAVIGATION BARS & MENUS
   ========================================================================== */

.main-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-height);
    padding: 0 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    background: var(--bg-dark);
}

.unlocked .main-navbar {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navbar.nav-hidden {
    transform: translateY(-100%) !important;
    opacity: 0;
    visibility: hidden;
}

/* Hide Phase 1 on Unlock */
.unlocked .landing-section {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.navbar-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.navbar-logo img {
    height: 40px;
    /* Shrunk for professionalism */
    filter: none;
}

@media (max-width: 480px) {
    .navbar-logo img {
        height: 32px;
        /* Extra small on tiny phones */
    }
}

.logo-subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 8px;
    letter-spacing: 2px;
    color: var(--text-maroon);
    margin-top: 4px;
    font-weight: 500;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
    margin-left: auto;
}

.nav-links a {
    color: var(--text-maroon);
    text-decoration: none;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    font-weight: 700;
    text-transform: none;
    /* Changed from uppercase */
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 4px;
}

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

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

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

.nav-links a:hover::after {
    width: 60%;
    /* Subtle hover underline */
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-maroon);
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-links {
    list-style: none;
    text-align: center;
    padding: 0;
}

.mobile-nav-links li {
    margin: 2rem 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.mobile-menu-overlay.active .mobile-nav-links li {
    opacity: 1;
    transform: translateY(0);
}

.mobile-nav-links li:nth-child(1) {
    transition-delay: 0.1s;
}

.mobile-nav-links li:nth-child(2) {
    transition-delay: 0.2s;
}

.mobile-nav-links li:nth-child(3) {
    transition-delay: 0.3s;
}

.mobile-nav-links li:nth-child(4) {
    transition-delay: 0.4s;
}

.mobile-nav-links a {
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    color: var(--text-maroon);
    text-decoration: none;
    text-transform: none;
    /* Changed from uppercase */
    letter-spacing: 2px;
    font-weight: 700;
}

/* Phase 2 Content */
.phase2-content {
    position: relative;
    z-index: 5;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.unlocked .phase2-content {
    opacity: 1;
    visibility: visible;
}

/* Phase 2 Hero */
/* ==========================================================================
   6. PHASE 2 CONTENT (HERO, LIEU, VILLAS)
   ========================================================================== */

.phase2-hero {
    height: 100vh;
    width: 100%;
    margin-top: 0;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: url('../assets/herosection.png') no-repeat center center;
    background-size: cover;
    overflow: hidden;
    scroll-snap-align: start;
}

.hero-content-centered {
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 4rem;
}

.hero-link {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 14px;
    color: #FFFFFF;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 5px;
    border-bottom: 2px solid #FFFFFF;
}

.clef-logo {
    width: 110px;
    height: auto;
}

.hero-reveal-title,
.scroll-indicator-down {
    display: none;
}

.scroller {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, #fff, transparent);
    position: relative;
    overflow: hidden;
}

.scroller::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--terracotta);
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100%);
    }
}

.content-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 0;
    background-color: var(--bg-dark);
    border-bottom: 1px solid rgba(242, 242, 242, 0.1);
    scroll-snap-align: start;
}

.container {
    width: 100%;
    /* Force width to prevent collapse */
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title,
.subsection-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--text-maroon);
    margin-bottom: 3rem;
}

.section-text {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--text-maroon);
    max-width: 800px;
}

/* Refined Project Section Redesign */
.section-header-centered {
    text-align: center;
    margin-bottom: 6rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.section-title-centered {
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-maroon);
    margin-bottom: 2rem;
}

.section-description-centered {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--text-maroon);
    opacity: 0.9;
}

/* Maroon Overlap Section (Image 1115) */
.maroon-overlap-section {

    display: flex;
    align-items: center;
    padding: 2rem 0;
    background-color: var(--bg-dark);
    scroll-snap-align: start;
}

.project-grid-refined {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6rem;
    margin-top: 4rem;
}

@media (max-width: 991px) {
    .project-grid-refined {
        flex-direction: column;
        gap: 3rem;
        text-align: center;
    }
}

.project-info-left {
    flex: 1;
}

.project-subtitle-figma {
    font-family: 'Space Mono', monospace;
    font-size: 1.8rem;
    color: var(--text-maroon);
    margin-bottom: 2.5rem;
}

.project-feature-description p {
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    color: var(--text-maroon);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    text-transform: none;
}

.project-image-right {
    flex: 1.2;
}

.figma-img-wrapper {
    width: 100%;
    max-height: 60vh;
    overflow: hidden;
}

.figma-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.amenities-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4rem;
}

.amenities-text {
    flex: 1;
}

.amenities-image {
    flex: 1;
}

.reveal-img {
    width: 100%;
    height: auto;
    box-shadow: none;
}

.amenities-list {
    list-style: none;
    margin-top: 2rem;
}

.amenities-list li {
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.amenities-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--terracotta);
}

/* Integrated Collage & Le Lieu Design */
.integrated-collage-section {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0;
    background-color: var(--bg-dark);
    scroll-snap-align: start;
    overflow: hidden;
}

.integrated-collage-section .collage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 0;
    position: relative;
    z-index: 10;
    /* Images on top of the overlap */
    padding: 0 4rem;
    width: 100%;
}

@media (max-width: 768px) {
    .integrated-collage-section .collage-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 2rem;
    }
}

.collage-item {
    position: relative;
    border: none;
    /* Removed as requested */
    overflow: hidden;
    transition: var(--transition);
}

.collage-img-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    overflow: visible;
    transition: var(--transition);
}

.collage-img-wrapper img {
    width: 100%;
    height: 70vh;
    object-fit: cover;
    display: block;
}

/* Remove overlay styles */
.collage-overlay {
    display: none;
}

.collage-integrated-title {
    color: #FFFFFF;
    text-align: center;
    width: 100%;
    margin: 0 0 1rem;
    position: relative;
    z-index: 10;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    text-transform: uppercase;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
}

.maroon-info-block {
    background-color: #493121;
    padding: 19rem 0 1rem;
    /* Taller top padding for more presence under images */
    color: #FFFFFF;
    scroll-snap-align: start;
    margin-top: -35vh;
    /* 50% overlap of the 70vh images */
    position: relative;
    z-index: 5;
    width: 100%;
}

@media (max-width: 768px) {
    .maroon-info-block {
        margin-top: -10vh;
        padding: 8rem 0 6rem;
    }
}

.maroon-info-block .container {
    padding: 0 10%;
    max-width: 1000px;
}

.maroon-info-block .section-title {
    color: #FFFFFF;
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.maroon-info-block .section-text {
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
}

/* Les Villas Section (Image 1039) */
.villas-section {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 4rem 0;
    background-color: var(--bg-dark);
    scroll-snap-align: start;
}

.villas-gallery-wrapper {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 5rem;
}

@media (max-width: 991px) {
    .villas-gallery-wrapper {
        flex-direction: column-reverse;
        gap: 2rem;
    }
}

.villas-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 0.5rem;
}

.villas-main-image,
.villas-textures-grid {
    height: 45vh;
    min-height: 300px;
}

.villas-main-image {
    border: none;
    /* Removed as requested */
    overflow: hidden;
}

.texture-item {
    border: none;
    /* Removed as requested */
    overflow: hidden;
}

.villas-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Removed border */
}

.villas-textures-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 0.5rem;
}

.texture-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Removed border */
}

.villas-nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-maroon);
    transition: var(--transition);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.villas-nav-btn:hover {
    transform: scale(1.1);
    color: var(--terracotta);
}

.villas-content {
    max-width: 1000px;
    margin: 0 auto;
}

.villas-title {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 2rem;
    color: var(--text-maroon);
    margin-bottom: 2rem;
    text-transform: lowercase;
}

.villas-description {
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-maroon);
    opacity: 0.8;
}

/* Responsiveness for Villas */
@media (max-width: 1024px) {
    .villas-grid {
        grid-template-columns: 1fr;
    }

    .villas-main-image,
    .villas-textures-grid {
        height: 400px;
    }

    .villas-gallery-wrapper {
        gap: 1rem;
    }
}

/* Maroon Map Section (Mockup 1115) */
.maroon-map-section {
    background-color: #493121;
    padding: 4rem 0;
    color: #FFFFFF;
    height: 100vh;
    display: flex;
    align-items: center;
}

.maroon-map-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.location-title {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 3rem;
    color: #FFFFFF;
}

.location-text {
    font-family: 'Space Mono', monospace;
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

.location-text p {
    margin-bottom: 1.5rem;
}

.map-wrapper {
    position: relative;
    border: 2px solid #FFFFFF;
    overflow: hidden;
    height: 50vh;
    /* Viewport-relative height */
}

.map-iframe {
    width: 100%;
    height: 100%;
    display: block;
    filter: grayscale(0.2) contrast(1.1);
    /* Subtle stylization to match branding */
}

@media (max-width: 991px) {
    .maroon-map-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .location-title {
        font-size: 1.5rem;
    }
}

/* Timeline Section (Image 1179) */
/* ==========================================================================
   7. TIMELINE & CONTACT SECTION
   ========================================================================== */

.timeline-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.6rem 0;
    background-color: var(--bg-dark);
    scroll-snap-align: start;
    overflow: hidden;
}

.timeline-main-wrapper {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 2.4rem auto;
    height: 240px;
    display: block;
}

.timeline-axis {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #493121;
    z-index: 1;
}

.axis-arrow {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 14px solid #493121;
}

.timeline-events {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.timeline-event {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: auto;
}

.timeline-event.above {
    bottom: 50%;
    flex-direction: column-reverse;
}

.timeline-event.below {
    top: 50%;
}

.event-marker {
    width: 2px;
    height: 60px;
    /* Bolder vertical lines */
    background-color: #493121;
}

.event-content {
    font-family: 'Space Mono', monospace;
    color: #493121;
    padding-left: 15px;
    white-space: nowrap;
}

.timeline-event.above .event-content {
    margin-bottom: 5px;
}

.timeline-event.below .event-content {
    margin-top: 5px;
}

.event-title {
    display: block;
    font-size: 0.9rem;
    line-height: 1.2;
    opacity: 0.8;
}

.event-date {
    display: block;
    font-weight: 700;
    font-size: 1.2rem;
    margin-top: 2px;
}

/* Responsiveness for Timeline */
@media (max-width: 768px) {
    .timeline-section {
        padding: 3rem 2rem;
    }

    .timeline-main-wrapper {
        height: auto;
        flex-direction: column;
        align-items: flex-start;
    }

    .timeline-axis {
        display: none;
        /* Switch to vertical list for mobile */
    }

    .timeline-events {
        display: flex;
        flex-direction: column;
        gap: 3rem;
    }

    .timeline-event {
        position: static !important;
        flex-direction: row !important;
        align-items: center;
        gap: 2rem;
    }

    .event-marker {
        width: 40px;
        height: 2px;
    }

    .event-content {
        white-space: normal;
    }
}

/* Final Form Section (Image 1192) */
.villas-contact-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 4rem 0;
    background-image: url('../assets/bg_deployed.png');
    background-size: cover;
    background-position: center;
    color: #FFFFFF;
    scroll-snap-align: start;
}

.villas-contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Overlay for readability */
}

.contact-editorial-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 6rem;
    align-items: center;
}

.editorial-title {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.5rem);
    /* Responsive title */
    margin-bottom: 2rem;
    letter-spacing: -1px;
}

.editorial-subtitle {
    font-family: 'Space Mono', monospace;
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.8;
    max-width: 400px;
    margin-bottom: 4rem;
}

.editorial-logo img {
    width: 180px;
    opacity: 0.9;
}

.contact-card {
    background: #FFFFFF;
    padding: 6rem 5rem;
    box-shadow: none;
}

.minimal-form {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

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

.form-item {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.form-item.full-width {
    grid-column: span 2;
}

.thank-you-message {
    font-size: 1.25rem;
    color: var(--text-maroon);
    line-height: 1.4;
    text-align: center;
    font-weight: 500;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .thank-you-message {
        font-size: 0.9rem;
    }
}

.form-item label {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-maroon);
    text-transform: none;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-item input,
.form-item textarea {
    background: none;
    border: none;
    border-bottom: 2px solid var(--text-maroon);
    padding: 0.8rem 0;
    font-family: 'Space Mono', monospace;
    font-size: 1.1rem;
    color: var(--text-maroon);
    transition: var(--transition);
}

.form-item textarea {
    resize: none;
    overflow: hidden;
}

.form-item input:focus,
.form-item textarea:focus {
    outline: none;
    border-bottom-color: var(--terracotta);
}

.form-submit-row {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.text-btn {
    background: none;
    border: none;
    border-bottom: 2px solid var(--text-maroon);
    font-family: 'Space Mono', monospace;
    font-size: 1.4rem;
    color: var(--text-maroon);
    padding: 0.5rem 0;
    cursor: pointer;
    transition: var(--transition);
}

.text-btn:hover {
    color: var(--terracotta);
    border-bottom-color: var(--terracotta);
    transform: translateY(-2px);
}

/* Responsiveness for Final Contact */
@media (max-width: 991px) {
    .villas-contact-section {
        padding: 3rem 1.5rem;
        height: auto;
        min-height: 100dvh;
        /* Dynamic viewport height */
    }

    .contact-editorial-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }

    .editorial-title {
        font-size: clamp(1.8rem, 8vw, 2.2rem);
        margin-bottom: 1.5rem;
    }

    .editorial-subtitle {
        margin: 0 auto 2.5rem;
        font-size: 0.95rem;
        opacity: 0.7;
    }

    .editorial-logo img {
        width: 120px;
    }

    .contact-card {
        padding: 2.5rem 1.5rem;
        width: 100%;
        max-width: 480px;
        margin: 0 auto;
    }

    .minimal-form {
        gap: 2rem;
    }

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

    .form-item.full-width {
        grid-column: span 1;
    }
}

@media (max-width: 480px) {
    .editorial-title {
        font-size: 1.8rem;
    }

    .contact-card {
        padding: 2rem 1rem;
    }

    .form-item input,
    .form-item textarea {
        font-size: 1rem;
    }

    .text-btn {
        font-size: 1.1rem;
        width: 100%;
        text-align: center;
    }
}

/* Main Footer Redesign (Image 1205) */
/* ==========================================================================
   8. FOOTER
   ========================================================================== */

.main-footer {
    padding: 4rem 0 4rem;
    background-color: #F2F2F2;
    color: var(--text-maroon);
    scroll-snap-align: start;
}

.footer-separator {
    width: 100%;
    height: 1px;
    background-color: rgba(73, 49, 33, 0.2);
    margin-bottom: 4rem;
}

.footer-content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 4rem;
}

.footer-logo {
    width: 280px;
    height: auto;
}

.footer-nav-columns {
    display: flex;
    gap: 6rem;
}

.footer-col h4 {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-maroon);
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.footer-col a {
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    color: var(--text-maroon);
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-col a:hover {
    opacity: 1;
    color: var(--terracotta);
}

.footer-bottom-minimal {
    margin-top: 6rem;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.4;
    font-family: 'Space Mono', monospace;
}

/* Responsiveness for Footer */
@media (max-width: 991px) {
    .footer-content-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-nav-columns {
        justify-content: center;
        gap: 3rem;
    }
}

/* Reveal Animations */
.reveal-img,
.collage-item,
.content-section,
.project-text,
.amenities-text,
.map-container,
.contact-details {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.revealed {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.center {
    text-align: center;
}

.section-header {
    margin-bottom: 4rem;
}

.section-tag-line {
    display: block;
    margin-bottom: 1rem;
}

.amenities-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4rem;
}

.amenities-text,
.amenities-image {
    flex: 1;
}

.reveal-img {
    width: 100%;
    height: auto;
    box-shadow: none;
}

.amenities-list {
    list-style: none;
    margin-top: 2rem;
}

.amenities-list li {
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.amenities-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--terracotta);
}

@media (max-width: 768px) {
    .main-navbar {
        padding: 1rem 2rem;
    }

    .nav-links {
        display: none;
        /* Hide on mobile for simplicity, can add burger later */
    }

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

    .footer-content-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-logo {
        width: 180px;
    }

    .footer-nav-columns {
        flex-direction: column;
        gap: 3rem;
    }

    .phase2-hero .hero-content-centered {
        flex-direction: column;
        gap: 2rem;
        padding: 0 2rem;
    }

    .clef-logo {
        width: 80px;
    }

    .section-title,
    .subsection-title {
        font-size: 2.5rem;
        margin-bottom: 5rem;
    }

    .integrated-collage-section,
    .villas-section,
    .timeline-section,
    .villas-contact-section {
        padding: 3rem 1rem;

    }

    .villas-main-image,
    .villas-textures-grid {
        height: 25vh !important;
        min-height: 180px !important;
    }

    .timeline-main-wrapper {
        height: auto !important;
        padding: 1rem 0;
    }

    .project-subtitle-figma {
        font-size: 1.4rem;
    }

    .collage-grid {
        padding: 0 1rem !important;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

/* 
   FINAL PROFESSIONAL MOBILE & TABLET OPTIMIZATION 
   Consolidated Source of Truth - Moved to end of file for absolute priority.
*/
@media (max-width: 1024px) {
    .background-video-container {
        display: none !important;
    }

    .landing-section.active,
    .landing-section {
        background-color: transparent !important;
        animation: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        cursor: pointer;
    }

    /* Core Logo & Text Container */
    .landing-section.show-logo .logo-container,
    .logo-container.revealed {
        --logo-size: 750px !important;
        /* Ultimate Brand Impact Logo */
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        opacity: 1 !important;
        visibility: visible !important;
        gap: 2.5rem !important;
        /* Professional stabilized gap */
        width: 100% !important;
        height: auto !important;
        margin: 0 auto !important;
        text-align: center !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        animation: none !important;
    }

    .logo-center-row {
        position: relative !important;
        top: auto !important;
        left: 0 !important;
        /* Force reset from desktop position */
        right: 0 !important;
        transform: none !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        /* Cross-axis centering */
        width: 100% !important;
        max-width: 100vw !important;
        /* Prevent expansion shift */
        height: auto !important;
        gap: 2.5rem !important;
        z-index: 5 !important;
        margin: 0 auto !important;
    }

    /* Side Landing Texts (Home, Hidden / In Nature) */
    .click-text,
    .contact-text {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        margin: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        font-size: clamp(1.35rem, 6vw, 1.6rem) !important;
        /* Balanced larger scale for mobile */
        font-weight: 800 !important;
        color: #FFFFFF !important;
        white-space: normal !important;
        line-height: 1.2 !important;
        z-index: 1000 !important;
        display: block !important;
        text-align: center !important;
        animation: none !important;
        width: 100% !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
    }

    /* Join Text (Unlock) - Decoupled for independent scaling */
    .join-text {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        margin: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        font-size: clamp(1rem, 4.5vw, 1.25rem) !important;
        font-weight: 700 !important;
        color: #FFFFFF !important;
        white-space: normal !important;
        line-height: 1.2 !important;
        z-index: 1000 !important;
        display: block !important;
        text-align: center !important;
        animation: none !important;
        width: 100% !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
    }

    /* Vertical Ordering: Home -> Logo -> In nature -> Unlock */
    .click-text {
        order: 1 !important;
        margin-bottom: 0.5rem !important;
    }

    .logo-stack {
        order: 2 !important;
        width: var(--logo-size) !important;
        height: var(--logo-size) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: -225px auto !important;
        /* Stable texts while logo grows ultimate */
        position: relative !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }

    .contact-text {
        order: 3 !important;
        margin-top: 0.5rem !important;
    }

    .join-text {
        order: 4 !important;
        margin-top: 2rem !important;
        /* Spacing for massive logo impact */
        letter-spacing: 0.15em !important;
        /* Mobile legibility check */
    }

    .logo-image {
        width: 100% !important;
        height: 100% !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        position: relative !important;
        object-fit: contain !important;
        pointer-events: none;
    }

    /* Prevent side-by-side shift by hiding the overlay logo on mobile */
    .logo-overlay {
        display: none !important;
    }

    /* popup UI mobile refinements */
    .popup-close {
        top: 0.75rem !important;
        right: 0.75rem !important;
        width: 32px !important;
        height: 32px !important;
    }
}