/* ==========================================================================
   Rimkus Systems | Rheingau
   Gleiche Marke wie die Hauptseite (Tokens aus assets/css/style.css bzw.
   design-system/rimkus-systems-webdesign/MASTER.md), eigenes Layout.
   Durchgehend dunkel, ein Akzent (Koralle).

   Radien, fest vergeben:
     Buttons 12px · Eingabefelder 10px · Akkordeon 14px · Karten und Bilder 22px
   ========================================================================== */

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter.woff2') format('woff2-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'JetBrains Mono';
    src: url('../fonts/jetbrains-mono.woff2') format('woff2-variations');
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}

/* --- Design-Tokens (identisch zur Hauptseite) ----------------------------- */
:root {
    --bg:            #161719;
    --bg-deep:       #111112;
    --surface:       #212225;
    --surface-hi:    #2c2c2f;
    --line:          #434346;
    --border:        rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);

    --accent:      #fa6e43;
    --accent-hi:   #ff8a66;
    --accent-soft: rgba(250, 110, 67, 0.14);
    --on-accent:   #161719;

    --text:        #e3dbd8;
    --text-strong: #f7f4f2;
    --text-muted:  #9a9aa3;
    --text-dim:    #85858e;

    --success: #6fcf97;
    --danger:  #ff7a6e;

    --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

    --radius-sm: 10px;
    --radius:    14px;
    --radius-lg: 22px;
    --radius-btn: 12px;

    --header-h: 72px;
    --shell:    1200px;
    --gutter:   24px;
    --ease:     cubic-bezier(0.22, 1, 0.36, 1);

    /* Schatten in der Grundfarbe getönt, nie reines Schwarz. */
    --shadow-lift: 0 30px 60px -28px rgba(8, 8, 9, 0.85);
}

/* --- Grundlagen ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
    -webkit-text-size-adjust: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

h1, h2, h3 {
    margin: 0 0 0.6em;
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.025em;
    color: var(--text-strong);
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--accent-hi); }

ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--on-accent); }

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

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

.skip-link {
    position: absolute;
    left: -9999px;
    top: 12px;
    z-index: 200;
    padding: 12px 20px;
    background: var(--accent);
    color: var(--on-accent);
    border-radius: var(--radius-sm);
    font-weight: 600;
}
.skip-link:focus { left: 24px; color: var(--on-accent); }

/* --- Layout --------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--shell);
    margin-inline: auto;
    padding-inline: var(--gutter);
}
.container-narrow { max-width: 820px; }

.section { position: relative; padding-block: clamp(80px, 10vw, 128px); }
.section-alt { background: var(--bg-deep); border-block: 1px solid var(--border); }

.section-title {
    font-size: clamp(2rem, 1.35rem + 2.6vw, 3.1rem);
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.06;
    max-width: 22ch;
}
.section-lead {
    max-width: 58ch;
    font-size: 1.08rem;
    color: var(--text-muted);
}

.eyebrow {
    margin: 0 0 18px;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    border: 1px solid transparent;
    border-radius: var(--radius-btn);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease),
                background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-sm { padding: 10px 16px; font-size: 0.86rem; border-radius: 10px; }
.btn-lg { padding: 17px 28px; font-size: 1rem; }

.btn-primary {
    background: var(--accent);
    color: var(--on-accent);
    box-shadow: 0 8px 24px -10px rgba(250, 110, 67, 0.55);
}
.btn-primary:hover { background: var(--accent-hi); color: var(--on-accent); }

.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface-hi); border-color: var(--line); color: var(--text-strong); }

.btn-outline { background: transparent; border-color: var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--accent-soft); color: var(--accent-hi); }

/* --- Kopfzeile ------------------------------------------------------------ */
.header-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 8px; pointer-events: none; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    display: flex;
    align-items: center;
    background: rgba(22, 23, 25, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--border); background: rgba(22, 23, 25, 0.94); }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand {
    display: inline-flex;
    align-items: baseline;
    color: var(--text-strong);
    font-weight: 600;
    font-size: 1.08rem;
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.brand:hover { color: var(--text-strong); }
.brand-name-accent { margin-left: 5px; font-weight: 500; color: var(--accent); }
.brand-suffix {
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.primary-nav ul { display: flex; align-items: center; gap: 24px; }
.primary-nav a { color: var(--text-muted); font-size: 0.93rem; font-weight: 500; white-space: nowrap; }
.primary-nav a:hover { color: var(--text-strong); }
.primary-nav .nav-cta { margin-left: 4px; }
.primary-nav .nav-cta a { color: var(--on-accent); }

.nav-toggle {
    display: none;
    width: 44px; height: 44px;
    align-items: center; justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.nav-toggle-bars { display: grid; gap: 5px; }
.nav-toggle-bars span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; }

/* --- Hero ----------------------------------------------------------------- */
.hero { padding-block: clamp(28px, 4vw, 64px) clamp(64px, 8vw, 104px); }

.hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(40px, 6vw, 88px);
    align-items: center;
}

.hero-title {
    margin: 0 0 clamp(20px, 2.4vw, 28px);
    font-size: clamp(2.6rem, 1.3rem + 4.2vw, 4.7rem);
    font-weight: 500;
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.hero-lead {
    max-width: 44ch;
    margin: 0 0 clamp(28px, 3vw, 40px);
    font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.22rem);
    line-height: 1.6;
    color: var(--text-muted);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-media {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lift);
}
.hero-media img {
    width: 100%;
    height: clamp(420px, calc(100dvh - var(--header-h) - 112px), 660px);
    object-fit: cover;
    object-position: 60% 50%;
}

@media (prefers-reduced-motion: no-preference) {
    .hero-copy .hero-in { animation: hero-rise 0.9s var(--ease) both; }
    .hero-copy .hero-in:nth-child(2) { animation-delay: 0.07s; }
    .hero-copy .hero-in:nth-child(3) { animation-delay: 0.14s; }
    .hero-copy .hero-in:nth-child(4) { animation-delay: 0.21s; }
    /* Nur Transform, keine Deckkraft: Das Bild ist das LCP-Element. */
    .hero-media img { animation: hero-settle 1.6s var(--ease) both; }
}
@keyframes hero-rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes hero-settle { from { transform: scale(1.06); } }

/* --- Orte ----------------------------------------------------------------- */
.towns-head { margin-bottom: clamp(48px, 6vw, 72px); }

.towns-scroller { position: relative; }
.towns-scroller:focus-visible { outline-offset: -2px; border-radius: 0; }

.towns-rail {
    --mark-y: 10px;
    position: relative;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 20px;
    padding-top: 0;
}

/* Der Rhein als Linie, auf der die Orte liegen. */
.towns-rail::before {
    content: '';
    position: absolute;
    top: var(--mark-y);
    left: var(--gutter);
    right: var(--gutter);
    height: 1px;
    background: linear-gradient(90deg, var(--line), var(--line) 85%, transparent);
    transform-origin: left center;
}

.town { position: relative; padding-top: 40px; }

.town-mark {
    position: absolute;
    top: calc(var(--mark-y) - 8px);
    left: 0;
    width: 1px;
    height: 17px;
    background: var(--text-dim);
}
.town.is-base .town-mark {
    top: calc(var(--mark-y) - 12px);
    left: -1px;
    width: 3px;
    height: 25px;
    background: var(--accent);
    border-radius: 2px;
}

.town-base {
    position: absolute;
    top: -26px;
    left: 0;
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--accent);
}

.town-name {
    margin: 0 0 8px;
    font-size: 1.08rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    hyphens: manual;
}
.town.is-base .town-name { color: var(--accent); }
.town-districts { margin: 0; font-size: 0.88rem; line-height: 1.55; color: var(--text-muted); }

.towns-more {
    margin: clamp(40px, 5vw, 56px) 0 0;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 0.95rem;
    color: var(--text-muted);
}

@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .towns-rail::before {
            animation: river-draw linear both;
            animation-timeline: view();
            animation-range: entry 20% cover 45%;
        }
    }
}
@keyframes river-draw { from { transform: scaleX(0); } }

/* --- Branchen (Bento) ----------------------------------------------------- */
.sectors-title { margin-bottom: clamp(40px, 5vw, 64px); }

.bento {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
}

.bento-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}
.bento-1, .bento-4 { grid-column: span 7; }
.bento-2, .bento-3 { grid-column: span 5; }

.bento-media { overflow: hidden; }
.bento-media img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }

.bento-body { padding: clamp(24px, 2.6vw, 34px); }
.bento-title { margin: 0 0 10px; font-size: 1.3rem; letter-spacing: -0.025em; }
.bento-text { margin: 0; max-width: 46ch; color: var(--text-muted); font-size: 0.98rem; }

/* Zellen ohne Foto: Titel groß oben, Text unten, eigene Fläche. */
.bento-plain { justify-content: flex-end; min-height: 280px; }
.bento-plain .bento-title { margin-bottom: 14px; font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.1rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1.08; max-width: 14ch; }

/* Warme Akzentfläche */
.bento-2 {
    border-color: rgba(250, 110, 67, 0.28);
    background:
        radial-gradient(130% 100% at 100% 0%, rgba(250, 110, 67, 0.26), transparent 62%),
        var(--surface);
}
/* Rebzeilen als ruhiges Linienmuster */
.bento-3 {
    background:
        repeating-linear-gradient(118deg, rgba(227, 219, 216, 0.07) 0 1px, transparent 1px 16px),
        var(--bg-deep);
}

/* --- Referenz ------------------------------------------------------------- */
.work-layout {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: center;
}

.work-shot {
    grid-column: 1 / 9;
    grid-row: 1;
    display: block;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lift);
}
/* 16:8.7 statt 16:9: Der Screenshot endet unten mit dem Anschnitt der hellen Folgesektion. */
.work-shot img { width: 100%; aspect-ratio: 16 / 8.7; object-fit: cover; object-position: top; transition: transform 0.7s var(--ease); }
.work-shot:hover img { transform: scale(1.025); }

.work-copy {
    grid-column: 8 / 13;
    grid-row: 1;
    position: relative;
    z-index: 1;
    padding: clamp(28px, 3vw, 44px);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lift);
}
.work-title { margin: 0 0 14px; font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.3rem); font-weight: 500; letter-spacing: -0.035em; }
.work-text { margin: 0 0 28px; color: var(--text-muted); }

/* --- Ablauf --------------------------------------------------------------- */
.process-layout {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(40px, 7vw, 112px);
    align-items: start;
}
.process-head { position: sticky; top: calc(var(--header-h) + 48px); }

.process-list { counter-reset: step; }
.process-item {
    position: relative;
    padding: 4px 0 44px 68px;
    counter-increment: step;
}
.process-item:last-child { padding-bottom: 0; }

.process-item::before {
    content: counter(step);
    position: absolute;
    top: 0;
    left: 0;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--bg);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: border-color 0.5s var(--ease) 0.2s, color 0.5s var(--ease) 0.2s, background 0.5s var(--ease) 0.2s;
}
.process-item::after {
    content: '';
    position: absolute;
    top: 50px;
    bottom: 8px;
    left: 21px;
    width: 1px;
    background: var(--line);
}
.process-item:last-child::after { display: none; }

/* Sobald ein Schritt im Bild ist, wird seine Marke zum Akzent. */
.process-item.is-visible::before,
.no-js .process-item::before { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.process-title { margin: 0 0 8px; font-size: 1.25rem; letter-spacing: -0.02em; }
.process-text { margin: 0; max-width: 48ch; color: var(--text-muted); }

/* --- Fragen --------------------------------------------------------------- */
.faq-heading { margin-bottom: clamp(36px, 4vw, 56px); }

.faq { display: grid; gap: 10px; }
.faq-item {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color 0.2s var(--ease);
}
.faq-item[open] { border-color: var(--border-strong); }
.faq-q {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    list-style: none;
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--text-strong);
    cursor: pointer;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
    content: '';
    flex: none;
    width: 9px; height: 9px;
    margin: 0 6px 4px 0;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(45deg);
    transition: transform 0.3s var(--ease);
}
.faq-item[open] .faq-q::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq-a { padding: 0 24px 22px; font-size: 0.97rem; color: var(--text-muted); }

/* --- Kontakt -------------------------------------------------------------- */
.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(40px, 6vw, 80px);
    align-items: start;
}

.contact-media { margin: 32px 0; overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.contact-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

.contact-facts { display: grid; grid-template-columns: repeat(2, auto); justify-content: start; gap: 22px 56px; }
.contact-facts dt {
    margin-bottom: 4px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
}
.contact-facts dd { font-size: 0.98rem; color: var(--text); }
.contact-facts a { color: var(--text-strong); }
.contact-facts a:hover { color: var(--accent); }

.contact-form-wrap {
    padding: clamp(24px, 3vw, 40px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

/* --- Formular (Markup aus includes/contact-form.php) ---------------------- */
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

label { font-size: 0.9rem; font-weight: 500; color: var(--text); }
.req { color: var(--accent); }
.opt { font-size: 0.82rem; font-weight: 400; color: var(--text-dim); }

input[type='text'], input[type='email'], input[type='tel'], textarea {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg-deep);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-strong);
    font-family: inherit;
    font-size: 0.98rem;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--text-dim); }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[aria-invalid='true'], textarea[aria-invalid='true'] { border-color: var(--danger); }
textarea { min-height: 132px; resize: vertical; }

.field-error { margin: 0; font-size: 0.86rem; color: var(--danger); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 8px; }
.form-note { margin: 0; font-size: 0.85rem; color: var(--text-dim); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.checkbox { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.checkbox input { position: absolute; width: 0; height: 0; opacity: 0; }
.checkbox-box {
    position: relative;
    flex: none;
    width: 22px; height: 22px;
    margin-top: 2px;
    background: var(--bg-deep);
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.checkbox input:checked + .checkbox-box { background: var(--accent); border-color: var(--accent); }
.checkbox input:checked + .checkbox-box::after {
    content: '';
    position: absolute; left: 7px; top: 3px;
    width: 6px; height: 11px;
    border: solid var(--on-accent);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.checkbox input:focus-visible + .checkbox-box { outline: 2px solid var(--accent); outline-offset: 3px; }
.checkbox-label { font-size: 0.88rem; line-height: 1.6; color: var(--text-muted); }

.alert {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 24px;
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
}
.alert p { margin: 0; }
.alert-icon { flex: none; font-weight: 700; }
.alert-success { background: rgba(111, 207, 151, 0.12); border: 1px solid rgba(111, 207, 151, 0.4); color: var(--success); }
.alert-error { background: rgba(255, 122, 110, 0.12); border: 1px solid rgba(255, 122, 110, 0.4); color: var(--danger); }

/* --- Fußzeile ------------------------------------------------------------- */
.site-footer { padding-block: 72px 28px; background: var(--bg-deep); border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 1.8fr 1.2fr 1fr 1fr; gap: 40px; }
.footer-name { margin: 0 0 10px; font-size: 1.1rem; font-weight: 600; letter-spacing: -0.02em; color: var(--text-strong); }
.footer-name-suffix { color: var(--accent); font-weight: 500; }
.footer-tagline { max-width: 36ch; font-size: 0.9rem; color: var(--text-dim); }
.footer-head {
    margin-bottom: 16px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
}
.footer-col ul { display: grid; gap: 10px; font-size: 0.92rem; }
.footer-col a { color: var(--text-muted); }
.footer-col a:hover { color: var(--accent); }
.footer-muted { color: var(--text-dim); }
.footer-bottom { margin-top: 48px; }
.footer-bottom p { margin: 0; padding-top: 24px; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--text-dim); }

.footer-link-btn {
    padding: 0;
    background: none;
    border: 0;
    font: inherit;
    color: var(--text-muted);
    text-align: left;
    cursor: pointer;
}
.footer-link-btn:hover { color: var(--accent); }
.footer-link-btn[hidden] { display: none; }

/* --- Cookie-Banner (Ablehnen und Zustimmen gleich gewichtet) --------------- */
.cookie-banner { position: fixed; inset: auto 16px 16px; z-index: 110; display: flex; justify-content: center; }
.cookie-banner[hidden] { display: none; }
.cookie-banner-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    width: 100%;
    max-width: 880px;
    padding: 20px 24px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: 0 20px 50px -12px rgba(8, 8, 9, 0.7);
}
.cookie-banner-text p { margin: 0; font-size: 0.94rem; color: var(--text-muted); }
.cookie-banner-text .cookie-banner-title { margin: 0 0 4px; font-size: 1rem; font-weight: 600; color: var(--text-strong); }
.cookie-banner-actions { display: flex; flex-shrink: 0; gap: 10px; }

/* --- 404 ------------------------------------------------------------------ */
.error-page { min-height: 60vh; }
.error-page .btn { margin-top: 12px; }

/* --- Einblenden beim Scrollen (nur mit JavaScript, siehe hub.js) ---------- */
.has-reveal .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.has-reveal .reveal.is-visible { opacity: 1; transform: none; }

.has-reveal .bento-cell:nth-child(2),
.has-reveal .process-item:nth-child(2) { transition-delay: 0.08s; }
.has-reveal .bento-cell:nth-child(3),
.has-reveal .process-item:nth-child(3) { transition-delay: 0.16s; }
.has-reveal .bento-cell:nth-child(4),
.has-reveal .process-item:nth-child(4) { transition-delay: 0.24s; }
.has-reveal .work-copy { transition-delay: 0.12s; }
.has-reveal .town:nth-child(2) { transition-delay: 0.06s; }
.has-reveal .town:nth-child(3) { transition-delay: 0.12s; }
.has-reveal .town:nth-child(4) { transition-delay: 0.18s; }
.has-reveal .town:nth-child(5) { transition-delay: 0.24s; }
.has-reveal .town:nth-child(6) { transition-delay: 0.30s; }
.has-reveal .town:nth-child(7) { transition-delay: 0.36s; }

/* --- Responsiv ------------------------------------------------------------ */
@media (max-width: 1099px) {
    /* Orte werden zur Wischleiste; der nächste Ort ragt als Hinweis ins Bild. */
    .towns-scroller {
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: var(--gutter);
        scrollbar-width: none;
        padding-top: 30px;
        margin-top: -30px;
    }
    .towns-scroller::-webkit-scrollbar { display: none; }
    .towns-rail {
        width: max-content;
        max-width: none;
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: clamp(200px, 56vw, 240px);
        gap: 24px;
    }
    .town { scroll-snap-align: start; }

    .bento-1, .bento-2, .bento-3, .bento-4 { grid-column: span 6; }

    .work-shot { grid-column: 1 / -1; }
    .work-copy { grid-column: 2 / 12; grid-row: 2; margin-top: -72px; }

    .process-layout, .contact-layout { grid-template-columns: 1fr; }
    .process-head { position: static; }

    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 959px) {
    .nav-toggle { display: inline-flex; }

    .primary-nav {
        position: fixed;
        inset: var(--header-h) 0 auto;
        display: none;
        padding: 12px var(--gutter) 28px;
        background: var(--bg-deep);
        border-bottom: 1px solid var(--border);
    }
    .primary-nav.is-open { display: block; }
    .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
    .primary-nav li { border-bottom: 1px solid var(--border); }
    .primary-nav li:last-child { border-bottom: 0; }
    .primary-nav a { display: block; padding: 14px 0; font-size: 1rem; }
    .primary-nav .nav-cta { margin: 16px 0 0; }
    .primary-nav .nav-cta a { display: flex; padding: 15px; }

    .hero-layout { grid-template-columns: 1fr; }
    .hero-media img { height: auto; aspect-ratio: 4 / 3; }
}

@media (max-width: 767px) {
    :root { --gutter: 16px; }

    .brand-suffix { margin-left: 10px; padding-left: 10px; }

    .hero { padding-top: 24px; }
    .hero-actions .btn { flex: 1 1 auto; }

    .bento { grid-template-columns: 1fr; }
    .bento-1, .bento-2, .bento-3, .bento-4 { grid-column: auto; }
    .bento-plain { min-height: 240px; }

    .work-copy { grid-column: 1 / -1; margin: -40px 12px 0; }

    .process-item { padding-left: 60px; }

    .contact-facts { grid-template-columns: 1fr; }
    .field-row { grid-template-columns: 1fr; gap: 0; }
    .form-actions .btn { width: 100%; }

    .footer-grid { grid-template-columns: 1fr; }
    .cookie-banner-inner { flex-direction: column; align-items: stretch; gap: 16px; padding: 18px; }
    .cookie-banner-actions .btn { flex: 1; }
}

@media (max-width: 380px) {
    .brand-suffix { display: none; }
}

/* --- Bewegung reduzieren -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }
}

/* --- Druck ---------------------------------------------------------------- */
@media print {
    .site-header, .cookie-banner, .skip-link, .contact-form-wrap { display: none; }
    body, .section-alt { background: #fff; color: #111; }
}
