/* ============================================================
   Jan Gutzeit – Werbefotograf Dresden
   Shared stylesheet – loaded by all pages

   ARCHITECTURE — split-panel layout:
   ┌─ LEFT PANEL (statische Sidebar) ─────────────────────┐
   │  .site-name · .site-subtitle                          │
   │  .left-teaser (h2 + p)                                │
   │  .bottom-links (copyright via main.js)                │
   ├─ MENU LAYER (Overlay, rechts) ────────────────────────┤
   │  .menu-contact-top · .section-label · .menu-main      │
   │  .menu-secondary (Impressum, Social, …)               │
   └─ RIGHT PANEL (scrollbar) ─────────────────────────────┘
     .leistung-hero (100vh Bild)
     .leistung-content (Text, dark bg)

   Design Tokens: --panel-pad, --gutter, Typo-Skala (--text … --display)  (→ :root)
   Typografie: Inter (Google Fonts) + modulare rem/clamp-Skala
   JS: main.js – Menü, Scroll-Hint, Theme
   ============================================================ */


/* ── DESIGN TOKENS ── */
:root {
  --panel-pad: 5.55vw 5vw calc(2.2vw - 14px) 3.2vw;
  --gutter:    3.2vw;

  /* Schriftfamilie – Inter (Google Fonts, Logo-Schrift vom Briefbogen).
     Display & Text identisch – Hierarchie über Größe/Gewicht. */
  --font-display: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-text:    "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Modulare Typo-Skala – Root = 16px (skaliert auf großen Monitoren, s.u.)
     Fließtext-Untergrenze 1.125rem = 18px (nie kleiner). */
  --text:     clamp(1.125rem, .95rem + .28vw, 1.2rem);
  --label:    .8rem;
  --subtitle: clamp(.85rem, .72rem + .4vw, 1.2rem);
  --h3:       clamp(1.25rem, 1.05rem + .7vw, 1.7rem);
  --h2:       clamp(1.6rem, 1.2rem + 1.6vw, 2.6rem);
  --display:  clamp(2.5rem, 1.7rem + 3.2vw, 4.5rem);

  /* Gemeinsames Satzmaß (Punkt 2) – root-relativ, damit Überschriften
     und Fließtext an derselben Kante fluchten (≈ 65 Zeichen). */
  --measure:  40rem;

  /* Gleiche Unterkante links/rechts (Gruppe 1) */
  --gap-edge: clamp(2.5rem, 6vh, 5rem);

  /* Vertikaler Rhythmus (Punkt 4) */
  --leading:  1.6;
  --para-gap: 0.9em;

  /* Spacing-Skala (Punkt 7) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 40px;
  --space-6: 64px;
  --space-7: 96px;

  /* Farben – Light (warm, Punkt 8) */
  --bg: #FAFAF8;
  --fg: #1A1A1A;
}

/* Farben – Dark (Punkt 8) */
html[data-theme="dark"] {
  --bg: #0E0E0E;
  --fg: #E7E7E4;
}

/* Punkt 1 – Große Monitore: Root-Schrift stufenweise anheben.
   Alle rem-Werte (Skala + Satzmaß) wachsen dadurch proportional mit.
   14" (≈1512px) bleibt unter 1680px → 16px, also unverändert. */
@media (min-width: 1680px) { :root { font-size: 17.5px; } }
@media (min-width: 1920px) { :root { font-size: 19px; } }   /* 24"-Monitore (Full HD) */
@media (min-width: 2300px) { :root { font-size: 20px; } }
@media (min-width: 2560px) { :root { font-size: 21px; } }

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


/* ── SKIP LINK (accessibility: keyboard users) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: .5rem 1rem;
  background: #212529;
  color: #fff;
  font-size: .85rem;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  transition: top .15s;
}
.skip-link:focus { top: 0; }


/* ── FOCUS STYLES (keyboard navigation – WCAG 2.1 AA) ── */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid #212529;
  outline-offset: 3px;
}
.lightbox-img:focus-visible,
.right-panel img:focus-visible { outline: none; }


/* ── BASE ── */
html,
body {
  height: 100%;
  min-height: 100dvh;
  color: var(--fg);
  background: var(--bg);
}
html {
  font-size: 16px;            /* Root = 16px → stabile rem-Skala */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body {
  font-family: var(--font-text);
  font-size: var(--text);
  line-height: var(--leading);
  font-kerning: normal;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

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


/* ── VISUALLY HIDDEN (SEO h1) ── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}


/* ============================================================
   TYPOGRAPHY — DESKTOP BASELINE
   Shared selectors cover left panel + menu layer + right panel
   ============================================================ */

/* HEAD – name */
/* Wortmarke – Inter Bold, Versal */
.site-name {
  font-family: var(--font-display); font-size: var(--display); font-weight: 700; line-height: 1; letter-spacing: -0.01em; text-transform: uppercase;
}
.site-name { margin-bottom: 1.5vw; flex-shrink: 0; }
.site-name a { color: inherit; }

/* HEAD – subtitle */
.site-subtitle {
  font-size: var(--subtitle); font-weight: 500; letter-spacing: .16em;
  text-transform: uppercase; color: var(--fg);
}
.site-subtitle { flex-shrink: 0; }

/* LEFT PANEL – Teaser-Block (oben: Logo/Subtitle,
unten: Teaser + Copyright) */
.left-teaser {
  margin-top: auto;
  padding-bottom: 0;
  flex-shrink: 0;
}
.left-teaser h2 {
  font-family: var(--font-display); font-size: var(--h2);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin-bottom: 1rem;
  color: var(--fg);
}
.left-teaser p {
  font-size: var(--text);
  line-height: var(--leading);
  color: var(--fg);
  max-width: 420px;
  margin-top: 1.4rem;
}
.left-teaser p + p { margin-top: 0.7rem; }
html[data-theme="dark"] .left-teaser h2 { color: var(--fg); }
html[data-theme="dark"] .left-teaser p { color: var(--fg); }
.menu-nav .section-label {
  margin-top: 0 !important;
  margin-bottom: 0.4em !important;
  flex-shrink: 0;
  font-size: min(2.3rem, 4vh) !important;
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  line-height: 1.08 !important;
  text-transform: none !important;
  letter-spacing: -0.03em !important;
  color: var(--fg);
}
html:not([data-theme="dark"]) .menu-nav .section-label { color: var(--fg); opacity: 1; }

/* Telefon/E-Mail über dem Menü ausgeblendet. !important nötig: überschreibt das
   spätere .menu-contact-top { display: flex } aus dem Menü-Layout. */
.menu-contact-top { display: none !important; }

/* Label-Hierarchie: drei Ebenen */

/* Kapitelüberschriften (kleine Uppercase-Labels) */
.section-label,
.ansatz-item h3 {
  font-size: var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--fg); display: block;
}
/* Abstand vor Abschnittsbezeichnern (Gestalt-Proximität: Raum vor > Raum nach).
   !important bleibt: setzt die Rhythmus-Regel gegen die generischen h3-Margins durch. */
.section-label {
  margin-top:    3em !important;
  margin-bottom: 0.3em !important;
}
.left-panel > .section-label:first-child,
.bio + .section-label,
.section-label:first-child {
  margin-top: 2em !important;
}

/* Ebene 3 – Kleinste Metainfos (Feldlabels) */
.field label { font-size: var(--label); letter-spacing: .135em; text-transform: uppercase; color: var(--fg); }

/* MAIN – body text (left + right panel) */
.bio,
.contact-block-body,
.impr-body,
.kunden-names {
  font-size: var(--text); line-height: var(--leading); color: var(--fg);
}

.contact-block-body + .contact-block-body { margin-top: 0.8em; }

/* ── Fließtext Absätze ── */
.bio p,
.left-panel p,
.contact-block-body p,
.ansatz-item p {
  margin-top:    0 !important;
  margin-bottom: var(--para-gap) !important;
  line-height: var(--leading);
}
.bio p:last-child {
  margin-bottom: 0;
}

/* ── Bio-Container ── */
.bio {
  margin-top:    0;
  margin-bottom: 0;
}

/* ── Kapitelüberschriften h3 ── */
h3,
.ansatz-item h3 {
  margin-top:    2.5em !important;
  margin-bottom: 0.3em !important;
  line-height: 1.2;
}

.ansatz-item {
  margin-top:    0;
  margin-bottom: 0;
}
/* ── NAVBAR ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 400;
  height: 5.55vw;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 3.2vw;
  background: transparent;
  pointer-events: none;
}
.navbar > * { pointer-events: all; }
.navbar-right { display: flex; align-items: center; gap: 1vw; }


/* ── CALL ME BUTTON ── */
.call-me {
  width: 2.6vw; height: 2.6vw;
  border: 1px solid #212529; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--label); font-weight: 500;
  letter-spacing: .09em; text-transform: uppercase;
  text-align: center; line-height: 1.3;
  padding-top: 5px;
  transition: background .2s, color .2s;
}
.call-me:hover { background: #212529; color: #fff; }


/* ── HAMBURGER TOGGLER ── */
.toggler {
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; gap: .32vw; padding: .4vw;
}
.toggler span { display: block; width: 1.5vw; height: 2px; background: #212529; }


/* ── MENU OVERLAY ── */
.menu-overlay {
  position: fixed;
  top: 0; right: 0; bottom: 0; width: 50%;
  background: var(--bg); z-index: 500;
  display: flex; flex-direction: column;
  padding: min(5.55vw, 8vh) 3.2vw calc(2.2vw - 14px);
  overflow: hidden;
  transform: translateX(100%);
  transition: transform .45s cubic-bezier(.77,0,.175,1);
}
.menu-overlay.open { transform: translateX(0); }

.menu-backdrop {
  display: none;
  position: fixed; inset: 0;
  z-index: 498;
  background: rgba(0,0,0,.35);
  cursor: pointer;
}
.menu-backdrop.open { display: block; }

.menu-close {
  position: absolute; top: 0; right: 3.2vw;
  height: 5.55vw; display: flex; align-items: center;
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 1.5rem; font-weight: 400; color: var(--fg);
}
/* ── MENU NAV – neue Struktur ── */
.menu-nav {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex: 1;
  min-height: 0;
  padding-top: min(3vw, 4vh);
  padding-bottom: 0;
  overflow: hidden;
}
.menu-main {
  list-style: none;
  padding: 0;
  margin: 0;
}
.menu-main > li { margin-bottom: 0.5em; }

.menu-main > li > a,
.menu-parent {
  font-size: min(1.8rem, 3vh);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--fg);
  text-decoration: none;
  cursor: default;
  display: block;
  padding: 0.15em 0;
  transition: opacity 0.2s;
}
.menu-main > li > a { cursor: pointer; }
.menu-main > li > a:hover { opacity: 0.6; }

.menu-sub {
  list-style: none;
  padding: 0.3em 0 0.5em 1.2em;
  margin: 0;
}
.menu-sub li { margin-bottom: 0.3em; }
.menu-sub a {
  font-size: min(1.55rem, 3vh);
  font-family: var(--font-display);
  letter-spacing: -0.018em;
  color: var(--fg);
  text-decoration: none;
  transition: color 0.2s;
}
.menu-sub a:hover { color: var(--fg); }

.menu-secondary {
  list-style: none;
  padding: min(1.2vw, 1.8vh) 0 0;
  margin: auto 0 0;
  display: flex;
  flex-wrap: wrap;
  --sec-row: 0.3em;
  --sec-col: 1.5em;
  gap: var(--sec-row) var(--sec-col);
  flex-shrink: 0;
}
.menu-secondary a {
  font-size: clamp(0.8rem, 0.72rem + 0.25vw, 0.95rem);
  letter-spacing: 0.126em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
  transition: color 0.2s;
}
.menu-secondary a:hover { color: var(--fg); }

/* Kontaktinfos oben im Menü */
.menu-contact-top {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
  margin-bottom: 1.8em;
  flex-shrink: 0;
}
.menu-contact-top a {
  font-size: min(1.8rem, 3vh);
  font-weight: 400;
  letter-spacing: 0.036em;
  color: var(--fg);
  text-decoration: none;
  transition: color 0.2s;
}
.menu-contact-top a:hover { color: var(--fg); }

/* Light mode */
html:not([data-theme="dark"]) .menu-main > li > a,
html:not([data-theme="dark"]) .menu-parent { color: #1a1a1a; }
html:not([data-theme="dark"]) .menu-sub a { color: var(--fg); }
html:not([data-theme="dark"]) .menu-sub a:hover { color: #1a1a1a; }
html:not([data-theme="dark"]) .menu-secondary a { color: var(--fg); }
html:not([data-theme="dark"]) .menu-secondary a:hover { color: var(--fg); }

/* Sekundärmenü: zwei Gruppen (rechtlich | social), Umbruch immer NACH Datenschutz */
.menu-sec-group { display: flex; flex-wrap: nowrap; gap: var(--sec-row) var(--sec-col); padding: 0; margin: 0; }

html:not([data-theme="dark"]) .menu-contact-top a { color: var(--fg); }
html:not([data-theme="dark"]) .menu-contact-top a:hover { color: var(--fg); }

/* Menu responsive */
@media (max-width: 768px) {
  .menu-nav { padding-top: min(10vw, 6vh); }
  .menu-contact-top a { font-size: min(1.7rem, 4.5vh); }
  .menu-main > li > a,
.menu-parent { font-size: min(1.7rem, 4.5vh); }
  .menu-sub a { font-size: min(1.3rem, 3vh); }
  .menu-sub { padding-left: 5vw; }
  .menu-secondary a { font-size: clamp(0.8rem, 0.72rem + 0.25vw, 0.95rem); }
  .menu-secondary { --sec-row: 0.5em; --sec-col: 3vw; padding-top: 4vw; margin-top: auto; }
}
/* Phone Landscape: sehr kurze Höhe – Nav-Links skalieren mit vh */
@media (max-width: 768px) and (orientation: landscape) {
  .menu-overlay { padding: min(10vw, 6vh) 5vw min(3vw, 3vh); }
  .menu-nav { padding-top: min(6vw, 4vh); }
  .menu-contact-top a { font-size: min(1.7rem, 3vh); }
  .menu-main > li > a,
.menu-parent { font-size: min(1.7rem, 3vh); }
  .menu-sub a { font-size: min(1.3rem, 2.1vh); }
  .menu-secondary a { font-size: clamp(0.8rem, 0.72rem + 0.25vw, 0.95rem); }
  .menu-secondary { margin-top: auto; padding-top: min(2vw, 1.5vh); }
}
@media (min-width: 769px) and (max-width: 1100px) and (orientation: portrait) {
  .menu-contact-top a { font-size: min(1.9rem, 3vh); }
  .menu-main > li > a,
.menu-parent { font-size: min(1.9rem, 3vh); }
  .menu-sub a { font-size: min(1.45rem, 2.1vh); }
  .menu-secondary a { font-size: clamp(0.8rem, 0.72rem + 0.25vw, 0.95rem); }
}
/* Tablet (769–1440px): arrow-link + menu-secondary lesbar */
/* ── THEME TOGGLE ── */
.theme-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--fg); padding: .4vw; line-height: 1;
  display: flex; align-items: center;
  font-size: 1.35rem; transition: opacity .2s;
}
.theme-toggle:hover { opacity: .6; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }


/* ── DARK MODE ── */
html[data-theme="dark"],
html[data-theme="dark"] body { background: var(--bg); color: var(--fg); }

html[data-theme="dark"] .call-me { border-color: #ccc; color: #fff; }
html[data-theme="dark"] .call-me:hover { background: #ccc; color: #1a1a1a; }
html[data-theme="dark"] .toggler span { background: #ccc; }
html[data-theme="dark"] .menu-close { color: var(--fg); }

html[data-theme="dark"] .menu-overlay { background: #1c1c1c; }

html[data-theme="dark"] .site-name a { color: var(--fg); }
html[data-theme="dark"] .site-subtitle { color: var(--fg); }
html[data-theme="dark"] .theme-toggle { color: var(--fg); }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Panels & borders */
html[data-theme="dark"] .left-panel { background: var(--bg); }
html[data-theme="dark"] .right-panel { background: var(--bg); border-left-color: #333; border-top-color: #333; }
html[data-theme="dark"] .grid-item { background: #2a2a2a; }
html[data-theme="dark"] .news-thumb { background: #2a2a2a; }
html[data-theme="dark"] .news-item { border-bottom-color: #2e2e2e; }
html[data-theme="dark"] .news-item:first-child { border-top-color: #2e2e2e; }

/* Text */
html[data-theme="dark"] .impr-body { color: var(--fg); }
html[data-theme="dark"] .impr-body a { color: var(--fg); }
html[data-theme="dark"] .bio { color: var(--fg); }
html[data-theme="dark"] .section-label { color: var(--fg); }
html[data-theme="dark"] .contact-block-body { color: var(--fg); }
html[data-theme="dark"] .contact-block-body a { color: var(--fg); }
html[data-theme="dark"] .news-title { color: var(--fg); }
html[data-theme="dark"] .news-excerpt { color: var(--fg); }
html[data-theme="dark"] .news-date,
html[data-theme="dark"] .news-cat,
html[data-theme="dark"] .news-read { color: var(--fg); }

/* Form */
html[data-theme="dark"] .field label { color: var(--fg); }
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .field select { color: #fff; border-bottom-color: #444; background: transparent; }
html[data-theme="dark"] .field input:focus,
html[data-theme="dark"] .field textarea:focus { border-bottom-color: #ddd; }
html[data-theme="dark"] .form-success { color: var(--fg); }
html[data-theme="dark"] .submit-btn { background: #ddd; color: #1a1a1a; }
html[data-theme="dark"] .submit-btn:hover { background: #fff; }


/* ── SPLIT LAYOUT (shared by all pages) ── */
#wrapper { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }
.left-panel { width: 50%; padding: var(--space-7) var(--space-6) var(--gap-edge) var(--space-6); display: flex; flex-direction: column; flex-shrink: 0; overflow-y: auto; }
.right-panel { flex: 1; height: 100vh; height: 100dvh; overflow-y: auto; }

/* ── LEFT PANEL VARIANTS ── */
/* Index: Split-Panel wie andere Seiten */
/* Kontaktseite: linkes Panel wie alle anderen Seiten */
html[data-page="kontakt"] .left-panel { overflow-y: hidden; }

/* ── RIGHT PANEL VARIANTS ── */
/* Index: rechtes Panel scrollbar wie andere Seiten */
html[data-page="index"] .right-panel { display: flex; flex-direction: column; overflow-y: auto; }
/* Karussell-Bilder im leistung-hero per Opacity einblenden */
html[data-page="index"] .leistung-hero img { opacity: 0; transition: opacity 2.5s ease; }
html[data-page="index"] .leistung-hero img.active { opacity: 1; }

/* Seiten mit statischer Sidebar + scrollbarem rechten Bereich */
html[data-page="about"] .left-panel,
html[data-page="index"] .left-panel,
html[data-page="leistungen"] .left-panel { overflow-y: hidden; }
html[data-page="about"] .right-panel,
html[data-page="leistungen"] .right-panel {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
html[data-page="about"] .leistung-hero img { object-position: center top; }

/* Leistungsseiten */
html[data-page="leistungen"] .right-panel {
  overflow-y: auto;
}

/* Hero-Bild (erstes Element im rechten Bereich) */
.leistung-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  flex-shrink: 0;
  overflow: hidden;
}
.leistung-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
/* Fotografie: Goldener Schnitt durch Schleifscheibe */
.leistung-hero.right-panel--fotografie img {
  object-position: 35% 38%;
}

/* Textinhalt unterhalb des Hero-Bildes */
.leistung-content {
  padding: var(--panel-pad);
  padding-bottom: var(--gap-edge);   /* Gruppe 1: gleiche Unterkante wie linkes Panel */
  display: flex;
  flex-direction: column;
}

/* ── RECHTE SEITE: Typografie-Regeln ──────────────────────────
   Regel 1: Zeilenabstand Fließtext 1.6
   Regel 2: Absatzabstand ≈ 1× Schriftgröße (0.9em)
   Regel 3: Mehr Raum vor Titel als danach
   Regel 4: Titel line-height 1.2
   ─────────────────────────────────────────────────────────── */

/* H2: frei stehend,
ohne Linie – wie ansatz-heading */
/* !important entfernt: dieser Selektor (0,2,0) gewinnt ohnehin gegen die
   generische .content-headline-Regel; nichts überschreibt ihn mehr per !important. */
.leistung-content .content-headline {
  font-size: var(--h2);
  font-weight: 700;
  font-style: normal;
  text-transform: none;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-wrap: balance;
  font-family: var(--font-display);
  color: var(--fg);
  border-bottom: none;
  padding-bottom: 0;
  margin-top: var(--space-6);
  margin-bottom: 0.8rem;
  display: block;
  opacity: 1;
}

/* H3: Fließtextgröße,
maximales Gewicht,
normale Schreibweise */
/* Font-Eigenschaften ohne !important (Selektor 0,2,0 gewinnt). Die beiden
   margin-Regeln behalten !important: das globale „h3 { margin … !important }"
   würde sie sonst per !important überstimmen. */
.leistung-content .section-label,
.leistung-content h3 {
  font-size: var(--h3);
  font-weight: 600;
  font-style: normal;
  font-family: inherit;
  text-transform: none;
  letter-spacing: -0.018em;
  line-height: 1.2;
  color: var(--fg);
  border-bottom: none;
  padding-bottom: 0;
  margin-top: 2rem !important;     /* muss globales h3-!important schlagen */
  margin-bottom: 0.5em !important; /* dito */
  display: block;
  opacity: 1;
}
/* Erster Titel: kein oberer Abstand */
.leistung-content > .content-headline:first-child,
.leistung-content > h3:first-child,
.ansatz-text-full > .content-headline { margin-top: 0 !important; }

/* H3 direkt nach H2: kein eigener oberer Abstand – H2-margin-bottom reicht */
.leistung-content .content-headline + h3,
.leistung-content .content-headline + .ansatz-item > h3 { margin-top: 0 !important; }

/* content-headline global (Kontaktseite etc.) – frei stehend, ohne Linie */
.content-headline {
  font-family: var(--font-display);
  font-size: var(--h2);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: normal;
  color: var(--fg);
  margin-top: 2.5em;
  margin-bottom: 0.8rem;
  font-style: normal;
  border-bottom: none;
  padding-bottom: 0;
  display: block;
}

/* Fließtext: 1.4vw,
Zeilenabstand 1.6,
Absatzabstand 0.9em */
.leistung-content .bio p,
.leistung-content p,
.leistung-content .kunden-names {
  font-size: var(--text);
  line-height: var(--leading);
  color: var(--fg);
  margin-bottom: var(--para-gap) !important;
  margin-top: 0 !important;
}
.leistung-content .bio {
  font-size: var(--text);
  line-height: var(--leading);
  color: var(--fg);
  margin-bottom: 0 !important;
  margin-top: 0 !important;
}
.leistung-content .kunden-names { line-height: var(--leading); padding-bottom: 0; margin-bottom: 0 !important; }
.leistung-content .bio p:last-child { margin-bottom: 0 !important; }

/* Dark Mode */
html[data-theme="dark"] .content-headline { color: var(--fg); }
html[data-theme="dark"] .leistung-content { background: var(--bg); }
html[data-theme="dark"] .leistung-content .content-headline { color: var(--fg); }
html[data-theme="dark"] .leistung-content .content-headline,
html[data-theme="dark"] .leistung-content .section-label,
html[data-theme="dark"] .leistung-content h3 {
  color: var(--fg);
}
html[data-theme="dark"] .leistung-content .bio p,
html[data-theme="dark"] .leistung-content .bio,
html[data-theme="dark"] .leistung-content p { color: var(--fg); }

html[data-page="portfolio"] .right-panel { padding: var(--space-7) 3.2vw var(--gap-edge) 1vw; position: relative; }
html[data-page="portfolio"] .right-panel.video-mode { overflow: hidden; padding: 0; }
.portfolio-cat-title {
  font-size: var(--h3);
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  color: var(--fg);
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 1.5vw;
  display: block;
}
html[data-theme="dark"] .portfolio-cat-title { color: var(--fg); border-color: var(--fg); }

.video-wrap { display: none; position: absolute; inset: 0; overflow: hidden; }
.video-wrap.active { display: block; }

/* iframe embed */
.video-wrap iframe {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 177.78vh;
  height: 100vh;
  min-width: 100%;
  border: none;
}

/* Transparente Klickfläche über dem iframe */
.video-click-zone {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
}
.video-click-zone::after {
  content: '';
  position: absolute;
  bottom: 1.5vw; right: 1.5vw;
  width: 2.4vw; height: 2.4vw;
  border: 1.5px solid rgba(255,255,255,.6);
  border-radius: 3px;
  opacity: 0;
  transition: opacity .2s;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cpolyline points='9 21 3 21 3 15'/%3E%3Cline x1='21' y1='3' x2='14' y2='10'/%3E%3Cline x1='3' y1='21' x2='10' y2='14'/%3E%3C/svg%3E")
    center/65% no-repeat;
}
.video-click-zone:hover::after { opacity: 1; }

/* Video-Lightbox */
.video-lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.96);
  z-index: 700;
  display: none;
  align-items: center;
  justify-content: center;
}
.video-lightbox.open { display: flex; }
.video-lb-wrap {
  position: relative;
  width: min(88vw, calc(85vh * 16 / 9));
}
.video-lb-wrap iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  display: block;
}

/* Thumbnail-Fallback */
.video-thumb-link {
  display: block;
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.video-thumb-link img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.video-thumb-link:hover img { transform: scale(1.03); }
.video-play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 4.5vw; height: 4.5vw;
  background: rgba(255,255,255,.88);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .2s;
  pointer-events: none;
}
.video-thumb-link:hover .video-play-btn {
  background: #fff;
  transform: translate(-50%, -50%) scale(1.1);
}
.video-play-btn svg { margin-left: .4vw; }

html[data-page="news"]      .right-panel { padding: 5.55vw 3.2vw 4vw 1vw; }
html[data-page="kontakt"]   .right-panel { padding: 5.55vw 3.2vw 3vw 2vw; display: flex; flex-direction: column; }
html[data-page="rechtliches"]     .right-panel { padding: 5.55vw 3.2vw 4vw 2vw; }
html[data-page="kontakt"] .left-teaser p,
html[data-page="index"]   .left-teaser p { max-width: calc(50vw * 0.618); }


/* ── PORTFOLIO ── */
/* Portfolio: Filterkategorien als Fließtext-Links im left-teaser */
html[data-page="portfolio"] .left-teaser p { margin-top: 1.4rem; }
html[data-page="portfolio"] .left-teaser p a {
  color: var(--fg);
  text-decoration: none;
  transition: color 0.2s;
}
html[data-page="portfolio"] .left-teaser p a:hover { color: var(--fg); }
html[data-page="portfolio"] .left-teaser p a.active { color: var(--fg); text-decoration: underline; }
html[data-theme="dark"][data-page="portfolio"] .left-teaser p a { color: #fff; }
html[data-theme="dark"][data-page="portfolio"] .left-teaser p a:hover,
html[data-theme="dark"][data-page="portfolio"] .left-teaser p a.active { color: #fff; }

.grid { columns: 2; column-gap: .6vw; }
.grid-item { position: relative; overflow: hidden; cursor: pointer; background: #f0f0f0; display: block; width: 100%; break-inside: avoid; margin-bottom: .6vw; }

/* Portfolio-Kategorie-Titel als vollbreiter Trennbalken */
.portfolio-cat-title {
  column-span: all;
  -webkit-column-span: all;
  margin-top: 3vw !important;
  margin-bottom: 1.5vw !important;
}
.portfolio-cat-title:first-child { margin-top: 0 !important; }
.grid-item img { width: 100%; height: auto; display: block; transition: transform .5s ease; will-change: transform; }
.grid-item:hover img { transform: scale(1.06); }
.grid-caption { position: absolute; bottom: 0; left: 0; right: 0; padding: .8vw 1vw; background: linear-gradient(transparent, rgba(0,0,0,.35)); color: #fff; font-size: var(--label); letter-spacing: .09em; text-transform: uppercase; opacity: 0; transition: opacity .3s; }
.grid-item:hover .grid-caption { opacity: 1; }

.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.94); z-index: 600; display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox-content { display: flex; flex-direction: column; align-items: center; gap: 1.2vw; }
.lightbox-imgwrap { position: relative; }
.lightbox-img { max-width: 88vw; max-height: 82vh; object-fit: contain; display: block; }
.lightbox-title { position: absolute; bottom: 0; left: 0; right: 0; padding: 2vw 1.5vw 1vw; background: linear-gradient(transparent, rgba(0,0,0,.5)); color: #fff; font-size: var(--label); letter-spacing: .108em; text-transform: uppercase; opacity: 0; transition: opacity .3s; pointer-events: none; }
.lightbox-imgwrap:hover .lightbox-title { opacity: 1; }
.lightbox-close { position: absolute; top: 2vw; right: 3vw; background: none; border: none; cursor: pointer; color: #fff; font-size: 1.75rem; font-weight: 400; font-family: inherit; line-height: 1; opacity: .7; transition: opacity .2s; }
.lightbox-close:hover { opacity: 1; }
.lightbox-prev,
.lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: #fff; font-size: 1.5rem; padding: 1.5vw 2vw; opacity: .5; transition: opacity .2s; }
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }
.lightbox-prev { left: 0; }
.lightbox-next { right: 0; }
.lightbox-counter { color: var(--fg); font-size: var(--label); letter-spacing: .135em; }
.news-list { display: flex; flex-direction: column; }
.news-item { display: grid; grid-template-columns: 12vw 1fr; gap: 0 2vw; padding: 2.2vw 0; border-bottom: 1px solid #e5e5e5; text-decoration: none; color: inherit; transition: opacity .2s; }
.news-item:first-child { border-top: 1px solid #e5e5e5; }
.news-item:hover { opacity: .6; }
.news-thumb { aspect-ratio: 4/3; overflow: hidden; background: #f0f0f0; flex-shrink: 0; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; display: block; }
.news-item:hover .news-thumb img { transform: scale(1.04); }
.news-body { display: flex; flex-direction: column; justify-content: center; gap: .5vw; }
.news-meta { display: flex; gap: 1.2vw; align-items: center; }
.news-date { font-size: var(--label); letter-spacing: .135em; text-transform: uppercase; color: var(--fg); }
.news-cat { font-size: var(--label); letter-spacing: .108em; text-transform: uppercase; color: var(--fg); }
.news-cat::before { content: '·'; margin-right: 1.2vw; }
.news-title { font-size: var(--h3); font-weight: 400; line-height: 1.4; }
.news-excerpt { font-size: var(--text); line-height: var(--leading); color: var(--fg); margin-top: .2vw; }
.news-read { font-size: var(--label); letter-spacing: .135em; text-transform: uppercase; color: var(--fg); margin-top: .5vw; }
.contact-block-body { margin-bottom: 0; }
.contact-block-body + .contact-block { margin-top: 0.9em; }
.contact-block { margin-bottom: 0.9em; }
.contact-block-body a { border-bottom: 1px solid transparent; transition: border-color .2s; }
.contact-block-body a:hover { border-color: var(--fg); }

/* Kontaktseite rechts: Info-Block über dem Formular */
.contact-info-block {
  margin-bottom: 0;
}
.contact-info-block .content-headline { margin-top: 0; margin-bottom: 1.5vw; }
.contact-form { display: flex; flex-direction: column; gap: 1.4vw; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1vw; }
.field { display: flex; flex-direction: column; gap: .35vw; }
.field input,
.field textarea,
.field select { font-family: inherit; font-size: var(--text); font-weight: 400; color: var(--fg); background: transparent; border: none; border-bottom: 1px solid #d0d0d0; padding: .5vw 0; outline: none; transition: border-color .2s; width: 100%; resize: none; }
.field input:focus,
.field textarea:focus,
.field select:focus { border-color: var(--fg); }
.field textarea { min-height: 8vw; }
.submit-btn { align-self: flex-start; margin-top: .5vw; background: #212529; color: #fff; border: none; cursor: pointer; font-family: inherit; font-size: var(--label); font-weight: 500; letter-spacing: .135em; text-transform: uppercase; padding: .9vw 2.2vw; transition: background .2s, color .2s; }
.submit-btn:hover { background: #000; }
.form-success { display: none; font-size: var(--text); line-height: var(--leading); color: var(--fg); padding: 1.5vw 0; }
.form-success.show { display: block; }

/* Spamschutz-Feld: schmaleres Eingabefeld */
.captcha-field input { max-width: 9em; }

/* DSGVO-Einwilligung: Checkbox + Fließtext nebeneinander */
.field-consent { display: flex; align-items: flex-start; gap: .7em; }
.field-consent input[type="checkbox"] { flex: 0 0 auto; width: 1.1em; height: 1.1em; margin-top: .15em; accent-color: var(--fg); cursor: pointer; }
.field-consent label { font-size: clamp(0.78rem, 0.72rem + 0.2vw, 0.9rem); line-height: 1.5; letter-spacing: normal; text-transform: none; color: var(--fg); }
.field-consent label a { color: inherit; text-decoration: underline; }
.field-consent.consent-error label { color: #c0392b; }
.field-consent.consent-error input[type="checkbox"] { outline: 2px solid #c0392b; outline-offset: 2px; }

/* ── Cookie-Einwilligung (Banner) ── */
.consent-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 2000;
  background: #ffffff;
  border-top: 1px solid #e2e2e2;
  box-shadow: 0 -6px 24px rgba(0,0,0,0.08);
  transform: translateY(100%);
  transition: transform .3s ease;
}
.consent-banner.show { transform: translateY(0); }
.consent-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.4rem 1.6rem;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
}
.consent-text {
  flex: 1 1 320px;
  margin: 0;
  font-size: clamp(0.8rem, 0.74rem + 0.2vw, 0.92rem);
  line-height: 1.55;
  color: #1a1a1a;
}
.consent-text a { color: inherit; text-decoration: underline; }
.consent-buttons { display: flex; gap: .8rem; flex: 0 0 auto; }
.consent-btn {
  font-family: inherit;
  font-size: var(--label);
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  border: 1px solid #1a1a1a;
  cursor: pointer;
  padding: .7em 1.5em;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.consent-decline { background: transparent; color: #1a1a1a; }
.consent-decline:hover { background: #ececec; }
.consent-accept { background: #1a1a1a; color: #fff; }
.consent-accept:hover { background: #000; }

html[data-theme="dark"] .consent-banner { background: #141414; border-top-color: #333; box-shadow: 0 -6px 24px rgba(0,0,0,0.5); }
html[data-theme="dark"] .consent-text { color: #f0f0f0; }
html[data-theme="dark"] .consent-btn { border-color: #f0f0f0; }
html[data-theme="dark"] .consent-decline { color: #f0f0f0; }
html[data-theme="dark"] .consent-decline:hover { background: #2a2a2a; }
html[data-theme="dark"] .consent-accept { background: #f0f0f0; color: #141414; }
html[data-theme="dark"] .consent-accept:hover { background: #fff; }

@media (max-width: 600px) {
  .consent-inner { padding: 1.1rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom)); gap: 1rem; }
  .consent-buttons { width: 100%; }
  .consent-btn { flex: 1 1 0; text-align: center; }
}
html[data-theme="dark"] .field-consent input[type="checkbox"] { accent-color: #fff; }


/* ── IMPRESSUM / DATENSCHUTZ ── */
.impr-section { margin-bottom: 2.5vw; }
.impr-body { font-size: var(--text); line-height: var(--leading); color: var(--fg); }

.impr-body a { border-bottom: 1px solid transparent; transition: border-color .2s; }
.impr-body a:hover { border-color: var(--fg); }


/* ── LANDING PAGE SECTIONS (index) ── */

/* Index: linkes Panel ohne Scroll */
html[data-page="index"] .left-panel { overflow-y: hidden; }
.ansatz-item h3 { letter-spacing: -0.018em; margin-bottom: 16px; color: var(--fg); font-weight: 600; }

/* Ansatz: Bild vollbreit + Text – innerhalb von leistung-content */
.leistung-content .ansatz-neu { display: block; margin-bottom: 0; }

/* Ansatz-Bild bricht aus dem leistung-content-Padding heraus → vollbreite Darstellung */
.ansatz-hero {
  position: relative;
  height: 70vh;
  overflow: hidden;
  flex-shrink: 0;
  margin-left: calc(-1 * 3.2vw);
  margin-right: calc(-1 * 5vw);
}
.ansatz-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
/* Ansatz-Text: kein eigenes Padding – leistung-content übernimmt */
.ansatz-text-full {
  padding: 2vw 0 2rem;
}

/* Scroll-Hint Overlay */
.scroll-hint {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-size: 0.72rem;
  letter-spacing: 0.135em;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 90;
  opacity: 0.5;
  transition: opacity 0.6s ease;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.scroll-hint svg { filter: drop-shadow(0 1px 3px rgba(0,0,0,0.35)); }
.scroll-hint span { font-weight: 500; }
.scroll-hint--hidden { opacity: 0; pointer-events: none; }

/* Auf Seiten mit Split-Layout: Hint über dem rechten Panel zentrieren */
html[data-page="index"]      .scroll-hint,
html[data-page="leistungen"] .scroll-hint,
html[data-page="portfolio"]  .scroll-hint,
html[data-page="news"]       .scroll-hint,
html[data-page="kontakt"]    .scroll-hint,
html[data-page="about"]      .scroll-hint {
  left: 75%;
}
@keyframes scrollHintBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(5px); }
}

/* Ansatz-Abschnitt (neu) */
.ansatz-neu { display: grid; grid-template-columns: 1fr 1fr; min-height: 80vh; }
.ansatz-text { padding: 5.55vw 3.2vw; display: flex; flex-direction: column; justify-content: flex-start; }
/* Overrides: neutralisiert unpassende .left-panel-Eigenschaften */
.ansatz-neu .left-panel { width: auto; overflow-y: visible; justify-content: flex-start; }
/* Heading */

/* Text-Link – Stil wie news-read: klein,
uppercase,
gesperrt */
.arrow-link {
  display: inline-block;
  margin-top: 0.15em;
  text-decoration: none;
  color: var(--fg);
  font-size: var(--label);
  font-weight: 400;
  letter-spacing: .135em;
  text-transform: uppercase;
  border-bottom: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  flex-shrink: 0;
}
.arrow-link::after {
  content: ' →';
  display: inline-block;
  transition: transform 0.25s ease;
}
.arrow-link:hover { opacity: 0.6; }
.arrow-link:hover::after { transform: translateX(4px); }
html[data-theme="dark"] .arrow-link { color: #fff; }

/* CTA – gefüllter Button (statt arrow-link) */
.cta-link {
  display: inline-block;
  margin-top: 0.6em;
  background: #1a1a1a;
  color: #FAFAF8;
  font-size: var(--label);
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 16px 30px;
  transition: background 0.2s, color 0.2s;
}
.cta-link:hover { background: #000; }
/* Dark Mode – invertiert wie der Formular-Button */
html[data-theme="dark"] .cta-link { background: #E7E7E4; color: #1a1a1a; }
html[data-theme="dark"] .cta-link:hover { background: #fff; }

/* Items: Padding NUR im ansatz-neu Abschnitt der Landing Page */
.ansatz-neu .ansatz-item { padding: 2rem 0 0; }
.ansatz-neu .ansatz-item:last-child { padding-bottom: 0; }
/* .bio margin-bottom: neutralisiert 2.5vw aus globalem .bio-Stil */
.ansatz-item .bio { margin-bottom: 0; }
.leistung-content .ansatz-item p { margin-bottom: 0 !important; }

/* Index: ansatz-neu — h3 in Items mit eigenem Padding */
.ansatz-neu .ansatz-item > h3 {
  margin-top: 0 !important;
}

/* Leistungsseiten: ansatz-items ohne Container-Padding,
spacing kommt allein aus dem h3 margin-top */
html[data-page="leistungen"] .ansatz-item > h3 {
  margin-top: 1.8em !important;
}
/* Erstes Item direkt nach section-label: weniger Luft */
html[data-page="leistungen"] .section-label + .ansatz-item > h3 {
  margin-top: 1em !important;
}

/* CTA */
.cta-section { text-align: center; padding: 3vw 3.2vw 60px; background: #f8f8f8; }


/* Kunden */
.kunden-section { padding-left: 3.2vw; padding-right: 3.2vw; }
.kunden-section { padding-top: 3vw; padding-bottom: 60px; text-align: left; }
[data-theme="dark"] .cta-section { background: #1c1c1c; }
.leistung-content .cta-section { background: transparent; }
.leistung-content .kunden-section { padding: 2rem 0 0; margin-top: 0; }
.leistung-content .kunden-section .section-label { margin-top: 0 !important; }
.leistung-content .cta-section { padding: 0; margin-top: 0; text-align: left; }
[data-theme="dark"] .ansatz-item h3 { color: #fff; }
/* Neutralisiert das dunkle left-panel im Dark Mode */
[data-theme="dark"] .ansatz-neu .left-panel { background: transparent; }

/* ── STARTSEITE: Nutzenpunkte (4er-Block) ── */
/* Punkt 4 – einspaltig, kurze Überschrift + ein Satz, dünne Trennlinie
   zwischen den Punkten (wie die übrigen Abschnitte). */
.nutzen-grid { display: block; margin-top: var(--space-4); }
/* Gruppe 3 – Trennlinien entfernt; Abstand kommt aus padding/margin */
.nutzen-item { padding: var(--space-4) 0; }
.nutzen-item:first-child { padding-top: 0; }
.nutzen-item h3 { margin-top: 0 !important; font-weight: 600; }   /* überschreibt globalen h3-margin (!important nötig) */
.nutzen-item .bio { margin-top: 0.2em; }

/* ── STARTSEITE: Abstand zwischen Content-Sektionen ── */
.leistung-content .content-section { margin-top: 4.5rem; }
/* Gruppe 5 – erste Headline eines Abschnitts ohne eigenen Top-Margin
   (sonst addieren sich Abschnitts- und Headline-Abstand). */
.leistung-content section > .content-headline:first-child,
.nutzen-section > .content-headline:first-child,
.kunden-section > .content-headline:first-child { margin-top: 0 !important; }
.leistung-content .nutzen-section + .ansatz-hero { margin-top: 3vw; }

/* ── Einsatzbereiche-Liste (KI) ── */
.ki-liste {
  list-style: none;
  margin: 1.2em 0 1.6em;
  padding: 0;
}
.ki-liste li {
  font-size: var(--text);
  line-height: var(--leading);
  color: var(--fg);
  padding: 0.45em 0 0.45em 1.3em;
  position: relative;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.ki-liste li::before {
  content: '→';
  position: absolute;
  left: 0;
  opacity: 0.5;
}
html[data-theme="dark"] .ki-liste li { color: #fff; border-bottom-color: rgba(255,255,255,0.12); }

/* ── BEISPIELBILD zwischen Textabschnitten (vollbreit, später austauschbar) ── */
.content-figure {
  margin: 3.5vw calc(-1 * 5vw) 3.5vw calc(-1 * 3.2vw);
}
.content-figure img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.content-figure figcaption {
  font-size: var(--label);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #888;
  padding: 0.8vw 3.2vw 0;
}
html[data-theme="dark"] .content-figure figcaption { color: #777; }

/* Gruppe 7 – optionale Bildunterschrift direkt nach dem Header-Bild */
.hero-caption {
  font-size: var(--label); letter-spacing: .12em; text-transform: uppercase;
  color: #888; font-weight: 500;
  padding: 1.25rem 5vw 0 3.2vw;      /* gleiche linke Kante wie .leistung-content */
  max-width: var(--measure);
}
html[data-theme="dark"] .hero-caption { color: #999; }

/* ── INTERNE LINKLISTE (Leistungen / Weitere Leistungen) ── */
.leistungen-liste { list-style: none; margin: 1.2em 0 0; padding: 0; }
.leistungen-liste li { border-bottom: 1px solid rgba(0,0,0,0.1); }
.leistungen-liste a {
  display: block;
  font-size: var(--text);
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
  padding: 0.7em 1.4em 0.7em 0;
  position: relative;
  transition: padding-left .2s ease, opacity .2s ease;
}
.leistungen-liste a::after {
  content: '→';
  position: absolute;
  right: 0;
  opacity: 0.4;
  transition: transform .2s ease;
}
.leistungen-liste a:hover { padding-left: .4em; }
.leistungen-liste a:hover::after { transform: translateX(4px); }
html[data-theme="dark"] .leistungen-liste li { border-bottom-color: rgba(255,255,255,0.14); }
html[data-theme="dark"] .leistungen-liste a { color: #fff; }


/* ============================================================
   RESPONSIVE — MOBILE (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {
  html, body { overflow: auto; height: auto; min-height: 100%; }

  /* Navbar */
  .navbar { height: 12vw; }
  .navbar-right { gap: 5vw; }
  .call-me { width: 8vw; height: 8vw; }
  .toggler { gap: 2.5vw; padding: 1vw; }
  .toggler span { width: 5vw; }
  .theme-toggle { padding: 1vw; }

  /* Menu overlay */
  .menu-overlay { width: 100%; padding-top: 18vw; }
  .menu-close { height: 12vw; right: 5vw; }

  /* HEAD – name + subtitle (left panel & menu unified) */
  .site-name { margin-bottom: 1.2vw; }
  .site-subtitle { letter-spacing: .135em; }
  .site-subtitle { margin-bottom: 4vw; }

  /* Gruppe 9 – Teaser: natürlicher Umbruch übers Maß, klarer Abstand */
  .left-teaser { margin-bottom: 8vw; }
  .left-teaser p { max-width: 32ch; }
  html[data-page="index"] .left-teaser p { max-width: 32ch; }
  .section-label { letter-spacing: .135em; }
  .ansatz-item h3 { letter-spacing: -0.018em; }

  /* MAIN – body text */
  .bio,
.contact-block-body,
.impr-body,
.kunden-names,
.news-excerpt { line-height: var(--leading); }

  /* Form inputs */
  .field input,
.field textarea,
.field select { padding: 2vw 0; }
  .field textarea { min-height: 25vw; }
  .form-row { grid-template-columns: 1fr; }
  .submit-btn { padding: 3vw 6vw; }

  /* Layout – eine einzige scrollbare Seite.
     !important bleibt: überschreibt Desktop 100dvh / overflow:auto je Panel. */
  #wrapper { flex-direction: column; height: auto !important; overflow: visible !important; }
  .left-panel { width: 100%; height: auto !important; overflow: visible !important; min-height: 0; }
  .right-panel { width: 100%; height: auto !important; border-top: none; overflow: visible !important; }
  html[data-page="leistungen"] .left-panel,
html[data-page="about"] .left-panel,
html[data-page="index"] .left-panel,
html[data-page="kontakt"] .left-panel { overflow: visible !important; height: auto !important; }
  /* Gruppe 11 – symmetrische Seitenränder im gestapelten Layout */
  .leistung-content { padding-left: 5vw; padding-right: 5vw; }
  .ansatz-hero { margin-left: -5vw; margin-right: -5vw; }
  .content-figure { margin-left: -5vw; margin-right: -5vw; }
  .ansatz-neu { grid-template-columns: 1fr; min-height: auto; }
  /* Verhindert,
dass html[data-page="index"] .left-panel das ansatz-text-Padding überschreibt */
  html[data-page="index"] .ansatz-neu .left-panel { padding: 50px 5%; }
  .cta-section { padding: 30px 5% 50px; }
  .kunden-section { padding: 40px 5%; }

  /* ── PAGE-SPECIFIC MOBILE (layout only) ── */

  /* Index */
  html[data-page="index"],
html[data-page="index"] body { overflow: auto; }
  html[data-page="index"] .left-panel { padding: 18vw 5vw 6vw; }
  html[data-page="index"] .right-panel { flex: 0 0 75vw; height: 75vw; }
  html[data-page="index"] .site-name { margin-bottom: 1.5vw; }
  html[data-page="index"] .site-subtitle { margin-bottom: 5vw; }

  /* About */
  html[data-page="about"] .left-panel { padding: 18vw 5vw 8vw; overflow: visible; }
  html[data-page="about"] .right-panel { flex: 0 0 75vw; height: 75vw; }
  html[data-page="about"] .section-label { margin-top: 6vw; }

  /* Portfolio */
  html[data-page="portfolio"] .left-panel { padding: 18vw 5vw 5vw; flex-shrink: initial; }
  html[data-page="portfolio"] .right-panel { padding: 0 4vw 8vw; }
  html[data-page="portfolio"] .grid { column-gap: 2vw; }
  html[data-page="portfolio"] .grid-item { margin-bottom: 2vw; }
  html[data-page="portfolio"] .grid-caption { padding: 2vw; }
  html[data-page="portfolio"] .lightbox-close { top: 4vw; right: 5vw; }
  html[data-page="portfolio"] .lightbox-content { gap: 3vw; }

  /* News */
  html[data-page="news"] .left-panel { padding: 18vw 5vw 5vw; flex-shrink: initial; }
  html[data-page="news"] .right-panel { padding: 0 5vw 10vw; }
  html[data-page="news"] .news-item { grid-template-columns: 28vw 1fr; gap: 0 4vw; padding: 5vw 0; }
  html[data-page="kontakt"] .left-panel { padding: 18vw 5vw 6vw; overflow: visible; }
  html[data-page="kontakt"] .right-panel { padding: 6vw 5vw 10vw; overflow: visible; }

  /* Legal */
  html[data-page="rechtliches"] .left-panel { padding: 18vw 5vw 6vw; }
  html[data-page="rechtliches"] .right-panel { padding: 6vw 5vw 10vw; }

  /* Spacing hierarchy fix – mobile portrait (font ~4vw,
p+p ≈ 4.8vw) */
  .contact-block { margin-bottom: 6vw; }
  .contact-block-body { margin-bottom: 0; }
  .contact-block-body + .contact-block { margin-top: 8vw; }
  .impr-section { margin-bottom: 6vw; }

  /* Typografie – mobile Anpassungen */
  .bio p,
.left-panel p {
    margin-top:    0 !important;
    margin-bottom: 0.9em;
  }
  .section-label {
    margin-top: 2.5em !important;
  }
}


/* ============================================================
   RESPONSIVE — PHONE LANDSCAPE (≤768px,
landscape)
   Stellt das 2-Spalten-Layout wieder her; überschreibt Mobile-Hochformat
   ============================================================ */
@media (max-width: 768px) and (orientation: landscape) {

  /* Navbar kompakter */
  .navbar { height: 7vw; }
  .menu-overlay { padding-top: 10vw; }
  .menu-close { height: 7vw; }

  /* 2-Spalten-Layout wiederherstellen */
  #wrapper { flex-direction: row; height: 100vh; overflow: hidden; }
  .left-panel { width: 50%; height: 100vh; overflow-y: auto; }
  .right-panel { width: 50%; height: 100vh; border-top: none; }

  /* Index-Seite */
  html[data-page="index"] .left-panel { padding: 9vw 4vw 3vw; }
  html[data-page="index"] .right-panel { flex: 0 0 50%; height: 100vh; }
  html[data-page="index"] .site-subtitle { margin-bottom: 1.5vw; }

  /* Gruppe 10 – kompakter, nichts wird abgeschnitten (left-panel scrollt, s.o.) */
  .site-name { font-size: clamp(1.8rem, 7vh, 2.6rem); margin-bottom: 1vh; }
  .left-teaser h2 { font-size: clamp(1.2rem, 4.5vh, 1.7rem); }
  .left-teaser p  { font-size: clamp(0.9rem, 3vh, 1.05rem); max-width: none; }

  /* Typografie */
  .bio,
.contact-block-body,
.impr-body,
.kunden-names,
.news-excerpt { line-height: var(--leading); }
  .cta-section { padding: 4vw 5%; }
  .kunden-section { padding: 4vw 5%; }
}


/* ============================================================
   RESPONSIVE — ZOOM-SCALING (769–1440px,
landscape)
   Wird via JavaScript in main.js gesetzt:
   document.documentElement.style.zoom = vw / 1440
   ============================================================ */


/* ============================================================
   RESPONSIVE — TABLET PORTRAIT (769–1100px,
portrait)
   ============================================================ */
@media (min-width: 769px) and (max-width: 1100px) and (orientation: portrait) {
  html, body { overflow: auto; height: auto; min-height: 100%; }

  /* Navbar */
  .navbar { height: 9vw; }
  .navbar-right { gap: 3vw; }
  .call-me { width: 5.5vw; height: 5.5vw; }
  .toggler { gap: 1.8vw; padding: .7vw; }
  .toggler span { width: 3.5vw; }
  .theme-toggle { padding: .7vw; }

  /* Menu overlay */
  .menu-overlay { width: 100%; padding-top: 14vw; }
  .menu-close { height: 9vw; right: 4vw; }

  /* Layout – eine einzige scrollbare Seite.
     !important bleibt: überschreibt Desktop 100dvh / overflow:auto je Panel. */
  #wrapper { flex-direction: column; height: auto !important; overflow: visible !important; }
  .left-panel { width: 100%; height: auto !important; overflow: visible !important; min-height: 0; }
  .right-panel { width: 100%; height: auto !important; border-top: none; overflow: visible !important; }
  html[data-page="leistungen"] .left-panel,
html[data-page="about"] .left-panel,
html[data-page="index"] .left-panel,
html[data-page="kontakt"] .left-panel { overflow: visible !important; height: auto !important; }

  /* HEAD – unified */
  .site-name { margin-bottom: 1vw; }
  .site-subtitle { letter-spacing: .135em; }
  .site-subtitle { margin-bottom: 3vw; }

  /* MAIN – body text */
  .bio,
.contact-block-body,
.impr-body,
.kunden-names,
.news-excerpt { line-height: var(--leading); }

  /* Form inputs */
  .field input,
.field textarea,
.field select { padding: 1.5vw 0; }
  .field textarea { min-height: 18vw; }
  .form-row { grid-template-columns: 1fr; }
  .submit-btn { padding: 2.2vw 5vw; }
  /* Gruppe 11 – symmetrische Seitenränder im gestapelten Layout */
  .leistung-content { padding-left: 5vw; padding-right: 5vw; }
  .ansatz-hero { margin-left: -5vw; margin-right: -5vw; }
  .content-figure { margin-left: -5vw; margin-right: -5vw; }
  .ansatz-neu { grid-template-columns: 1fr; min-height: auto; }
  /* Verhindert,
dass html[data-page="index"] .left-panel das ansatz-text-Padding überschreibt */
  html[data-page="index"] .ansatz-neu .left-panel { padding: 60px 5%; }
  .cta-section { padding: 35px 5% 55px; }
  .kunden-section { padding: 50px 5%; }

  /* ── PAGE-SPECIFIC TABLET PORTRAIT (layout only) ── */

  /* Index */
  html[data-page="index"],
html[data-page="index"] body { overflow: auto; }
  html[data-page="index"] .left-panel { padding: 14vw 4vw 5vw; }
  html[data-page="index"] .right-panel { flex: 0 0 60vw; height: 60vw; }
  html[data-page="index"] .site-name { margin-bottom: 1vw; }
  html[data-page="index"] .site-subtitle { margin-bottom: 4vw; }

  /* About */
  html[data-page="about"] .left-panel { padding: 14vw 4vw 6vw; overflow: visible; }
  html[data-page="about"] .right-panel { flex: 0 0 60vw; height: 60vw; }
  html[data-page="about"] .section-label { margin-top: 5vw; }

  /* Portfolio */
  html[data-page="portfolio"] .left-panel { padding: 14vw 4vw 4vw; flex-shrink: initial; }
  html[data-page="portfolio"] .right-panel { padding: 0 3vw 6vw; }
  html[data-page="portfolio"] .grid { column-gap: 1.5vw; }
  html[data-page="portfolio"] .grid-caption { padding: 1.5vw; }
  html[data-page="portfolio"] .lightbox-close { top: 3vw; right: 4vw; }
  html[data-page="portfolio"] .lightbox-content { gap: 2vw; }

  /* News */
  html[data-page="news"] .left-panel { padding: 14vw 4vw 4vw; flex-shrink: initial; }
  html[data-page="news"] .right-panel { padding: 0 4vw 8vw; }
  html[data-page="news"] .news-item { grid-template-columns: 22vw 1fr; gap: 0 3vw; padding: 4vw 0; }
  html[data-page="kontakt"] .left-panel { padding: 14vw 4vw 5vw; overflow: visible; }
  html[data-page="kontakt"] .right-panel { padding: 5vw 4vw 8vw; overflow: visible; }

  /* Legal */
  html[data-page="rechtliches"] .left-panel { padding: 14vw 4vw 5vw; }
  html[data-page="rechtliches"] .right-panel { padding: 5vw 4vw 8vw; }

  /* Spacing hierarchy fix – tablet portrait (font ~2.5vw,
p+p ≈ 3vw) */
  .contact-block { margin-bottom: 4vw; }
  .contact-block-body { margin-bottom: 0; }
  .contact-block-body + .contact-block { margin-top: 5vw; }
  .impr-section { margin-bottom: 4vw; }

  /* ── TYPOGRAFIE-ANPASSUNGEN PORTRAIT ── */

  /* Burger-Menü: Lücken so eng,
dass 3 Striche = Mond-Höhe */
  .toggler { gap: 1.1vw; }

  /* Scroll-Hint: horizontal zentriert */
  .scroll-hint { left: 50% !important; }

  /* Subheadline: etwas kleiner */

  /* Abstand zwischen Subheadline und Teaser-Text */
  .left-teaser { margin-top: 10vw; }

  /* Left-teaser Text: größer */
  .left-teaser p { max-width: none; margin-top: 2vw; }
  .left-teaser p + p { margin-top: 1.5vw; }

  /* H2 im Content-Bereich: größer */
  .leistung-content .content-headline,
.content-headline { margin-top: 6vw !important; margin-bottom: 2vw !important; }

  /* H3 im Content-Bereich: größer */
  .leistung-content .section-label,
.leistung-content h3 { margin-top: 5vw !important; }

  /* Fließtext im Content-Bereich: größer */

  /* arrow-link (mehr →): etwas kleiner als zuvor */

  /* Mehr Platz nach "Kontakt →" */
  .leistung-content .cta-section { padding: 6vw 0 6vw !important; }

  /* Menü "MENÜ" Label: größer */
  .menu-nav .section-label { font-size: min(1.8rem, 5vh) !important; }

  /* Horizontales Menü (Secondary): etwas kleiner */
  .menu-secondary a { font-size: clamp(0.8rem, 0.72rem + 0.25vw, 0.95rem) !important; }

  /* Menü-Layer: doppelte Einrückung links,
eine Zeilenhöhe weniger unten */
  .menu-overlay { padding-left: 6.4vw; padding-bottom: 4vw; }

  /* Hauptmenü: größere Schrift im Vollbild-Overlay.
     !important bleibt: überschreibt die Desktop-Menügrößen gleicher Spezifität. */
  .menu-contact-top a,
.menu-main > li > a,
.menu-parent { font-size: min(1.7rem, 4.5vh) !important; }
  .menu-sub a { font-size: min(1.3rem, 3vh) !important; }

  /* Teaser-Überschrift: fett */
}


/* ============================================================
   RESPONSIVE — ALLE MITTLEREN BILDSCHIRME (769–1400px)
   Zitat-Schriftgröße für Tablet landscape + portrait
   ============================================================ */


/* ============================================================
   RESPONSIVE — FOLDABLE / KLEINE TABLETS QUER (769–1100px,
landscape)
   iPhone Fold aufgeklappt: Falz = Panelgrenze (50/50-Split bleibt).
   Ersetzt den JS-Zoom,
der auf iOS deaktiviert ist.
   ============================================================ */
@media (min-width: 769px) and (max-width: 1100px) and (orientation: landscape) {
  /* Split-Layout bleibt – nur Typografie hochskalieren */

  /* HEAD */

  /* Teaser links */
  .left-teaser p { max-width: none; }

  /* Content rechts */

  /* Formular (Kontakt) */
  .submit-btn { padding: 1.4vw 3.5vw; }

  /* Navbar-Icons */
  .toggler span { width: 2.4vw; }

  /* Menü-Layer: lesbare Größen (vh-Anteile greifen bei geringer Höhe) */
  .menu-contact-top a,
.menu-main > li > a,
.menu-parent { font-size: min(1.9rem, 4vh) !important; }
  .menu-sub a { font-size: min(1.45rem, 3vh) !important; }
  .menu-nav .section-label { font-size: min(1.9rem, 4.5vh) !important; }
  .menu-secondary a { font-size: clamp(0.8rem, 0.72rem + 0.25vw, 0.95rem) !important; }

  /* Portfolio-Raster + News */
}


/* ============================================================
   Gruppe 10 – TELEFON QUERFORMAT (kurze Höhe, JEDE Breite).
   Greift auch bei modernen iPhones (844–932px breit in Landscape),
   die der ≤768px-Regel entgehen. Ziel: nichts wird beschnitten.
   ============================================================ */
@media (orientation: landscape) and (max-height: 500px) and (max-width: 1000px) {
  /* Linkes Panel scrollbar machen – schlägt das index/leistungen overflow:hidden */
  .left-panel,
  html[data-page="index"] .left-panel,
  html[data-page="leistungen"] .left-panel,
  html[data-page="kontakt"] .left-panel { overflow-y: auto !important; height: 100vh; }

  .site-name      { font-size: clamp(1.8rem, 7vh, 2.6rem); margin-bottom: 1vh; }
  .left-teaser h2 { font-size: clamp(1.2rem, 4.5vh, 1.7rem); }
  .left-teaser p  { font-size: clamp(0.9rem, 3vh, 1.05rem); max-width: none; }
}


/* ============================================================
   BRANCHEN-ÜBERSICHT (branchen.html)
   ============================================================ */
.leistung-content .branche-block {
  padding: 2.6vw 0;
  border-top: 1px solid rgba(0,0,0,0.1);
  max-width: var(--measure);   /* Gruppe 3: Trennlinie nie breiter als der Text */
}
.leistung-content .branche-block:first-of-type { border-top: none; padding-top: 1vw; }

/* Meta-Zeilen erben Fließtextgröße (1.4vw / mobil 3.3vw) über .leistung-content p,
   .branche-meta als <div> bekommt sie hier explizit */
.leistung-content div.branche-meta { font-size: var(--text); line-height: var(--leading); color: var(--fg); }

.leistung-content .meta-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: var(--label);
  font-weight: 500;
  color: #8a8a8a;
  margin: 0.9em 0 0.25em;
}
.leistung-content .referenz-liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2em 1.2em;
}
.leistung-content .referenz-liste li {
  position: relative;
  font-size: var(--text);
  font-weight: 500;
  color: var(--fg);
  line-height: 1.5;
}
.leistung-content .referenz-liste li:not(:last-child)::after {
  content: "·";
  position: absolute;
  right: -0.75em;
  color: #c4c4c4;
}
.leistung-content .branche-leistungen a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(0,0,0,0.3);
}
.leistung-content .branche-leistungen a:hover { text-decoration-color: #000; }

/* Dark Mode */
html[data-theme="dark"] .leistung-content .branche-block { border-top-color: rgba(255,255,255,0.14); }
html[data-theme="dark"] .leistung-content div.branche-meta,
html[data-theme="dark"] .leistung-content .referenz-liste li { color: #fff; }
html[data-theme="dark"] .leistung-content .meta-label { color: #9a9a9a; }
html[data-theme="dark"] .leistung-content .branche-leistungen a { color: #fff; text-decoration-color: rgba(255,255,255,0.4); }
html[data-theme="dark"] .leistung-content .branche-leistungen a:hover { text-decoration-color: #fff; }
html[data-theme="dark"] .leistung-content .referenz-liste li:not(:last-child)::after { color: #555; }

/* Mobil: Größen an Fließtext angleichen */
@media (max-width: 768px) {
  .leistung-content .meta-label { margin-top: 1.4em; }
  .leistung-content .branche-block { padding: 6vw 0; }
}


/* ============================================================
   PUNKTE 3–6: Zeilenlänge, Fließtext-Feinschliff, Labels
   ============================================================ */

/* Punkt 2 – Gemeinsames Satzmaß auf ALLE Textelemente (auch Überschriften
   und .bio auf „Über mich"), damit nichts breiter läuft als der Fließtext. */
.leistung-content .content-headline,
.leistung-content h2,
.leistung-content h3,
.leistung-content p,
.leistung-content li,
.leistung-content .bio,
.leistung-content .kunden-names,
.leistung-content .ki-liste,
.leistung-content .branche-meta,
.leistung-content .leistungen-liste,
.bio, .bio p { max-width: var(--measure); }

/* Punkt 4 – Fließtext: schönerer Umbruch + Silbentrennung (html lang="de") */
.bio, .bio p, .leistung-content p, .kunden-names,
.contact-block-body, .impr-body, .ki-liste li, .branche-meta {
  text-wrap: pretty;
  -webkit-hyphens: auto;
  hyphens: auto;
}
/* Teaser/Claim: schöner Umbruch, aber keine Silbentrennung */
.left-teaser p { text-wrap: pretty; -webkit-hyphens: manual; hyphens: manual; }

/* Punkt 5/6 – Versal-Labels einheitlich: Gewicht 500, ruhige Sperrung */
.section-label,
.field label,
.leistung-content .meta-label,
.arrow-link,
.menu-secondary a,
.content-figure figcaption,
.news-date, .news-cat, .news-read,
.lightbox-counter,
html[data-page="portfolio"] .grid-caption { font-weight: 500; }
.section-label { letter-spacing: .13em; }


/* ============================================================
   KACHEL-RASTER (Übersichts-Seiten: Leistungen, Produktion, Branchen)
   ============================================================ */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 0;
}
.tile {
  display: block;
  padding: 1.4rem 1.5rem 1.5rem;
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: 6px;
  color: var(--fg);
  text-decoration: none;
  transition: border-color .2s ease, transform .2s ease;
}
.tile:hover { border-color: var(--fg); transform: translateY(-2px); }
.tile h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--h3);
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0 0 .45em !important;
  overflow-wrap: break-word;
  word-break: break-word;
  /* Nur an gesetzten weichen Trennstellen (&shy;) umbrechen, nicht automatisch */
  -webkit-hyphens: manual;
  -ms-hyphens: manual;
  hyphens: manual;
}
.tile p { font-size: var(--text); line-height: 1.5; margin: 0; color: var(--fg); overflow-wrap: break-word; -webkit-hyphens: manual; -ms-hyphens: manual; hyphens: manual; }
.tile .tile-more {
  display: inline-block; margin-top: .9em;
  font-size: var(--label); font-weight: 500;
  letter-spacing: .13em; text-transform: uppercase;
}
.tile .tile-more::after { content: " →"; }
html[data-theme="dark"] .tile { border-color: rgba(255,255,255,0.16); }
html[data-theme="dark"] .tile:hover { border-color: var(--fg); }

