/* ============================================================
   KfA – Kanzlei für Alle
   CSS – Desktop-first | Vanilla CSS | Katja Dickels
   Fonts: Cormorant Garamond (Display) + Inter (Body)
   Palette: Navy #1b2a4a | Gold #c9a86c | Warm White #f9f7f3
   ============================================================ */

/* ── LOCAL FONTS ────────────────────────────────────────────── */
/* woff2-Dateien in templates/fonts/ ablegen.
   Cormorant Garamond: https://fonts.google.com/specimen/Cormorant+Garamond
   Inter: https://fonts.google.com/specimen/Inter
   Download via fontsource oder google-webfonts-helper.herokuapp.com */

@font-face {
    font-family: 'Cormorant Garamond';
    src: url('../fonts/cormorant-garamond-300.woff2') format('woff2');
    font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Cormorant Garamond';
    src: url('../fonts/cormorant-garamond-300-italic.woff2') format('woff2');
    font-weight: 300; font-style: italic; font-display: swap;
}
@font-face {
    font-family: 'Cormorant Garamond';
    src: url('../fonts/cormorant-garamond-400.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Cormorant Garamond';
    src: url('../fonts/cormorant-garamond-600.woff2') format('woff2');
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-400.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-500.woff2') format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-600.woff2') format('woff2');
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-700.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
}

/* ── VARIABLEN ──────────────────────────────────────────────── */
:root {
    /* Farben */
    --color-primary:     #1b2a4a;
    --color-gold:        #c9a86c;
    --color-gold-dark:   #8b6914;
    --color-bg:          #ffffff;
    --color-bg-alt:      #f9f7f3;
    --color-bg-dark:     #1b2a4a;
    --color-text:        #1a1a1a;
    --color-text-muted:  #5a5a5a;
    --color-text-light:  #ffffff;
    --color-border:      #e5e0d8;

    /* Typografie */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body:    'Inter', system-ui, sans-serif;

    /* Abstände */
    --space-xs:  0.5rem;
    --space-sm:  1rem;
    --space-md:  2rem;
    --space-lg:  5rem;
    --space-xl:  9rem;

    /* Layout */
    --wrapper-max:     80rem;
    --wrapper-padding: 1.5rem;
    --header-height:   5rem;

    /* Transitions */
    --transition:      0.3s ease;
    --transition-slow: 0.5s ease;
}

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

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

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

img, video { max-width: 100%; height: auto; display: block; }

/* ── TYPOGRAFIE ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.2;
    color: var(--color-primary);
    margin-top: 0;
    margin-bottom: 0.72em;
}

h1 { font-size: clamp(2.25rem, 5vw, 4rem);    font-weight: 300; }
h2 { font-size: clamp(1.75rem, 3vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p, nav, button, input, textarea, select { font-family: var(--font-body); }

p {
    font-size: 1.0625rem;
    line-height: 1.8;
    margin-block-start: 0;
    margin-block-end: 1em;
}
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
li { font-size: 1.0625rem; line-height: 1.75; margin-bottom: 0.4rem; }

a { color: var(--color-primary); transition: color var(--transition); }
a:hover { color: var(--color-gold-dark); }

/* ── FOKUS (WCAG AA 2.4.11) ─────────────────────────────────── */
:focus-visible {
    outline: 3px solid var(--color-gold-dark);
    outline-offset: 3px;
    border-radius: 2px;
}

/* br-Spacing (CMS-Redakteur-Freundlichkeit) */
br { display: block; margin-bottom: 0.5em; }

/* ── LAYOUT ─────────────────────────────────────────────────── */
.wrapper {
    max-width: var(--wrapper-max);
    margin: 0 auto;
    padding: 0 var(--wrapper-padding);
}

.section { padding: var(--space-lg) 0; }
.section-alt  { background-color: var(--color-bg-alt); }
.section-dark { background-color: var(--color-bg-dark); color: var(--color-text-light); }
.section-dark h1,
.section-dark h2,
.section-dark h3 { color: var(--color-text-light); }
.section-dark p   { color: rgba(255,255,255,0.85); }

/* ── BUTTONS ────────────────────────────────────────────────── */
a.primary, button.primary,
a.secondary, button.secondary {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all var(--transition);
    text-align: center;
    line-height: 1.4;
}

a.primary, button.primary {
    background-color: var(--color-gold);
    color: var(--color-primary);
    border-color: var(--color-gold);
}
a.primary:hover, button.primary:hover {
    background-color: transparent;
    color: var(--color-gold);
}

a.secondary, button.secondary {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}
a.secondary:hover, button.secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}

.section-dark a.secondary {
    color: var(--color-text-light);
    border-color: rgba(255,255,255,0.5);
}
.section-dark a.secondary:hover {
    background-color: rgba(255,255,255,0.12);
    border-color: var(--color-text-light);
}

/* ── SKIP LINK ──────────────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    padding: 0.5rem 1rem;
    background: var(--color-primary);
    color: var(--color-text-light);
    font-size: 0.875rem;
    z-index: 9999;
    transition: top var(--transition);
    text-decoration: none;
    border-radius: 0 0 3px 3px;
}
.skip-link:focus { top: 0; color: var(--color-text-light); }

/* ── HEADER ─────────────────────────────────────────────────── */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-height);
    background-color: transparent;
    border-bottom: 1px solid transparent;
    z-index: 100;
    transition: background-color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.header.scrolled {
    background-color: var(--color-bg);
    border-bottom-color: var(--color-border);
    box-shadow: 0 2px 16px rgba(27,42,74,0.08);
}

.is-subpage .header {
    background-color: var(--color-bg);
    border-bottom-color: var(--color-border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.site-logo { text-decoration: none; flex-shrink: 0; }
.site-logo img { height: 48px; width: auto; max-width: none; align-self: flex-start; }
.site-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-text-light);
    letter-spacing: 0.04em;
    transition: color var(--transition);
}
.is-subpage .site-name, .header.scrolled .site-name { color: var(--color-primary); }

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* ── DESKTOP-NAVIGATION ─────────────────────────────────────── */
.nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav a {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    position: relative;
    transition: color var(--transition);
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--color-gold);
    transition: width var(--transition);
}

.nav a:hover, .nav a[aria-current="page"] { color: var(--color-gold); }
.nav a:hover::after, .nav a[aria-current="page"]::after { width: 100%; }

.is-subpage .nav a, .header.scrolled .nav a { color: var(--color-text-muted); }
.is-subpage .nav a:hover, .is-subpage .nav a[aria-current="page"],
.header.scrolled .nav a:hover, .header.scrolled .nav a[aria-current="page"] {
    color: var(--color-primary);
}

/* ── SPRACHSCHALTER ─────────────────────────────────────────── */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-left: 1px solid rgba(255,255,255,0.25);
    padding-left: 1.5rem;
}
.is-subpage .lang-switcher,
.header.scrolled .lang-switcher { border-left-color: var(--color-border); }

.lang-switcher a {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    transition: color var(--transition);
    padding: 0.2rem 0.25rem;
}
.lang-switcher a:hover, .lang-switcher a.active, .lang-switcher a[aria-current="true"] {
    color: var(--color-gold);
}
.is-subpage .lang-switcher a, .header.scrolled .lang-switcher a { color: var(--color-text-muted); }
.is-subpage .lang-switcher a.active, .header.scrolled .lang-switcher a.active { color: var(--color-primary); }
.is-subpage .lang-switcher a:hover, .header.scrolled .lang-switcher a:hover { color: var(--color-gold-dark); }

/* ── HAMBURGER ──────────────────────────────────────────────── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 2.5rem;
    height: 2.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
}
.hamburger span {
    display: block;
    width: 100%;
    height: 1.5px;
    background-color: rgba(255,255,255,0.9);
    transition: all var(--transition);
    border-radius: 1px;
}
.is-subpage .hamburger span, .header.scrolled .hamburger span {
    background-color: var(--color-primary);
}

/* ── MOBILE MENÜ ────────────────────────────────────────────── */
.mobile-menu {
    position: fixed;
    inset: 0;
    background-color: var(--color-primary);
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }

.mobile-menu nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}
.mobile-menu nav a {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 5vw, 2.75rem);
    font-weight: 300;
    letter-spacing: 0.04em;
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    transition: color var(--transition);
    padding: 0.3rem 0;
}
.mobile-menu nav a:hover, .mobile-menu nav a[aria-current="page"] { color: var(--color-gold); }

.mobile-lang {
    display: flex;
    gap: 1rem;
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(255,255,255,0.2);
}
.mobile-lang a {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    transition: color var(--transition);
}
.mobile-lang a:hover, .mobile-lang a.active { color: var(--color-gold); }

.mobile-menu-close {
    position: absolute;
    top: 1.5rem; right: 1.5rem;
    background: none; border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: rgba(255,255,255,0.55);
    width: 2.5rem; height: 2.5rem;
    display: flex; align-items: center; justify-content: center;
    transition: color var(--transition);
}
.mobile-menu-close:hover { color: var(--color-gold); }

/* Header-Offset */
main { padding-top: var(--header-height); }
.is-home main { padding-top: 0; }

/* ── HERO ───────────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    background-color: var(--color-primary);
    background-image: var(--hero-bg, none);
    background-size: cover;
    background-position: center top;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(27,42,74,0.85) 0%,
        rgba(27,42,74,0.55) 60%,
        rgba(27,42,74,0.78) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    padding-top: calc(var(--header-height) + var(--space-md));
    padding-bottom: var(--space-lg);
    max-width: 56rem;
}

.hero-content h1 {
    color: var(--color-text-light);
    font-size: clamp(2.75rem, 7vw, 5.5rem);
    font-weight: 300;
    line-height: 1.08;
    margin-bottom: 1.2rem;
    letter-spacing: -0.01em;
}

.hero-sub {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    color: rgba(255,255,255,0.82);
    margin-bottom: 2.5rem;
    max-width: 44rem;
    line-height: 1.7;
}

.hero-actions { display: flex; gap: var(--space-sm); flex-wrap: wrap; }

.hero-content a.primary {
    background-color: var(--color-gold);
    border-color: var(--color-gold);
    color: var(--color-primary);
}
.hero-content a.primary:hover {
    background-color: transparent;
    color: var(--color-gold);
}
.hero-content a.secondary {
    border-color: rgba(255,255,255,0.55);
    color: rgba(255,255,255,0.85);
}
.hero-content a.secondary:hover {
    background-color: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.9);
    color: var(--color-text-light);
}

.hero-scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.35);
    animation: bounce 2.5s ease-in-out infinite;
}
@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(8px); }
}

/* ── PAGE HEADER (Subpages) ─────────────────────────────────── */
.page-header {
    padding: var(--space-md) 0 var(--space-lg);
    background-color: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
}
.page-header h1 { margin-bottom: 0; }
.page-header-sub {
    margin-top: 0.75rem;
    font-size: 1.125rem;
    color: var(--color-text-muted);
    max-width: 44rem;
    margin-bottom: 0;
}

/* Page Hero (mit Bild) */
.page-hero {
    position: relative;
    height: 45vh;
    min-height: 320px;
    display: flex;
    align-items: flex-end;
    background-image: var(--hero-bg, none);
    background-size: cover;
    background-position: center;
}
.page-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(27,42,74,0.72), rgba(27,42,74,0.18));
}
.page-hero-content {
    position: relative;
    z-index: 1;
    padding-bottom: var(--space-md);
}
.page-hero-content h1 { color: var(--color-text-light); margin-bottom: 0; }

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-sm);
}
.breadcrumb a { color: var(--color-text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb span[aria-hidden] { color: var(--color-border); }

/* ── SECTION-HEADER / CTA ───────────────────────────────────── */
.section-header { margin-bottom: var(--space-md); }
.section-header h2 { position: relative; display: inline-block; }
.section-header h2::after {
    content: '';
    display: block;
    width: 3rem;
    height: 2px;
    background: var(--color-gold);
    margin-top: 0.5rem;
}
.section-subtitle {
    color: var(--color-text-muted);
    font-size: 1.0625rem;
    max-width: 44rem;
    margin-top: 0.5rem;
}
.section-intro {
    font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
    color: var(--color-text-muted);
    max-width: 52rem;
    margin-bottom: var(--space-md);
    line-height: 1.8;
}
.section-cta {
    margin-top: var(--space-md);
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

/* ── USPs ───────────────────────────────────────────────────── */
.usp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.usp-item {
    padding: var(--space-md);
    border: 1px solid var(--color-border);
    position: relative;
    transition: border-color var(--transition), transform var(--transition);
    overflow: hidden;
}
.usp-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 0;
    background: var(--color-gold);
    transition: height var(--transition-slow);
    transform-origin: top center;
}
.usp-item:hover { border-color: var(--color-gold); transform: translateY(-4px); }
.usp-item:hover::before { height: 100%; }

.usp-icon { width: 3rem; height: 3rem; margin-bottom: var(--space-sm); color: var(--color-gold); }
.usp-icon svg { width: 100%; height: 100%; }
.usp-item h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.usp-item p  { font-size: 0.9375rem; color: var(--color-text-muted); margin-bottom: 0; }

/* ── FACHGEBIETE-GRID ───────────────────────────────────────── */
.fachgebiete-grid, .fachgebiete-grid-full {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.fachgebiet-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-md) 1.5rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    text-decoration: none;
    color: var(--color-text);
    position: relative;
    overflow: hidden;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.fachgebiet-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--color-gold);
    transform: scaleX(0);
    transition: transform var(--transition);
}
.fachgebiet-card:hover {
    border-color: var(--color-gold);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(27,42,74,0.08);
    color: var(--color-text);
}
.fachgebiet-card:hover::after { transform: scaleX(1); }

.fachgebiet-card-icon { width: 2.5rem; height: 2.5rem; margin-bottom: 1rem; color: var(--color-gold); }
.fachgebiet-card-icon svg { width: 100%; height: 100%; }

.fachgebiet-card h2, .fachgebiet-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}
.fachgebiet-card p { font-size: 0.9375rem; color: var(--color-text-muted); flex: 1; margin-bottom: 1rem; }

.card-arrow {
    font-size: 1.25rem;
    color: var(--color-gold);
    margin-top: auto;
    display: inline-block;
    transition: transform var(--transition);
}
.fachgebiet-card:hover .card-arrow { transform: translateX(4px); }

/* Fachgebiet Detail */
.fachgebiet-detail { max-width: 52rem; }
.fachgebiet-header { margin-bottom: var(--space-md); }
.fachgebiet-icon-large { width: 4rem; height: 4rem; color: var(--color-gold); margin-bottom: var(--space-sm); }
.fachgebiet-icon-large svg { width: 100%; height: 100%; }
.fachgebiet-lead {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    font-style: italic;
    font-family: var(--font-display);
    max-width: 40rem;
    margin-bottom: 0;
}

/* ── TEAM-GRID ──────────────────────────────────────────────── */
.team-grid, .team-grid-full {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.team-card {
    display: block;
    text-decoration: none;
    color: var(--color-text);
}

.team-card-img {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--color-bg-alt);
}
.team-card-img picture { display: contents; }
.team-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: transform 0.45s ease, filter 0.45s ease;
}
.team-card:hover .team-card-img img { transform: scale(1.05); filter: grayscale(0%); }

/* Frame: 4 lines drawing from center of each side outward */
.team-card-frame {
    position: absolute;
    inset: 0.75rem;
    pointer-events: none;
}
.team-card-frame span {
    position: absolute;
    background: #fff;
}
.team-card-frame .frame-t,
.team-card-frame .frame-b {
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    transition: width 0.4s ease;
}
.team-card-frame .frame-t { top: 0; }
.team-card-frame .frame-b { bottom: 0; }
.team-card-frame .frame-l,
.team-card-frame .frame-r {
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 0;
    transition: height 0.4s ease;
}
.team-card-frame .frame-l { left: 0; }
.team-card-frame .frame-r { right: 0; }

.team-card:hover .frame-t,
.team-card:hover .frame-b { width: 100%; }
.team-card:hover .frame-l,
.team-card:hover .frame-r { height: 100%; }

/* Bottom caption panel */
.team-card-caption {
    position: absolute;
    bottom: 0.55rem;
    left: 0.75rem;
    right: auto;
    max-width: 72%;
    background: none;
    padding: 0;
    line-height: 1.4;
    transform: translateY(calc(100% + 0.55rem));
    transition: transform 0.38s ease;
}
.team-card-caption span {
    display: inline;
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #111;
    background-color: #fff;
    padding: 0.3em 0.4em;
    line-height: 2.5;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
.team-card:hover .team-card-caption { transform: translateY(0); }

/* Name below image */
.team-card-name {
    display: block;
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--color-text);
    margin-top: 0.6rem;
    padding-left: 0.75rem;
    line-height: 1.3;
}

/* Team Member Detail */
.member-detail {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-md);
    align-items: start;
}
.member-photo-img { width: 100%; height: auto; }
.member-content h1 { margin-bottom: 0.25rem; }
.member-role {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-gold-dark);
    margin-bottom: var(--space-sm);
}
.member-bio { margin-bottom: var(--space-sm); }
.member-contact { display: flex; gap: var(--space-sm); flex-wrap: wrap; }
.member-fachgebiete {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-sm);
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.member-fachgebiete li a {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-gold-dark);
    border: 1px solid var(--color-gold);
    padding: 0.2rem 0.6rem;
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
}
.member-fachgebiete li a:hover {
    background: var(--color-gold);
    color: #fff;
}

/* ── KONTAKT CTA ────────────────────────────────────────────── */
.kontakt-cta-inner {
    text-align: center;
    max-width: 44rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}
.kontakt-cta-inner h2 { font-size: clamp(1.75rem, 3vw, 2.75rem); margin-bottom: 0.5rem; }

/* ── KONTAKT-LAYOUT ─────────────────────────────────────────── */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--space-lg);
    align-items: start;
}
.contact-form-wrap h2 { margin-bottom: var(--space-sm); }

.contact-info-panel {
    background: var(--color-bg-alt);
    padding: var(--space-md);
    border: 1px solid var(--color-border);
}
.contact-info-panel h2 { font-size: 1.5rem; margin-bottom: var(--space-sm); }

.contact-info-block {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
}
.contact-info-block:last-child { border-bottom: 0; padding-bottom: 0; }
.contact-info-block address { font-style: normal; font-size: 0.9375rem; }

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0;
}

.contact-icon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; color: var(--color-gold); margin-top: 0.1rem; }

.contact-info-block a, .contact-info-item a {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color var(--transition);
}
.contact-info-block a:hover, .contact-info-item a:hover { color: var(--color-gold-dark); }

.contact-langs { padding-top: var(--space-sm); }
.contact-langs p { font-size: 0.9375rem; margin-bottom: 0.5rem; font-weight: 600; }
.contact-langs ul { margin-bottom: 0; padding-left: 0; list-style: none; }
.contact-langs li { font-size: 0.9375rem; padding: 0.25rem 0; color: var(--color-text-muted); }
.contact-langs li::before { content: '· '; color: var(--color-gold); margin-right: 0.25rem; }

/* ── FORMULARE ──────────────────────────────────────────────── */
.contact-form { display: grid; gap: 1.25rem; max-width: 52rem; }

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: 0.02em;
}
.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.8rem 1rem;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    transition: border-color var(--transition), box-shadow var(--transition);
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-gold-dark);
    box-shadow: 0 0 0 3px rgba(139,105,20,0.25);
}
.form-group textarea { resize: vertical; }

.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
}
.checkbox-group input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--color-gold-dark);
}
.checkbox-group label a { color: var(--color-primary); }
.checkbox-group label a:hover { color: var(--color-gold-dark); }

.hp-field {
    position: absolute;
    left: -9999px; top: -9999px;
    opacity: 0; height: 0; overflow: hidden;
}

.form-message {
    padding: 1rem 1.25rem;
    margin-bottom: var(--space-sm);
    font-size: 0.9375rem;
}
.form-message.success { background: #d4edda; color: #155724; border-left: 4px solid #28a745; }
.form-message.error   { background: #f8d7da; color: #721c24; border-left: 4px solid #dc3545; }

/* ── BODY CONTENT ───────────────────────────────────────────── */
.body-content { max-width: 60rem; }
.body-content-narrow { max-width: 44rem; }
.body-content h2, .body-content h3 { margin-top: 2em; }
.body-content h2:first-child, .body-content h3:first-child { margin-top: 0; }
.body-content a {
    color: var(--color-primary);
    border-bottom: 1px solid var(--color-gold);
    text-decoration: none;
    transition: color var(--transition), border-color var(--transition);
}
.body-content a:hover { color: var(--color-gold-dark); border-bottom-color: var(--color-gold-dark); }

/* ── FOOTER ─────────────────────────────────────────────────── */
.footer {
    background-color: var(--color-primary);
    color: rgba(255,255,255,0.65);
    padding-top: var(--space-lg);
    padding-bottom: 0;
}

/* Top area: columns */
.footer-top {
    display: grid;
    grid-template-columns: 200px 1fr 1fr;
    gap: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    align-items: start;
}

.footer-brand { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-brand img { filter: brightness(0) invert(1); opacity: 0.85; height: 70px; width: auto; max-width: none; align-self: flex-start; }
.footer-name { font-family: var(--font-display); font-size: 1.25rem; color: var(--color-text-light); }
.footer-brand > a { font-size: 0.875rem; color: rgba(255,255,255,0.5); text-decoration: none; transition: color var(--transition); }
.footer-brand > a:hover { color: var(--color-gold); }

.footer-col-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 0.75rem;
}

.footer-col nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.footer-col nav a {
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    transition: color var(--transition);
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}
.footer-col nav a:hover { color: var(--color-gold); }

.footer-member-role {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.3);
    font-weight: 400;
}

/* Bottom bar */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-legal {
    display: flex;
    gap: 1.25rem;
}
.footer-legal a {
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    transition: color var(--transition);
}
.footer-legal a:hover { color: var(--color-gold); }

.footer-copy {
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.35);
    margin-bottom: 0;
}
.footer-credit a { color: rgba(255,255,255,0.45); text-decoration: none; transition: color var(--transition); }
.footer-credit a:hover { color: var(--color-gold); }

/* ── UTILITY ────────────────────────────────────────────────── */
.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── SCROLL FADE-IN ANIMATION ───────────────────────────────── */
.fade-in {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Cascade delays for grid items */
.usp-item:nth-child(2)        { transition-delay: 0.1s; }
.usp-item:nth-child(3)        { transition-delay: 0.2s; }
.fachgebiet-card:nth-child(2) { transition-delay: 0.08s; }
.fachgebiet-card:nth-child(3) { transition-delay: 0.16s; }
.fachgebiet-card:nth-child(4) { transition-delay: 0.24s; }
.fachgebiet-card:nth-child(5) { transition-delay: 0.32s; }
.fachgebiet-card:nth-child(6) { transition-delay: 0.4s; }
.team-card:nth-child(2)       { transition-delay: 0.08s; }
.team-card:nth-child(3)       { transition-delay: 0.16s; }
.team-card:nth-child(4)       { transition-delay: 0.24s; }

/* ── MEDIA QUERIES (Desktop-first) ──────────────────────────── */

/* 1280px */
@media (max-width: 1280px) {
    :root { --space-lg: 4rem; --space-xl: 7rem; }
    .team-grid, .team-grid-full { grid-template-columns: repeat(3, 1fr); }
}

/* 1024px */
@media (max-width: 1024px) {
    :root { --space-lg: 3.5rem; --space-xl: 6rem; }
    .contact-layout { grid-template-columns: 1fr; gap: var(--space-md); }
    .footer-top { grid-template-columns: 180px 1fr 1fr; }
}

/* 768px — Hamburger */
@media (max-width: 768px) {
    :root {
        --space-md:        1.5rem;
        --space-lg:        3rem;
        --wrapper-padding: 1.25rem;
    }

    .nav, .lang-switcher { display: none; }
    .hamburger { display: flex; }

    .team-grid, .team-grid-full { grid-template-columns: repeat(2, 1fr); }
    .usp-grid { grid-template-columns: repeat(2, 1fr); }
    .fachgebiete-grid, .fachgebiete-grid-full { grid-template-columns: repeat(2, 1fr); }

    .member-detail { grid-template-columns: 1fr; }

    .footer-top { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .footer-bottom { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}

/* 640px */
@media (max-width: 640px) {
    :root { --space-lg: 2.5rem; --wrapper-padding: 1rem; }
    .form-row { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .section-cta { flex-direction: column; align-items: flex-start; }
    .kontakt-cta-inner { align-items: flex-start; text-align: left; }
}

/* 480px */
@media (max-width: 480px) {
    :root { --space-lg: 2rem; --wrapper-padding: 0.875rem; }
    .usp-grid { grid-template-columns: 1fr; }
    .fachgebiete-grid, .fachgebiete-grid-full { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: clamp(2rem, 10vw, 2.75rem); }
    .member-contact { flex-direction: column; }
}
