/**
 * Attach Design - High Impact Agency Theme
 * Vertical Layout | MedTech | Professional
 */

/* ==========================================
   DESIGN TOKENS
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    /* Brand Palette */
    --color-primary: #B85C5C;      /* Terracotta - Main Action */
    --color-primary-dark: #9A4A4A; /* Hover / Active */
    --color-primary-light: #FCE8E8;/* Surface Tint */

    --color-slate-900: #0F172A;    /* Headings */
    --color-slate-700: #334155;    /* Body Text */
    --color-slate-500: #64748B;    /* Muted Text */
    --color-slate-100: #F1F5F9;    /* Light Backgrounds */
    --color-white: #FFFFFF;

    /* Semantic */
    --text-heading: var(--color-slate-900);
    --text-body: var(--color-slate-700);
    --bg-body: var(--color-white);
    --bg-subtle: var(--color-slate-100);

    /* Typography */
    --font-heading: 'Outfit', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;   /* 8px */
    --space-sm: 1rem;     /* 16px */
    --space-md: 1.5rem;   /* 24px */
    --space-lg: 3rem;     /* 48px */
    --space-xl: 5rem;     /* 80px */

    /* UI Elements */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    
    --header-height: 80px;
    --container-width: 1200px;
    
    /* Additional tokens */
    --radius-full: 9999px;
    --shadow-sticker-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-sticker-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --color-ink-light: var(--color-slate-500);
    --base-white: #FFFFFF;
}

/* ==========================================
   RESET & BASE
   ========================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-body);
    background-color: var(--bg-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-heading);
    line-height: 1.1;
    font-weight: 700;
}

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

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

/* ==========================================
   UTILITIES & COMPONENTS
   ========================================== */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section {
    padding: var(--space-xl) 0;
}

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

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
}

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

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(184, 92, 92, 0.25);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-slate-900);
    color: var(--color-slate-900);
}

.btn-outline:hover {
    background: var(--color-slate-900);
    color: white;
    transform: translateY(-2px);
}

/* Badge List */
.badge-list {
    list-style: none;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.badge-list li {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ==========================================
   HEADER
   ========================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled,
.site-header.header-solid {
    background: var(--color-primary); /* Terracotta */
    box-shadow: 0 4px 20px rgba(184, 92, 92, 0.15); /* Tint shadow with brand color */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Change link colors when scrolled or solid */
.site-header.is-scrolled .nav-link,
.site-header.header-solid .nav-link {
    color: rgba(255, 255, 255, 0.9);
}

.site-header.is-scrolled .nav-link:hover,
.site-header.header-solid .nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.15);
}

/* Invert Logo to make it white (assumes black logo input) */
.site-header.is-scrolled .logo img,
.site-header.header-solid .logo img {
    filter: brightness(0) invert(1);
    opacity: 1; /* Ensure full visibility */
}

/* Update Hamburger/Toggle for mobile */
.site-header.is-scrolled .hamburger,
.site-header.is-scrolled .hamburger::before,
.site-header.is-scrolled .hamburger::after,
.site-header.header-solid .hamburger,
.site-header.header-solid .hamburger::before,
.site-header.header-solid .hamburger::after {
    background: white;
}

/* Special handling for the CTA button in the nav when scrolled */
.site-header.is-scrolled .nav-cta,
.site-header.header-solid .nav-cta {
    background: white;
    color: var(--color-primary) !important; /* Text becomes primary color */
}

.site-header.is-scrolled .nav-cta:hover,
.site-header.header-solid .nav-cta:hover {
    background: var(--color-slate-100) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Nav Toggle (Hidden on Desktop) */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-slate-900);
    position: relative;
    transition: all 0.3s ease-in-out;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--color-slate-900);
    transition: all 0.3s ease-in-out;
    left: 0;
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

/* Hamburger Animation */
.nav-toggle.is-active .hamburger { background: transparent; }
.nav-toggle.is-active .hamburger::before { transform: rotate(45deg); top: 0; }
.nav-toggle.is-active .hamburger::after { transform: rotate(-45deg); bottom: 0; }


.nav-container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.main-nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 8px; /* Tighter gap for pill background effect */
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-link {
    display: block;
    padding: 8px 16px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-slate-700);
    border-radius: 50px; /* Pill shape */
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--color-slate-900);
    background-color: var(--color-slate-100); /* Subtle pill bg on hover */
}

/* ==========================================
   DROPDOWN MENU
   ========================================== */

.nav-item.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: white;
    min-width: 240px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    list-style: none;
    z-index: 1002;
    margin-top: 10px; /* Gap bridge */
}

/* Bridge for hover */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

.nav-item.has-dropdown:hover .dropdown-menu,
.nav-item.has-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 16px;
    color: var(--color-slate-700);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    text-align: left;
    white-space: nowrap;
}

.dropdown-menu li a:hover {
    background: var(--bg-subtle);
    color: var(--color-primary);
    transform: translateX(4px);
}

/* Arrow indicator */
.nav-link.dropdown-toggle::after {
    content: '▾';
    margin-left: 6px;
    font-size: 0.8em;
    display: inline-block;
    transition: transform 0.2s;
}

.nav-item.has-dropdown:hover .nav-link.dropdown-toggle::after {
    transform: rotate(180deg);
}


/* Specific styling for the CTA within the list */
.nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-slate-900);
    color: white !important;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.9rem !important;
    font-weight: 600;
    margin-left: 12px; /* Extra separation from text links */
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
    transition: all 0.2s ease;
}

.nav-cta:hover {
    background: var(--color-primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(184, 92, 92, 0.25);
}

/* ==========================================
   HERO SECTION
   ========================================== */

.hero-section {
    position: relative;
    min-height: 90vh;
    padding-top: calc(var(--header-height) + 4rem);
    display: flex;
    align-items: center;
    background-image: url('../imgs/product_00_launch.jpeg');
    background-size: cover;
    background-position: center;
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.85), rgba(0,0,0,0.4));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1000px; /* Increased width for bigger text */
    margin: 0 auto;    /* Center container */
    text-align: center; /* Center text */
    padding: 0 var(--space-md);
}

.hero-title {
    font-size: 5.5rem; /* Bigger */
    font-weight: 800;  /* Bolder */
    color: white;
    margin-bottom: 2rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3); /* Add depth */
}

.hero-lead {
    font-size: 1.5rem; /* Bigger lead */
    color: rgba(255, 255, 255, 0.95);
    max-width: 700px;
    margin: 0 auto 3rem auto; /* Center with auto margins */
    font-weight: 500;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center; /* Center buttons */
}

.hero-actions .btn-outline {
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
}

.hero-actions .btn-outline:hover {
    background: white;
    color: var(--color-slate-900);
}

/* ==========================================
   TRUST / LOGOS
   ========================================== */

.trust-section {
    border-bottom: 1px solid var(--color-slate-100);
    padding: 2rem 0;
    background: white;
}

.trust-label {
    text-align: center;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    font-weight: 600;
    color: var(--color-slate-500);
    margin-bottom: 1.5rem;
}

.logo-strip {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
}

/* Text-based logos */
.client-logo {
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--color-slate-400);
    letter-spacing: -0.01em;
    transition: all 0.3s ease;
}

.client-logo:hover {
    color: var(--color-slate-700);
}

/* Image logos */
img.client-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    color: transparent;
}

img.client-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* ==========================================
   EXPERTISE (BENTO GRID)
   ========================================== */

.expertise-section {
    background: white;
}

.section-header {
    margin-bottom: var(--space-lg);
    max-width: 600px;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--color-slate-500);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(250px, auto);
    gap: 20px;
}

.bento-item {
    background: var(--bg-subtle);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0,0,0,0.03);
    transition: transform 0.3s ease;
}

.bento-item:hover {
    transform: translateY(-5px);
}

.bento-item.span-2 {
    grid-column: span 2;
}

.bento-item.highlighted {
    background: var(--color-slate-900);
    color: white;
}

.bento-item.highlighted h3 {
    color: white;
}

.bento-item.highlighted p {
    color: rgba(255, 255, 255, 0.7);
}

.bento-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.bento-item p {
    color: var(--color-slate-500);
    font-size: 1.05rem;
}

/* ==========================================
   SERVICES (CARDS)
   ========================================== */

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    border: 1px solid transparent;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(184, 92, 92, 0.1);
}

.service-card.featured {
    border: 2px solid var(--color-primary);
    background: #FFFBFB; /* Slight tint */
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-desc {
    color: var(--color-slate-500);
    margin-bottom: 2rem;
    flex-grow: 1;
}

.card-link {
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.95rem;
}

/* ==========================================
   CONTACT
   ========================================== */

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: center;
}

.contact-text h2 {
    font-size: 3.5rem;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.contact-text p {
    font-size: 1.25rem;
    color: var(--color-slate-500);
}

.contact-form-wrapper {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

/* ==========================================
   FOOTER
   ========================================== */

.site-footer {
    background: var(--color-white);
    padding: 3rem 0;
    border-top: 1px solid var(--color-slate-100);
}

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

.copyright {
    font-size: 0.85rem;
    color: var(--color-slate-500);
    margin-top: 0.5rem;
}

.footer-links a {
    margin-left: 2rem;
    color: var(--color-slate-700);
    font-weight: 500;
}

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


/* ==========================================
   BACKWARD COMPATIBILITY (Article Layout)
   ========================================== */

/* Used in product-design-sprint.html, etc. */
.article-layout {
    max-width: 800px;
    margin: 0 auto;
    padding: calc(var(--header-height) + 4rem) 2rem 4rem;
}

.article-header {
    text-align: center;
    margin-bottom: 4rem;
}

.article-hero-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-card);
}

.article-title {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.article-subtitle {
    font-size: 1.5rem;
    color: var(--color-slate-500);
    font-weight: 400;
}

.article-content p {
    font-size: 1.125rem;
    color: var(--color-slate-700);
    margin-bottom: 1.5rem;
}

.article-content h2 {
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.sprint-card {
    background: var(--bg-subtle);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.sprint-meta {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--color-slate-500);
    margin-bottom: 0.5rem;
}

.sprint-card h3 {
    margin-bottom: 0.5rem;
}

.cta-button {
    /* Mapped to btn primary */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.125rem;
    background-color: var(--color-primary);
    color: white;
    margin-top: 1rem;
    transition: transform 0.2s;
}

.cta-button:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 900px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .bento-grid, .services-grid, .split-layout {
        grid-template-columns: 1fr;
    }
    
    .bento-item.span-2 {
        grid-column: span 1;
    }

    /* Mobile Navigation */
    .nav-toggle {
        display: block; /* Show hamburger */
    }

    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: white;
        padding: 2rem;
        flex-direction: column;
        align-items: center;
        border-bottom: 1px solid var(--color-slate-100);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
        
        /* Animation properties */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s ease;
        z-index: 900;
        height: auto;
        gap: 1.5rem;
    }

    .main-nav.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        display: flex; /* Override display: none from previous if set, but we use visibility */
    }
    
    .nav-links {
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
        text-align: center;
    }

    .nav-link {
        font-size: 1.125rem;
        padding: 12px;
        width: 100%;
    }

    .nav-cta {
        margin-left: 0;
        margin-top: 1rem;
        width: 100%;
        display: flex;
    }

    /* Mobile Dropdown */
    .nav-item.has-dropdown {
        width: 100%;
        flex-direction: column;
        display: flex;
        align-items: center;
    }

    .dropdown-menu {
        position: static; /* Relative flow in mobile */
        transform: none;
        box-shadow: none;
        background: var(--bg-subtle);
        width: 100%;
        margin-top: 0;
        display: none; /* JS toggle preferably, or hover */
        opacity: 1;
        visibility: visible;
        padding: 0;
    }

    /* Force show for now or rely on JS/Hover. 
       Simple CSS workaround: Show when clicking? 
       For "hover" on mobile usually means click. */
    .nav-item.has-dropdown:hover .dropdown-menu,
    .nav-item.has-dropdown:active .dropdown-menu {
        display: block;
        animation: fadeIn 0.3s;
    }

    .dropdown-menu li a {
         padding: 12px 20px;
         text-align: center;
         color: var(--color-slate-700);
    }
    
    .dropdown-menu li a:hover {
        transform: none;
        background: rgba(0,0,0,0.05);
    }

    
    .hero-content {
        margin: 0;
        text-align: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
}

/* .cta-button is defined above (lines 797-815) - using that version */