/* ─── Design Tokens ─────────────────────────────────────────────────────── */

:root {
    --black:      #1d1d1b;
    --white:      #ffffff;
    --accent:     #e0e0e0;
    --gray-100:   #f7f7f7;
    --gray-200:   #e8e8e8;
    --gray-400:   #aaaaaa;
    --gray-600:   #555555;

    --font:         -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-body:    'Crimson Text', Georgia, serif;

    --container-width: 1100px;
    --container-pad:   clamp(1.25rem, 5vw, 3rem);

    --nav-height: 4rem;
}

/* ─── Reset ─────────────────────────────────────────────────────────────── */

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

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

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

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

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

/* ─── Scroll Offset for Fixed Nav ──────────────────────────────────────── */

[id] {
    scroll-margin-top: calc(var(--nav-height) + 1rem);
}

#hero {
    scroll-margin-top: 0;
}

/* ─── Container ─────────────────────────────────────────────────────────── */

.container {
    width: 100%;
    max-width: var(--container-width);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

/* ─── Navigation ────────────────────────────────────────────────────────── */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--black);
    border-bottom: 1px solid rgba(224, 224, 224, 0.1);
}

.navbar {
    height: var(--nav-height);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    transition: opacity 120ms ease;
}

.navbar-brand:hover { opacity: 0.8; }

.brand-code {
    display: inline-block;
    background: var(--accent);
    color: var(--black);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.2em 0.5em;
    border-radius: 3px;
    line-height: 1.3;
}

.brand-black {
    font-family: 'Crimson Text', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.06em;
    line-height: 1;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    gap: 1.75rem;
}

.nav-links a {
    font-size: 0.8125rem;
    letter-spacing: 0.05em;
    color: var(--gray-400);
    text-transform: uppercase;
    transition: color 120ms ease;
}

.nav-links a:hover { color: var(--white); }

.lang-switch {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--gray-400);
    text-transform: uppercase;
    border: 1px solid rgba(224, 224, 224, 0.2);
    padding: 0.25rem 0.625rem;
    border-radius: 3px;
    transition: color 120ms ease, border-color 120ms ease;
}

.lang-switch:hover {
    color: var(--white);
    border-color: var(--accent);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 110;
}

.menu-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--white);
    transition: transform 200ms ease, opacity 200ms ease;
}

.menu-toggle[aria-expanded="true"] .menu-bar:first-child {
    transform: translateY(3.5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-bar:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
}

/* ─── Hero ──────────────────────────────────────────────────────────────── */

.section-hero {
    background: var(--black);
    color: var(--white);
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding-block: calc(var(--nav-height) + 4rem) 6rem;
}

.section-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.025em;
    max-width: 18ch;
    margin-bottom: 1.5rem;
}

.section-hero .lead {
    font-family: var(--font-body);
    font-size: clamp(1.0625rem, 2vw, 1.3125rem);
    color: rgba(255, 255, 255, 0.7);
    max-width: 52ch;
    margin-bottom: 2.5rem;
}

.hero-proof {
    font-size: 0.8125rem;
    letter-spacing: 0.06em;
    color: var(--gray-600);
    margin-top: 2.5rem;
}

/* ─── Hero Actions ─────────────────────────────────────────────────────── */

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

/* ─── Buttons ───────────────────────────────────────────────────────────── */

.btn-primary {
    display: inline-block;
    background: var(--white);
    color: var(--black);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.875rem 2rem;
    border-radius: 3px;
    transition: opacity 120ms ease;
}

.btn-primary:hover { opacity: 0.85; }

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.875rem 2rem;
    border-radius: 3px;
    transition: border-color 120ms ease;
}

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

/* ─── Section Shared ────────────────────────────────────────────────────── */

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.75vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 2.5rem;
    height: 2px;
    background: var(--accent);
}

/* ─── Section Icons ────────────────────────────────────────────────────── */

.service-icon,
.expertise-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--black);
}

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

.expertise-icon {
    color: var(--accent);
}

/* ─── Services ──────────────────────────────────────────────────────────── */

.section-services {
    background: var(--white);
    padding-block: 6rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 2px;
    background: var(--accent);
    border: 2px solid var(--accent);
}

.service-card {
    background: var(--white);
    padding: 2.75rem;
}

.service-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

.service-card p {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--gray-600);
    line-height: 1.7;
}

/* ─── Expertise ─────────────────────────────────────────────────────────── */

.section-expertise {
    background: var(--black);
    color: var(--white);
    padding-block: 6rem;
}

.section-expertise .section-title {
    color: var(--white);
}

.expertise-intro {
    font-family: var(--font-body);
    font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
    color: var(--gray-400);
    max-width: 52ch;
    margin-bottom: 3rem;
}

.expertise-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 3rem 3.5rem;
}

.expertise-group h3 {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 1rem;
}

.expertise-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.expertise-tag {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--accent);
    border: 1px solid rgba(224, 224, 224, 0.2);
    background: rgba(224, 224, 224, 0.06);
    padding: 0.375rem 0.75rem;
    border-radius: 3px;
}

/* ─── About ─────────────────────────────────────────────────────────────── */

.section-about {
    background: var(--white);
    padding-block: 6rem;
}

.about-quote {
    font-family: var(--font-body);
    font-size: clamp(1.625rem, 3.5vw, 2.375rem);
    line-height: 1.45;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--black);
    max-width: 36ch;
    margin-bottom: 3rem;
    padding-left: 2rem;
    border-left: 4px solid var(--accent);
}

.about-content {
    max-width: 52ch;
}

.about-body {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.about-body:last-child {
    margin-bottom: 0;
}

.about-free {
    font-weight: 600;
    color: var(--black);
}

/* ─── Contact ───────────────────────────────────────────────────────────── */

.section-contact {
    background: var(--black);
    color: var(--white);
    padding-block: 6rem;
}

.section-contact .section-title { color: var(--white); }

.contact-intro {
    font-family: var(--font-body);
    font-size: 1.125rem;
    color: var(--gray-400);
    max-width: 48ch;
    margin-bottom: 1.25rem;
}

.contact-email {
    display: block;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--white);
    margin-bottom: 2rem;
}

.contact-email:hover {
    color: var(--gray-400);
}

.contact-free {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    color: var(--white);
    line-height: 1.7;
    max-width: 48ch;
    padding-left: 1.25rem;
    border-left: 2px solid var(--accent);
    margin-bottom: 2.5rem;
}

.contact-hint {
    font-size: 0.8125rem;
    color: var(--gray-600);
    margin-top: 1.5rem;
}

/* ─── Footer ────────────────────────────────────────────────────────────── */

.site-footer {
    background: #141413;
    border-top: 1px solid rgba(224, 224, 224, 0.1);
    padding-block: 1.75rem;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.site-footer p,
.site-footer a {
    font-size: 0.8125rem;
    color: var(--gray-600);
}

.site-footer a:hover { color: var(--gray-400); }

/* ─── Legal pages (Imprint, Privacy) ───────────────────────────────────── */

.section-legal {
    padding-block: calc(var(--nav-height) + 4rem) 6rem;
    min-height: 100vh;
    min-height: 100svh;
}

.section-legal h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 2.5rem;
}

.section-legal h2 {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-top: 3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.section-legal h3 {
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.section-legal h4 {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 700;
    margin-top: 1.25rem;
    margin-bottom: 0.375rem;
    color: var(--gray-600);
}

.section-legal p {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--gray-600);
    line-height: 1.7;
    max-width: 72ch;
    margin-bottom: 0.875rem;
}

.section-legal ul {
    font-family: var(--font-body);
    list-style: disc;
    padding-left: 1.5rem;
    max-width: 72ch;
    margin-bottom: 0.875rem;
}

.section-legal li {
    font-size: 1rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.section-legal a {
    text-decoration: underline;
    word-break: break-word;
}

.legal-note {
    font-size: 0.8125rem !important;
    color: var(--gray-400) !important;
    margin-top: -2rem !important;
    margin-bottom: 2rem !important;
}

.footer-links {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

/* ─── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
    .menu-toggle {
        display: flex;
    }

    .navbar-right {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--black);
        border-bottom: 1px solid rgba(224, 224, 224, 0.1);
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem var(--container-pad) 2rem;
        gap: 1.25rem;
        display: none;
    }

    .navbar-right.is-open {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links a {
        font-size: 0.9375rem;
    }

    .section-hero {
        padding-block: calc(var(--nav-height) + 2.5rem) 4rem;
    }

    .section-services,
    .section-expertise,
    .section-about,
    .section-contact {
        padding-block: 4rem;
    }

    /* Tighter section title spacing */
    .section-title {
        margin-bottom: 1.75rem;
        padding-bottom: 0.875rem;
    }

    /* Slightly smaller icons on mobile */
    .service-icon,
    .expertise-icon {
        width: 2.25rem;
        height: 2.25rem;
        margin-bottom: 1.25rem;
    }

    /* Reduce card padding */
    .service-card {
        padding: 1.5rem;
    }

    /* Full-width hero buttons for better touch targets */
    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        width: 100%;
        text-align: center;
        padding: 1rem 2rem;
    }

    /* Tighter expertise spacing */
    .expertise-groups {
        gap: 2.5rem;
    }

    /* Ensure contact email is readable */
    .contact-email {
        font-size: 1.25rem;
        word-break: break-all;
    }
}
