/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    --color-navy: #0B132B;
    --color-navy-light: #1C2541;
    --color-primary: #1D4ED8;
    /* Electric Blue */
    --color-primary-hover: #1E40AF;
    --color-primary-light: #EFF6FF;
    --color-secondary: #E2E8F0;
    --color-white: #FFFFFF;
    --color-bg-light: #F8FAFC;
    --color-text: #334155;
    --color-text-light: #64748B;

    --font-main: 'Inter', system-ui, -apple-system, sans-serif;

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

@media (prefers-reduced-motion: reduce) {
    :root {
        --transition-fast: 0s;
        --transition-normal: 0s;
    }

    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    color: var(--color-text);
    background-color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-navy);
    line-height: 1.2;
    font-weight: 700;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

@media (max-width: 1024px) {
    h1 {
        font-size: 1rem;
    }
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.01em;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Layout Classes
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding: 6rem 0;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 4rem 0;
    }

    .container {
        padding: 0 1.5rem;
    }
}

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

.mt-xl {
    margin-top: 4rem;
}

.bg-light {
    background-color: var(--color-bg-light);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    border-radius: 4px;
    transition: all var(--transition-fast);
    cursor: pointer;
    font-size: 1rem;
    border: 2px solid transparent;
}

.btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-navy);
    border-color: var(--color-secondary);
}

.btn-secondary:hover {
    border-color: var(--color-navy);
    background-color: transparent;
    color: var(--color-navy);
}

.btn-secondary-light {
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary-light:hover {
    border-color: var(--color-white);
    color: var(--color-white);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all var(--transition-normal);
    padding: 1.5rem 0;
    background: transparent;
}

.header.scrolled {
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    margin-right: 0.75rem;
    /* CSS filter to turn dark/black logo into #1D4ED8 Electric Blue */
    filter: brightness(0) saturate(100%) invert(26%) sepia(89%) saturate(2317%) hue-rotate(214deg) brightness(91%) contrast(93%);
}

.footer-logo .logo-img {
    /* Lighter blue for footer: target #93C5FD */
    filter: brightness(0) saturate(100%) invert(86%) sepia(21%) saturate(1210%) hue-rotate(185deg) brightness(101%) contrast(104%);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-navy);
    letter-spacing: -0.5px;
}

.logo-text span {
    font-weight: 400;
    color: var(--color-primary);
}

/* We want the logo to be dark initially or light depending on hero, but we'll assume dark text works for the hero text space */
.header:not(.scrolled) .logo-text {
    /* If the hero is dark at the top left, we'd make this white. Assuming light area based on brand rules */
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    color: var(--color-navy);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--color-primary);
    transition: width var(--transition-fast);
}

.nav-link:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001;
}

.menu-toggle .bar {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-navy);
    position: absolute;
    left: 0;
    transition: all var(--transition-fast);
}

.menu-toggle .bar:nth-child(1) {
    top: 0;
}

.menu-toggle .bar:nth-child(2) {
    top: 11px;
}

.menu-toggle .bar:nth-child(3) {
    top: 22px;
}

.menu-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg);
    top: 11px;
}

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

.menu-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg);
    top: 11px;
}

@media (max-width: 912px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 400px;
        height: 100vh;
        background-color: var(--color-white);
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding: 4rem 3rem;
        transition: right var(--transition-normal);
        box-shadow: var(--shadow-xl);
    }

    .nav-links.active {
        right: 0;
    }

    .menu-toggle {
        display: block;
    }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    /* offset for header */
}

@media (min-width: 768px) {
    .hero {
        min-height: 75vh;
        max-height: 800px;
    }
}

@media (max-width: 1024px) {
    .hero {
        align-items: flex-start;
        padding-top: 140px;
        /* Push down just past header */
    }
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-navy-light);
    background-image: url('images/mobile-hero.webp');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

@media (min-width: 768px) {
    .hero-background {
        background-image: url('images/tablet-hero.webp');
    }
}

@media (min-width: 1024px) {
    .hero-background {
        background-image: url('images/desktop-hero.webp');
    }
}

.hero-container {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 0 1.5rem;
}

@media (min-width: 768px) {
    .hero-container {
        padding-left: 5%;
        padding-right: 5%;
    }
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.tablet-buttons {
    display: none;
}

.hero-content {
    max-width: 480px;
    background: rgba(255, 255, 255, 0.85);
    /* Added slight bg for readability if image is complex */
    backdrop-filter: blur(5px);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

.eyebrow {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.hero-content p {
    font-size: 1.125rem;
    color: var(--color-text);
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .hero-content {
        max-width: clamp(320px, 46vw, 400px); /* Scales fluidly based on screen width */
        padding: clamp(0.5rem, 1.5vw, 0.85rem) clamp(1rem, 2vw, 1.25rem);
    }

    .hero-content p {
        font-size: clamp(0.65rem, 1.5vw, 0.85rem);
        margin-bottom: 0.45rem;
    }

    .eyebrow {
        font-size: clamp(0.55rem, 1.2vw, 0.7rem);
        margin-bottom: 0.15rem;
    }

    h1 {
        font-size: clamp(2rem, 4.5vw, 2.5rem);
        margin-bottom: 0.15rem;
    }

    .hero-buttons {
        gap: 1rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .tablet-buttons .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        justify-content: center;
    }

    .tablet-buttons .btn-secondary {
        background-color: rgba(255, 255, 255, 0.95);
        border-color: rgba(255, 255, 255, 0.95);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .desktop-buttons {
        display: none;
    }

    .tablet-buttons {
        display: flex;
        position: absolute;
        bottom: 4rem;
        left: 5%;
        width: 90%;
        justify-content: flex-start; /* Aligned to the left */
        z-index: 10;
        margin-top: 0;
    }
}

@media (max-width: 767px) {
    .hero {
        padding-top: 95px; /* Moved up closer to header */
    }

    .tablet-buttons .btn {
        padding: 0.85rem 1.4rem;
        font-size: 1rem;
    }

    .hero-content {
        max-width: 85%; /* Reduced box size */
        margin: 0 auto; /* Centered */
        padding: 1.5rem;
        background: rgba(255, 255, 255, 0.9);
    }

    .hero-content h1 {
        font-size: 2.25rem; /* Made headline big */
        line-height: 1.1;
        margin-bottom: 0.5rem;
    }

    .hero-content p {
        font-size: 0.45rem; /* Micro-sized subtext */
    }
}

/* ==========================================================================
   Feature Highlights
   ========================================================================== */
.features {
    padding: 4rem 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.feature-card {
    padding: 1.5rem;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.feature-card h3 {
    font-size: 1.125rem;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    margin: 0;
}

/* ==========================================================================
   Business Focus
   ========================================================================== */
.focus-content {
    max-width: 800px;
    margin: 0 auto;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: 3rem;
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.pill {
    padding: 0.75rem 1.5rem;
    background: var(--color-white);
    border: 1px solid var(--color-secondary);
    border-radius: 50px;
    font-weight: 500;
    color: var(--color-navy);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.pill:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* ==========================================================================
   Value Proposition
   ========================================================================== */
.value-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

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

.benefit-list {
    margin-top: 2rem;
}

.benefit-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-weight: 500;
    color: var(--color-navy);
}

.check-icon {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.value-visual {
    position: relative;
}

.visual-box {
    aspect-ratio: 4/3;
    background: var(--color-white);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--color-secondary);
}

.visual-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--color-primary), #60A5FA);
}

/* ==========================================================================
   Services Preview
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.service-card {
    background: var(--color-white);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    border: 1px solid var(--color-secondary);
    transition: all var(--transition-normal);
}

.service-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: transparent;
    transform: translateY(-5px);
}

.service-icon {
    width: 56px;
    height: 56px;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

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

.service-card p {
    color: var(--color-text-light);
    margin: 0;
}

/* ==========================================================================
   Portfolio Preview
   ========================================================================== */
.portfolio-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Desktop gets more width to balance the height */
    gap: 2rem;
    margin: 4rem auto 0;
    max-width: 900px;
    align-items: center; /* Center them vertically */
}

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

.portfolio-placeholder {
    aspect-ratio: 16/9;
    background: var(--color-white);
    border: 1px solid var(--color-secondary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-light);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal);
}

.portfolio-placeholder:hover {
    transform: scale(1.02);
}

/* ==========================================================================
   Process Preview
   ========================================================================== */
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 4rem;
    position: relative;
}

@media (max-width: 912px) {
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 3rem;
    }
}

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

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

.step-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--color-primary-light);
    line-height: 1;
    margin-bottom: 1rem;
}

.process-step h3 {
    margin-bottom: 0.5rem;
}

.process-step p {
    color: var(--color-text-light);
    margin: 0;
}

/* ==========================================================================
   Final CTA
   ========================================================================== */
.final-cta {
    background: linear-gradient(135deg, var(--color-navy), var(--color-navy-light));
    color: var(--color-white);
}

.final-cta h2 {
    color: var(--color-white);
}

.final-cta p {
    color: var(--color-secondary);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

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

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--color-navy);
    color: var(--color-white);
    padding: 4rem 0 2rem;
}

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

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

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

.footer-logo .logo-text {
    color: var(--color-white);
}

.footer-logo .logo-text span {
    color: #93C5FD;
    /* lighter blue for contrast on dark bg */
}

.footer-brand p {
    color: #94A3B8;
    margin-top: 1rem;
    max-width: 300px;
}

.footer h4 {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    color: var(--color-white);
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links ul li a {
    color: #94A3B8;
    transition: color var(--transition-fast);
}

.footer-links ul li a:hover {
    color: var(--color-white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: #64748B;
    font-size: 0.875rem;
}

/* ==========================================================================
   Portfolio Page & Gallery
   ========================================================================== */
.portfolio-link {
    display: block;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    /* Aspect ratio determined by .desktop-mockup or .mobile-mockup class */
}

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.portfolio-overlay span {
    color: var(--color-white);
    font-weight: 600;
    font-size: 1.125rem;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.portfolio-link:hover .portfolio-image {
    transform: scale(1.05);
}

.portfolio-link:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-link:hover .portfolio-overlay span {
    transform: translateY(0);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Increased columns for tall mobile screens */
    gap: 2rem;
    align-items: center; /* Ensures different sized mockups center vertically in their row */
    grid-auto-flow: dense; /* Allows items to fill in gaps automatically for a bento-box look */
}

@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    /* Aspect ratio determined by .desktop-mockup or .mobile-mockup class */
}

/* Mockup specific sizing */
.desktop-mockup {
    aspect-ratio: 16/9;
}

.gallery-grid .desktop-mockup {
    grid-column: span 2; /* Make desktop mockups wider in the gallery so they aren't tiny */
}

@media (max-width: 480px) {
    .gallery-grid .desktop-mockup {
        grid-column: span 1;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr; /* Stack on mobile */
    }
}

.mobile-mockup {
    aspect-ratio: 9/16;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.03);
}

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

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

/* ==========================================================================
   Cookie Banner
   ========================================================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--color-white);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    border-top: 1px solid var(--color-gray-200);
    padding: 1.5rem;
}

.cookie-content {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

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

.cookie-content p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.cookie-content p a {
    color: var(--color-primary);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}
