/* ==========================================
   0. CUSTOM FONTS
   ========================================== */
@font-face {
    font-family: 'Almarena Display';
    src: url('fonts/AlmarenaDisplayLight.woff2') format('woff2'),
         url('fonts/AlmarenaDisplayLight.woff') format('woff'),
         url('fonts/AlmarenaDisplayLight.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Almarena Display';
    src: url('fonts/AlmarenaDisplayRegular.woff2') format('woff2'),
         url('fonts/AlmarenaDisplayRegular.woff') format('woff'),
         url('fonts/AlmarenaDisplayRegular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Almarena Display';
    src: url('fonts/AlmarenaDisplayBold.woff2') format('woff2'),
         url('fonts/AlmarenaDisplayBold.woff') format('woff'),
         url('fonts/AlmarenaDisplayBold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ==========================================
   1. RESET & BASE STYLES (The Optimizer)
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Very important to prevent element expansion due to Padding */
}


/* ==========================================
   SCROLL LOCK (During Loading Screen)
   ========================================== */
body.scroll-locked {
    overflow: hidden !important; /* Prevents desktop scrolling */
}

body.scroll-locked .horizontal-scroll-wrapper {
    overflow: hidden !important; /* Prevents mobile scrolling */
    pointer-events: none !important; /* Prevents touch or drag completely in the background */
}


html, body {
    background-color: #000000;
    color: #ffffff;
    font-family: 'Almarena Display', sans-serif;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    
    /* The magic here: this line prevents the browser from doing "Pull-to-Refresh" completely */
    overscroll-behavior-y: none; 
}

body {
    background-color: #030303; /* Pure black and comfortable for the eyes */
    color: #ffffff;
    font-family: 'Almarena Display', sans-serif;
    overflow-x: hidden; /* We prevent the default horizontal scrolling of the browser */
    overflow-y: auto;   /* We allow vertical scrolling so GSAP works */
}

/* ==========================================
   2. THE CANVAS (The Rocket Background)
   ========================================== */
#rocket-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100); /* Uses the actual height from JavaScript */
    z-index: 0; /* We place it in the far background */
    pointer-events: none; /* We prevent it from interfering with mouse movement or clicking on texts */
}

/* ==========================================
   LOGO (Top Left)
   ========================================== */
.site-logo {
    position: fixed;
    top: 30px;
    left: 40px;
    z-index: 50; /* Above content but below overlays */
    transition: opacity 0.3s ease;
}

.site-logo img {
    height: 40px;
    width: auto;
    display: block;
}

.site-logo:hover {
    opacity: 0.8;
}

/* Hide logo when overlays are active to prevent overlap with back button */
body:has(#details-overlay.active) .site-logo,
body:has(.lead-modal.active) .site-logo {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Hide logo on mobile for cleaner UI */
@media (max-width: 768px) {
    .site-logo {
        top: 20px;
        left: 20px;
    }
    
    .site-logo img {
        height: 32px;
    }
}

/* ==========================================
   3. SCROLL WRAPPER & TRACK (The Structure)
   ========================================== */
.horizontal-scroll-wrapper {
    position: relative;
    z-index: 10; /* Must be above the canvas */
    width: 100%;
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    overflow: hidden; /* Hide the rest of the sections that go off screen */
    background-color: transparent !important; /* Complete transparency to see the rocket */
}

.horizontal-track {
    display: flex;
    width: 500vw; /* Width of 5 screens (intro + 4 skills) */
    height: 100%;
    flex-wrap: nowrap; /* Force sections to stay in one horizontal line */
}

/* ==========================================
   4. THE PANELS (Individual Screens)
   ========================================== */
.panel {
    width: 100vw;
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    flex-shrink: 0; /* Prevents sections from shrinking or overlapping */
    display: flex;
    align-items: center; /* Center content vertically */
    padding: 0 10vw; /* Leave 10% space from right and left to arrange texts */
    position: relative;
    background-color: transparent !important; /* Complete transparency */
}

/* ==========================================
   5. TYPOGRAPHY & CONTENT (The Designer)
   ========================================== */
.content-box {
    max-width: 550px; /* Set maximum width for text so it doesn't cover the rocket */
    position: relative;
    z-index: 20; /* Ensure content is above canvas and other background elements */
}

.chapter-num {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

h1 {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
    letter-spacing: -1px;
}

p {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #a0a0a0; /* Light gray for eye comfort */
}

/* ==========================================
   6. CHAPTER COLORS (Matching your screenshots)
   ========================================== */
.panel-intro .chapter-num      { color: #ffffff; }
.panel-strategist .chapter-num { color: #00e5ff; } /* Cyan */
.panel-designer .chapter-num   { color: #ff00ff; } /* Magenta/Purple */
.panel-coder .chapter-num      { color: #00ff00; } /* Green */
.panel-optimizer .chapter-num  { color: #ffd700; } /* Gold */


/* ==========================================
   7. MOBILE RESPONSIVENESS (Native Swipe)
   ========================================== */
@media (max-width: 768px) {
    /* Prevent any vertical scrolling by mistake on mobile */
    body {
        overflow: hidden; 
    }

    /* Enable real horizontal swipe with finger */
    .horizontal-scroll-wrapper {
        height: calc(var(--vh, 1vh) * 100); /* Uses the actual height from JavaScript */
        overflow-x: auto !important; 
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory; /* Magnetic effect when swiping */
        -webkit-overflow-scrolling: touch; /* Very smooth swiping on iPhone devices */
        scrollbar-width: none; 
        -ms-overflow-style: none;
    }

    .horizontal-scroll-wrapper::-webkit-scrollbar {
        display: none;
    }

    .panel {
        scroll-snap-align: center; 
        position: relative; /* Very necessary for absolute positioning */
        display: block; /* We cancel Flexbox here to prevent automatic expansion */
        height: calc(var(--vh, 1vh) * 100);
    }
    
    /* Intro section needs Flexbox for different layout */
    .panel-intro {
        display: flex;
        align-items: stretch;
        padding: 0;
    }

    .content-box {
        /* The magic starts here: we separated the box from the screen and fixed its "ceiling" */
        position: absolute;
        top: calc(var(--vh, 1vh) * 55); /* 60% of actual height - below the rocket */
        left: 5vw;
        right: 5vw;
        bottom: 20px; /* Small space from the bottom */
        width: 90vw;
        text-align: center; 
        text-shadow: 0 4px 15px rgba(0,0,0,1), 0 0 50px rgba(0,0,0,0.9);
        z-index: 20; /* Ensure content box is above canvas on mobile */
    }

    /* Professional touch: fix text height so "Explore Details" button doesn't jump */
    .content-box p {
        min-height: 90px; /* Fixed space always enough for 4 lines */
        margin-bottom: 20px;
    }

    h1 {
        font-size: 2.5rem; 
        margin-bottom: 10px;
    }

    p {
        font-size: 1.1rem;
        line-height: 1.4;
    }

    .chapter-num {
        font-size: 0.75rem;
        margin-bottom: 10px;
    }
}


/* ==========================================
   8. PRELOADER (Typewriter Effect)
   ========================================== */
#preloader {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; 
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    background-color: #000000;
    z-index: 99999; /* Highest layer in the site */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease-out, visibility 1s ease-out;
}

#typewriter {
    font-size: 3.5rem;
    font-weight: 800;
    color: #ffffff;
    border-right: 4px solid #ffffff; /* Typing cursor */
    padding-right: 8px;
    white-space: nowrap;
    animation: blink-cursor 0.8s infinite step-end;
}

/* Loading texts and button container */
.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px; /* Space between text and button */
}

/* Styling for start button (Enter Experience) */
#enter-btn {
    padding: 15px 40px;
    font-size: 1rem;
    font-weight: bold;
    color: #000000;
    background-color: #ffffff;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    
    /* Hide and animation settings */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px); /* Starts from slightly below */
    transition: all 0.5s ease;
}

/* Mouse hover effect on button */
#enter-btn:hover {
    background-color: #e0e0e0;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    transform: translateY(0) scale(1.02);
}

/* The class that JS will add to show the button */
#enter-btn.show-btn {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@keyframes blink-cursor {
    0%, 100% { border-color: transparent; }
    50% { border-color: #ffffff; }
}

/* ==========================================
   9. SCROLL INDICATOR ANIMATION
   ========================================== */
.scroll-indicator {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.mouse-icon {
    width: 26px; height: 42px;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 15px;
    position: relative;
}

.mouse-icon::before {
    content: '';
    position: absolute;
    top: 8px; left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 8px;
    background: #ffffff;
    border-radius: 2px;
    animation: scroll-wheel 1.5s infinite;
}

.scroll-text {
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    animation: pulse-text 2s infinite;
}

@keyframes scroll-wheel {
    0% { top: 8px; opacity: 1; }
    100% { top: 22px; opacity: 0; }
}
@keyframes pulse-text {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}



/* Hide mobile text on desktop screens */
.mobile-text {
    display: none;
}

/* ==========================================
   10. MOBILE RESPONSIVENESS (Native Swipe & Rotate Icon)
   ========================================== */
@media (max-width: 768px) {
    /* 1. Hide desktop text and show mobile text */
    .desktop-text { display: none; }
    .mobile-text { display: block; }

    /* 2. Rotate mouse icon to look like a horizontal swipe indicator */
    .mouse-icon {
        transform: rotate(-90deg);
        margin-bottom: 15px; /* Simple space after rotation */
    }

    /* 3. Enable real horizontal swipe and prevent vertical scroll completely */
    body {
        overflow: hidden; 
    }
    
    .horizontal-scroll-wrapper {
        overflow-x: auto !important; 
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory; /* Magnetic effect */
        -webkit-overflow-scrolling: touch; 
    }

    /* 4. Adjust sections and center them */
    .panel {
        scroll-snap-align: center; 
        padding: 0 5vw;
        align-items: flex-end;
        padding-bottom: 0; 
        justify-content: center;
    }

    #typewriter { font-size: 1.5rem; }
    .content-box { text-align: center; }
    h1 { font-size: 2.5rem; }
    p { font-size: 1.1rem; }
}


/* ==========================================
   11. CTA BUTTONS & FULLSCREEN OVERLAY
   ========================================== */
.cta-btn {
    margin-top: 20px;
    padding: 12px 30px;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;
    position: relative;
    z-index: 30; /* Ensure buttons are above all other content */
    pointer-events: auto; /* Explicitly enable clicks */
}
.cta-btn:hover {
    background: #fff;
    color: #000;
}

/* Fullscreen overlay */
#details-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; 
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    background-color: #050505;
    z-index: 100000; /* Above everything */
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* Critical: Don't block clicks when hidden */
    transition: opacity 0.4s ease;
    overscroll-behavior: none;
}
#details-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* Enable clicks when visible */
}

/* Back button - Clean White Style */
#close-overlay-btn {
    position: absolute;
    top: 20px; 
    left: 20px;
    z-index: 100001;
    
    /* White background with black outline */
    background: #ffffff;
    border: 2px solid #000000;
    color: #000000;
    
    padding: 10px 18px; 
    border-radius: 50px;
    cursor: pointer; 
    
    /* Layout */
    display: flex;
    align-items: center;
    gap: 6px;
    
    /* Typography */
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    
    /* Smooth transitions */
    transition: all 0.2s ease;
}

#close-overlay-btn:hover {
    background-color: #e0e0e0;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
}

#close-overlay-btn:active {
    transform: scale(0.97);
}

/* Back icon size */
.custom-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    filter: invert(0); /* Black icon */
    transition: filter 0.2s ease;
}


/* Internal sections (each section represents a skill) */
.overlay-section {
    display: none; /* Hidden by default */
    width: 100%; height: 100%;
}
.overlay-section.active {
    display: flex; /* Displays as Flexbox when activated */
}

/* --- Desktop layout (50/50) --- */
.overlay-left-slider {
    width: 50%; height: 100%;
    position: relative; background: #111;
}
.overlay-right-content {
    width: 50%; height: 100%;
    padding: 80px 50px;
    overflow-y: auto;
    background: #0a0a0a;
    overscroll-behavior-y: contain;
    overscroll-behavior: none; /* First weapon: prevent scroll bleed */
    overscroll-behavior: contain;
}
.overlay-right-content h2 { margin-bottom: 20px; font-size: 3rem; }

/* Slider (images) */
.slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0; transition: opacity 0.5s ease;
}
.slide.active { opacity: 1; }
.slider-controls {
    position: absolute; bottom: 30px; left: 50%;
    transform: translateX(-50%); display: flex; gap: 15px;
}

/* Slider buttons (navigation) */
.slider-controls button {
    background: rgba(0,0,0,0.5); 
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%; 
    width: 44px; /* We made the button slightly bigger to fit the finger */
    height: 44px; 
    cursor: pointer;
    
    /* Center the icon inside the circular button perfectly */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    transition: background 0.3s ease, transform 0.2s ease;
}

.slider-controls button:hover {
    background: rgba(0,0,0,0.8);
    transform: scale(1.05); /* Smooth enlargement on mouse hover */
}

/* Size of navigation icons (Next / Prev) */
.slider-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Mobile elements hidden on desktop */
.drag-indicator, .collapse-btn { display: none; }

/* ==========================================
   12. OVERLAY MOBILE RESPONSIVENESS
   ========================================== */
@media (max-width: 768px) {
    #close-overlay-btn { top: 15px; left: 15px; }
    .overlay-section.active { flex-direction: column; }
    
    /* Image in the upper half */
    .overlay-left-slider {
        width: 100%; height: calc(var(--vh, 1vh) * 50); 
    }
    
    /* Content in the lower half (Bottom Sheet system) */
    .overlay-right-content {
        width: 100%; height: calc(var(--vh, 1vh) * 55); /* Initial space */
        position: absolute; bottom: 0;
        padding: 40px 20px;
        background: #151515;
        border-radius: 30px 30px 0 0;
        box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
        transition: height 0.4s cubic-bezier(0.25, 1, 0.5, 1); /* Smooth expansion animation */
    }

    /* Content appearance when expanded (Expand) */
    .overlay-right-content.expanded {
        height: calc(var(--vh, 1vh) * 90); /* Takes most of the screen */
    }

    .drag-indicator {
        display: block; 
        width: 50px; 
        height: 6px;
        background: #444; 
        border-radius: 10px;
        position: absolute; 
        top: 15px; 
        left: 50%; 
        transform: translateX(-50%);
    }

}



/* ==========================================
   CUSTOM SCROLLBAR FOR OVERLAY CONTENT
   ========================================== */
/* Complete scrollbar appearance */
.overlay-right-content::-webkit-scrollbar {
    width: 6px; /* Slim and elegant width */
}

/* Scrollbar track (background) */
.overlay-right-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05); 
    border-radius: 10px;
}

/* Moving part of scrollbar (thumb) */
.overlay-right-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3); 
    border-radius: 10px;
    transition: background 0.3s ease;
}

/* When mouse hovers over thumb (for desktop) */
.overlay-right-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.6); 
}

/* ==========================================
   MOBILE EXPAND FIX (The Secret Trick)
   ========================================== */
@media (max-width: 768px) {
    /* 1. When screen is collapsed (at bottom): we prevent scrolling completely */
    .overlay-right-content {
        overflow-y: hidden; /* Dragging here will only expand the screen without scrolling the text */
    }

    /* 2. When screen expands (Expand): we allow scrolling */
    .overlay-right-content.expanded {
        overflow-y: auto; 
    }
}



/* ==========================================
   13. OVERLAY CONTENT TYPOGRAPHY & STYLING
   ========================================== */

/* Main content container */
.overlay-right-content {
    color: #ffffff;
    font-family: inherit; /* Will take the same font as the main site */
}

/* Main heading (h2) - like Strategist and Coder */
.overlay-right-content h2 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
    line-height: 1.1;
}

/* Text paragraphs (p) */
.overlay-right-content p {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #c4c4c4; /* Light gray color for eye comfort while reading */
    margin-bottom: 30px;
}

/* Sub-headings (h3) - like What I Optimize */
.overlay-right-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #ffffff;
}

/* Bullet lists (ul) */
.overlay-right-content ul {
    list-style-type: none; /* We cancel the default style to design a better one */
    padding-left: 0;
    margin-bottom: 40px;
}

/* List items (li) */
.overlay-right-content ul li {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #c4c4c4;
    margin-bottom: 12px;
    position: relative;
    padding-left: 25px; /* Space for custom bullet point */
}

/* Custom bullet point next to each list item */
.overlay-right-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    background-color: #ffffff; /* Bullet point color */
    border-radius: 50%; /* To make it circular */
}

/* CTA buttons inside content (like Call Me Now) */
.overlay-right-content button {
    display: inline-block;
    padding: 14px 32px;
    background-color: #ffffff;
    color: #000000;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 30px; /* Elegant oval shape */
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    margin-top: 10px;
}

/* Mouse hover effect on button */
.overlay-right-content button:hover {
    background-color: #e0e0e0;
    transform: translateY(-3px); /* Slight upward elevation */
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.15); /* Soft glow */
}

/* ==========================================
   14. MOBILE TYPOGRAPHY ADJUSTMENTS
   ========================================== */
@media (max-width: 768px) {
    .overlay-right-content h2 {
        font-size: 2.5rem;
        margin-top: 20px; /* Extra space below drag indicator */
    }

    .overlay-right-content p {
        font-size: 1.05rem;
        margin-bottom: 25px;
    }

    .overlay-right-content h3 {
        font-size: 1.25rem;
    }

    .overlay-right-content ul li {
        font-size: 1.05rem;
    }

    .overlay-right-content button {
        width: 100%; /* Full-width button on mobile to be easier to click */
        padding: 16px;
    }
}


/* ---------------------------------------------------
   Adding styles for new intro section in CSS file
   (Add this at the end of style.css file)
   --------------------------------------------------- */

/* Intro section container */
.intro-container {
    display: flex;
    align-items: center; /* Vertical alignment in the center */
    justify-content: space-between; /* Distribute space between text and image */
    width: 100%;
    height: 100%; /* Takes full height of the panel */
    max-width: 1200px; /* Maximum content width */
    margin: 0 auto; /* Center container on the page */
    padding: 0 5%; /* Side margins */
    position: relative;
}

/* Left column (texts) */
.intro-text {
    flex: 1; /* Takes available space */
    max-width: 50%; /* Does not exceed half screen */
}

.intro-text h1 {
    font-size: 4rem; /* Enlarge main heading */
    margin-bottom: 20px;
}

.intro-text p {
    font-size: 1.5rem; /* Enlarge paragraph */
    color: #cccccc;
}

/* Scroll indicator positioned absolutely on desktop */
.intro-text .scroll-indicator {
    position: absolute;
    bottom: 80px;
    left: 5%;
}

/* Right column (image) */
.intro-image {
    flex: 1; /* Takes available space */
    display: flex;
    justify-content: flex-end; /* Align image to the right */
}

/* Profile image styling */
.profile-image {
    width: 400px; /* Fixed width for image */
    height: 400px; /* Fixed height to make it square */
    object-fit: cover; /* Fill frame without distortion */
    border-radius: 50%; /* Make image circular (optional, can be removed to keep it square) */
    border: 5px solid #ffffff; /* White border for image */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); /* Light shadow */
}

/* ---------------------------------------------------
   Mobile Typography (Responsive Design)
   --------------------------------------------------- */
@media (max-width: 768px) {
    /* Change direction to vertical */
    .intro-container {
        flex-direction: column-reverse; /* Image at top, text at bottom */
        text-align: center; /* Center texts */
        padding: 20px 5vw 10px 5vw;
        height: calc(var(--vh, 1vh) * 100);
        max-height: calc(var(--vh, 1vh) * 100);
        justify-content: center;
        align-items: center;
        box-sizing: border-box;
        overflow: hidden;
    }

    /* Texts take full width */
    .intro-text {
        max-width: 100%;
        margin-top: 20px;
        flex: 0 0 auto;
    }

    .intro-text h1 {
        font-size: 2rem;
        margin-bottom: 10px;
        line-height: 1.2;
    }

    .intro-text p {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 0;
    }

    /* Image in the center */
    .intro-image {
        justify-content: center;
        flex: 0 0 auto;
    }

    /* Shrink image for mobile */
    .profile-image {
        width: 220px;
        height: 220px;
    }
    
    .scroll-indicator {
        margin-top: 15px;
        position: static;
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================
   LEAD CAPTURE MODAL
   ========================================== */
.lead-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 200000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lead-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lead-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

.lead-modal-container {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    overflow-y: auto;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lead-modal.active .lead-modal-container {
    transform: translateY(0) scale(1);
}

.lead-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    line-height: 1;
}

.lead-modal-close:hover {
    color: #fff;
    transform: scale(1.1);
}

/* Progress Bar */
.lead-modal-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px 20px 0 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4ade80, #22d3ee);
    transition: width 0.4s ease;
}

/* Steps */
.lead-step {
    animation: fadeInUp 0.4s ease;
}

.lead-step.hidden {
    display: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lead-step h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: #fff;
}

.lead-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    margin-bottom: 30px;
}

/* Hide reCAPTCHA badge (privacy notice shown in form) */
.grecaptcha-badge {
    visibility: hidden;
    opacity: 0;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.service-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.service-card.selected {
    background: rgba(74, 222, 128, 0.1);
    border-color: #4ade80;
}

/* Individual service colors matching CORE DISCIPLINE chapter-num */
.service-card[data-service="strategist"].selected {
    background: rgba(0, 229, 255, 0.1);
    border-color: #00e5ff;
}
.service-card[data-service="designer"].selected {
    background: rgba(255, 0, 255, 0.1);
    border-color: #ff00ff;
}
.service-card[data-service="coder"].selected {
    background: rgba(0, 255, 0, 0.1);
    border-color: #00ff00;
}
.service-card[data-service="optimizer"].selected {
    background: rgba(255, 215, 0, 0.1);
    border-color: #ffd700;
}

.service-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.service-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

.service-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.service-card.selected .service-icon img {
    opacity: 1;
}

.service-card.selected .service-icon {
    color: #4ade80;
}
.service-card[data-service="strategist"].selected .service-icon { color: #00e5ff; }
.service-card[data-service="designer"].selected .service-icon { color: #ff00ff; }
.service-card[data-service="coder"].selected .service-icon { color: #00ff00; }
.service-card[data-service="optimizer"].selected .service-icon { color: #ffd700; }

.service-title {
    display: block;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
}

.service-desc {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

.service-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: #4ade80;
    border-radius: 50%;
    color: #000;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}
.service-card[data-service="strategist"] .service-check { background: #00e5ff; }
.service-card[data-service="designer"] .service-check { background: #ff00ff; }
.service-card[data-service="coder"] .service-check { background: #00ff00; }
.service-card[data-service="optimizer"] .service-check { background: #ffd700; }

.service-card.selected .service-check {
    opacity: 1;
    transform: scale(1);
}

/* Form Groups */
.lead-form-group {
    margin-bottom: 20px;
}

.lead-form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.lead-form-group .optional {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}

.lead-form-group input,
.lead-form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 14px 16px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.lead-form-group input::placeholder,
.lead-form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.lead-form-group input:focus,
.lead-form-group textarea:focus {
    outline: none;
    border-color: #00e5ff;
    background: rgba(0, 229, 255, 0.05);
}

.lead-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Honeypot field (anti-spam protection) */
.honeypot-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Buttons */
.lead-btn {
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.lead-btn-next,
.lead-btn-submit {
    background: #ffffff;
    color: #000000;
    width: 100%;
}

.lead-btn-next:hover,
.lead-btn-submit:hover {
    background-color: #e0e0e0;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
}

.lead-btn-next:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.lead-btn-back {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

.lead-btn-back:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
}

/* reCAPTCHA privacy notice */
.recaptcha-notice {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    margin: 20px 0 15px 0;
    line-height: 1.4;
}

.recaptcha-notice a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s ease;
}

.recaptcha-notice a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.lead-btn-group {
    display: flex;
    gap: 15px;
}

.lead-btn-group .lead-btn-back {
    flex: 0 0 auto;
}

.lead-btn-group .lead-btn-next,
.lead-btn-group .lead-btn-submit {
    flex: 1;
}

.lead-btn-close {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 100%;
}

.lead-btn-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Success State */
#lead-step-success {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: #00e5ff;
}

.success-icon svg {
    width: 100%;
    height: 100%;
}

#lead-step-success h2 {
    color: #00e5ff;
}

/* Lead CTA Buttons in Overlay */
.lead-cta-btn {
    background: #ffffff;
    color: #000000;
    border: none;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.lead-cta-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .lead-modal {
        align-items: flex-start;
        padding-top: 20px;
        padding-bottom: 20px;
        height: 100%;
        height: 100dvh;
    }
    
    .lead-modal-container {
        width: 95%;
        padding: 30px 20px;
        max-height: calc(100dvh - 40px);
        margin-top: 0;
    }
    
    .lead-step {
        padding-bottom: 20px;
    }
    
    .lead-form-group input:focus,
    .lead-form-group textarea:focus {
        scroll-margin-top: 100px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .service-card {
        display: grid;
        grid-template-columns: 36px 1fr auto;
        grid-template-rows: auto auto;
        align-items: center;
        text-align: left;
        padding: 15px;
        gap: 4px 15px;
    }
    
    .service-icon {
        width: 36px;
        height: 36px;
        margin: 0;
        grid-column: 1;
        grid-row: 1 / 3;
        align-self: center;
    }
    
    .service-title {
        grid-column: 2;
        grid-row: 1;
        text-align: left;
    }
    
    .service-desc {
        grid-column: 2;
        grid-row: 2;
        text-align: left;
    }
    
    .service-check {
        position: static;
        grid-column: 3;
        grid-row: 1 / 3;
        align-self: center;
    }
    
    .lead-step h2 {
        font-size: 1.5rem;
    }
    
    .lead-btn-group {
        flex-direction: column-reverse;
    }
    
    .lead-btn {
        width: 100%;
    }
}