/* Design System & Reset */
:root {
    --bg-color: #050505;
    --surface-color: #121212;
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --accent-color: #3b82f6;
    /* Electric Blue */
    --accent-glow: rgba(59, 130, 246, 0.5);

    --font-main: 'Inter', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    --container-width: 1200px;
    --transition-fast: 0.3s ease;
    --transition-smooth: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Mode completely removed per request */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-weight: 700;
}

h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: var(--spacing-md);
}

p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 65ch;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.text-gradient {
    background: linear-gradient(to right, #fff, #999);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--text-primary);
    color: var(--bg-color);
    font-weight: 600;
    border-radius: 4px;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}

/* Project Card Hover Effects */
.project-card {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.project-card img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover img {
    transform: scale(1.05);
}

/* Specific Section Styles */
section {
    padding: var(--spacing-xl) 0;
}

/* Hero Enhancements */
#home {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* Ensure hero section centers content vertically/horizontally */
}

#home h1 {
    transform: translateY(20px);
}

#home p {
    transform: translateY(20px);
}

#home .btn {
    transform: translateY(20px);
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Comparison Slider */
.comparison-container {
    position: relative;
    width: 100%;
    /* aspect-ratio: 16/9;  Removed fixed aspect ratio to allow content to dictate height, but usually fixed is safer for slider. Kept 16/9 in HTML inline for now, but CSS here controls the inner mechanics */
    overflow: hidden;
    border-radius: 8px;
    cursor: ew-resize;
    touch-action: pan-y;
}

.comparison-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    -webkit-user-drag: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: none;
    /* Let clicks pass through to container/handle logic if needed, but we are changing logic to handle-only */
}

.comparison-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    /* Initial split */
    height: 100%;
    overflow: hidden;
    border-right: 2px solid var(--accent-color);
    background-color: var(--bg-color);
    /* Fallback */
    z-index: 10;
}

.comparison-overlay img {
    /* Important: The overlay image must maintain the same dimensions as the container, 
       even when the parent div is clipped. 
       We use width: auto and max-width: none, or setting it to the container width via JS or calculation */
    width: auto;
    height: 100%;
    max-width: none;
}

.slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 20;
    pointer-events: none;
    /* Let clicks pass through to container */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    transition: var(--transition-fast);
}

.service-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

.service-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: inline-block;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

/* Carousel Controls */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 30;
    /* Higher than slider handle */
    opacity: 0.6;
    /* Always visible but subtle */
    transition: opacity 0.3s, background-color 0.3s;
    backdrop-filter: blur(4px);
}

.carousel-btn:hover {
    background: rgba(59, 130, 246, 0.8);
    /* Accent color */
    opacity: 1;
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background-color: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-secondary);
}

/* Firefox Scrollbar */
html {
    scrollbar-width: thin;
    scrollbar-color: #333 var(--bg-color);
}

html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-smooth iframe {
    pointer-events: none;
}

/* --- Premium Features --- */

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--text-primary);
    color: var(--bg-color);
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-smooth);
    z-index: 90;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--text-primary);
    z-index: 9999;
    pointer-events: none;
    transition: width 0.1s ease-out;
}

/* Click to Copy */
.copy-target {
    position: relative;
    cursor: pointer;
    display: inline-block;
}

.copy-target::after {
    content: 'Click to copy';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    background: var(--text-primary);
    color: var(--bg-color);
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
    white-space: nowrap;
    pointer-events: none;
}

.copy-target:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

.copy-target.copied::after {
    content: '✓ Copied!';
    background: #10b981;
    /* Success green */
    color: white;
}

/* Globe Container adjustments */
#globe-container {
    cursor: grab;
}

#globe-container:active {
    cursor: grabbing;
}

/* --- Refactored Utility & Component Classes --- */

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem;
    z-index: 100;
    mix-blend-mode: difference;
    transition: padding var(--transition-fast), background var(--transition-fast);
}

.navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.05em;
    color: #fff;
    font-family: var(--font-heading);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fff;
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 101;
}

.menu-toggle span {
    width: 30px;
    height: 2px;
    background: #fff;
    transition: var(--transition-fast);
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transform: translateY(-100%);
    transition: transform var(--transition-smooth);
    z-index: 99;
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-nav-link {
    font-size: 2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .services-grid {
        gap: 2rem;
    }
}

@media (hover: none) and (pointer: coarse) {
    .custom-cursor {
        display: none !important;
    }

    * {
        cursor: auto !important;
    }

    .copy-target {
        cursor: pointer !important;
    }
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 100px;
    overflow: hidden;
}

.hero-content {
    text-align: center !important;
    margin: 0 auto !important;
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-grid {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.hero-title {
    margin-bottom: 1rem;
    text-align: center !important;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
}

#globe-container {
    position: absolute !important;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.3) !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 0;
    opacity: 0.5;
    pointer-events: none !important;
}

.price-tag {
    color: var(--text-primary);
    font-weight: 600;
}

/* Micro-interactions */
.glow-effect {
    position: relative;
}

.glow-effect::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(to right, transparent, var(--accent-glow), transparent);
    z-index: -1;
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.glow-effect:hover::before {
    opacity: 1;
}

.transition-delay-1 {
    transition-delay: 0.2s;
}

.service-subtitle {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.service-desc {
    font-size: 1rem;
    color: var(--text-secondary);
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.project {
    margin-bottom: 8rem;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
}

.project-title {
    margin-bottom: 0;
    font-family: var(--font-heading);
}

.project-type {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.comparison-label {
    position: absolute;
    bottom: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 8px;
    font-size: 0.8rem;
    border-radius: 4px;
}

.comparison-label.left {
    left: 10px;
}

.comparison-label.right {
    right: 10px;
}

.project-hint {
    margin-top: 1rem;
    color: var(--text-secondary);
}

.view-all-container {
    text-align: center;
    margin-top: 4rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--text-primary);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--text-primary);
    color: var(--bg-color);
}

/* Contact Section */
.contact-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.contact-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: -2px;
}

/* Contact Form Styling */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
    width: 100%;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.2rem;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all var(--transition-smooth);
    backdrop-filter: blur(10px);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-secondary);
}

.submit-btn {
    width: 100%;
    margin-top: 1rem;
    font-size: 1.1rem !important;
    padding: 1.2rem !important;
}

/* Footer Section */
.site-footer {
    padding: 2rem 0;
    border-top: 1px solid #222;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Shifts Page Helpers */
.shifts-header {
    padding-top: 15vh;
    padding-bottom: 4rem;
}

.shifts-title {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 1rem;
}

.shifts-subtitle {
    margin-bottom: 2rem;
}

.portfolio-grid-section {
    padding-top: 0;
}

.contact-cta-section {
    min-height: 40vh;
    display: flex;
    align-items: center;
    border-top: 1px solid #222;
}

/* Portfolio Filters */
.filter-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.filter-btn:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.5);
}

.filter-btn.active {
    background: var(--text-primary);
    color: var(--bg-color);
    font-weight: 500;
}

/* Pricing & Value Breakdown Section */
.pricing-section .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    align-items: stretch;
}

.pricing-card {
    position: relative;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
}

.pricing-header {
    margin-bottom: 0.5rem;
}

.pricing-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.pricing-header .price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.pricing-header .price .period {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-top: auto;
    /* Push features to bottom to align cards */
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

.premium-card {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.1), rgba(0, 0, 0, 0.4));
    border-color: rgba(59, 130, 246, 0.3);
}

.premium-card::before {
    background: linear-gradient(to right, transparent, rgba(59, 130, 246, 0.4), transparent);
}

.premium-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--accent-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.4);
}

/* Pain & Transformation Section */
.pain-section {
    padding: 6rem 0;
    background-color: var(--surface-color);
}

.transformation-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 768px) {
    .transformation-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
}

/* Testimonial Section */
.testimonial-section {
    padding: 6rem 0;
    overflow: hidden;
}

.testimonial-marquee-container {
    position: relative;
    width: 100%;
    padding: 1rem 0;
    overflow: hidden;
}

/* Gradient fade on the sides */
.marquee-fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 15vw;
    z-index: 2;
    pointer-events: none;
}

.marquee-fade-left {
    left: 0;
    background: linear-gradient(to right, var(--bg-color), transparent);
}

.marquee-fade-right {
    right: 0;
    background: linear-gradient(to left, var(--bg-color), transparent);
}

.testimonial-marquee-track {
    display: flex;
    gap: 2rem;
    width: max-content;
    animation: marqueeScroll 45s linear infinite;
    padding: 1rem 2rem;
}

.testimonial-marquee-container:hover .testimonial-marquee-track {
    animation-play-state: paused;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        /* Translated by exactly 50% of content length minus half the gap */
        transform: translateX(calc(-50% - 1rem));
    }
}

.testimonial-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.4));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.15);
    border-radius: 12px;
    padding: 3rem 2rem;
    position: relative;
    width: 450px;
    flex-shrink: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.testimonial-badge {
    display: none;
}

.testimonial-card .quote-icon {
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    display: flex;
    justify-content: flex-start;
}

.testimonial-text {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-style: italic;
    flex-grow: 1;
}

.testimonial-author {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
}

.testimonial-author strong {
    display: block;
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
    color: #fff;
}

.testimonial-author span {
    color: var(--accent-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

@media (max-width: 768px) {
    .testimonial-section {
        padding: 4rem 0;
    }
    
    .testimonial-card {
        width: 320px;
        padding: 2rem 1.5rem;
    }

    .testimonial-marquee-track {
        gap: 1rem;
        padding: 1rem;
    }
    
    .testimonial-text {
        font-size: 0.95rem;
    }
}

/* Process Section */
.process-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .process-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.process-step {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    position: relative;
    text-align: left;
}

.process-step .step-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-color);
    opacity: 0.3;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    line-height: 1;
    font-family: 'Space Grotesk', sans-serif;
}

.process-step h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    padding-right: 3rem;
}

.process-step p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}