/**
 * Vitalytics Design System
 * A unified styling framework for consistent brand presentation
 * 
 * Design Philosophy: Professional, Modern, Trustworthy
 * - Clean geometric aesthetics
 * - Teal-forward color palette conveying technology & reliability
 * - Generous whitespace for clarity
 * - Subtle depth through shadows and layering
 */

/* ============================================
   FONTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Source+Sans+3:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* ============================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */
:root {
    /* === Typography === */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Font Sizes - Fluid Typography Scale */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
    --text-base: clamp(1rem, 0.925rem + 0.375vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1rem + 0.625vw, 1.375rem);
    --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.625rem);
    --text-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 2.25rem);
    --text-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 3rem);
    --text-4xl: clamp(2.25rem, 1.75rem + 2.5vw, 4rem);
    
    /* Font Weights */
    --weight-light: 300;
    --weight-normal: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;
    --weight-extrabold: 800;
    
    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;
    
    /* === Color Palette === */
    
    /* Primary - Teal (Brand Color) */
    --primary-50: #f0fdfa;
    --primary-100: #ccfbf1;
    --primary-200: #99f6e4;
    --primary-300: #5eead4;
    --primary-400: #2dd4bf;
    --primary-500: #14b8a6;
    --primary-600: #0d9488;
    --primary-700: #0f766e;
    --primary-800: #115e59;
    --primary-900: #134e4a;
    --primary-950: #042f2e;
    
    /* Secondary - Slate (Text & Backgrounds) */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --slate-950: #020617;
    
    /* Accent - Emerald (Success/CTA) */
    --accent-400: #34d399;
    --accent-500: #10b981;
    --accent-600: #059669;
    
    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* === Light Theme (Default) === */
    --bg-primary: #ffffff;
    --bg-secondary: var(--slate-50);
    --bg-tertiary: var(--slate-100);
    --bg-elevated: #ffffff;
    --bg-overlay: rgba(15, 23, 42, 0.5);
    
    --text-primary: var(--slate-900);
    --text-secondary: var(--slate-600);
    --text-tertiary: var(--slate-400);
    --text-inverse: #ffffff;
    --text-link: var(--primary-600);
    --text-link-hover: var(--primary-700);
    
    --border-default: var(--slate-200);
    --border-strong: var(--slate-300);
    --border-focus: var(--primary-500);
    
    /* === Spacing Scale === */
    --space-0: 0;
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */
    --space-24: 6rem;     /* 96px */
    
    /* === Border Radius === */
    --radius-none: 0;
    --radius-sm: 0.25rem;   /* 4px */
    --radius-md: 0.5rem;    /* 8px */
    --radius-lg: 0.75rem;   /* 12px */
    --radius-xl: 1rem;      /* 16px */
    --radius-2xl: 1.5rem;   /* 24px */
    --radius-full: 9999px;
    
    /* === Shadows === */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --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);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 20px rgba(13, 148, 136, 0.3);
    
    /* === Transitions === */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    --transition-slower: 500ms ease;
    
    /* === Z-Index Scale === */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
    
    /* === Layout === */
    --container-max: 1200px;
    --header-height: 70px;
}

/* ============================================
   DARK THEME
   ============================================ */
:root[data-theme="dark"],
[data-theme="dark"] {
    --bg-primary: var(--slate-900);
    --bg-secondary: var(--slate-800);
    --bg-tertiary: var(--slate-700);
    --bg-elevated: var(--slate-800);
    --bg-overlay: rgba(0, 0, 0, 0.7);
    
    --text-primary: var(--slate-50);
    --text-secondary: var(--slate-300);
    --text-tertiary: var(--slate-400);
    --text-inverse: var(--slate-900);
    --text-link: var(--primary-400);
    --text-link-hover: var(--primary-300);
    
    --border-default: var(--slate-700);
    --border-strong: var(--slate-600);
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
}

/* ============================================
   BASE STYLES
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--weight-normal);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color var(--transition-slow), color var(--transition-slow);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Account for fixed header */
body {
    padding-top: var(--header-height);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-tight);
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h1 { font-size: var(--text-4xl); font-weight: var(--weight-bold); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); font-weight: var(--weight-semibold); }

p {
    margin-bottom: var(--space-4);
    color: var(--text-secondary);
}

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

a:hover {
    color: var(--text-link-hover);
}

strong, b {
    font-weight: var(--weight-semibold);
}

small {
    font-size: var(--text-sm);
}

/* ============================================
   LAYOUT COMPONENTS
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.main-wrapper {
    flex: 1 0 auto;
}

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

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

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

/* ============================================
   HEADER
   ============================================ */
.header {
    background-color: var(--slate-800);
    color: var(--text-inverse);
    padding: var(--space-4);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: var(--z-fixed);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(8px);
    background-color: rgba(30, 41, 59, 0.95);
}

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

.nav-brand h1 {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: var(--weight-bold);
    letter-spacing: -0.03em;
    margin: 0;
}

.nav-links {
    display: flex;
    gap: var(--space-2);
}

.nav-item {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    transition: all var(--transition-fast);
}

.nav-item:hover {
    background-color: var(--primary-600);
    color: white;
    box-shadow: var(--shadow-glow);
}

.nav-item.active {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Mobile Navigation */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    position: relative;
    transition: all var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: white;
    transition: all var(--transition-fast);
}

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

@media (max-width: 960px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--slate-800);
        flex-direction: column;
        padding: var(--space-4);
        gap: var(--space-2);
        box-shadow: var(--shadow-lg);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-item {
        width: 100%;
        text-align: center;
        padding: var(--space-3) var(--space-4);
    }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
    line-height: var(--leading-none);
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.98);
}

/* Primary Button */
.btn--primary,
.button {
    background-color: var(--primary-600);
    color: white;
    border-color: var(--primary-600);
}

.btn--primary:hover,
.button:hover {
    background-color: var(--primary-700);
    border-color: var(--primary-700);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

/* Secondary Button */
.btn--secondary {
    background-color: transparent;
    color: var(--primary-600);
    border-color: var(--primary-600);
}

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

/* Ghost Button */
.btn--ghost {
    background-color: transparent;
    color: var(--text-primary);
    border-color: var(--border-default);
}

.btn--ghost:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--border-strong);
}

/* Button Sizes */
.btn--sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
}

.btn--lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
}

/* Legacy .button class support */
.button {
    display: inline-block;
    padding: var(--space-3) var(--space-6);
    background-color: var(--primary-600);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-body);
    font-weight: var(--weight-medium);
    transition: all var(--transition-fast);
    border: none;
    cursor: pointer;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background-color: var(--bg-elevated);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-default);
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card--flat {
    box-shadow: none;
    border: 1px solid var(--border-default);
}

.card--elevated {
    box-shadow: var(--shadow-lg);
}

/* Service Card - Legacy Support */
.service-card {
    background-color: var(--bg-elevated);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-default);
    text-align: center;
    transition: all var(--transition-base);
}

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

.service-card h3 {
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

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

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: var(--space-5);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: var(--weight-medium);
    color: var(--text-primary);
    font-size: var(--text-sm);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-tertiary);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--slate-800) 0%, var(--primary-900) 100%);
    color: white;
    padding: var(--space-20) var(--space-6);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(13, 148, 136, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(13, 148, 136, 0.1) 0%, transparent 50%);
    z-index: 1;
}

.hero > * {
    position: relative;
    z-index: 2;
}

.hero h1 {
    color: white;
    margin-bottom: var(--space-4);
}

.hero p {
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--text-lg);
    max-width: 600px;
    margin: 0 auto var(--space-6);
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta {
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-600) 100%);
    color: white;
    padding: var(--space-16) var(--space-6);
    text-align: center;
}

.cta h2 {
    color: white;
    margin-bottom: var(--space-4);
}

.cta p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-6);
}

.cta .button {
    background-color: white;
    color: var(--primary-700);
}

.cta .button:hover {
    background-color: var(--slate-100);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    flex-shrink: 0;
    background-color: var(--slate-800);
    color: white;
    padding: var(--space-12) var(--space-6);
}

footer a {
    color: rgba(255, 255, 255, 0.7);
}

footer a:hover {
    color: white;
}

/* ============================================
   COOKIE CONSENT
   ============================================ */
.cookie-consent {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: rgba(30, 41, 59, 0.98);
    backdrop-filter: blur(8px);
    color: white;
    padding: var(--space-6);
    text-align: center;
    z-index: var(--z-modal);
    transition: bottom var(--transition-slow);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.cookie-consent.active {
    bottom: 0;
}

.cookie-consent p {
    color: rgba(255, 255, 255, 0.9);
    margin: var(--space-2) 0;
}

.cookie-consent a {
    color: var(--primary-400);
}

.cookie-buttons {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    margin-top: var(--space-4);
    flex-wrap: wrap;
}

.cookie-btn {
    padding: var(--space-2) var(--space-4);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    transition: all var(--transition-fast);
}

/* Easter-egg hint — subtle, sits above the footer on the homepage. */
.easter-egg-hint {
    text-align: center;
    color: var(--text-tertiary);
    font-size: var(--text-sm);
    margin: var(--space-12) auto var(--space-8);
    padding: 0 var(--space-4);
}
.easter-egg-hint kbd {
    display: inline-block;
    padding: 0.05em 0.45em;
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}
.easter-egg-hint a {
    color: var(--primary-600);
    text-decoration: underline;
}

/* Cookie banner buttons share neutral styling — no dark-pattern weighting.
   The choice the visitor makes is the choice they make; we don't
   visually steer towards "Accept". */
.accept-cookies,
.reject-cookies,
.cookie-settings {
    background: var(--slate-700);
    color: white;
    border: 1px solid var(--slate-600);
}

.accept-cookies:hover,
.reject-cookies:hover,
.cookie-settings:hover {
    background: var(--slate-600);
}

.accept-cookies:focus-visible,
.reject-cookies:focus-visible,
.cookie-settings:focus-visible {
    outline: 2px solid var(--primary-300);
    outline-offset: 2px;
}

/* ============================================
   SERVICES GRID
   ============================================ */
.services {
    max-width: var(--container-max);
    margin: var(--space-12) auto;
    padding: 0 var(--space-6);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
}

/* Service Section - Detail Pages */
.service-section {
    background-color: var(--bg-elevated);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-default);
}

.service-section h2 {
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

.features-list {
    list-style: none;
    margin: var(--space-4) 0;
}

.features-list li {
    margin: var(--space-3) 0;
    padding-left: var(--space-6);
    position: relative;
    color: var(--text-secondary);
}

.features-list li::before {
    content: "✓";
    color: var(--primary-500);
    font-weight: var(--weight-bold);
    position: absolute;
    left: 0;
}

/* ============================================
   CONTACT FORM
   ============================================ */
.contact-container {
    max-width: var(--container-max);
    margin: var(--space-8) auto;
    padding: 0 var(--space-6);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
}

.contact-form {
    background-color: var(--bg-secondary);
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.contact-form h2 {
    margin-bottom: var(--space-6);
}

.contact-info h2 {
    margin-bottom: var(--space-6);
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.info-item i {
    color: var(--primary-500);
    font-size: var(--text-xl);
    width: 24px;
}

.info-item h3 {
    color: var(--text-primary);
    font-size: var(--text-base);
    margin-bottom: var(--space-1);
}

.info-item p {
    color: var(--text-secondary);
    margin: 0;
}

.info-item a {
    color: var(--text-link);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }
    
    .hero {
        padding: var(--space-12) var(--space-4);
    }
    
    .services {
        padding: 0 var(--space-4);
        grid-template-columns: 1fr;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
        gap: var(--space-8);
        padding: 0 var(--space-4);
    }
    
    .contact-form,
    .contact-info {
        padding: var(--space-6);
    }
    
    .button {
        width: 100%;
        max-width: 300px;
    }
    
    .cookie-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cookie-btn {
        width: 100%;
        max-width: 200px;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

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

.bg-primary { background-color: var(--bg-primary); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-tertiary { background-color: var(--bg-tertiary); }

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }

.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

.shadow { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   PR2 components — eyebrow, metric grid, industry card,
   logo wall, compliance badges, testimonial, sector hero
   ============================================ */

.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: var(--primary-700);
    margin-bottom: var(--space-3);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-6);
    max-width: var(--container-max);
    margin: var(--space-12) auto;
    padding: 0 var(--space-4);
}
.metric {
    text-align: center;
}
.metric__value {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--primary-700);
    line-height: 1;
    margin-bottom: var(--space-2);
}
.metric__label {
    display: block;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.industry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-6);
    max-width: var(--container-max);
    margin: var(--space-8) auto;
    padding: 0 var(--space-4);
}
.industry-card {
    display: block;
    padding: var(--space-6);
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.industry-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-500);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}
.industry-card:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}
.industry-card__icon {
    width: 40px;
    height: 40px;
    color: var(--primary-600);
    margin-bottom: var(--space-4);
}
.industry-card__title {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}
.industry-card__desc {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.55;
    margin-bottom: var(--space-3);
}
.industry-card__cta {
    color: var(--primary-600);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
}

.logo-wall {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-6);
    max-width: 1100px;
    margin: var(--space-8) auto;
    padding: 0 var(--space-4);
    align-items: center;
    justify-items: center;
}
.logo-wall__item {
    filter: grayscale(1) opacity(0.6);
    transition: filter var(--transition-fast);
    max-height: 48px;
    width: auto;
}
.logo-wall__item:hover {
    filter: grayscale(0) opacity(1);
}

.compliance-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    justify-content: center;
    margin: var(--space-6) auto;
    max-width: 900px;
}
.compliance-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    color: var(--text-secondary);
}
.compliance-badge--in-progress {
    background: transparent;
    border-style: dashed;
    color: var(--text-tertiary);
}
.compliance-badge::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-500);
}
.compliance-badge--in-progress::before {
    background: var(--text-tertiary);
}

.testimonial {
    max-width: 720px;
    margin: var(--space-8) auto;
    padding: var(--space-6);
    background: var(--bg-elevated);
    border-left: 4px solid var(--primary-500);
    border-radius: var(--radius-md);
}
.testimonial__quote {
    font-size: var(--text-lg);
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}
.testimonial__quote::before { content: '"'; }
.testimonial__quote::after { content: '"'; }
.testimonial__cite {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-style: normal;
}
.testimonial__cite strong {
    color: var(--text-primary);
    font-weight: var(--weight-semibold);
}

/* SLA tier table */
.sla-table {
    max-width: 1100px;
    margin: var(--space-12) auto;
    padding: 0 var(--space-4);
}
.sla-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.sla-table th, .sla-table td {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    border-bottom: 1px solid var(--border-default);
    font-size: var(--text-sm);
}
.sla-table th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: var(--weight-semibold);
}
.sla-table th[data-tier="regulated"] {
    background: var(--primary-700);
    color: white;
}
.sla-table td[data-tier="regulated"] {
    background: var(--primary-50);
    color: var(--slate-900);          /* explicit dark text — was inheriting body color, which goes white in dark theme over the light teal background */
    font-weight: var(--weight-medium);
}
[data-theme="dark"] .sla-table td[data-tier="regulated"] {
    background: var(--primary-100);   /* slightly more saturated so the cell still pops in dark mode */
    color: var(--slate-900);
}
@media (max-width: 768px) {
    .sla-table { font-size: var(--text-xs); padding: 0 var(--space-2); }
    .sla-table th, .sla-table td { padding: var(--space-2); }
}

/* Sector-led hero (replaces generic hero on /home.html) */
.hero-sector {
    background: linear-gradient(135deg, var(--primary-800) 0%, var(--trust-800) 100%);
    color: white;
    padding: clamp(var(--space-12), 8vw, var(--space-20)) var(--space-4);
}
.hero-sector__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
    align-items: center;
}
@media (min-width: 900px) {
    .hero-sector__inner { grid-template-columns: 3fr 2fr; }
}
.hero-sector .eyebrow {
    color: var(--primary-200);
}
.hero-sector h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: var(--space-4);
    color: white;
}
.hero-sector p {
    font-size: var(--text-lg);
    color: rgba(255,255,255,0.92);
    margin-bottom: var(--space-6);
    max-width: 560px;
}
.hero-sector__ctas {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}
.hero-sector__ctas .button {
    background: white;
    color: var(--primary-700);
}
.hero-sector__ctas .button:hover {
    background: var(--primary-50);
}
.hero-sector__ctas .button--ghost {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.5);
}
.hero-sector__ctas .button--ghost:hover {
    background: rgba(255,255,255,0.1);
}
.hero-sector__art {
    display: none;
}
@media (min-width: 900px) {
    .hero-sector__art {
        display: block;
        opacity: 0.85;
    }
}

/* Header dropdown nav (Industries/Services/Trust/Company) */
.nav-item {
    position: relative;
}
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    padding: var(--space-2);
    display: none;
    z-index: 100;
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
    display: block;
}
.nav-dropdown a {
    display: block;
    padding: var(--space-2) var(--space-3);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
}
.nav-dropdown a:hover,
.nav-dropdown a:focus-visible {
    background: var(--bg-tertiary);
    color: var(--primary-700);
    outline: none;
}
@media (max-width: 900px) {
    .nav-item:hover .nav-dropdown,
    .nav-item:focus-within .nav-dropdown {
        display: block;
        position: static;
        box-shadow: none;
        border: none;
        margin-left: var(--space-4);
    }
}

/* ============================================
   PR3 — industry page templates
   ============================================ */

.sector-hero {
    background: linear-gradient(135deg, var(--trust-800) 0%, var(--primary-800) 100%);
    color: white;
    padding: clamp(var(--space-12), 8vw, var(--space-20)) var(--space-4);
}
.sector-hero__inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}
.sector-hero .eyebrow { color: var(--primary-200); }
.sector-hero h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.15;
    color: white;
    margin: var(--space-3) 0 var(--space-4);
}
.sector-hero p {
    font-size: var(--text-lg);
    color: rgba(255,255,255,0.92);
    max-width: 680px;
    margin-bottom: var(--space-6);
}
.sector-hero .button {
    background: white;
    color: var(--trust-800);
}
.sector-hero .button:hover { background: var(--primary-50); }

.sector-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--space-12) var(--space-4);
}
.sector-section + .sector-section {
    border-top: 1px solid var(--border-default);
}
.sector-section h2 {
    color: var(--text-primary);
    margin-bottom: var(--space-6);
    text-align: center;
}

.stake-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-6);
}
.stake-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
}
.stake-card h3 {
    color: var(--primary-700);
    font-size: var(--text-lg);
    margin-bottom: var(--space-3);
}
.stake-card p {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.55;
    margin: 0;
}

.help-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-6);
}
.help-card {
    padding: var(--space-5);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-500);
}
.help-card h3 {
    font-size: var(--text-base);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}
.help-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.55;
}

/* FAQ accordion */
.faq-list {
    max-width: 800px;
    margin: var(--space-6) auto 0;
}
.faq-item {
    border-bottom: 1px solid var(--border-default);
}
.faq-item summary {
    cursor: pointer;
    padding: var(--space-4) var(--space-2);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    font-size: var(--text-xl);
    color: var(--primary-600);
    transition: transform var(--transition-fast);
    flex: 0 0 auto;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item summary:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: -2px;
    border-radius: var(--radius-sm);
}
.faq-item__body {
    padding: 0 var(--space-2) var(--space-4);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.65;
}
.faq-item__body p { margin: 0 0 var(--space-3); }
.faq-item__body p:last-child { margin: 0; }

.sector-cta {
    text-align: center;
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--trust-700) 100%);
    color: white;
    padding: var(--space-12) var(--space-4);
    margin-top: var(--space-12);
}
.sector-cta h2 { color: white; margin-bottom: var(--space-3); }
.sector-cta p { color: rgba(255,255,255,0.92); margin-bottom: var(--space-6); }
.sector-cta .button {
    background: white;
    color: var(--primary-700);
}
.sector-cta .button:hover { background: var(--primary-50); }

/* ============================================
   PR4 — case studies
   ============================================ */

.sector-pill {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 999px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
}
.sector-pill--geotechnical { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.sector-pill--financial    { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.sector-pill--banking      { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.sector-pill--healthcare   { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.sector-pill--research     { background: #f5f3ff; color: #5b21b6; border-color: #ddd6fe; }
.sector-pill--legal        { background: #eef2ff; color: #3730a3; border-color: #c7d2fe; }
.sector-pill--charity      { background: #fff1f2; color: #9f1239; border-color: #fecdd3; }
.sector-pill--cloud        { background: var(--primary-50); color: var(--primary-800); border-color: var(--primary-200); }
.sector-pill--msp          { background: #f1f5f9; color: #334155; border-color: #cbd5e1; }
.sector-pill--other        { background: var(--bg-tertiary); color: var(--text-secondary); }

/* Client tile logos — restored. The <img> sits above the letterform mark.
 * If the image fails to load we hide it via inline onerror and reveal the mark,
 * so a missing file never breaks the layout. */
/* ============================================
 * Client tile = <details> element. Summary is the tile face; clicking expands
 * the case-study panel inline. When [open], the tile spans the full grid row.
 * ============================================ */
.client-tile { position: relative; }
details.client-tile { padding: 0; }      /* let summary supply its own padding */
.client-tile > summary.client-tile__face {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
    padding: var(--space-5);
    cursor: pointer;
    list-style: none;          /* hide default disclosure marker (Firefox) */
    position: relative;
}
.client-tile > summary.client-tile__face::-webkit-details-marker {
    display: none;             /* Safari/Chrome variant */
}
.client-tile > summary.client-tile__face:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}
.client-tile__chev {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
    transition: transform var(--transition-base), color var(--transition-base);
}
.client-tile__chev::before {
    content: "";
    position: absolute;
    inset: 4px 6px 4px 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);  /* down-chevron, points to "click to expand" */
}
details.client-tile[open] .client-tile__chev {
    transform: rotate(180deg); /* points up when open */
    color: var(--primary-600);
}
.client-tile__logo {
    display: block;
    width: 100%;
    max-width: 140px;
    height: 56px;
    object-fit: contain;
    object-position: center;
    margin: 0 auto var(--space-3);
}
/* Tiles whose source logo is white-on-transparent need a dark backdrop just for
 * the logo slot, otherwise it disappears against the card. The MPA brand asset
 * we have is the "Secondary White" version. */
.client-tile--dark-bg .client-tile__logo {
    background: var(--slate-800);
    border-radius: var(--radius-md);
    padding: 6px 10px;
    box-sizing: border-box;
}
/* When the <img> is present, hide the initials mark to avoid duplicating the brand */
.client-tile:has(.client-tile__logo:not([style*="display: none"])) .client-tile__mark {
    display: none;
}

/* Open state: expand to full grid row, reveal study panel */
details.client-tile[open] {
    grid-column: 1 / -1;
    background: var(--bg-elevated);
    border-color: var(--primary-200);
    box-shadow: var(--shadow-md);
}
details.client-tile[open] > summary.client-tile__face {
    border-bottom: 1px solid var(--border-default);
    padding-bottom: var(--space-4);
}
.client-tile__study {
    padding: var(--space-5) var(--space-6) var(--space-6);
    max-width: 800px;
}
.client-tile__study h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-3);
    color: var(--primary-800);
}
[data-theme="dark"] .client-tile__study h3 { color: var(--primary-300); }
.client-tile__study h4 {
    font-size: var(--text-base);
    margin-top: var(--space-4);
    margin-bottom: var(--space-2);
}
.client-tile__study p { margin-bottom: var(--space-3); }
.client-tile__study ul {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-3);
}
.client-tile__study ul li {
    padding-left: var(--space-5);
    position: relative;
    margin-bottom: var(--space-3);
    line-height: var(--leading-relaxed);
}
.client-tile__study ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-500);
}
.client-tile__study-cta { margin-top: var(--space-4); font-weight: var(--weight-medium); }
.client-tile__study-placeholder {
    color: var(--text-secondary);
    font-style: italic;
}

/* ============================================
 * Modal dialog for case-study expansion.
 * The <dialog> element is the modern, accessible way to do this — focus is
 * trapped, ESC dismisses, ::backdrop styles the overlay. The JS in
 * case-studies/index.html copies the study content into this shared dialog.
 * ============================================ */
.client-study-dialog {
    border: none;
    border-radius: var(--radius-xl);
    background: var(--bg-elevated);
    color: var(--text-primary);
    padding: 0;
    margin: auto;                                /* explicit center (UA default, but make it explicit) */
    max-width: 720px;
    width: calc(100% - var(--space-8));
    max-height: calc(100vh - var(--space-12));
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}
.client-study-dialog[open] {
    animation: client-study-pop 240ms cubic-bezier(0.2, 0.9, 0.4, 1.05);
}
.client-study-dialog::backdrop {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
}
.client-study-dialog[open]::backdrop {
    animation: client-study-fade 220ms ease-out;
}
[data-theme="dark"] .client-study-dialog::backdrop { background: rgba(0, 0, 0, 0.75); }

@keyframes client-study-pop {
    from { opacity: 0; transform: scale(0.94) translateY(12px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}
@keyframes client-study-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
/* Honour user's reduced-motion preference (system-level setting) */
@media (prefers-reduced-motion: reduce) {
    .client-study-dialog[open],
    .client-study-dialog[open]::backdrop {
        animation: none;
    }
}

.client-study-dialog__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border-default);
    background: linear-gradient(180deg, var(--primary-50) 0%, var(--bg-elevated) 100%);
}
[data-theme="dark"] .client-study-dialog__header {
    background: linear-gradient(180deg, var(--primary-900) 0%, var(--bg-elevated) 100%);
}
.client-study-dialog__header h2 {
    margin: 0;
    font-size: var(--text-2xl);
    flex: 1 1 auto;
}
.client-study-dialog__logo {
    height: 40px !important;
    width: auto !important;
    max-width: 160px !important;
    margin: 0 !important;
}
.client-study-dialog .client-tile__mark {
    display: flex;
    width: 48px;
    height: 48px;
    margin: 0;
    flex: 0 0 48px;
}
.client-study-dialog__close {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    color: var(--slate-700);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
    z-index: 2;
}
.client-study-dialog__close:hover {
    background: var(--slate-200);
    color: var(--slate-900);
}
[data-theme="dark"] .client-study-dialog__close {
    background: var(--slate-700);
    color: var(--slate-200);
}
[data-theme="dark"] .client-study-dialog__close:hover {
    background: var(--slate-600);
    color: white;
}
.client-study-dialog__body {
    overflow-y: auto;
    max-height: calc(100vh - var(--space-12));
}
.client-study-dialog__body .client-tile__study {
    padding: var(--space-5) var(--space-6) var(--space-6);
    max-width: none;
}

/* Hide the inline-expansion chevron when JS is doing the modal — the dialog
 * has its own close button. The chevron is for the no-JS fallback path. */
@media (any-pointer: fine) {
    /* keep chevron visible on hover-able devices for affordance */
}

.case-study-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
    max-width: 1100px;
    margin: var(--space-8) auto;
    padding: 0 var(--space-4);
}
.case-study-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.case-study-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-500);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}
.case-study-card:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}
.case-study-card__client {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
    margin: var(--space-3) 0 var(--space-2);
}
.case-study-card__outcome {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.55;
    margin-bottom: var(--space-3);
}
.case-study-card__cta {
    color: var(--primary-600);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
}

/* Case-study detail page layout */
.case-study {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-4);
}
.case-study__header {
    text-align: left;
    padding: var(--space-12) 0 var(--space-8);
    border-bottom: 1px solid var(--border-default);
}
.case-study__h1 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    line-height: 1.15;
    margin: var(--space-3) 0 var(--space-3);
}
.case-study__lede {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    max-width: 720px;
}
.case-study__section {
    padding: var(--space-8) 0;
    border-bottom: 1px solid var(--border-default);
}
.case-study__section:last-of-type { border-bottom: none; }
.case-study__section h2 {
    color: var(--primary-700);
    font-size: var(--text-2xl);
    margin-bottom: var(--space-3);
}
.case-study__metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-4);
    margin: var(--space-4) 0;
}
.case-study__metric {
    background: var(--bg-tertiary);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    text-align: center;
}
.case-study__metric-value {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--primary-700);
    margin-bottom: var(--space-2);
}
.case-study__metric-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}
.case-study__stack {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-4);
}
.case-study__stack-item {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    font-family: var(--font-mono);
}
