/*
Theme Name: OpenHaus
Theme URI: https://haudegen-webdesign.de
Author: Haudegen Webdesign
Author URI: https://haudegen-webdesign.de
Description: Haudegen-Theme fuer OpenHaus (open-haus.io). Dunkles Design, Leitungs-Bewegungssystem.
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
   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 {
    /* Dunkles Design: --black ist die Seitenflaeche, --white die helle
       Schrift. Die Namen bleiben (Core), die Werte sind die OpenHaus-Palette. */
    --black: #141D29;        /* Seitenhintergrund */
    --white: #E8EEF6;        /* Ueberschriften, helle Schrift */
    --grey: #18222F;         /* aufgehellte Sektionsflaeche - NIE Text */
    --text-grey: #9BAAC0;    /* Standard-Fliesstext */
    --line: #2A3A50;         /* Trennlinie, Kartenrahmen, Feature-Zellen */
    --accent: #4D8EDE;       /* Buttons, aktive Zustaende */
    --accent-hover: #5796E2;
    --contrast: #1F2A38;     /* Karten, Feature-Sektion */

    /* Projektspezifisch (OpenHaus) */
    --deep: #101822;         /* Code-/Flow-Boxen */
    --line-2: #354862;       /* staerkere Linie, Sekundaerbutton */
    --line-3: #415878;       /* Hover-Rand Sekundaerbutton */
    --text-2: #A9B7CB;       /* Hero-/Kartentext */
    --text-muted: #8595AC;   /* Eyebrow, Labels */
    --link: #6BA5F0;         /* Links, Preise */
    --highlight: #9CC4F7;    /* Link-Hover, Fokus, Lichtimpulse */
    --on-accent: #08111C;    /* Schrift auf blauem Button */
    --ok: #2DD4AA;
    --warn: #F2B33D;
}


/* ============================================================
   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: 'Archivo';
    src: url('fonts/archivo-variable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IBM Plex Sans';
    src: url('fonts/ibm-plex-sans-variable.woff2') format('woff2');
    font-weight: 100 700;
    font-style: normal;
    font-display: swap;
}
/* Plex Mono gibt es nicht variabel - zwei statische Schnitte */
@font-face {
    font-family: 'IBM Plex Mono';
    src: url('fonts/ibm-plex-mono-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IBM Plex Mono';
    src: url('fonts/ibm-plex-mono-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}


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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
    color: var(--text-grey);
    background: var(--black);
    line-height: 1.7;
    font-size: 17px;
    /* 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;
}


/* ============================================================
   4  TYPOGRAFIE
============================================================ */
h1, h2, h3, h4 {
    font-family: 'Archivo', sans-serif;
    color: var(--white);
    line-height: 1.2;
    font-weight: 600;
    text-wrap: balance;
}

h1 {
    font-size: clamp(36px, 5vw, 58px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -.5px;
}
h2 { font-size: 32px; }
h2.gross { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; }
h3 { font-size: 19px; }
h4 { font-size: 16px; }

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

.text-small { font-size: .9rem; }
.text-lead { font-size: 19px; line-height: 1.6; color: var(--text-2); }

/* 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-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.3;
    color: var(--text-muted);
    margin-bottom: 16px;
}
/* Auf der aufgehellten Feature-Sektion etwas heller */
.contrast-bg .eyebrow { color: var(--text-grey); }

/* Links im Fliesstext */
.link { color: var(--link); transition: color .25s; }
.link:hover { color: var(--highlight); }


/* ============================================================
   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); }

/* Dunkles Design: die Hintergrundklassen setzen nur die Flaeche,
   die Schriftfarbe kommt vom body. */
.black-bg { background: var(--black); }
.grey-bg { background: var(--grey); }
.contrast-bg { background: var(--contrast); }
.accent-bg { background: var(--accent); color: var(--on-accent); }

/* Jede Sektion in <main> schliesst unten mit einer Linie ab */
main > section { border-bottom: 1px solid var(--line); }


/* ============================================================
   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: 96px 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; }  /* OpenHaus-Seitencontainer */
.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; }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }


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

/* --- Button -------------------------------------------------
   Varianten als zweite Klasse: class="button outline" (Sekundaer),
   class="button pill" (Nav-Button). Der Leitungsimpuls beim Hover
   kommt aus script.js (leitungsimpuls) und setzt Spans INS Element. */
.button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    align-self: flex-start;
    padding: 15px 28px;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    border-radius: 10px;
    transition: background .3s ease, border-color .3s ease;
}
.button:hover {
    background: var(--accent-hover);
    color: var(--on-accent);
}
.button.outline {
    background: transparent;
    border: 1px solid var(--line-2);
    color: var(--white);
}
.button.outline:hover {
    background: transparent;
    border-color: var(--line-3);
    color: var(--white);
}
.button.klein { font-size: 15px; padding: 13px 24px; }
.button.outline.klein { padding: 12px 23px; }
.button.pill {
    font-size: 14px;
    padding: 9px 18px;
    border-radius: 999px;
}
/* Eltern von Buttons: Impuls-Linie liegt bei blauen Buttons HINTER dem Button */
.button-row {
    isolation: isolate;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* Leitungsimpuls (Hover/Fokus): Glow + je eine Leitung mit Lichtkugel
   nach links und rechts. Spans werden von script.js erzeugt. */
.impuls-glow,
.impuls-rand,
.impuls-seite {
    position: absolute;
    pointer-events: none;
}
.impuls-glow {
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 0 1px rgba(156, 196, 247, .8), 0 0 18px 3px rgba(77, 142, 222, .5);
    animation: ohGlow 360ms ease-out both;
}
.impuls-rand {
    inset: -1px;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px var(--highlight);
    animation: ohGlow 360ms ease-out both;
}
.impuls-seite {
    top: 50%;
    height: 16px;
    margin-top: -8px;
    overflow: hidden;
}
.impuls-seite.links  { right: 100%; }
.impuls-seite.rechts { left: 100%; }
.impuls-linie {
    position: absolute;
    top: 50%;
    height: 1px;
    margin-top: -.5px;
    animation: ohLead 380ms cubic-bezier(.2, .7, .3, 1) both;
}
.links  .impuls-linie { right: 0; background: linear-gradient(270deg, var(--highlight), rgba(77, 142, 222, 0)); }
.rechts .impuls-linie { left: 0;  background: linear-gradient(90deg,  var(--highlight), rgba(77, 142, 222, 0)); }
.impuls-kugel {
    position: absolute;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-radius: 50%;
    background: #F2F7FF;
    box-shadow: 0 0 6px 2px var(--link), 0 0 14px 4px rgba(77, 142, 222, .6);
}
.links  .impuls-kugel { right: -3px; animation: ohOrbL 360ms cubic-bezier(.3, .6, .3, 1) both; }
.rechts .impuls-kugel { left: -3px;  animation: ohOrbR 360ms cubic-bezier(.3, .6, .3, 1) both; }
/* Blaue Buttons: Impuls hinter dem Button */
.button:not(.outline) .impuls-glow,
.button:not(.outline) .impuls-seite { z-index: -1; }

@keyframes ohLead { 0% { width: 0; opacity: 1; } 55% { width: 56px; opacity: 1; } 100% { width: 56px; opacity: 0; } }
@keyframes ohOrbL { 0% { transform: translateX(0); opacity: 1; } 100% { transform: translateX(-62px); opacity: 0; } }
@keyframes ohOrbR { 0% { transform: translateX(0); opacity: 1; } 100% { transform: translateX(62px); opacity: 0; } }
@keyframes ohGlow { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }

/* --- Karte --------------------------------------------------
   Ein Baustein fuer alle Kartenmuster (Architektur, Preise, Formular).
   Nicht pro Sektion neu definieren. */
.card {
    background: var(--contrast);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 28px;
}
/* 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(--accent);
}
.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: 8px;
    background: var(--deep);
    font: inherit;
    color: var(--white);
}
.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: 14px 32px;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
    font-family: inherit;
    font-size: inherit;
    border: 0;
    border-radius: 10px;
    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(--accent);
}
.wpcf7-not-valid-tip {
    display: block;
    margin-top: 6px;
    font-size: .85rem;
    color: #ff8080;
}
.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: var(--ok) !important;
    background: rgba(45, 212, 170, .1);
}
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output {
    border-color: #ff8080 !important;
    background: rgba(255, 128, 128, .08);
}
.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(--link);
    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(--accent);
    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(--accent);
}

/* 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: 8px;
}
.pagination .page-numbers.current {
    background: var(--accent);
    color: var(--on-accent);
}


/* --- OpenHaus-Sektionen -------------------------------------
   Gemeinsame Bausteine zuerst, dann je Sektion. Texte stehen in
   front-page.php, hier nur Optik. */

/* Haus-Symbol aus dem Logo: Bild enthaelt Symbol + "Haus"-Schriftzug,
   der Container schneidet oben das Symbol aus (Entwurf-Vorgabe).
   Besser: Symbol als eigenes SVG, sobald es vorliegt. */
.logo-symbol {
    display: block;
    flex-shrink: 0;
    width: 160px;
    height: 50px;
    overflow: hidden;
}
.logo-symbol.gross { width: 40px; height: 29px; }
.logo-symbol img { width: 100%; height: auto; }

/* Einleitung einer Sektion: Eyebrow, H2, optional Absatz */
.section-intro h2 { max-width: 640px; margin-bottom: 16px; }
.section-intro h2:last-child { margin-bottom: 48px; }
.section-intro p { max-width: 66ch; margin-bottom: 48px; }

/* Mono-Label (Karten, Plugin-Box) */
.mono-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Status-Pill (Architektur) und Badge (Preise) */
.status {
    flex-shrink: 0;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
}
.status.ok    { color: var(--ok); background: rgba(20, 191, 152, .15); }
.status.alpha { color: var(--on-accent); background: var(--warn); }

/* Hintergrund-Leitungen: <canvas class="leitungen"> in einer Sektion mit .has-leitungen */
.has-leitungen {
    position: relative;
    overflow: hidden;
}
.has-leitungen > .max-width-1180 { position: relative; }
canvas.leitungen {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}

/* Hero */
.hero.section-padding { padding: 120px 24px 100px; }
.hero .eyebrow { margin-bottom: 20px; }
.hero h1 { max-width: 760px; margin-bottom: 24px; }
.hero .text-lead { max-width: 600px; margin-bottom: 40px; }

/* Zweispaltig: Titel links, Text rechts (Problem, Partner, Plugin-Kopf) */
.split {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 64px;
    align-items: start;
}
.split-text {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 8px;
}
.split-text .betont { color: var(--white); font-weight: 500; }

/* Oberflaeche: Laptop + Smartphone */
.oberflaeche {
    background-image: radial-gradient(ellipse 50% 70% at 72% 55%, rgba(77, 142, 222, .14) 0%, rgba(77, 142, 222, 0) 70%);
}
.oberflaeche.section-padding { padding: 88px 24px 104px; }
.shot-grid {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr);
    gap: 56px;
    align-items: center;
}
.shot-wrap {
    position: relative;
    padding: 0 26% 8% 6%;
}
.shot-phone {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 25%;
}

/* Architektur */
.arch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.arch-grid .card,
.preis-grid .card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}
.card-kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.flow {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12.5px;
    line-height: 1.9;
    color: var(--link);
    background: var(--deep);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px;
    overflow-wrap: break-word;
}
.arch-grid .card p,
.preis-grid .card p { font-size: 15px; line-height: 1.6; }

/* Geraete & Plugins */
.plugin-box {
    display: flex;
    flex-direction: column;
    gap: 40px;
    background: var(--grey);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 48px;
}
.plugin-box .split {
    padding-bottom: 40px;
    border-bottom: 1px solid var(--line);
}
.plugin-box .split > p { padding-top: 8px; }
.plugin-flow {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(40px, .3fr) minmax(0, .75fr) minmax(40px, .3fr) minmax(0, .75fr);
    align-items: center;
}
.plugin-geraete { display: flex; flex-direction: column; gap: 14px; }
.plugin-tags {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.plugin-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-grey);
    background: var(--black);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background .5s, border-color .5s, color .5s, box-shadow .6s;
}
.plugin-tag.aktiv {
    color: var(--white);
    background: rgba(77, 142, 222, .16);
    border-color: rgba(107, 165, 240, .45);
    box-shadow: 0 0 10px rgba(107, 165, 240, .45), 0 0 26px rgba(107, 165, 240, .22), inset 0 0 10px rgba(156, 196, 247, .12);
}
.flow-wrap { overflow: hidden; padding: 14px 0; }
.flow-line {
    position: relative;
    height: 1px;
    background: rgba(77, 142, 222, .28);
}
.puls {
    position: absolute;
    top: -12px;
    left: 0;
    width: 84px;
    height: 24px;
    opacity: 0;
    pointer-events: none;
    animation: oh-line 3.2s var(--delay, 0s) cubic-bezier(.45, 0, .55, 1) infinite;
}
.puls-spur {
    position: absolute;
    left: 0;
    right: 12px;
    top: 11px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, rgba(156, 196, 247, 0) 0%, rgba(156, 196, 247, .35) 100%);
}
.puls-kugel {
    position: absolute;
    right: 0;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(240, 245, 252, .85) 0%, rgba(200, 220, 248, .5) 18%, rgba(156, 196, 247, .14) 50%, rgba(156, 196, 247, 0) 70%);
}
@keyframes oh-line {
    0%   { left: -72px; opacity: 0; }
    18%  { opacity: 1; }
    82%  { opacity: 1; }
    100% { left: calc(100% - 12px); opacity: 0; }
}
.plugin-karte,
.openhaus-karte {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-height: 156px;
    padding: 22px;
    background: var(--contrast);
    border: 1px solid var(--line);
    border-radius: 14px;
}
.plugin-karte {
    border-color: rgba(107, 165, 240, .45);
    box-shadow: 0 0 14px rgba(107, 165, 240, .4), 0 0 38px rgba(107, 165, 240, .18), inset 0 0 18px rgba(156, 196, 247, .1);
}
.openhaus-karte { align-items: center; text-align: center; }
.plugin-karte strong,
.openhaus-karte strong {
    font-family: 'Archivo', sans-serif;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.plugin-karte span:last-child,
.openhaus-karte span:last-child { font-size: 14px; line-height: 1.5; }

/* Features */
main > section.contrast-bg { border-bottom-color: var(--line-2); }
.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line-2);
    border: 1px solid var(--line-2);
    border-radius: 16px;
    overflow: hidden;
}
.feature-grid > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 28px 24px;
    background: var(--line);
}
.feature-grid h3 { font-size: 16px; }
.feature-grid p { font-size: 14px; line-height: 1.55; color: var(--text-2); }

/* Foto-Sektionen (Community, Kontakt): Bild als <img> mit Verlauf davor */
.foto-sektion {
    position: relative;
    overflow: hidden;
    background: var(--black);
}
.foto-sektion .foto {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
}
.foto-sektion .verlauf {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(20, 29, 41, .97) 0%, rgba(20, 29, 41, .9) 32%, rgba(20, 29, 41, .45) 52%, rgba(20, 29, 41, 0) 70%);
}
.foto-inhalt {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 540px;
    padding: 110px 24px;
}
.foto-sektion h2 { margin-bottom: 20px; }
.foto-community h2 { max-width: 460px; }
.foto-community p { max-width: 420px; margin-bottom: 32px; }
.foto-kontakt .foto { object-position: right 30%; }
.foto-kontakt .verlauf {
    background: linear-gradient(90deg, rgba(20, 29, 41, .94) 0%, rgba(20, 29, 41, .82) 38%, rgba(20, 29, 41, .15) 68%, rgba(20, 29, 41, 0) 100%);
}
.foto-kontakt .foto-inhalt { min-height: 620px; padding: 120px 24px; }
.foto-kontakt h2 { max-width: 520px; }
.foto-kontakt .text-2 { max-width: 480px; margin-bottom: 16px; color: var(--text-2); }
.mono-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    color: var(--text-grey);
}
.foto-kontakt .mono-text { display: block; }
.foto-kontakt .name { margin-bottom: 28px; }
.foto-kontakt .button-row { flex-direction: column; align-items: flex-start; gap: 12px; }

/* API */
.api-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.api-grid h2 { margin-bottom: 16px; }
.api-grid .text { margin-bottom: 24px; }
.link-row { display: flex; flex-wrap: wrap; gap: 24px; font-size: 15px; font-weight: 600; }
.code-box {
    background: var(--deep);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 24px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13.5px;
    line-height: 1.8;
    color: var(--text-grey);
    overflow: auto;
}
.code-box > div + div { margin-top: 12px; }
.code-box .get  { color: var(--link); }
.code-box .post { color: var(--highlight); }
.code-box .hinweis { display: block; padding-left: 1.2em; color: var(--text-muted); }

/* Preise */
.preis-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.preis-grid .card { padding: 32px; gap: 12px; }
.preis-grid .card.hell { border-color: var(--line-2); }
.preis-grid .card-kopf { min-height: 25px; }
.preis-grid h3 { line-height: 1.3; }
.preis-grid .preis {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 22px;
    line-height: 1.3;
    color: var(--link);
}
.preis-grid .card p { flex: 1; }

/* Android-APK */
.android {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}
.android-text { flex: 1 1 380px; max-width: 560px; }
.android-text h2 { margin-bottom: 16px; }
.android-text p { font-size: 16px; line-height: 1.6; text-wrap: pretty; }
.apk-kachel {
    flex: 0 1 440px;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px 20px 20px;
    background: var(--contrast);
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--white);
    transition: border-color .2s, background .2s;
}
.apk-kachel:hover { border-color: var(--accent); background: #223044; }
.apk-icon {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--grey);
    border: 1px solid var(--line);
    border-radius: 14px;
}
.apk-icon img { width: 44px; height: auto; }
.apk-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.apk-text .mono-label { font-size: 12px; }
.apk-name {
    font-family: 'Archivo', sans-serif;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.1;
    color: var(--white);
}
.apk-pfeil {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent);
    border-radius: 999px;
    color: var(--link);
}


/* ============================================================
   9  HEADER
   sticky, damit <main> keinen Offset braucht.
============================================================ */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    background: rgba(24, 34, 47, .94);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line);
    padding: 0 24px;
}
.header-inner {
    max-width: 1180px;
    height: 72px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
}
.logo-text {
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    font-size: 19px;
    letter-spacing: -.2px;
}

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

/* Burger (mobil) */
.burger {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    margin-right: -10px;
}
.burger span {
    display: block;
    width: 28px;
    height: 2px;
    background: var(--white);
    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(--grey);
    border-left: 1px solid var(--line);
    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-family: 'Archivo', sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
}
#navi-small a:hover {
    color: var(--link);
}
#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, .6);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease;
}
.body-overlay.aktiv {
    opacity: 1;
    visibility: visible;
}


/* ============================================================
   10  FOOTER
============================================================ */
footer {
    background: var(--grey);
    padding: 24px;
}
.footer-inner {
    max-width: 1180px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}
.footer-links,
.footer-rechts {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.footer-links { gap: 36px; }
.footer-rechts { gap: 32px; }
.footer-links img { width: 56px; height: auto; }
.footer-links .mono-text,
.footer-recht { color: var(--text-muted); }
.footer-recht a:hover { color: var(--link); }
.footer-icons { display: flex; gap: 12px; }
.icon-kachel {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--contrast);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text-grey);
    transition: color .2s, border-color .2s;
}
.icon-kachel:hover { color: var(--link); border-color: var(--accent); }


/* ============================================================
   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);
}


/* ============================================================
   13  RESPONSIVE
   Entwurf liefert nur Desktop - der Mobilumbau (eine Spalte, Flow
   senkrecht, Fotos mit durchgehend dunklem Verlauf) ist ergaenzt.
============================================================ */
@media (min-width: 1200px) {
    #navi-big { display: block; }
    .burger   { display: none; }
}

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

@media (max-width: 900px) {
    .double-grid,
    .triple-grid,
    .post-grid,
    .split,
    .shot-grid,
    .arch-grid,
    .api-grid,
    .preis-grid {
        grid-template-columns: 1fr;
    }
    .split, .shot-grid, .api-grid { gap: 32px; }
    /* Ohne zwei Spalten braucht auch die Umkehrung nicht mehr zu greifen */
    .double-grid.reverse > *:first-child { order: 0; }
    .section-padding { padding: 64px 24px; }
    .hero.section-padding { padding: 80px 24px 64px; }
    .oberflaeche.section-padding { padding: 64px 24px 72px; }
    h2 { font-size: 28px; }

    .plugin-box { padding: 28px; gap: 28px; }
    .plugin-box .split { padding-bottom: 28px; }
    .plugin-flow { grid-template-columns: 1fr; gap: 0; }
    /* Verbindung senkrecht, ohne wandernden Impuls */
    .flow-wrap { display: flex; justify-content: center; height: 44px; padding: 0; }
    .flow-line { width: 1px; height: 100%; }
    .puls { display: none; }

    .foto-inhalt,
    .foto-kontakt .foto-inhalt { min-height: 0; padding: 72px 24px; }
    .foto-sektion .verlauf,
    .foto-kontakt .verlauf {
        background: linear-gradient(180deg, rgba(20, 29, 41, .94) 0%, rgba(20, 29, 41, .8) 100%);
    }
    .android { gap: 32px; }
}

@media (max-width: 600px) {
    .feature-grid { grid-template-columns: 1fr; }
    .footer-links, .footer-rechts { gap: 20px; }
}

@media (max-width: 400px) {
    body { font-size: 16px; }
    .section-padding { padding: 56px 20px; }
    .apk-name { font-size: 24px; }
}


/* ============================================================
   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(--highlight);
    outline-offset: 3px;
}
.button.outline:focus-visible { outline-color: var(--link); }

/* Sprunglink zum Inhalt - erst beim Tabben sichtbar */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
}
.skip-link:focus {
    left: 24px;
    top: 10px;
    z-index: 300;
    background: var(--accent);
    color: var(--on-accent);
    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;
    }
    /* Leitungsimpuls und wandernde Lichtpunkte aus */
    .puls { animation: none; }
    .impuls-glow, .impuls-rand, .impuls-seite { display: none; }
}
