/* 
   Site Luna - Premium Portfolio Theme 
   Principles: High Contrast, Space/Tech Aesthetic, Refactoring UI
*/

:root {
    /* Fonts */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Colors - Dark Mode (Default) */
    --bg-body: #050510;
    --surface-1: rgba(255, 255, 255, 0.03);
    --surface-2: rgba(255, 255, 255, 0.07);
    --text-main: #FFFFFF;
    --text-muted: #A0A5B8;
    --primary: #6C63FF;
    --accent: #4FACFE;
    --border-subtle: rgba(255, 255, 255, 0.1);

    /* Effects */
    --glow-shadow: 0 0 20px rgba(108, 99, 255, 0.3);
    --glass-blur: blur(12px);

    /* Spacing */
    --spacing-xs: 0.5rem;
    /* 8px */
    --spacing-sm: 1rem;
    /* 16px */
    --spacing-md: 2rem;
    /* 32px */
    --spacing-lg: 4rem;
    /* 64px */
    --spacing-xl: 8rem;
    /* 128px */
}

[data-theme="light"] {
    --bg-body: #F9FAFB;
    --surface-1: #FFFFFF;
    --surface-2: #F3F4F6;
    --text-main: #111827;
    --text-muted: #6B7280;
    --primary: #4F46E5;
    --accent: #0EA5E9;
    --border-subtle: rgba(0, 0, 0, 0.1);
    --glow-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --glass-blur: none;
    /* Reduce glass effect in light mode for readability */
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* html { scroll-behavior: smooth; } REMOVED per user request for instant jumping */

body {
    background-color: var(--bg-body);
    font-family: var(--font-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    /* transition: background-color 0.3s ease, color 0.3s ease; REMOVED for instant switch */
}

/* Texture Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    opacity: 0.4;
}

h1,
h2,
h3,
h4,
.logo,
.eyebrow {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

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

ul {
    list-style: none;
}

/* Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.container-sm {
    max-width: 800px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

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

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

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

.text-accent {
    color: var(--accent);
}

.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.9rem;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-widest {
    letter-spacing: 0.15em;
}

.mb-4 {
    margin-bottom: var(--spacing-sm);
}

.mt-4 {
    margin-top: var(--spacing-sm);
}

.hidden {
    display: none;
}

.gradient-text {
    background: linear-gradient(135deg, var(--text-main), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient {
    /* Brighter gradient for stats/big numbers */
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.6rem;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-body);
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}

.btn-primary:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.5);
}

.btn-secondary {
    background: var(--surface-2);
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    background: var(--surface-1);
    border-color: var(--text-muted);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: rgba(108, 99, 255, 0.1);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-xl {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.1rem;
}

/* Disabled state only if explicitly applied, visually */
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--surface-2);
    box-shadow: none;
    transform: none;
}

/* Glass Card */
.glass-card {
    background: var(--surface-1);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: var(--spacing-md);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

[data-theme="light"] .glass-card {
    background: var(--surface-1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 5, 16, 0.8);
    /* Dark semi-transparent */
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-subtle);
    /* transition: background-color 0.3s ease... REMOVED for instant switch */
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.9);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.site-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    display: block;
    animation: logo-load 1s ease-out forwards;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.27);
    /* Filter transition REMOVED for instant switch */
    /* Universal Glow for Light/Dark Theme Visibility REMOVED per user request */
}

.site-logo:hover {
    transform: scale(1.05) rotate(2deg);
    /* Removed drop-shadow on hover as well to keep it clean */
}

/* Light Theme Logo Adjustment */
[data-theme="light"] .site-logo {
    filter: brightness(0.3) contrast(1.2);
}

@keyframes logo-load {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.2s;
}

.icon-btn:hover {
    background: var(--surface-2);
}

#theme-toggle {
    font-size: 0.9rem;
    padding: 0.4rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

@keyframes celestial-float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-2px) rotate(5deg);
    }
}

@keyframes celestial-orbit {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.1);
        filter: drop-shadow(0 0 5px var(--accent));
    }

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

#theme-toggle i {
    animation: celestial-float 4s ease-in-out infinite;
    transform-origin: center;
}

/* Only animate on hover if the device supports hovering (Mouse) */
@media (hover: hover) {
    #theme-toggle:hover i {
        animation: celestial-orbit 1.5s linear infinite;
        color: var(--accent);
    }
}

/* Class for one-time spin on click (Mobile & Desktop) */
.spin-anim {
    animation: celestial-orbit 0.5s linear;
    color: var(--accent);
}

/* Application Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 16, 0.9);
    backdrop-filter: blur(8px);
    z-index: 2000;
    /* Above navbar */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-sm);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    /* Ensure clicks register */
}

.modal-content {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: var(--spacing-md);
    width: 100%;
    max-width: 500px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.27);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: var(--text-main);
}

[data-theme="light"] .modal-content {
    background: #FFFFFF;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Hero */
.hero {
    padding-top: 130px;
    padding-bottom: 60px;
    position: relative;
    overflow: hidden;
    z-index: 2;
    /* Explicitly above visuals */
    position: relative;
    pointer-events: auto;
    /* Ensure clicks works */
}

.hero-bg-glow {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79, 172, 254, 0.2) 0%, rgba(5, 5, 16, 0) 70%);
    z-index: -1;
    pointer-events: none;
}


/* New Hero Grid Layout */
.hero-grid-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    position: relative;
    z-index: 3;
}

.hero-text-side {
    text-align: center;
    /* Default mobile centered */
}

.hero-visual-side {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    /* Mobile: Pull it wider to make it larger */
    width: 150vw;
    margin-left: -75vw;
    /* Counteract container padding conceptually */
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

@media (min-width: 968px) {
    .hero-grid-container {
        display: grid;
        grid-template-columns: 1fr 1.2fr;
        gap: 3rem;
        align-items: center;
        /* Vertically Center */
        text-align: left;
        padding-top: 0;
    }

    .hero-text-side {
        text-align: left;
    }

    .hero-visual-side {
        margin-top: 0;
        justify-content: center;
        width: auto;
        /* Reset mobile width override */
        margin-left: 0;
        left: auto;
        transform: none;
        flex-direction: column;
    }

    /* Override centered styles for desktop */
    .lead {
        margin-left: 0;
        margin-right: 0;
    }

    .cta-group {
        justify-content: flex-start;
    }
}

.eyebrow {
    display: inline-block;
    color: var(--accent);
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    letter-spacing: -2px;
}

.lead {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 3.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Hero Visuals (Wireframes) */
.hero-visuals {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    /* Explicitly visible layer */
    overflow: hidden;
}

.wireframe-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.08);
    /* Boosted opacity */
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 1rem;
    width: 280px;
    /* Removed generic border and shadow to handle specifically below */
    transition: all 0.3s ease;
}

.wf-shadow {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    z-index: -1;
    filter: blur(35px);
    opacity: 0.5;
}

/* Specific Wireframe Positioning & Styling */
.wf-left {
    top: 20%;
    left: 8%;
    /* Moved slightly in */
    transform: rotate(-10deg);
    border: 1px solid rgba(108, 99, 255, 0.3);
    /* Primary color border */
    box-shadow: 0 10px 40px rgba(108, 99, 255, 0.2);
    /* Primary glow */
}

.wf-left .wf-shadow {
    background: var(--primary);
}

.wf-right {
    bottom: 20%;
    /* Moved up */
    right: 8%;
    /* Moved in */
    transform: rotate(5deg);
    border: 1px solid rgba(79, 172, 254, 0.3);
    /* Accent color border */
    box-shadow: 0 10px 40px rgba(79, 172, 254, 0.2);
    /* Accent glow */
}

.wf-right .wf-shadow {
    background: var(--accent);
}

/* Interior Elements */
.wf-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.wf-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.bg-red {
    background: #FF5F56;
}

.bg-yellow {
    background: #FFBD2E;
}

.bg-green {
    background: #27C93F;
}

.wf-bar {
    width: 60%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.wf-body {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.wf-line {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.w-75 {
    width: 75%;
}

.w-50 {
    width: 50%;
}

.wf-grid {
    display: flex;
    gap: 0.5rem;
}

.wf-box {
    width: 50%;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.wf-hero-block {
    width: 100%;
    height: 80px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(79, 172, 254, 0.1));
    border-radius: 6px;
}

.wf-row {
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.wf-pill {
    width: 30%;
    height: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

/* Animations */
.floating-slow {
    animation: float 8s ease-in-out infinite;
}

.floating-fast {
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(-10deg);
    }

    50% {
        transform: translateY(-20px) rotate(-8deg);
    }

    100% {
        transform: translateY(0) rotate(-10deg);
    }
}

/* Adjust animation for the right one to keep its own rotation base */
@keyframes float-right {
    0% {
        transform: translateY(0) rotate(5deg);
    }

    50% {
        transform: translateY(-15px) rotate(3deg);
    }

    100% {
        transform: translateY(0) rotate(5deg);
    }
}

.wf-right.floating-fast {
    animation-name: float-right;
}

/* Hero Decorations */
.hero-decoration-top,
.hero-decoration-bottom {
    position: absolute;
    background: var(--surface-1);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glow-shadow);
    z-index: 2;
    animation: float 6s ease-in-out infinite;
    width: 40px;
    height: 40px;
}

.hero-decoration-top {
    top: 10%;
    left: -20px;
    animation-delay: 0s;
}

.hero-decoration-bottom {
    bottom: 16%;
    right: -20px;
    animation-delay: 2s;
}

.deco-icon {
    font-size: 20px;
    color: var(--accent);
}

/* NEW: Hero Testimonial Top-Center Pill (Final) */
.hero-testimonial-top {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.8rem;
    padding: 0.5rem 1.4rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    max-width: 92%;
    width: auto;
    margin: 0 auto 1.5rem auto;
}

.hero-testimonial-top:hover {
    border-color: rgba(108, 99, 255, 0.3);
    box-shadow: 0 0 25px rgba(108, 99, 255, 0.15);
}

[data-theme="light"] .hero-testimonial-top {
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.05);
}

.hero-quote-text {
    font-size: 0.8rem;
    line-height: 1.3;
    color: var(--text-main);
    font-weight: 400;
    margin-bottom: 0;
    margin-right: 0.5rem;
    font-style: italic;
    letter-spacing: 0.8px;
}

.hero-quote-text strong {
    color: var(--primary);
    font-weight: 600;
}

.hero-author {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 0.8rem;
    flex-shrink: 0;
}

[data-theme="light"] .hero-author {
    border-left-color: rgba(0, 0, 0, 0.1);
}

.hero-author strong {
    font-size: 0.8rem;
    color: var(--text-main);
    white-space: nowrap;
}

.hero-author .text-xs {
    font-size: 0.75rem;
    white-space: nowrap;
}

/* Mobile Specifics */
@media (max-width: 968px) {
    .hero-testimonial-top {
        padding: 0.5rem 1rem;
        flex-wrap: wrap;
        margin-bottom: 1.25rem;
    }

    .hero-quote-text {
        font-size: 0.75rem;
        letter-spacing: 0.5px;
    }

    .hero-author {
        border-left: none;
        padding-left: 0;
    }

    @media (min-width: 450px) {
        .hero-author {
            border-left: 1px solid rgba(255, 255, 255, 0.2);
            padding-left: 0.8rem;
        }
    }
}

/* Ensure hero padding is reduced */
/* Duplicate rule removed */

/* Desktop adjustments */
@media (min-width: 968px) {
    .hero {
        padding-top: 160px;
        /* Slightly reduced for desktop too */
    }

    .hero-grid-container {
        display: grid;
        grid-template-columns: 1fr 1.2fr;
        /* reset to grid */
        justify-items: center;
        /* Center items to align nicely */
    }

    .hero-testimonial-top {
        grid-column: 1 / -1;
        /* Span all columns */
        margin-bottom: 2rem;
        /* Consistent spacing */
        flex-direction: row;
        /* Enforce row */
        border-radius: 100px;
        /* Enforce pill */
        max-width: fit-content;
        width: auto;
        justify-self: center;
        /* Center in grid */
        margin-left: auto;
        margin-right: auto;
        flex-direction: row;
        /* Force row */
        align-items: center;
        /* Vertical center */
    }

    .hero-quote-text {
        font-size: 0.85rem;
        /* Keep consistent with mobile base, maybe slightly more readable */
    }

    .hero-author .text-xs {
        display: inline;
        /* Show title on desktop */
        margin-left: 0.3rem;
    }
}

/* Mobile: Fade them out slightly or hide if too cluttered */
@media (max-width: 1024px) {
    .wireframe-card {
        opacity: 0.3;
        transform: scale(0.8);
    }

    .wf-left {
        left: -50px;
    }

    .wf-right {
        right: -50px;
    }
}

@media (max-width: 768px) {
    .hero-visuals {
        display: none;
        /* Hide on small mobile to preserve text readability */
    }
}

/* Trusted By - Infinite Scroll */
.trusted-by {
    padding: 2rem 0;
    overflow: hidden;
    position: relative;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    background: var(--surface-1);
}

.logos-wrapper {
    margin-top: 1rem;
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.logos-track {
    display: flex;
    gap: 4rem;
    width: max-content;
    animation: scroll 20s linear infinite;
}

.logos-track span {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-muted);
    font-size: 2.5rem;
    /* Larger icons */
    opacity: 0.8;
    /* Higher visibility */
    transition: color 0.3s ease, opacity 0.3s ease;
    display: flex;
    /* alignment */
    align-items: center;
}

.logos-track span:hover {
    color: var(--primary);
    opacity: 1;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Sections General */
.section {
    padding: var(--spacing-lg) 0;
}

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

/* Increased Bottom Margin */

/* Grid Layouts */
.grid-2 {
    display: grid;
    gap: 2rem;
}

.grid-3 {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr 1fr;
    }

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

/* About & Marketable Cards */
.card-marketable {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-marketable:hover {
    transform: translateY(-5px) scale(1.02);
}

.card-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    z-index: 2;
}

/* Case Study Page Styles */
.case-hero {
    padding-top: 140px;
    padding-bottom: 60px;
    text-align: center;
}

.case-image-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto 4rem auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-subtle);
}

.case-image-container img {
    width: 100%;
    height: auto;
    display: block;
}

.case-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, var(--bg-body) 0%, transparent 100%);
}

.tech-pill {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: 50px;
    margin: 0.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.feature-list li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: start;
    gap: 0.75rem;
}

.feature-list i {
    color: var(--primary);
    margin-top: 4px;
}


.card-content {
    position: relative;
    z-index: 2;
}

.card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.card-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Card Variants & Textures */
/* Growth Card: Darker, Grid Texture, Green/Cyan Accent */
.card-growth {
    background: linear-gradient(135deg, rgba(5, 20, 10, 0.6) 0%, rgba(5, 5, 16, 0.4) 100%);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.card-growth .card-icon {
    color: #4ade80;
    /* Green-400 */
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.1);
}

.card-growth:hover {
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
}

.card-texture-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(34, 197, 94, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 197, 94, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: 1;
    opacity: 0.5;
    pointer-events: none;
    mask-image: radial-gradient(circle at top left, black, transparent 80%);
}

/* Conversion Card: Lighter/Blue tint, Dot Texture, Blue/Purple Accent */
.card-conversion {
    background: linear-gradient(135deg, rgba(20, 10, 40, 0.6) 0%, rgba(5, 5, 16, 0.4) 100%);
    border: 1px solid rgba(167, 139, 250, 0.2);
}

.card-conversion .card-icon {
    color: #a78bfa;
    /* Violet-400 */
    box-shadow: 0 0 15px rgba(167, 139, 250, 0.1);
}

.card-conversion:hover {
    box-shadow: 0 10px 30px rgba(167, 139, 250, 0.15);
    border-color: rgba(167, 139, 250, 0.4);
}

.card-texture-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(167, 139, 250, 0.15) 1px, transparent 1px);
    background-size: 12px 12px;
    z-index: 1;
    opacity: 0.6;
    pointer-events: none;
    mask-image: radial-gradient(circle at bottom right, black, transparent 80%);
}

/* Portfolio */
.project-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.project-content {
    padding: 2.5rem;
}

.project-content h3 {
    margin-bottom: 1.5rem;
}

.project-content p {
    margin-bottom: 2.5rem;
}

.project-tag {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-weight: 600;
}

.project-image {
    height: 350px;
    /* Taller for better presence */
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    /* Matching dark bg */
    position: relative;
    overflow: hidden;
    /* Ensure card radius is respected */
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image img {
    width: 110%;
    /* Zoomed in to allow rotation without edges showing */
    height: 110%;
    object-fit: cover;
    transform: rotate(-3deg) scale(1.05) translateY(10px);
    /* Dynamic tilt */
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.project-card:hover .project-image img {
    transform: rotate(0deg) scale(1.1);
    /* Straighten and zoom on hover */
}

@media (min-width: 768px) {
    .project-card {
        flex-direction: row;
    }

    .project-content {
        flex: 1;
    }

    .project-image {
        flex: 1;
        height: auto;
    }
}

/* Stats */
/* Custom Grid for 2 Stats Optimised */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    padding: 2.5rem;
    /* Glass card class handles background */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.stat-item .h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Testimonials */
/* Old testimonials CSS removed */

/* Pricing */
.pricing-grid {
    align-items: flex-start;
}

.pricing-card {
    position: relative;
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: var(--glow-shadow);
}

.badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
}

.price {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-heading);
    margin: 1rem 0;
}

.check-list li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.check-list li i {
    color: var(--accent);
}

.full-width {
    width: 100%;
    text-align: center;
    margin-top: 1.5rem;
}

/* FAQ */
.faq-item {
    margin-bottom: 1rem;
}

.faq-item h4 {
    margin-bottom: 0.5rem;
}

.faq-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Scarcity Box */
.scarcity-box {
    text-align: left;
    max-width: 500px;
    margin: 0 auto 2rem auto;
}

.scarcity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Fixed alignment */
    gap: 2rem;
    /* Added Gap */
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.progress-bar-track {
    background: var(--surface-2);
    height: 10px;
    border-radius: 20px;
    overflow: hidden;
}

.progress-bar-fill {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    height: 100%;
    border-radius: 20px;
}

/* Contract Checkbox */
.contract-box {
    background: rgba(108, 99, 255, 0.05);
    /* Slight tint */
    border: 1px solid var(--primary);
    padding: 2rem;
    transition: all 0.2s ease;
}

.contract-box h4 {
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.checklist-item input {
    margin-top: 0.3rem;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

.checklist-item label {
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--text-muted);
}

/* Calendar Placeholder */
.calendar-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    border: 1px dashed var(--accent);
}

/* Shake Animation */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s;
}

/* --- Navigation Styles --- */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.desktop-nav {
    display: none;
    /* Hidden on mobile by default */
}

.nav-link {
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary);
}

/* Hamburger Menu (2 Lines) */
.mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    /* Right align the asymmetric bars */
    width: 30px;
    height: 14px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    transition: all 0.3s ease-in-out;
    border-radius: 4px;
    /* Rounded corners */
}

/* Bottom bar shorter */
.bar.bottom {
    width: 75%;
}

/* Hamburger Animation */
.mobile-toggle.active .bar.top {
    transform: translateY(6px) rotate(45deg);
}

.mobile-toggle.active .bar.bottom {
    width: 100%;
    /* Reset width for symmetrical X */
    transform: translateY(-6px) rotate(-45deg);
}

/* Mobile Menu Overlay - Refined (Slide Down) */
.mobile-menu-overlay {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: auto;
    background: rgba(5, 5, 16, 0.95);
    border-bottom: 1px solid var(--border-subtle);
    padding: 2rem 0;
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    transform: translateY(-150%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

[data-theme="light"] .mobile-menu-overlay {
    background: rgba(255, 255, 255, 0.98);
}

.mobile-menu-overlay.active {
    transform: translateY(0);
}

.mobile-menu-overlay a {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    padding: 0.5rem 2rem;
    width: 100%;
    text-align: center;
}

.mobile-menu-overlay a:hover {
    background: var(--surface-2);
    color: var(--primary);
}

[data-theme="light"] .mobile-menu-overlay a:not(.btn) {
    color: #111827 !important;
    /* Force visibility */
}

[data-theme="light"] .mobile-menu-overlay a:not(.btn):hover {
    color: var(--primary) !important;
}

@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
        align-items: center;
        gap: 2rem;
    }

    .mobile-toggle {
        display: none;
    }
}

/* Footer */
footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border-subtle);
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

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

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

/* Animations - Fade Up */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* Mobile Menu utility (not fully implemented in HTML but good to have) */
.sm-hidden {
    display: none;
}

@media(min-width: 768px) {
    .sm-hidden {
        display: inline-flex;
    }
}

/* Mobile Responsive Typography Adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

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

    .nav-container {
        padding: 0 1rem;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Additional optimizations */
@media (max-width: 768px) {
    .stats-grid {
        gap: 1rem;
    }

    /* Hide hero description on mobile for cleaner look */
    .hero .lead {
        display: none;
    }

    /* Visual Hierarchy Improvements */
    .hero h1 {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }

    .eyebrow {
        font-size: 0.85rem;
        letter-spacing: 1.5px;
        color: var(--accent);
        margin-bottom: 1.2rem;
        opacity: 1;
    }

    .cta-group {
        flex-direction: row;
        gap: 1rem;
        justify-content: center;
        margin-top: 1rem;
    }

    /* De-emphasize secondary button on mobile */
    .hero .btn-secondary {
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: var(--text-muted);
        padding: 0.8rem 1.5rem;
    }
}

@media (max-width: 450px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Security & Bug Fixes --- */

/* 1. Prevent iOS Zoom on Inputs */
@media screen and (max-width: 768px) {

    input,
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* 2. Lottie Visibility Fix */
lottie-player {
    display: block;
    width: 100%;
    height: auto;
    min-height: 544px;
    max-width: 320px;
    margin: 0 auto;
    /* Ensure it stays centered if width < container */
}

/* 3. Hide Hero Decorations on Mobile */
@media (max-width: 768px) {

    .hero-decoration-top,
    .hero-decoration-bottom {
        display: none;
    }

    /* Ensure Lottie container is visible and centered */
    .hero-visual-side {
        width: 100%;
        margin-left: 0;
        left: auto;
        transform: none;
        margin-top: 2rem;
    }
}

/* 4. Utility Classes for CSP (Replacing Inline Styles) */
.w-70 {
    width: 70%;
}

.bg-accent-solid {
    background: var(--accent);
}

.mobile-apply-btn {
    display: inline-flex;
    width: auto;
    margin-top: 1rem;
}