/* --- Root Variables & Base Setup --- */
:root {
    --bg: #ffffff;
    --fg: #0f172a;
    --muted: #64748b;
    --accent: #64748b;
    --accent-rgb: 100, 116, 139;
    --max-width: 1100px;
    --radius: 12px;
    --glass: rgba(255, 255, 255, 0.85);
    --border: rgba(0, 0, 0, 0.06);
    --ease-premium: cubic-bezier(0.2, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Target Phones and iPads */
@media (max-width: 1024px) {
    .hero {
        /* This kills the parallax zoom bug on iPad/Safari */
        background-attachment: scroll !important; 
        
        /* Force the image to stay centered and not zoom into a corner */
        background-position: center center !important;
        background-size: cover !important;
        
        /* Ensure there is enough vertical space for the text */
        padding: 100px 0;
        min-height: 80vh;
        display: flex;
        align-items: center;
    }

    .hero-content h1 {
        /* Prevents text from becoming massive on tablet */
        font-size: clamp(2.5rem, 8vw, 4rem); 
        line-height: 1.1;
    }
}

.container.hero-wide {
    position: relative;
    z-index: 1;
}

body {
    margin: 0; padding: 0;
    display: flex; flex-direction: column;
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--fg);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

main { flex: 1; width: 100%; }
a { color: inherit; text-decoration: none; transition: all 0.3s ease; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
section { padding: 100px 0; border-bottom: 1px dashed var(--border); }

.textured-bg {
    position: relative;
    background-color: var(--bg);
    
    /* Layer 1: Primary Waves | Layer 2: Offset Chaotic Waves */
    background-image: 
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1000' height='400' viewBox='0 0 1000 400'%3E%3Cg fill='none' stroke='rgba(0, 102, 255, 0.12)' stroke-width='1'%3E%3Cpath d='M0 50 Q 250 150 500 50 T 1000 50' /%3E%3Cpath d='M0 120 Q 250 20 500 120 T 1000 120' /%3E%3Cpath d='M0 190 Q 250 290 500 190 T 1000 190' /%3E%3Cpath d='M0 260 Q 250 160 500 260 T 1000 260' /%3E%3Cpath d='M0 330 Q 250 430 500 330 T 1000 330' /%3E%3C/g%3E%3C/svg%3E");
    /* This aligns and offsets the two layers to create the chaos */
    background-size: 1000px 400px;
    background-position: 0 0, 150px 100px;
    background-attachment: fixed;
    z-index: 1;
}

/* Ensure the transition from the Hero image is seamless */
.textured-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 180px;
    background: linear-gradient(to bottom, var(--bg) 5%, transparent);
    z-index: 2;
    pointer-events: none;
}


.credentials-box {
    display: flex;
    align-items: center;
    justify-content: center; /* Centers everything */
    gap: 32px;               /* Space between text and logo */
    padding: 30px 40px;
    background: #f8fafc;
    border-radius: 20px;
    border: 1px solid var(--border);
    max-width: 800px;        /* Prevents the bar from being too wide */
    margin: 0 auto;          /* Centers the box itself */
}

.n8n-logo {
    height: 40px;            /* Forces a specific, professional height */
    width: auto;             /* Keeps proportions correct */
    object-fit: contain;
    filter: grayscale(0%);   /* Keeps original logo colors */
    flex-shrink: 0;          /* Prevents the logo from getting squished */
}

/* Mobile fix for trust bar */
@media (max-width: 768px) {
    .credentials-box {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        padding: 24px;
    }
}

/* Removes any intentional separator lines */
section::after {
    display: none !important;
}

section {
    border-bottom: none !important;
}

/* --- About Section Restoration --- */
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr; /* Text on left, Card on right */
    gap: 60px;
    align-items: center;
    margin-top: 40px;
}

.about-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-card {
    background: #f8fafc; /* Light gray-blue background */
    padding: 48px 32px;
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.stat-value {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: var(--fg);
    line-height: 1;
    margin-bottom: 12px;
}

.stat-label {
    display: block;
    font-size: 1rem;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 24px;
}

.cred-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--fg);
    font-weight: 600;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}


/* --- Process Section: Cycle Style --- */
#process {
    background: #f8fafc; /* Light contrast background */
    text-align: center;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 60px;
    position: relative;
}

/* The Connecting Line (Desktop Only) */
@media (min-width: 1001px) {
    .products-grid::before {
        content: '';
        position: absolute;
        top: 45px;
        left: 15%;
        right: 15%;
        height: 2px;
        background: repeating-linear-gradient(to right, var(--border) 0, var(--border) 10px, transparent 10px, transparent 20px);
        z-index: 0;
    }
}

.product {
    background: #ffffff;
    padding: 60px 30px 40px;
    border-radius: 24px;
    border: 1px solid var(--border);
    position: relative;
    transition: all 0.4s var(--ease-premium);
    z-index: 1;
}

.product:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    border-color: var(--accent);
}

/* The Circular Number Badge */
.step-num {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: #ffffff;
    border: 4px solid #f8fafc;
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    z-index: 2;
}

.product h3 {
    font-size: 1.4rem;
    margin-bottom: 16px;
    color: var(--fg);
}

.product p {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.6;
}

/* Responsive Fix */
@media (max-width: 1000px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

/* --- Mission List Restoration --- */
.mission-list {
    list-style: none; /* Removes default black bullets */
    padding: 0;
    margin: 32px 0;
    display: flex;
    flex-direction: column;
    gap: 20px; /* Space between each list item */
}

.mission-list li {
    position: relative;
    padding-left: 28px; /* Room for the custom marker */
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--muted);
}

/* Custom Marker (The Blue Accent) */
.mission-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px; /* Aligns with the first line of text */
    width: 6px;
    height: 6px;
    background-color: var(--accent); /* Uses your brand color */
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.1); /* Subtle outer glow */
}

.mission-list li strong {
    color: var(--fg); /* Makes the key points stand out */
    font-weight: 600;
}

/* Optional: Subtle hover effect for interactivity */
.mission-list li:hover {
    color: var(--fg);
    transition: color 0.3s ease;
}

/* Responsive Fix */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* --- Global Typography --- */
h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 32px;
    position: relative;
    padding-bottom: 12px;
}

h2::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 40px; height: 3px; background: var(--accent); border-radius: 2px;
}

.kicker {
    font-size: 0.8rem; letter-spacing: 0.15em;
    text-transform: uppercase; font-weight: 700;
    margin-bottom: 20px; color: var(--accent);
    display: block;
}

/* --- Header & Navigation --- */
header {
    position: sticky; top: 0; width: 100%;
    background: var(--glass); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border); z-index: 1000;
}

.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; }
.brand-logo { width: 28px; height: 28px; flex-shrink: 0; }

.nav-links { display: flex; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.nav-links a { padding: 8px 16px; font-size: 0.95rem; font-weight: 500; color: var(--muted); border-radius: 8px; }
.nav-links a:hover { color: var(--fg); background: rgba(0, 0, 0, 0.03); }

.nav-cta {
    background: var(--fg) !important; color: white !important;
    margin-left: 12px; padding: 10px 20px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.menu-toggle { display: none; border: 1px solid var(--border); background: transparent; padding: 8px; border-radius: 8px; cursor: pointer; color: var(--fg); }

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 80vh;
    min-height: 80svh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0b0d11;
    overflow: hidden; /* now SAFE again */
}

/* Background layer */
.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('images/bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.6;
    z-index: 0;

    /* iPad Safari stabilizer */
    transform: translateZ(0);
}

/* Content wrapper */
.container.hero-wide {
    position: relative;
    z-index: 1;
}

/* Content */
.hero-content {
    position: relative;
    z-index: 1;
}

/* Heading */
.hero h1 { 
    font-size: clamp(2rem, 5.5vw, 4.5rem); 
    line-height: 1.1; 
    margin-bottom: 24px; 
    font-weight: 800; 
    letter-spacing: -0.02em;
    white-space: normal; 
    padding: 0 10px;
}

/* Desktop-only parallax */
@media (min-width: 1025px) {
    .hero-bg {
        background-attachment: fixed;
    }
}


/* 4. Optional: Expand the Hero container's padding to give the text more room */
.hero .container {
    max-width: 1400px; /* Or 'none' if you want it truly edge-to-edge */
    padding-left: 5%;
    padding-right: 5%;
}
.hero-subtitle { font-size: 1.25rem; color: rgba(255, 255, 255, 0.9); max-width: 700px; margin: 0 auto 32px; }

.hero-benefits { list-style: none; padding: 0; margin: 0 auto 48px; display: flex; flex-direction: column; gap: 12px; max-width: fit-content; text-align: left; }
.hero-benefits li { font-size: 1.1rem; color: white; display: flex; align-items: center; gap: 12px; }
.hero-benefits li::before { content: '✓'; display: flex; justify-content: center; align-items: center; width: 20px; height: 20px; background: var(--accent); color: var(--fg); border-radius: 50%; font-size: 0.7rem; font-weight: 900; }

.cta-primary {
    display: inline-flex; padding: 20px 40px; background: #ffffff; color: #0f172a;
    border-radius: 14px; font-weight: 700; font-size: 1.1rem;
    transition: all 0.4s var(--ease-premium); box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.cta-primary:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.3); background: var(--accent); color: white; }

/* --- Work Carousel (Logos) --- */
.work-carousel-container {
    width: 100%; overflow: hidden; padding: 80px 0; background: #ffffff;
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

/* --- Mobile carousel tweaks --- */
@media (max-width: 768px) {

    .work-carousel-container {
        overflow: hidden;  /* hide the scrollbar */
        position: relative;
    }

    .carousel-track {
        display: flex; /* ensure logos line up horizontally */
        width: max-content; /* allow infinite duplication */
        gap: 24px; /* smaller gaps on mobile */
        transition: transform 0.1s linear; /* smooth movement */
    }

    .logo-item img {
        max-height: 50px; /* smaller logo on mobile */
        width: auto;
        opacity: 0;
        transition: opacity 0.8s ease;
    }

    /* Hide scroll bar for webkit and Firefox */
    .work-carousel-container::-webkit-scrollbar {
        display: none;
    }

    .work-carousel-container {
        overflow: hidden; /* hide any scroll bar */
        -webkit-overflow-scrolling: touch;
        position: relative;
    }
}

.work-mission-text {
    text-align: center; font-size: 1.1rem; color: var(--muted); margin-bottom: 40px; justify-content: center; display: flex;
}

.cta-nav {
    display: inline-block; margin-top: 24px; padding: 14px 28px;
    background: var(--fg); color: rgb(0, 0, 0); border-radius: 12px;
    font-weight: 600; transition: all 0.3s var(--ease-premium);
}
.cta-nav:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); background: var(--accent); }

.cta-work {
    display: inline-block; margin-top: 24px; padding: 14px 28px;
    background: var(--fg); color: white; border-radius: 12px;
    font-weight: 600; transition: all 0.3s var(--ease-premium);
}
.cta-work:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); background: var(--accent); }

.carousel-track { display: flex; width: max-content; animation: scroll-loop 40s linear infinite; }
.logo-item { flex: 0 0 auto; width: 250px; display: flex; justify-content: center; align-items: center; padding: 0 40px; }
.logo-item img { max-height: 60px; width: auto; filter: grayscale(100%); opacity: 0.5; transition: all 0.3s var(--ease-premium); }
.logo-item img:hover { filter: grayscale(0%); opacity: 1; }


/* --- Mobile Carousel Tweaks --- */
@media (max-width: 768px) {

    .tools-breakout-grid {
        /* Reduce the gap between cards significantly for mobile */
        gap: 12px !important; 
        padding-left: 20px;
        padding-right: 20px;
        
        /* Ensure cards don't shrink */
        display: flex;
        width: max-content;
    }

    .product-card {
        /* Make cards slightly narrower so the user sees the "peek" 
           of the next card, signaling that they can scroll */
        flex: 0 0 260px !important; 
        padding: 40px 20px 30px; /* Tighter internal padding */
    }
    
}


.carousel-track {
    display: flex;
    width: max-content;
    animation: scroll-loop 40s linear infinite;
}

/* --- Mobile: Scrollable Logo Carousel --- */
@media (max-width: 768px) {
    .work-carousel-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 40px 0 20px;
        mask-image: none;
        -webkit-mask-image: none;
    }

    .carousel-track {
        animation: none;
        gap: 16px;
        padding: 0 20px;
    }

    .logo-item {
        padding: 0 16px;
        scroll-snap-align: center;
    }

    .work-carousel-container {
        scroll-snap-type: x mandatory;
    }
}


@keyframes scroll-loop {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
/* --- Outcome-Based Solutions --- */
.solutions-container { display: flex; flex-direction: column; gap: 40px; margin-top: 60px; }

.solution-card {
    display: grid; grid-template-columns: 1fr 1.5fr; gap: 60px;
    padding: 60px; border-radius: 32px; border: 1px solid var(--border);
    background: #fcfcfc; transition: all 0.4s var(--ease-premium);
}

.solution-card:hover { border-color: var(--accent); background: #ffffff; box-shadow: 0 30px 60px rgba(0,0,0,0.04); transform: translateY(-4px); }

.solution-header .solution-icon { font-size: 2.5rem; margin-bottom: 20px; color: var(--accent); }
.solution-header h3 { font-size: 1.8rem; margin-bottom: 16px; font-weight: 700; }
.solution-desc { font-size: 1.1rem; color: var(--muted); line-height: 1.6; }

.scope-list { list-style: none; padding: 0; margin-bottom: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.scope-list li { font-size: 0.95rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.scope-list li::before { content: "•"; color: var(--accent); font-weight: bold; }

.impact-box {
    background: rgba(var(--accent-rgb), 0.05); padding: 24px;
    border-radius: 16px; border: 1px dashed var(--accent);
}
.impact-label { display: block; font-size: 0.75rem; text-transform: uppercase; font-weight: 800; color: var(--accent); margin-bottom: 8px; }
.impact-box p { margin: 0; font-weight: 600; color: var(--fg); }

/* --- Work Projects (Case Studies) --- */
.work-projects-grid { display: grid; gap: 60px; margin-top: 40px; }

.work-project-card {
    display: grid; grid-template-columns: 320px 1fr; gap: 48px;
    padding: 40px; border-radius: 20px; border: 1px solid var(--border);
    transition: all 0.4s var(--ease-premium); overflow: hidden;
    background-color: #ffffff;
}

.work-project-card:hover { border-color: var(--accent); box-shadow: 0 20px 40px rgba(0,0,0,0.05); }

.work-project-image {
    width: 100%; aspect-ratio: 4/3; border-radius: 12px;
    background: #ffffff; overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.work-project-image img { max-width: 100%; transition: transform 0.6s var(--ease-premium); }
.work-project-card:hover .work-project-image img { transform: scale(1.05); }

.work-project-results { display: flex; flex-direction: column; gap: 10px; margin: 24px 0; }
.result-pill { padding: 12px 18px; background: #f1f5f9; border-radius: 10px; font-size: 0.9rem; border-left: 3px solid #cbd5e1; }
.result-pill.highlight { background: rgba(var(--accent-rgb), 0.08); border-left-color: var(--accent); color: var(--fg); font-weight: 500; }

/* --- Lead Capture (Contact) --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 80px; align-items: start; }

.contact-form {
    display: flex; flex-direction: column; gap: 24px;
    padding: 48px; border-radius: 24px; border: 1px solid var(--border); background: #fcfcfc;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; color: var(--muted); }

.form-group input, .form-group textarea {
    padding: 14px 18px; border-radius: 10px; border: 1px solid var(--border);
    background: white; font-family: inherit; font-size: 1rem; transition: all 0.2s ease;
}

.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.05); }

.submit-btn {
    background: var(--fg); color: white; border: none; padding: 18px;
    border-radius: 12px; font-weight: 700; cursor: pointer; transition: 0.3s var(--ease-premium);
}
.submit-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); background: var(--accent); }

/* --- Professional Footer --- */
/* --- Updated Footer Styles --- */
footer { 
    background: #fcfcfc; 
    padding: 80px 0 40px; 
    border-top: 1px solid var(--border); 
    color: var(--muted); 
}

.footer-grid { 
    display: grid; 
    grid-template-columns: 1.5fr 1fr 1fr 1fr; 
    gap: 60px; 
    margin-bottom: 60px; 
    align-items: start; /* Ensures all columns start at the exact same top line */
}

/* Aligning the Logo Section with the H4 titles */
.footer-logo { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    font-weight: 700; 
    color: var(--fg); 
    margin-top: 0;      /* Matches the reset H4 margin */
    margin-bottom: 24px; /* Space before the tagline */
    line-height: 1; 
}

.footer-logo img {
    height: 24px;
    width: auto;
    display: block;
}

/* Matching the "Navigation" headings */
.footer-links h4 {
    margin-top: 0;
    margin-bottom: 24px;
    color: var(--fg);
    font-size: 1rem;
}

.footer-tagline {
    margin: 0 0 16px 0;
    font-size: 0.95rem;
}

/* Formatting the email and city to match list item spacing */
.footer-contact-info p {
    margin: 0 0 12px 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.footer-contact-info a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contact-info a:hover {
    color: var(--accent);
}

.footer-links ul { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
}

.footer-links li { 
    margin-bottom: 12px; 
    font-size: 0.95rem;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom-bar { 
    padding-top: 40px; 
    border-top: 1px solid var(--border); 
    text-align: center; 
    font-size: 0.85rem; 
}

/* --- Mobile & Accessibility --- */
/* --- Tablet & Small Desktop (1000px and down) --- */
@media (max-width: 1000px) {
    .solution-card, 
    .work-project-card,
    .about-grid { 
        grid-template-columns: 1fr; 
        padding: 40px; 
    }
    .footer-grid { 
        grid-template-columns: 1fr 1fr; 
        gap: 40px; 
    }
}

/* --- Mobile (768px and down) --- */
@media (max-width: 768px) {
    /* Layout Adjustments */
    .contact-grid, .form-row, .scope-list, .products-grid { 
        grid-template-columns: 1fr; 
    }
    .contact-grid { gap: 60px; }
    header { padding: 0 10px; }
    section { padding: 60px 0; }
    h2 { font-size: 2rem; }

    /* Mobile Menu Logic */
    .menu-toggle { 
        display: block; 
        background: none;
        border: none;
        color: var(--fg);
        cursor: pointer;
    }

    .nav-links { 
        display: none; /* Hidden by default */
        flex-direction: column;
        position: absolute;
        top: 100%; /* Sits right below the header */
        left: 0;
        width: 100%;
        background: #ffffff;
        padding: 40px 20px;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 30px rgba(0,0,0,0.05);
        z-index: 1000;
        gap: 20px;
        text-align: center;
    }

    /* THE FIX: When JS adds this class, the menu appears */
    .nav-links.is-active { 
        display: flex; 
        animation: slideDown 0.3s ease-out forwards;
    }

    .nav-links li { width: 100%; }
    
    .nav-cta {
        display: inline-block;
        width: 100%;
        margin-top: 10px;
    }
}

/* --- Tools Wide Section --- */
.tools-wide {
    padding: 120px 0;
    overflow-x: hidden; /* Prevents unwanted horizontal scroll */
}

.wide-container {
    max-width: 1400px; /* Wider than your standard 1100px container */
    margin: 0 auto;
    padding: 0 40px;
}

.tools-breakout-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns side by side */
    gap: 24px;
    margin-top: 40px;
}

.product-card {
    background: #ffffff;
    padding: 50px 30px 40px;
    border-radius: 24px;
    border: 1px solid rgba(0,0,0,0.06);
    position: relative;
    transition: all 0.4s var(--ease-premium);
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    border-color: #000;
}

/* --- THE LOGO/ICON FIX --- */
.icon-badge {
    position: absolute;
    top: -30px;
    left: 30px; /* Aligned to left for a modern look, or use 50% + translateX(-50%) */
    width: 60px;
    height: 60px;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
}

.icon-badge img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Cages the giant logos */
}

.product-card h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    color: var(--fg);
    font-weight: 700;
}

.product-card p {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.6;
}

/* --- Responsive: Stack on Mobile --- */
@media (max-width: 1100px) {
    .tools-breakout-grid {
        grid-template-columns: repeat(2, 1fr); /* 2x2 on tablets */
    }
}

@media (max-width: 768px) {
    /* Ensure grid stacks fully */
    .tools-breakout-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
        padding-left: 20px;
        padding-right: 20px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Make cards fill the column and handle badges */
    .product-card {
        width: 100% !important;
        padding: 40px 20px 30px; /* more top padding for badge */
        box-sizing: border-box;
        overflow: visible !important;
    }

    /* Center the badges on mobile */
    .icon-badge {
        left: 50% !important;
        transform: translateX(-50%);
        top: -30px; /* same as desktop */
    }

    /* Fix text wrapping inside cards */
    .product-card h3,
    .product-card p {
        white-space: normal;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* Make container full width for mobile */
    .wide-container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

@media (max-width: 480px) {
    /* Ensure the grid is truly 1-column on small phones */
    .tools-breakout-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        width: 100% !important;
    }

    /* Force cards to fit full width */
    .product-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        margin-left: auto;
        margin-right: auto;
    }

    /* Ensure badges are visible */
    .icon-badge {
        left: 50% !important;
        transform: translateX(-50%);
    }
}

.bespoke-section {
    padding: 160px 0;
    background-color: #ffffff;
    border-top: 1px solid #f0f0f0;
}

.bespoke-header {
    max-width: 800px;
    margin: 0 auto 100px auto;
    text-align: center;
}

.bespoke-header h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    margin: 20px 0 30px;
}

.bespoke-lead {
    font-size: 1.25rem;
    color: var(--muted);
    line-height: 1.6;
}

/* Pillar Layout */
.bespoke-pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 80px;
}

.pillar {
    padding: 40px;
    border-radius: 24px;
    background: #fafafa;
    border: 1px solid rgba(0,0,0,0.03);
    transition: all 0.4s ease;
}

.pillar:hover {
    background: #fff;
    border-color: #000;
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.04);
}

.pillar-num {
    display: block;
    font-family: serif; /* Adds a "premium" editorial feel */
    font-style: italic;
    font-size: 1.5rem;
    color: #cccccc;
    margin-bottom: 20px;
}

.pillar h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.pillar p {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.5;
}

.bespoke-footer {
    text-align: center;
    margin-top: 60px;
}

.btn-outline {
    display: inline-block;
    padding: 15px 40px;
    border: 1px solid #000;
    border-radius: 100px;
    color: #000;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
}

.btn-outline:hover {
    background: #000;
    color: #fff;
}

/* iPad/Mobile Fixes */
@media (max-width: 1024px) {
    .bespoke-pillars {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .bespoke-section {
        padding: 100px 0;
    }

    .bespoke-header h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .bespoke-footer {
        margin-top: 40px;
    }
}
/* Animation for a smooth menu entrance */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Reveal Animations */
[data-reveal] { opacity: 0; transform: translateY(30px); transition: all 0.8s var(--ease-premium); }
[data-reveal].revealed { opacity: 1; transform: translateY(0); }

/* Cookie Popup */
.cookie-popup {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px);
    width: 90%; max-width: 600px; background: #fff; padding: 20px 30px;
    border-radius: 16px; box-shadow: 0 20px 40px rgba(0,0,0,0.1); z-index: 10000;
    opacity: 0; transition: all 0.6s var(--ease-premium);
}
.cookie-popup.is-visible { transform: translateX(-50%) translateY(0); opacity: 1; }

.cookie-actions {
    display: flex;
    align-items: center; /* Ensures text and button share the same middle line */
    gap: 12px;
    flex-shrink: 0; /* Prevents buttons from squishing on medium screens */
}


/* Primary Button (Accept) */
.cookie-btn-premium {
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Ensure the button doesn't have extra height */
.cookie-btn-secondary {
    background: transparent;
    color: #666;
    border: none;
    padding: 10px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    line-height: 1; /* Match the line-height of the main button */
    transition: color 0.3s ease;
}
.cookie-btn-secondary:hover {
    color: #1a1a1a; /* Darkens on hover to show interactivity */
    text-decoration: underline;
}

@media (max-width: 600px) {
    .cookie-actions {
        width: 100%;
        flex-direction: column-reverse; /* Put 'Got it' on top for mobile */
    }
    .cookie-btn-premium, .cookie-btn-secondary {
        width: 100%;
    }
}

/* Layout logic to make the HTML look clean */
.cookie-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.cookie-text p {
    margin: 0;
    font-size: 0.9rem;
    color: #666; /* var(--muted) if you have it */
    line-height: 1.5;
}

.cookie-text a {
    color: #1a1a1a; /* var(--fg) */
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
}

/* Mobile Tweak: When the screen is narrow, stack the content */
@media (max-width: 600px) {
    .cookie-container {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .cookie-btn-premium {
        width: 100%; /* Makes button easier to tap on phones */
    }
}

@media (max-width: 768px) {
.work-carousel-container {
    overflow-x: auto; /* allow horizontal scroll */
    -webkit-overflow-scrolling: touch;
    padding: 40px 0 20px;
}

.carousel-track {
    display: flex;
    gap: 16px;
    padding: 0 20px;
    animation: none; /* disable auto-loop on mobile */
}

.logo-item {
    flex: 0 0 auto;
    scroll-snap-align: center;
}

.work-carousel-container {
    scroll-snap-type: x mandatory;
}

/* Make logos visible immediately */
.logo-item img {
    opacity: 1 !important;
}
}
