/* inter-regular - latin */
@font-face {
    font-display: swap;
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    src: url('/assets/fonts/inter-v20-latin-regular.woff2') format('woff2');
}

/* inter-600 - latin */
@font-face {
    font-display: swap;
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    src: url('/assets/fonts/inter-v20-latin-600.woff2') format('woff2');
}

/* inter-800 - latin */
@font-face {
    font-display: swap;
    font-family: 'Inter';
    font-style: normal;
    font-weight: 800;
    src: url('/assets/fonts/inter-v20-latin-800.woff2') format('woff2');
}

:root {
    /* Color */
    --bg-color: #FAFAFA;
    --text-color: #111111;
    --text-strong: #222222;
    --text-secondary: #3f3f3f;
    --text-muted: #5a5a5a;
    --text-subtle: #6f6f6f;
    --link-underline-muted: rgba(17, 17, 17, 0.35);
    --link-underline-mid: rgba(17, 17, 17, 0.55);
    --link-underline-strong: rgba(17, 17, 17, 0.85);

    /* Typography */
    --font-sans: 'Inter', sans-serif;
    --fs-base: 1rem;
    --fs-lead: clamp(1.1rem, 1.03rem + 0.45vw, 1.34rem);
    --fs-display: clamp(2.2rem, 1.32rem + 4.2vw, 4.72rem);
    --fs-h3: clamp(1.18rem, 1.1rem + 0.4vw, 1.38rem);
    --fs-label: 0.82rem;
    --fs-meta: 0.76rem;
    --fs-ui: 0.98rem;
    --fs-brand: clamp(1.1rem, 1.02rem + 0.55vw, 1.34rem);
    --fs-sub-brand: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);

    /* Spacing */
    --space-1: 0.4rem;
    --space-2: 0.7rem;
    --space-3: 1rem;
    --space-4: 1.35rem;
    --space-5: 1.8rem;
    --space-6: 2.4rem;
    --space-7: 3.1rem;
    --space-8: 3.8rem;
    --section-label-gap: 1.45rem;
    --divider-gap: 2.85rem;

    /* Layout & Sizing */
    --max-width: 900px;
    --pad-inline: clamp(1rem, 3.8vw, 2rem);
    --border-strong: 2px;
    --radius-sm: 0.18rem;
    --focus-ring: 3px;
    --cta-height: 3rem;

    /* Component-specific */
    --max-width-reading: 75ch;
    --max-width-reading-person: 82ch;
    --col-label-w-case: 9.5rem;
    --col-label-w-person: 5.8rem;
    /* Mobile intentionally uses slightly more vertical link spacing for readability/tap comfort */
    --footer-link-row-gap-desktop: 0.3rem;
    --footer-link-row-gap-mobile: 0.36rem;
}


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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 1.55;
    font-size: var(--fs-base);
    -webkit-font-smoothing: antialiased;
    padding: 0 var(--pad-inline);
}

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

h1, h2, h3, h4 {
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.16;
    margin-bottom: var(--space-3);
}

p {
    margin-bottom: var(--space-5);
    max-width: 65ch;
}

a {
    color: inherit;
    text-decoration-line: underline;
    text-decoration-color: var(--link-underline-muted);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.14em;
}

a:hover,
a:focus-visible {
    text-decoration-color: var(--link-underline-strong);
}

a:focus-visible {
    outline: var(--focus-ring) solid var(--text-color);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: var(--pad-inline);
    top: 0;
    transform: translateY(-140%);
    background: var(--text-color);
    color: var(--bg-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    z-index: 1000;
}

.skip-link:focus-visible {
    transform: translateY(0.55rem);
    outline-color: var(--bg-color);
}

.divider {
    height: var(--border-strong);
    background-color: var(--text-color);
    width: 100%;
    margin: var(--divider-gap) 0;
    border: none;
}

header {
    margin-bottom: var(--space-7);
}

.brand {
    font-size: var(--fs-brand);
    font-weight: 800;
    letter-spacing: 0.015em;
    line-height: 1;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.06rem;
    color: var(--text-color);
    text-decoration: none;
}

.sub-brand {
    font-size: var(--fs-label);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0.01em;
    color: var(--text-muted);
    display: block;
    white-space: nowrap;
    max-width: 100%;
}

.hero-statement {
    font-size: var(--fs-display);
    font-weight: 800;
    line-height: 1.14;
    margin-bottom: var(--space-5);
    letter-spacing: -0.028em;
    text-wrap: balance;
}

/* Erste Hero-Zeile bleibt eine Zeile; Schrift skaliert auf schmalen Screens nach */
.hero-line1 {
    white-space: nowrap;
}

.hero-statement br {
    display: block;
    margin-top: 0.3em;
}

.hero-sub {
    font-size: var(--fs-lead);
    color: var(--text-strong);
    line-height: 1.56;
    max-width: min(88%, 66ch);
    margin-bottom: var(--space-4);
}

.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
}

.cta-primary,
.cta-secondary {
    font-size: var(--fs-base);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--cta-height);
    padding: 0.64rem 1.05rem;
    border-radius: var(--radius-sm);
    border: var(--border-strong) solid var(--text-color);
    transition: background-color 140ms ease, color 140ms ease;
}

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

.cta-secondary {
    background-color: transparent;
    color: var(--text-color);
}

.cta-primary:hover,
.cta-primary:focus-visible {
    background-color: var(--bg-color);
    color: var(--text-color);
    text-decoration: none;
}

.cta-secondary:hover,
.cta-secondary:focus-visible {
    background-color: var(--text-color);
    color: var(--bg-color);
    text-decoration: none;
}

.cta-note {
    margin-top: var(--space-2);
    margin-bottom: 0;
    color: var(--text-muted);
    font-size: 0.98rem;
    max-width: 60ch;
}

.section-label {
    font-size: var(--fs-label);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: var(--section-label-gap);
    display: block;
}

.pillars {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-5);
    margin-top: 0;
}

.pillar h3 {
    font-size: clamp(1.06rem, 1.02rem + 0.28vw, 1.2rem);
    margin-bottom: var(--space-2);
    white-space: nowrap;
}

.pillar p {
    font-size: var(--fs-base);
    color: var(--text-secondary);
    line-height: 1.62;
}

.case-study {
    margin-bottom: var(--space-6);
    padding-top: var(--space-4);
    border-top: 1px solid rgba(17, 17, 17, 0.14);
}

#referenzen .case-study:first-of-type {
    border-top: none;
    padding-top: 0;
}

.case-study h3 {
    font-size: var(--fs-h3);
    margin-bottom: var(--space-2);
}

.case-meta {
    display: grid;
    grid-template-columns: var(--col-label-w-case) 1fr;
    gap: 0.35rem var(--space-2);
    margin-bottom: var(--space-3);
    font-size: var(--fs-base);
    line-height: 1.58;
}

.case-label {
    font-weight: 600;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.035em;
    color: var(--text-subtle);
    padding-top: 0;
}

footer {
    margin-top: var(--space-4);
    padding-bottom: var(--space-6);
    font-size: var(--fs-base);
    color: var(--text-muted);
}

.site-footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-4) var(--space-5);
    margin-bottom: var(--space-6);
}

.footer-block {
    min-width: 0;
}

.footer-label {
    margin: 0 0 var(--space-2);
    font-size: var(--fs-meta);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-subtle);
}

.footer-text {
    margin: 0;
    font-size: var(--fs-ui);
    line-height: 1.58;
    color: var(--text-secondary);
}

.footer-block a {
    display: block;
    width: fit-content;
    color: var(--text-secondary);
    font-size: var(--fs-ui);
    line-height: 1.45;
    text-decoration-line: underline;
    text-decoration-color: var(--link-underline-muted);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.14em;
}

.footer-block a:hover,
.footer-block a:focus-visible {
    color: var(--text-color);
    text-decoration-color: var(--link-underline-strong);
}

.footer-links a,
.footer-links .footer-current,
.footer-contact a {
    display: block;
    width: fit-content;
    margin-bottom: var(--footer-link-row-gap-desktop);
    font-size: var(--fs-ui);
    line-height: 1.45;
}

.footer-links > :last-child,
.footer-contact > :last-child {
    margin-bottom: 0;
}

.footer-links .footer-current {
    color: var(--text-color);
}

.site-footer-note {
    margin: 0;
    color: var(--text-muted);
    font-size: var(--fs-base);
    line-height: 1.45;
}

.legal-content header {
    margin-bottom: var(--space-5);
}

.legal-content h1 {
    font-size: clamp(1.85rem, 1.55rem + 1.2vw, 2.45rem);
    line-height: 1.18;
    margin-top: var(--space-7);
    margin-bottom: 0;
}

.reading-content {
    width: min(100%, var(--max-width-reading));
}

.person-content .reading-content {
    width: min(100%, var(--max-width-reading-person));
}

.person-name {
    margin-top: var(--space-2);
    margin-bottom: 0;
    font-size: var(--fs-lead);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0;
    color: var(--text-muted);
}

.person-content .legal-section p {
    max-width: 72ch;
}

.person-links {
    display: grid;
    gap: var(--space-2);
    margin-top: var(--space-3);
    max-width: 34rem;
}

.person-links a {
    display: grid;
    grid-template-columns: var(--col-label-w-person) 1fr;
    align-items: center;
    gap: var(--space-2);
    width: fit-content;
    text-decoration: none;
    color: var(--text-secondary);
}

.person-links a span {
    font-size: var(--fs-meta);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-subtle);
}

.person-links a strong {
    font-size: var(--fs-ui);
    font-weight: 400;
    text-decoration-line: underline;
    text-decoration-color: var(--link-underline-muted);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.14em;
}

.person-links a:hover,
.person-links a:focus-visible {
    color: var(--text-color);
}

.person-links a:hover strong,
.person-links a:focus-visible strong {
    text-decoration-color: var(--link-underline-strong);
}

.legal-section {
    margin-bottom: var(--space-5);
}

.legal-section h2 {
    font-size: var(--fs-h3);
    letter-spacing: -0.01em;
    margin-bottom: var(--space-2);
}

.legal-section p,
.legal-section li {
    font-size: var(--fs-base);
    color: var(--text-secondary);
    line-height: 1.62;
}

.legal-section ul {
    padding-left: 1.2rem;
    margin-bottom: var(--space-3);
}

/* 404 / error (matches site typography) */
.error-page-main {
    padding-top: var(--space-1);
}

.error-code {
    font-size: clamp(3.2rem, 13.5vw, 5.5rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-4);
    color: var(--text-color);
}

.error-heading {
    font-size: clamp(1.45rem, 1.22rem + 1.18vw, 1.95rem);
    font-weight: 800;
    line-height: 1.16;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-3);
    max-width: 22ch;
}

.error-copy {
    color: var(--text-secondary);
    max-width: 52ch;
    margin-bottom: var(--space-5);
    line-height: 1.58;
}

/* Tablet landscape and below */
@media (max-width: 900px) {
    .hero-cta-group {
        gap: 0.65rem;
    }

    .pillars {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .pillar h3 {
        white-space: normal;
    }

    .divider {
        margin: var(--space-6) 0;
    }

    header {
        margin-bottom: var(--space-6);
    }

    .hero-sub {
        max-width: 100%;
    }

    .site-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Tablet portrait and below */
@media (max-width: 768px) {
    .container {
        padding-top: var(--space-7);
        padding-bottom: var(--space-7);
    }

    .case-meta {
        grid-template-columns: 1fr;
        gap: 0.1rem;
    }

    .case-label {
        margin-top: var(--space-1);
        color: var(--text-subtle);
        font-size: 0.8rem;
    }
}

/* Mobile layout */
@media (max-width: 640px) {
    .hero-statement {
        font-size: clamp(1.86rem, 1.3rem + 2.8vw, 2.55rem);
        line-height: 1.16;
        margin-bottom: var(--space-4);
    }

    .hero-statement br {
        margin-top: 0.25em;
    }

    .container {
        padding-top: var(--space-6);
        padding-bottom: var(--space-6);
    }

    .divider {
        margin: var(--space-6) 0;
    }

    header {
        margin-bottom: var(--space-5);
    }

    .sub-brand {
        white-space: normal;
    }

    .hero-cta-group {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }

    .cta-primary,
    .cta-secondary {
        width: min(100%, 19.5rem);
        max-width: 100%;
    }

    .legal-content h1 {
        font-size: clamp(1.65rem, 1.3rem + 1.7vw, 2rem);
        margin-top: var(--space-5);
    }

    .person-links a {
        grid-template-columns: 1fr;
        gap: var(--space-1);
    }

    .site-footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
        margin-bottom: var(--space-5);
    }

    .footer-links a,
    .footer-links .footer-current,
    .footer-contact a {
        margin-bottom: var(--footer-link-row-gap-mobile);
    }
}

/* Very small mobile fallback */
@media (max-width: 430px) {
    .hero-line1 {
        white-space: normal;
    }

}
