/* Accessible Brutalism Design System */
:root {
    /* Color Palette - Warm, Earthy, Human */
    --terra-cotta: #C7624F;
    --burnt-sienna: #8B4A3C;
    --deep-forest: #2C5F4F;
    --warm-cream: #FAF7F2;
    --stone-100: #F5F2ED;
    --stone-200: #E8E3DA;
    --stone-300: #D4CFC4;
    --stone-400: #B8B1A3;
    --stone-500: #8B8577;
    --stone-600: #68635A;
    --stone-700: #4A4641;
    --stone-800: #2E2B27;
    --stone-900: #1A1816;
    --charcoal: #0F0E0D;
    --pure-white: #FFFFFF;

    /* Spacing - More generous, editorial scale */
    --space-1: 0.25rem;    /* 4px */
    --space-2: 0.5rem;     /* 8px */
    --space-3: 0.75rem;    /* 12px */
    --space-4: 1rem;       /* 16px */
    --space-5: 1.5rem;     /* 24px */
    --space-6: 2rem;       /* 32px */
    --space-8: 3rem;       /* 48px */
    --space-10: 4rem;      /* 64px */
    --space-12: 5rem;      /* 80px */
    --space-16: 7rem;      /* 112px */
    --space-20: 10rem;     /* 160px */
    --space-24: 12rem;     /* 192px */

    /* Typography - Fraunces + Inter + IBM Plex Mono */
    --font-display: 'Fraunces', 'Georgia', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

    /* Type Scale - Dramatic shifts */
    --text-xs: 0.6875rem;   /* 11px */
    --text-sm: 0.8125rem;   /* 13px */
    --text-base: 0.9375rem; /* 15px */
    --text-lg: 1.0625rem;   /* 17px */
    --text-xl: 1.25rem;     /* 20px */
    --text-2xl: 1.625rem;   /* 26px */
    --text-3xl: 2.125rem;   /* 34px */
    --text-4xl: 2.875rem;   /* 46px */
    --text-5xl: 3.75rem;    /* 60px */
    --text-6xl: 5rem;       /* 80px */
    --text-7xl: 6.5rem;     /* 104px */

    /* Font Weights */
    --weight-light: 300;
    --weight-regular: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;
    --weight-black: 900;

    /* Line Heights */
    --leading-tight: 1.1;
    --leading-snug: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.7;
    --leading-loose: 1.9;

    /* Letter Spacing */
    --tracking-tight: -0.02em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.1em;

    /* Border Radius - Minimal, architectural */
    --radius-sm: 0.125rem;
    --radius-md: 0.25rem;
    --radius-lg: 0.375rem;
    --radius-xl: 0.5rem;

    /* Shadows - Subtle, layered */
    --shadow-sm: 0 1px 3px rgba(26, 24, 22, 0.08);
    --shadow-md: 0 4px 12px rgba(26, 24, 22, 0.1);
    --shadow-lg: 0 12px 32px rgba(26, 24, 22, 0.12);

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--stone-900);
    background: var(--warm-cream);
    line-height: var(--leading-normal);
    font-weight: var(--weight-regular);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: var(--tracking-normal);
}

/* Selection styling */
::selection {
    background: var(--terra-cotta);
    color: var(--pure-white);
}

/* Navigation - Minimal, confident */
.navigation {
    background: var(--warm-cream);
    border-bottom: 2px solid var(--stone-900);
    padding: var(--space-4) var(--space-6);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background: rgba(250, 247, 242, 0.95);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--weight-black);
    color: var(--charcoal);
    text-decoration: none;
    letter-spacing: var(--tracking-tight);
    transition: color 0.3s var(--ease-out);
}

.nav-logo:hover {
    color: var(--terra-cotta);
}

.nav-button {
    background: transparent;
    color: var(--charcoal);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    transition: all 0.3s var(--ease-out);
    border: 2px solid var(--charcoal);
}

.nav-button:hover {
    background: var(--charcoal);
    color: var(--warm-cream);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Container - More generous */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container-medium {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container-narrow {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* Section - Editorial pacing */
.section {
    padding: var(--space-8) 0;
}

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

/* Button - Strong, confident CTA */
.button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-5) var(--space-8);
    background: var(--charcoal);
    color: var(--warm-cream);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    font-family: var(--font-body);
    border: 2px solid var(--charcoal);
    transition: all 0.3s var(--ease-out);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--terra-cotta);
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease-out);
    z-index: -1;
}

.button:hover {
    border-color: var(--terra-cotta);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.button:hover::before {
    transform: translateX(0);
}

/* Headings - Prose defaults (legal, rich-text, general content) */
h2 {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-snug);
    color: var(--charcoal);
    margin-top: var(--space-8);
    margin-bottom: var(--space-5);
}

h3 {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-snug);
    color: var(--stone-800);
    margin-top: var(--space-6);
    margin-bottom: var(--space-4);
}

/* Landing page section headings - dramatic scale */
.section h2 {
    font-size: clamp(2.125rem, 4vw, 3.75rem);
    font-weight: var(--weight-black);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    margin-top: 0;
    margin-bottom: var(--space-6);
}

.section h3 {
    font-family: var(--font-display);
    font-size: clamp(1.625rem, 3vw, 2.125rem);
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-tight);
    color: var(--stone-900);
}

/* Rich text inside sections stays at prose scale */
.rich-text h2 {
    font-size: var(--text-2xl);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-normal);
    margin-top: var(--space-8);
    margin-bottom: var(--space-5);
}

.rich-text h3 {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-normal);
    color: var(--stone-800);
    margin-top: var(--space-6);
    margin-bottom: var(--space-4);
}

h4 {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-snug);
    color: var(--stone-900);
    margin-bottom: var(--space-2);
}

/* Text utilities */
.text-muted {
    color: var(--stone-600);
    font-size: var(--text-sm);
}

.text-lead {
    font-size: var(--text-xl);
    color: var(--stone-700);
    line-height: var(--leading-relaxed);
    font-weight: var(--weight-regular);
}

.text-uppercase {
    text-transform: uppercase;
    letter-spacing: var(--tracking-widest);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
}

/* Section dividers - Bold architectural lines */
.section-border {
    border-top: 3px solid var(--stone-900);
    margin-top: 0;
    padding-top: var(--space-8);
    position: relative;
}

.section-border::before {
    content: '';
    position: absolute;
    top: -6px;
    width: 120px;
    height: 3px;
    background: var(--terra-cotta);
}

/* Hide the divider bar when there's nothing above to separate from */
.navigation + .section .section-border,
.hero + .section .section-border {
    border-top: none;
    padding-top: 0;
}

.navigation + .section .section-border::before,
.hero + .section .section-border::before {
    display: none;
}

/* Card - Clean, elevated */
.card {
    background: var(--pure-white);
    border: 2px solid var(--stone-200);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s var(--ease-out);
}

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

.card-cta {
    text-align: center;
    padding: var(--space-16) var(--space-8);
    background: var(--stone-100);
    border: 3px solid var(--charcoal);
}

.card-cta h2 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-8);
}

/* LinkedIn icon */
.linkedin-icon {
    width: 24px;
    height: 24px;
    opacity: 0.5;
    transition: all 0.3s var(--ease-out);
}

.linkedin-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Team Section - Editorial, asymmetric */
.team-container {
    display: flex;
    justify-content: center;
    margin-top: var(--space-12);
}

.team-photo {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 4px solid var(--stone-200);
    transition: all 0.3s var(--ease-out);
}

.team-photo:hover {
    border-color: var(--terra-cotta);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 0 0 4px rgba(199, 98, 79, 0.1);
}

/* Footer - Minimal, refined */
.footer {
    margin-top: var(--space-16);
    padding: var(--space-10) 0;
    border-top: 3px solid var(--stone-900);
    text-align: center;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 3px;
    background: var(--terra-cotta);
}

.footer-text {
    color: var(--stone-600);
    font-size: var(--text-sm);
    font-family: var(--font-mono);
    letter-spacing: var(--tracking-wide);
}

.footer-links {
    margin-bottom: var(--space-5);
}

.footer-links a {
    color: var(--stone-600);
    text-decoration: none;
    font-size: var(--text-sm);
    margin: 0 var(--space-4);
    font-family: var(--font-mono);
    letter-spacing: var(--tracking-wide);
    transition: color 0.2s ease;
}

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

/* Hero with image - side by side layout */
.hero-content--with-image {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
    align-items: center;
    max-width: 1280px;
}

.hero-media {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--stone-200);
}

/* Logo Bar */
.logo-bar {
    padding-top: var(--space-8);
    padding-bottom: var(--space-8);
    text-align: center;
}

.logo-bar-label {
    margin-bottom: var(--space-4);
}

.logo-bar-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-16);
    flex-wrap: wrap;
}

.logo-bar-img {
    height: 36px;
    width: auto;
}

/* Feature Columns */
.feature-columns-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.feature-columns-header .text-uppercase {
    margin-bottom: var(--space-3);
}

.feature-columns {
    display: grid;
    grid-template-columns: repeat(var(--col-count, 3), 1fr);
    gap: var(--space-6);
}

.feature-column {
    background: var(--pure-white);
    border: 2px solid var(--stone-200);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s var(--ease-out);
    text-align: center;
}

.feature-column:hover {
    border-color: var(--stone-400);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature-column-number {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--charcoal);
    color: var(--warm-cream);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--weight-black);
    margin-bottom: var(--space-4);
    transition: background 0.3s var(--ease-out);
}

.feature-column:hover .feature-column-number {
    background: var(--terra-cotta);
}

.feature-column p {
    color: var(--stone-700);
    line-height: var(--leading-relaxed);
}

/* Full Width Image */
.full-width-image {
    margin: 0;
}

.full-width-image-img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--stone-200);
}

.full-width-image-caption {
    margin-top: var(--space-4);
    text-align: center;
    font-style: italic;
}

/* Testimonial — tighter vertical rhythm when stacked */
.testimonial {
    border: none;
    margin: 0;
    padding: var(--space-6) 0;
    text-align: center;
}

.container-narrow + .container-narrow .testimonial {
    border-top: 1px solid var(--stone-200);
}

.testimonial-quote {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.5vw, 1.625rem);
    font-weight: var(--weight-regular);
    font-style: italic;
    line-height: var(--leading-relaxed);
    color: var(--stone-800);
    margin-bottom: var(--space-6);
}

.testimonial-attribution {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
}

.testimonial-photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--stone-200);
}

.testimonial-name {
    font-style: normal;
    font-weight: var(--weight-semibold);
    color: var(--stone-900);
    display: block;
}

.testimonial-role {
    color: var(--stone-600);
    font-size: var(--text-sm);
    font-family: var(--font-mono);
    letter-spacing: var(--tracking-wide);
}

/* Rich text content styling */
.rich-text p {
    color: var(--stone-700);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
}

.rich-text a {
    color: var(--terra-cotta);
    text-decoration: underline;
}

.rich-text a:hover {
    color: var(--burnt-sienna);
}

.rich-text ul, .rich-text ol {
    padding-left: var(--space-6);
    margin-bottom: var(--space-4);
    color: var(--stone-700);
    line-height: var(--leading-relaxed);
}

.rich-text li {
    margin-bottom: var(--space-2);
}

.rich-text li::marker {
    color: var(--terra-cotta);
}

/* Hero for Wagtail pages */
.hero {
    padding: var(--space-12) var(--space-6) var(--space-8);
    position: relative;
    overflow: hidden;
    min-height: 40vh;
    display: flex;
    align-items: center;
}

.hero-background {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, var(--stone-100) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(199, 98, 79, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 1120px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.75rem);
    font-weight: var(--weight-black);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--charcoal);
    margin-bottom: var(--space-5);
    max-width: 880px;
    font-optical-sizing: auto;
}

.hero-description {
    font-size: var(--text-lg);
    color: var(--stone-700);
    line-height: var(--leading-relaxed);
    max-width: 640px;
    margin-bottom: var(--space-6);
    font-weight: var(--weight-regular);
}

.hero-cta {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}

/* Stats Bar */
.stats-bar {
    border-top: 2px solid var(--stone-200);
    border-bottom: 2px solid var(--stone-200);
    background: var(--stone-100);
}

.stats-bar-row {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: var(--space-12);
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    text-align: center;
}

.stat-value {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: var(--weight-black);
    line-height: var(--leading-tight);
    color: var(--charcoal);
}

.stat-label {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--stone-600);
    letter-spacing: var(--tracking-wide);
}

/* FAQ */
.faq-heading {
    font-size: var(--text-3xl);
    max-width: 720px;
}

.faq-list {
    max-width: 720px;
}

.faq-item {
    border-bottom: 1px solid var(--stone-200);
}

.faq-item summary {
    padding: var(--space-5) 0;
    font-weight: var(--weight-semibold);
    font-size: var(--text-lg);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    font-family: var(--font-mono);
    font-size: var(--text-xl);
    font-weight: var(--weight-regular);
    color: var(--stone-500);
    flex-shrink: 0;
    transition: transform 0.2s var(--ease-out);
}

.faq-item[open] summary::after {
    content: "−";
    color: var(--terra-cotta);
}

.faq-answer {
    padding-bottom: var(--space-5);
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding: var(--space-16) var(--space-5) var(--space-12);
    }

    .hero-content--with-image {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .hero h1 {
        font-size: clamp(2.125rem, 8vw, 2.875rem);
        margin-bottom: var(--space-6);
    }

    .hero-description {
        font-size: var(--text-lg);
        margin-bottom: var(--space-8);
    }

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

    .card-cta {
        padding: var(--space-12) var(--space-6);
    }

    .logo-bar-logos {
        gap: var(--space-8);
    }

    .feature-columns {
        grid-template-columns: 1fr;
    }

    .stats-bar-row {
        gap: var(--space-8);
    }

    .stat-value {
        font-size: var(--text-3xl);
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 var(--space-4);
    }

    .nav-logo {
        font-size: var(--text-xl);
    }

    .nav-button {
        padding: var(--space-2) var(--space-4);
        font-size: var(--text-xs);
    }

    .button {
        padding: var(--space-4) var(--space-6);
        font-size: var(--text-base);
    }

    .container,
    .container-medium,
    .container-narrow {
        padding: 0 var(--space-4);
    }

    h2 {
        font-size: clamp(1.875rem, 6vw, 2.125rem);
    }
}
