/*
Theme Name: Haudegen Theme Template
Theme URI: https://haudegen-webdesign.de
Author: Haudegen Webdesign
Author URI: https://haudegen-webdesign.de
Description: Schlankes, custom-codiertes Basis-Theme (kein Page Builder). Startpunkt fuer neue Kundenprojekte.
Version: 2.0.0
License: GNU General Public License v2 or later
Text Domain: haudegen-theme
*/

/* ============================================================
   REIHENFOLGE DIESER DATEI - NEUE BLOECKE HIER EINSORTIEREN
   1  Tokens
   2  Fonts
   3  Reset / Basis
   4  Typografie (inkl. .eyebrow)
   5  Farb- und Hintergrundklassen
   6  Layout-Utilities (flex, grids, Container-Stufen)
   7  Abstaende
   8  Komponenten (button, card, section-head, faq, form, post)
   9  Header
   10 Footer
   11 Einblenden beim Scrollen
   12 Swiper-Basis
   12a Startseite (Wolken, Sektionen)
   13 Responsive
   14 Barrierefreiheit (Fokus, reduced motion)
============================================================ */


/* ============================================================
   1  TOKENS
   Acht Werte, jeder mit genau EINER Bedeutung.
   --grey ist eine FLAECHE und nie Text. Leiser Text ist --text-grey.
   Projektspezifische Variablen erst bei Bedarf einzeln ergaenzen.
============================================================ */
:root {
    --black: #1f2b37;        /* Ink: Text auf hell, dunkle Flaeche (Footer) */
    --white: #f4f3ee;        /* Paper: Text auf dunkel, helle Flaeche */
    --grey: #e9edef;         /* Mist: helle Flaeche fuer Sektionswechsel - NIE Text */
    --text-grey: #4a5866;    /* leiser Text auf heller Flaeche */
    --line: #d6d8d2;         /* dezente Trennlinie / Kartenrahmen */
    --accent: #f2bf3a;       /* Gold: Buttons, Kicker auf dunkel, aktive Zustaende */
    --accent-hover: #f7cf5c; /* Aufhellung des Akzents fuer :hover */
    --contrast: #2b3845;     /* Night: zweite dunkle Flaeche (Statement-Sektionen) */

    /* Projektspezifisch (Gedankenfreiheit) */
    --night-2: #3d4d5d;      /* Angebot-Sektion, Ende des Statement-Verlaufs */
    --gold-dark: #9a6d0c;    /* Gold als Text auf hell (Kontrast) */
    --text-light: #c9d1d8;   /* leiser Text auf dunkler Flaeche */
}


/* ============================================================
   2  FONTS
   Immer self-hosted, nie Google Fonts (DSGVO).
   Variable Datei ist der Standard - vor dem Hochladen pruefen, dass
   die Datei wirklich variabel ist (fvar-Tabelle) und wirklich woff2
   (Signatur wOF2). Sonst sind fette Ueberschriften duenn.
============================================================ */
@font-face {
    font-family: 'Manrope';
    src: url('fonts/Manrope-Variable.woff2') format('woff2-variations'),
         url('fonts/Manrope-Variable.woff2') format('woff2'),
         url('fonts/Manrope-Variable.woff') format('woff');
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Newsreader';
    src: url('fonts/Newsreader-Variable.woff2') format('woff2-variations'),
         url('fonts/Newsreader-Variable.woff2') format('woff2'),
         url('fonts/Newsreader-Variable.woff') format('woff');
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Newsreader';
    src: url('fonts/Newsreader-Italic-Variable.woff2') format('woff2-variations'),
         url('fonts/Newsreader-Italic-Variable.woff2') format('woff2'),
         url('fonts/Newsreader-Italic-Variable.woff') format('woff');
    font-weight: 200 800;
    font-style: italic;
    font-display: swap;
}


/* ============================================================
   3  RESET / BASIS
============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', sans-serif;
    -webkit-font-smoothing: antialiased;
    color: var(--black);
    background: var(--white);
    line-height: 1.6;
    font-size: 18px;
    /* clip statt hidden: hidden macht den Body zum Scroll-Container und
       bricht damit position:sticky im Header. */
    overflow-x: clip;
}

/* Scroll-Lock, wenn das Popup-Menue offen ist */
body.fixed {
    overflow: hidden;
}

/* height:auto ist PFLICHT. wp_get_attachment_image() liefert width- und
   height-Attribute; ohne diese Regel erzwingt das height-Attribut die
   Hoehe und staucht jedes Bild. */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
    text-align: inherit;
}

.underline {
    text-decoration: underline;
}


/* ============================================================
   4  TYPOGRAFIE
============================================================ */
h1, h2, h3, h4 {
    font-family: 'Newsreader', serif;
    line-height: 1.08;
    font-weight: 300;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); }
h2 { font-size: clamp(36px, 4.4vw, 64px); }
h3 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h4 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

.rechtliches-inhalt h2 {
    font-family: 'Manrope', sans-serif;
    -webkit-font-smoothing: antialiased;
    font-size: 2rem;
}

/* Kursiv-Wort in Ueberschriften und Wortmarke */
.kursiv { font-style: italic; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.text-small { font-size: .9rem; }
.text-lead { font-size: 1.15rem; }

/* Kleines Versal-Label UEBER der Ueberschrift.
   NIE innerhalb einer Ueberschrift - sonst liest Google die H1 als
   "eyebrow + headline" in einem Satz. */
.eyebrow {
    display: block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .22em;
    line-height: 1.3;
    color: var(--gold-dark);
    margin-bottom: 12px;
}
.black-bg .eyebrow,
.contrast-bg .eyebrow { color: var(--accent); }


/* ============================================================
   5  FARB- UND HINTERGRUNDKLASSEN
============================================================ */
.black { color: var(--black); }
.white { color: var(--white); }
.accent { color: var(--accent); }
.text-grey { color: var(--text-grey); }
.contrast { color: var(--contrast); }

.black-bg { background: var(--black); color: var(--white); }
.white-bg { background: var(--white); color: var(--black); }
.grey-bg { background: var(--grey); color: var(--black); }
.contrast-bg { background: var(--contrast); color: var(--white); }
.accent-bg { background: var(--accent); color: var(--black); }

/* Leiser Text auf dunkler Flaeche - --text-grey waere dort zu dunkel */
.black-bg .text-grey,
.contrast-bg .text-grey,
footer .text-grey { color: rgba(255, 255, 255, .7); }


/* ============================================================
   6  LAYOUT-UTILITIES
   Layout wird im Markup zusammengesetzt, nicht pro Seite neu in CSS.
============================================================ */
.flex {
    display: flex;
    flex-direction: column;
}
.flex-horizontal {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}
.flex-start { align-items: flex-start; }
.flex-end { align-items: flex-end; }
.flex-center { align-items: center; }
.flex-between { justify-content: space-between; }

.gap-5 { gap: 5px; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
.gap-40 { gap: 40px; }

.section-padding {
    padding: clamp(100px, 16vh, 180px) 24px;
}

.double-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
/* Bild links, Text rechts - ohne die Reihenfolge im Markup zu drehen
   (die DOM-Reihenfolge bleibt so auch mobil korrekt) */
.double-grid.reverse > *:first-child { order: 2; }

.triple-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    align-items: stretch;
}

/* Container-Stufen.
   Das nackte ".max-width" gibt es NICHT mehr: es bedeutete in einem
   Projekt 700px (Textspalte) und im naechsten 1600px (Seitenbreite).
   Jede Stufe traegt jetzt ihre Breite im Namen.
   Standard-Seitencontainer = .max-width-1600 */
.max-width-700,
.max-width-1100,
.max-width-1180,
.max-width-1400,
.max-width-1600 {
    margin-inline: auto;
    width: 100%;
}
.max-width-700  { max-width: 700px; }   /* schmale Textspalte, Rechtstexte */
.max-width-1100 { max-width: 1100px; }  /* Beitrag, Formular, FAQ */
.max-width-1180 { max-width: 1180px; }  /* Onepager-Container (Entwurf) */
.max-width-1400 { max-width: 1400px; }  /* engerer Inhaltscontainer */
.max-width-1600 { max-width: 1600px; }  /* Standard-Seitencontainer */


/* ============================================================
   7  ABSTAENDE
============================================================ */
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }
.mb-60 { margin-bottom: 60px; }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }


/* ============================================================
   8  KOMPONENTEN
============================================================ */

/* --- Button -------------------------------------------------
   Varianten als zweite Klasse: class="button outline"
   (nicht .button-outline - der Modifier-Stil ist der gelebte) */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    align-self: flex-start;
    padding: 13px 22px;
    background: var(--accent);
    color: var(--black);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    border-radius: 999px;
    transition: background .25s ease, transform .25s ease, color .25s ease;
}
.button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}
.button.outline {
    background: transparent;
    border: 1px solid var(--black);
    color: var(--black);
    padding: 12px 22px;
}
.button.outline:hover {
    background: var(--black);
    color: var(--white);
}
.button.dark {
    background: var(--black);
    color: var(--white);
    padding: 16px 30px;
    font-size: 15px;
}
.button.dark:hover {
    background: var(--contrast);
    color: var(--accent);
}
/* Auf dunkler Flaeche braucht outline eine helle Linie */
.black-bg .button.outline,
.contrast-bg .button.outline {
    border-color: var(--white);
    color: var(--white);
}
.black-bg .button.outline:hover,
.contrast-bg .button.outline:hover {
    background: var(--white);
    color: var(--black);
}

/* --- Karte --------------------------------------------------
   Ein Baustein fuer alle Kartenmuster (Leistung, Rezension,
   Partner, Formular). Nicht pro Sektion neu definieren. */
.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 30px;
}
.grey-bg .card {
    background: var(--white);
}
.black-bg .card,
.contrast-bg .card {
    background: rgba(255, 255, 255, .05);
    border-color: rgba(255, 255, 255, .15);
}
/* Nur bei klickbaren Karten */
a.card:hover,
.card.klickbar:hover {
    border-color: var(--accent);
}

/* --- Sektionskopf -------------------------------------------
   Eyebrow + Headline links, Zusatztext rechts. Bei genug Platz
   nebeneinander, sonst untereinander. */
.section-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
    margin-bottom: 50px;
}
.section-head > *:first-child { flex: 1 1 460px; }
.section-head > *:last-child  { flex: 0 1 380px; }
.section-head > *:only-child  { flex: 1 1 100%; }

/* --- FAQ ----------------------------------------------------
   .faq-question ist ein <button>, kein <div onclick>. */
.faq-item {
    border-bottom: 1px solid var(--line);
}
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    width: 100%;
    padding: 25px 0;
    font-weight: 700;
    font-size: 1.05rem;
}
.faq-icon {
    flex-shrink: 0;
    transition: transform .3s ease;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--gold-dark);
}
.faq-icon.aktiv {
    transform: rotate(45deg);
}
/* max-height reicht fuer ca. 15 Zeilen Antwort. Bei laengeren
   Antworten den Wert erhoehen - eine Hoehe von "auto" laesst sich
   nicht animieren. */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
}
.faq-answer.aktiv {
    max-height: 1500px;
}
.faq-answer-inner {
    padding-bottom: 25px;
    color: var(--text-grey);
}

/* --- Formular (CF7) -----------------------------------------
   Die Plugin-Styles sind in functions.php abgeschaltet, deshalb
   steht das komplette Formular-CSS hier. */
.form-card label {
    display: block;
    font-weight: 700;
    font-size: .9rem;
    margin-bottom: 6px;
}
.form-card p {
    margin-bottom: 18px;
}
.form-card input[type="text"],
.form-card input[type="email"],
.form-card input[type="tel"],
.form-card textarea,
.form-card select {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--white);
    font: inherit;
    color: var(--black);
}
.form-card textarea {
    min-height: 150px;
    resize: vertical;
}
.form-card input:focus,
.form-card textarea:focus,
.form-card select:focus {
    border-color: var(--accent);
    outline: none;
}
.form-card input[type="submit"] {
    display: inline-block;
    padding: 13px 22px;
    background: var(--accent);
    color: var(--black);
    font-weight: 600;
    font-family: inherit;
    font-size: 14px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: background .25s ease;
}
.form-card input[type="submit"]:hover {
    background: var(--accent-hover);
}
/* Consent-Checkbox */
.form-card .wpcf7-acceptance .wpcf7-list-item {
    margin: 0;
}
.form-card .wpcf7-acceptance label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400;
    font-size: .85rem;
    line-height: 1.5;
}
.form-card .wpcf7-acceptance input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--accent);
}
/* Pflichtfeld-Markierung und Meldungen */
.form-card .pflicht {
    color: var(--gold-dark);
}
.wpcf7-not-valid-tip {
    display: block;
    margin-top: 6px;
    font-size: .85rem;
    color: #c00;
}
/* Live-Region fuer Screenreader: Plugin-CSS ist aus, also hier visuell verstecken
   (nicht display:none - sonst liest der Screenreader die Fehler nicht vor) */
.wpcf7 .screen-reader-response {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
/* Antwortbox nur zeigen, wenn sie eine Meldung hat */
.wpcf7 form.init .wpcf7-response-output,
.wpcf7-response-output:empty {
    display: none;
}
.wpcf7-response-output {
    margin-top: 20px !important;
    padding: 14px 18px !important;
    border: 1px solid var(--line) !important;
    border-radius: 4px;
    font-size: .95rem;
}
.wpcf7 form.sent .wpcf7-response-output {
    border-color: #2a7f3f !important;
    background: #eef7f0;
}
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output {
    border-color: #c00 !important;
    background: #fdeeee;
}
.wpcf7-spinner {
    display: none;
}
/* Honeypot- / Hidden-Felder */
.hidden-fields-container {
    visibility: hidden !important;
    position: absolute;
    left: -9999px;
}

/* --- Beitrag / Seite ----------------------------------------
   entry-content: hier stehen die Styles fuer vom Editor
   ausgegebenes HTML, das wir nicht mit Klassen versehen koennen. */
.entry-content h2,
.entry-content h3 { margin: 40px 0 15px; }
.entry-content ul,
.entry-content ol { margin: 0 0 20px 20px; }
.entry-content li { margin-bottom: 8px; }
.entry-content img { margin: 30px 0; }
.entry-content a {
    color: var(--gold-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}
.entry-content th,
.entry-content td {
    border: 1px solid var(--line);
    padding: 10px 14px;
    text-align: left;
}

.post-meta {
    display: block;
    color: var(--gold-dark);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

/* Beitragsraster (index, archive, search) */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}
.post-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}
.post-card img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 5px;
}
.post-card h3 {
    font-size: 1.3rem;
    transition: color .25s ease;
}
.post-card:hover h3 {
    color: var(--gold-dark);
}

/* Pagination */
.pagination {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 60px;
    flex-wrap: wrap;
}
.pagination .page-numbers {
    padding: 10px 16px;
    background: var(--grey);
    border-radius: 2px;
}
.pagination .page-numbers.current {
    background: var(--accent);
    color: var(--black);
}


/* ============================================================
   9  HEADER
   Nicht standardmäßig sticky, weil wir nicht bei kleinen / einfachen Seiten brauchen dass der Header standardmäßig mitläuft
============================================================ */
header {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    width: min(1180px, calc(100% - 32px));
    padding: 10px 12px 10px 24px;
    background: rgba(246, 247, 245, .62);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-radius: 999px;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Wortmarke in Header und Footer */
.logo {
    font-family: 'Newsreader', serif;
    font-size: 22px;
    letter-spacing: -0.01em;
    line-height: 1;
}

/* Unterseiten: Seitenkopf liegt nicht unter der fixierten Pille */
body:not(.home) main {
    padding-top: 80px;
}

/* Buchen-Button neben dem Burger, ab 1200px steckt er in der grossen Navi */
.header-cta {
    margin-left: auto;
}

/* Grosse Navigation ab 1200px */
#navi-big {
    display: none;
}
#navi-big ul {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 28px;
    list-style: none;
    font-size: 14px;
    font-weight: 500;
}
#navi-big .button:hover {
    color: var(--black);
}
#navi-big a:hover,
#navi-big .current-menu-item > a {
    color: var(--accent);
}

/* Burger (mobil) */
.burger {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
}
.burger span {
    display: block;
    width: 28px;
    height: 2px;
    background: var(--black);
    transition: transform .3s ease, opacity .3s ease;
}

/* Popup-Menue (mobil) */
#navi-small {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    width: 340px;
    max-width: 85vw;
    background: var(--contrast);
    color: var(--white);
    z-index: 200;
    transform: translateX(100%);
    transition: transform .35s ease;
    padding: 100px 40px 40px;
    overflow-y: auto;
    visibility: hidden;
}
#navi-small.aktiv {
    transform: translateX(0);
    visibility: visible;
}
#navi-small ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
#navi-small a {
    font-size: 1.35rem;
    font-weight: 700;
}
#navi-small a:hover {
    color: var(--accent);
}
#navi-small .close {
    position: absolute;
    top: 25px;
    right: 30px;
    font-size: 2.2rem;
    line-height: 1;
    padding: 5px;
}

/* Overlay hinter dem Popup */
.body-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease;
}
.body-overlay.aktiv {
    opacity: 1;
    visibility: visible;
}


/* ============================================================
   10  FOOTER
============================================================ */
footer {
    background: var(--black);
    color: var(--text-light);
    padding: 48px 24px;
    font-size: 14px;
}
.footer-inner {
    max-width: 1180px;
    margin-inline: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}
footer .logo {
    color: var(--white);
}
footer a:hover {
    color: var(--accent);
}
footer ul {
    list-style: none;
}


/* ============================================================
   11  EINBLENDEN BEIM SCROLLEN
   Element bekommt class="content transform transform-small".
   Der Observer in script.js setzt .aktiv, sobald es sichtbar wird.
   Namen sind fest: content / aktiv - nicht umbenennen.
============================================================ */
.content {
    opacity: 0;
    transition: opacity .8s ease, transform .8s ease;
}
.transform.transform-small  { transform: translateY(30px); }
.transform.transform-middle { transform: translateY(60px); }
.transform.transform-big    { transform: translateY(120px); }
.transform.transform-tilt   { transform: translateY(40px) rotate(-2deg); }
/* MUSS hinter den transform-Klassen stehen - gleiche Spezifitaet,
   sonst bleibt der Versatz nach dem Einblenden dauerhaft stehen. */
.content.aktiv {
    opacity: 1;
    transform: none;
}

/* Ohne JavaScript bleibt sonst die halbe Seite unsichtbar */
.no-js .content {
    opacity: 1;
    transform: none;
}


/* ============================================================
   12  SWIPER-BASIS
   Slider-spezifisches CSS und die Initialisierung kommen INLINE
   ins jeweilige Slider-Template - jeder Slider hat eigene
   breakpoints, slidesPerView, loop, autoplay.
============================================================ */
.swiper {
    width: 100%;
    overflow: hidden;
}
.swiper-pagination-bullet {
    background: var(--accent);
    opacity: .35;
}
.swiper-pagination-bullet-active {
    opacity: 1;
}
.swiper-button-next,
.swiper-button-prev {
    color: var(--accent);
}


/* ============================================================
   12a  STARTSEITE (Wolken, Sektionen)
   Die Scroll-Animationen laufen in script.js (ein rAF-Loop, nur
   transform / opacity / filter). Hier steht der Ausgangszustand.
============================================================ */

/* --- Wolken (Dekorbilder) -------------------------------------
   Position/Breite/Opacity stehen als Inline-Werte am Bild
   (parts/wolke.php), die Zentrierung hier. */
.wolke {
    position: absolute;
    max-width: none;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.wolke.flip {
    transform: translate(-50%, -50%) scaleX(-1);
}

/* Sticky-Buehne: 100vh-Viewport innerhalb einer hohen Scroll-Sektion */
.sticky-buehne {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}
.sticky-mitte {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
}

/* --- Hero ---------------------------------------------------- */
.hero-wolken {
    position: relative;
    height: 320vh;
}
.hero-bg {
    position: absolute;
    top: -4%;
    left: -4%;
    width: 108%;
    height: 108%;
    max-width: none;
    object-fit: cover;
    transform: scale(1.15);
}
.hero-glanz {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(250, 250, 246, .55), rgba(250, 250, 246, 0) 70%);
}
/* Weicher Uebergang in die erste dunkle Sektion */
.hero-uebergang {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 45vh;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(227, 229, 216, 0) 0%, rgba(227, 229, 216, .35) 40%, rgba(227, 229, 216, .8) 75%, #e3e5d8 100%);
}
.hero-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 24px;
}
.hero-text .eyebrow {
    color: var(--text-grey);
    margin-bottom: 20px;
}
.hero-h1 {
    font-size: clamp(18px, 1.7vw, 26px);
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -0.005em;
    max-width: 30em;
    margin-bottom: 28px;
    color: var(--text-grey);
}
.hero-lead {
    font-size: clamp(30px, 4.4vw, 68px);
    line-height: 1.12;
    letter-spacing: -0.015em;
    max-width: 17em;
}
.hero-text .button,
.himmel .button {
    align-self: center;
    max-width: 100%;
    white-space: normal;   /* langer Button-Text darf mobil umbrechen */
    text-align: center;
}
.hero-sub {
    font-size: clamp(16px, 1.3vw, 19px);
    line-height: 1.6;
    max-width: 34em;
    margin-top: 36px;
    color: #2f3e4d;
    text-wrap: pretty;
}
/* Mit JS startet der Text unsichtbar und wird beim Scrollen eingeblendet.
   Ohne JS bleibt er stehen, die Wolken dagegen werden ausgeblendet. */
.js .hero-text { opacity: 0; }
html:not(.js) .hero-wolken .wolke { display: none; }

.hero-hinweis {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    padding: 0 24px;
}
.hero-hinweis-satz {
    font-family: 'Newsreader', serif;
    font-style: italic;
    font-size: 22px;
}
.hero-hinweis-label {
    font-size: 12px;
    letter-spacing: .2em;
    text-transform: uppercase;
    font-weight: 600;
}
.hero-hinweis-linie {
    width: 1px;
    height: 48px;
    background: var(--black);
    opacity: .5;
}

/* --- Drei Gedanken ------------------------------------------- */
.gedanke {
    position: relative;
    height: 240vh;
    background: var(--contrast);
    color: var(--white);
}
/* Bewusst weicher Uebergang hell -> dunkel */
.gedanke-1 {
    background: linear-gradient(180deg, #e3e5d8 0%, #d9dfd9 5%, #c6d0d3 10%, #a9b6bf 16%, #8695a3 22%, #647487 28%, #4a5a6c 34%, #38475a 40%, #2e3b4a 46%, #2b3845 52%, #2b3845 100%);
}
.gedanke-3 {
    background: linear-gradient(180deg, #2b3845 0%, #2b3845 60%, #3d4d5d 100%);
}
.gedanke-inhalt {
    position: relative;
    text-align: center;
}
.angebot .eyebrow,
.gedanke .eyebrow {
    color: var(--accent);
}
.gedanke .eyebrow {
    margin-bottom: 40px;
}
.statement {
    font-size: clamp(38px, 6.4vw, 104px);
    line-height: 1.04;
    letter-spacing: -0.025em;
    color: var(--white);
}
.statement .kursiv {
    color: var(--accent);
}
.zusatz {
    max-width: 34em;
    margin: 40px auto 0;
    font-size: clamp(16px, 1.5vw, 22px);
    line-height: 1.6;
    color: var(--text-light);
    text-wrap: pretty;
}
/* Mit JS startet der Zusatz unten und unsichtbar, script.js fliegt ihn ein */
.js .zusatz {
    opacity: 0;
    transform: translateY(60px);
}
/* Wort-Spans entstehen in script.js. Gedimmt startet bei 30 %, nie tiefer. */
.statement [data-word] {
    opacity: .3;
    transition: opacity .25s linear;
}

/* --- Angebot ------------------------------------------------- */
.angebot {
    position: relative;
    overflow: hidden;
    background: var(--night-2);
    color: var(--white);
}
.angebot .max-width-1180 {
    position: relative;
}
.head-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 48px 80px;
    align-items: end;
    margin-bottom: 96px;
}
.angebot-text {
    font-size: 18px;
    line-height: 1.65;
    max-width: 32em;
    color: #d5dce1;
    text-wrap: pretty;
}
.angebot-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    border-top: 1px solid rgba(243, 244, 241, .22);
}
.angebot-item {
    padding: 40px 32px 8px 0;
    gap: 16px;
}
.kennzahl {
    font-family: 'Newsreader', serif;
    font-size: 56px;
    font-weight: 300;
    line-height: 1;
    color: var(--accent);
}
.angebot-item h3 {
    font-family: 'Manrope', sans-serif;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.3;
}
.angebot-item p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-light);
    text-wrap: pretty;
}

/* --- Termine ------------------------------------------------- */
.termine-text {
    font-size: 16px;
    line-height: 1.6;
    max-width: 26em;
    color: var(--text-grey);
}
.termine-liste {
    border-top: 1px solid var(--line);
}
.termin {
    display: grid;
    grid-template-columns: minmax(110px, 160px) minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding: 28px 0;
    border-bottom: 1px solid var(--line);
}
.termin-datum {
    font-family: 'Newsreader', serif;
    font-size: 30px;
    font-weight: 300;
}
.termin-titel {
    font-size: 18px;
    font-weight: 600;
}
.termin-meta {
    font-size: 15px;
    color: var(--text-grey);
}

/* --- Ueber mich ---------------------------------------------- */
.ueber-mich {
    background: var(--grey);
    overflow: hidden;
}
.ueber-mich .double-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 64px 96px;
    align-items: start;   /* Portrait oben buendig mit dem Text */
}
.portrait {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    background: repeating-linear-gradient(135deg, #d7dde1 0 12px, #dfe4e7 12px 24px);
}
.portrait img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.platzhalter {
    padding: 20px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-grey);
}
.ueber-mich-text {
    font-size: 18px;
    line-height: 1.65;
}
.ueber-mich-text p {
    margin-bottom: 1.2em;
}
.ueber-mich-text h3 {
    font-size: clamp(1.25rem, 1.8vw, 1.6rem);
    margin-bottom: 1em;
    color: var(--gold-dark);
}
.ueber-mich-text .lead {
    font-family: 'Newsreader', serif;
    font-size: clamp(1.25rem, 1.9vw, 1.6rem);
    font-weight: 300;
    line-height: 1.4;
}
.ueber-mich-text .abschluss {
    font-family: 'Newsreader', serif;
    font-style: italic;
    font-size: 1.5rem;
    margin-top: 1.5em;
}

/* --- Unterseite mit Titelbild ---------------------------------
   Bild liegt hinter dem Text, der Kopf reicht bis unter die fixierte
   Navigation. Der helle Glanz haelt den Text lesbar (wie im Hero). */
.unterseite-bild {
    position: relative;
    overflow: hidden;
    margin-top: -80px;   /* hebt den Abstand von main auf Unterseiten auf */
    padding-top: calc(80px + clamp(100px, 16vh, 180px));
}
.unterseite-bild-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
}
.unterseite-bild::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 90% at 30% 55%, rgba(250, 250, 246, .6), rgba(250, 250, 246, 0) 75%);
}
.unterseite-bild > div {
    position: relative;
    z-index: 1;
}

/* --- Kontaktseite: Gruende fuer eine Anfrage --------------------- */
#kontakt .double-grid {
    align-items: start;
    gap: 60px;
}
.kontakt-punkte {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 10px;
}
.kontakt-punkte li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 20px;
    border-left: 2px solid var(--accent);
}
.kontakt-punkte span {
    color: var(--text-grey);
}

/* --- YouTube-Icon / -Link ------------------------------------- */
.icon-youtube {
    flex-shrink: 0;
}
.footer-youtube {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.kontakt-punkte .button {
    margin-top: 10px;
    align-self: flex-start;
}
/* Outline-Button auf der dunklen Angebot-Sektion */
.angebot .button.outline {
    border-color: var(--white);
    color: var(--white);
}
.angebot .button.outline:hover {
    background: var(--white);
    color: var(--black);
}

/* --- Klarer Himmel ------------------------------------------- */
.himmel {
    position: relative;
    height: 100vh;
    min-height: 640px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 24px;
    background: linear-gradient(180deg, #e9edef 0%, #c9d6df 40%, #f6e7b8 100%);
}
.himmel-glow {
    position: absolute;
    left: 50%;
    bottom: -38vh;
    width: 90vh;
    height: 90vh;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(242, 191, 58, .55), rgba(242, 191, 58, 0) 65%);
    pointer-events: none;
}
.himmel-inhalt {
    position: relative;
}
.himmel-headline {
    font-size: clamp(40px, 6vw, 96px);
    line-height: 1.04;
    letter-spacing: -0.025em;
    max-width: 12em;
}

@media (max-width: 700px) {
    .termin {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .head-grid {
        margin-bottom: 56px;
    }
}


/* ============================================================
   13  RESPONSIVE
============================================================ */
@media (min-width: 1200px) {
    #navi-big { display: block; }
    .burger   { display: none; }
    .header-cta { display: none; }
}

@media (max-width: 1100px) {
    .triple-grid { grid-template-columns: repeat(2, 1fr); }
    .post-grid   { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .double-grid,
    .triple-grid,
    .post-grid {
        grid-template-columns: 1fr;
    }
    /* Ohne zwei Spalten braucht auch die Umkehrung nicht mehr zu greifen */
    .double-grid.reverse > *:first-child { order: 0; }
    h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
}

@media (max-width: 400px) {
    body { font-size: 17px; }
}


/* ============================================================
   14  BARRIEREFREIHEIT
============================================================ */
/* Sichtbarer Fokus - nie wegstylen */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--black);
    outline-offset: 3px;
    border-radius: 2px;
}
/* Auf dunklen Flaechen Gold */
.black-bg :focus-visible,
.contrast-bg :focus-visible,
.angebot :focus-visible,
.gedanke :focus-visible,
footer :focus-visible,
#navi-small :focus-visible {
    outline-color: var(--accent);
}

/* Sprunglink zum Inhalt - erst beim Tabben sichtbar */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
}
.skip-link:focus {
    left: 5vw;
    top: 10px;
    z-index: 300;
    background: var(--black);
    color: var(--white);
    padding: 12px 20px;
}

/* Nur fuer Screenreader */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
    .content {
        opacity: 1;
        transform: none;
    }
    /* Keine Wolkenbewegung: Wolken weg, Text sofort sichtbar */
    .wolke { opacity: 0 !important; }
    .js .hero-text { opacity: 1; }
    .js .zusatz { opacity: 1; transform: none; }
    .hero-bg { transform: none; }
}
