/* =================================================================
   SH-Media – Stylesheet
   ================================================================= */

/* ---------- Schriften (lokal gehostet, keine Verbindung zu Google) ---------- */

/* Überschriften: Bricolage Grotesque (SIL Open Font License, frei nutzbar) */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../Fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-display: swap;
}

/* Fließtext: Figtree, sehr gut lesbar auch in kleinen Größen */
@font-face {
  font-family: "Figtree";
  src: url("../Fonts/figtree-latin-300-normal.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("../Fonts/figtree-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("../Fonts/figtree-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

/* ---------- Farben & Grundwerte ---------- */
:root {
  /* Markenverlauf */
  --brand-1: #c331c6;
  --brand-2: #3415b4;
  --grad: linear-gradient(120deg, var(--brand-1) 0%, var(--brand-2) 100%);
  --grad-soft: linear-gradient(120deg, color-mix(in srgb, var(--brand-1) 12%, transparent), color-mix(in srgb, var(--brand-2) 12%, transparent));

  /* Einzelfarbe aus dem Verlauf für Text-Links (gut lesbar auf Hell) */
  --accent: #6a22bc;
  --accent-dark: var(--brand-2);
  /* Schrift auf Farbflächen (Buttons) */
  --on-brand: #fff;

  /* Die Markenfarben lassen sich je Webseite im Backend ändern:
     Startseite → Seiteneigenschaften → Reiter „Design“. Die Werte dort
     überschreiben --brand-1, --brand-2, --accent, --accent-dark, --on-brand. */

  --paper: #f7f6f9;
  --paper-2: #eeebf3;
  --ink: #1b1530;
  --muted: #564f68;
  --line: #dcd6e6;
  --ok: #1d7a4c;
  --err: #b3261e;

  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;

  --wrap: 72rem;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: var(--brand-1); }

:focus-visible {
  outline: 3px solid var(--brand-1);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--brand-1); color: var(--on-brand); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

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

h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.12;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.005em;
}

/* Überschrift 4 (z. B. im Texteditor): kleine Zwischenüberschrift */
h4 {
  font-family: var(--display);
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: .01em;
  margin: 1.25rem 0 .35rem;
}
h4:first-child { margin-top: 0; }
.section--dark h4 { color: #fff; }

/* Text im Markenverlauf (für Akzente) */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Kopfzeile ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
/* feine Verlaufslinie unter der Kopfzeile */
.site-header::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--grad);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 4.25rem; gap: 1rem;
}
.brand {
  display: inline-flex; align-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand:hover { color: transparent; opacity: .85; }
.brand-logo {
  height: var(--logo-h, 56px);
  width: auto;
  max-width: 18rem;
  object-fit: contain;
  object-position: left center;
}
.site-header .wrap:has(.brand-logo) { padding-block: .6rem; }
@media (max-width: 34rem) {
  .brand-logo { height: min(var(--logo-h, 56px), 44px); max-width: 11rem; }
}
.nav { display: flex; gap: clamp(.9rem, 3vw, 2rem); }
.nav a {
  position: relative;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .98rem;
  padding-block: .35rem;
}
.nav a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--grad);
  transform: scaleX(0); transform-origin: left;
  transition: transform .2s ease;
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }
.nav a.is-active::after { transform: scaleX(1); }
.nav { align-items: center; }

/* Menüpunkt als Button im Markenverlauf (z. B. „Kontakt“) */
.nav a.nav-cta {
  padding: .6rem 1.2rem;
  border-radius: 999px;
  color: var(--on-brand);
  background: var(--grad);
  background-size: 160% 100%;
  background-position: 0% 50%;
  box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--brand-2) 60%, transparent);
  transition: background-position .35s ease, box-shadow .2s ease;
}
.nav a.nav-cta::after { display: none; }
.nav a.nav-cta:hover,
.nav a.nav-cta:focus-visible {
  color: var(--on-brand);
  background-position: 100% 50%;
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--brand-1) 70%, transparent);
}

/* Menü-Knopf fürs Handy (nur sichtbar unter 48rem) */
.nav-toggle {
  display: none;
  align-items: center; gap: .5rem;
  font: 600 .95rem/1 var(--body);
  color: var(--ink);
  background: none;
  border: 2px solid transparent;
  border-radius: 999px;
  padding: .55rem .9rem;
  cursor: pointer;
  background:
    linear-gradient(var(--paper), var(--paper)) padding-box,
    var(--grad) border-box;
}
.nav-toggle-icon, .nav-toggle-icon::before, .nav-toggle-icon::after {
  display: block; width: 1rem; height: 2px; border-radius: 1px;
  background: currentColor; position: relative; transition: transform .2s, background .2s;
}
.nav-toggle-icon::before, .nav-toggle-icon::after { content: ""; position: absolute; left: 0; }
.nav-toggle-icon::before { top: -5px; }
.nav-toggle-icon::after { top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 48rem) {
  .js .nav-toggle { display: inline-flex; }
  .js .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0;
    align-items: stretch;
    padding: .5rem var(--pad) 1.25rem;
    background: var(--paper);
    box-shadow: 0 18px 30px -18px rgba(27, 21, 48, .35);
    display: none;
  }
  .js .nav.is-open { display: flex; }
  .js .nav a { padding-block: .8rem; border-bottom: 1px solid var(--line); }
  .js .nav a:last-child { border-bottom: 0; }
  .js .nav a::after { display: none; }
  .js .nav a.is-active { color: var(--accent); }
  .js .nav a.nav-cta {
    margin-top: .75rem;
    padding-block: .85rem;
    text-align: center;
    border-bottom: 0;
  }
  /* ohne JavaScript: Menü umbrechen statt verstecken */
  html:not(.js) .nav { flex-wrap: wrap; justify-content: flex-end; row-gap: .25rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  font: 600 1rem/1 var(--body);
  padding: 1rem 1.6rem;
  border-radius: 999px;
  border: 0;
  background: var(--grad);
  background-size: 160% 100%;
  background-position: 0% 50%;
  color: var(--on-brand);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--brand-2) 55%, transparent);
  transition: background-position .35s ease, box-shadow .2s ease, transform .15s ease;
}
.btn:hover {
  color: var(--on-brand);
  background-position: 100% 50%;
  box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--brand-1) 70%, transparent);
}
.btn:active { transform: translateY(1px); }

/* Umriss-Button mit Verlaufsrahmen */
.btn.ghost {
  color: var(--accent-dark);
  background:
    linear-gradient(var(--paper), var(--paper)) padding-box,
    var(--grad) border-box;
  border: 2px solid transparent;
  box-shadow: none;
  padding: calc(1rem - 2px) calc(1.6rem - 2px);
}
.btn.ghost:hover {
  color: var(--on-brand);
  background: var(--grad) border-box;
}
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(4rem, 12vw, 9rem) clamp(3.5rem, 9vw, 7rem);
}
/* Hintergrundbild (optional, aus dem Hero-Element) */
.hero-bg {
  /* bewusst ohne z-index: so liegen Bild, Bildnachweis und Verlauf in
     derselben Ebenen-Reihenfolge des Heros (siehe Ebenen-Übersicht unten) */
  position: absolute; inset: 0;
}
.hero-bg { overflow: hidden; }
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide img,
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Übergang "Schieben": Bilder nebeneinander, die Leiste wird verschoben */
.hero-bg:not([data-effect="fade"]) .hero-slides {
  display: flex;
  transition: transform 1.1s cubic-bezier(.65, 0, .35, 1);
  will-change: transform;
}
.hero-bg:not([data-effect="fade"]) .hero-slide { flex: 0 0 100%; height: 100%; }

/* Übergang "Überblenden": Bilder übereinander */
.hero-bg[data-effect="fade"] .hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero-bg[data-effect="fade"] .hero-slide.is-active { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .hero-slides, .hero-slide { transition-duration: .01s !important; }
}

/* ---------- Copyright im Bild: klein, senkrecht, unten links, von unten nach oben ---------- */
.img-copyright {
  --cr-left: .45rem;    /* Abstand vom linken Bildrand */
  --cr-bottom: .7rem;   /* Abstand vom unteren Bildrand */
  position: absolute;
  left: var(--cr-left);
  bottom: var(--cr-bottom);
  z-index: 3;
  /* Senkrecht, von unten nach oben gelesen – ohne Drehung per transform,
     damit die Schrift gestochen scharf bleibt */
  writing-mode: sideways-lr;
  max-height: calc(100% - 2 * var(--cr-bottom));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 300 .58rem/1 var(--body);
  letter-spacing: .07em;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  pointer-events: none;
  /* Durchlässiges Rechteck, genau so lang wie der Text */
  padding: .45rem .3rem;
  background: rgba(20, 16, 36, .38);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
/* Ältere Browser ohne "sideways-lr": klassisch drehen */
@supports not (writing-mode: sideways-lr) {
  .img-copyright {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
  }
}
.img-copyright[hidden] { display: none; }
.portrait .img-copyright { z-index: 1; --cr-bottom: 1.4rem; }
/* Im Hero liegt der Bildnachweis direkt auf dem Bild, unter dem Farbverlauf */
.hero-copyright { --cr-left: .5rem; --cr-bottom: 1rem; z-index: 1; }


/* Markenverlauf über den Bildern, sorgt für Lesbarkeit.
   Stärke anpassen: --hero-tint (0 = kein Verlauf, 1 = deckend) */
.hero { --hero-tint: .7; }
.hero-bg::after {
  content: "";
  position: absolute; inset: 0; z-index: 2;
  background:
    linear-gradient(120deg, var(--brand-1) 0%, var(--brand-2) 100%),
    rgba(27, 21, 48, .2);
  background-blend-mode: normal;
  opacity: var(--hero-tint);
}
/* zusätzliche Abdunklung links, wo der Text steht */
.hero-bg::before {
  content: "";
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(90deg, rgba(27, 21, 48, .45) 0%, rgba(27, 21, 48, 0) 65%);
  pointer-events: none;
}

/* Ebenen im Hero (von hinten nach vorn):
   0 Bilder · 1 Bildnachweis · 2 Farbverlauf/Abdunklung · 3 „SH“ · 4 Text · 5 Punkte/Pause */

/* Großes Monogramm im Hintergrund */
.hero-mark {
  position: absolute;
  z-index: 3;
  right: -0.06em;
  bottom: -0.2em;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(13rem, 36vw, 32rem);
  line-height: 1;
  letter-spacing: -0.04em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: .16;
  pointer-events: none;
  user-select: none;
  animation: mark-in 1.4s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes mark-in {
  from { opacity: 0; transform: translateY(6%); }
  to   { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .hero-mark { animation: none; } }

.hero-content { position: relative; z-index: 4; }
.hero h1 {
  font-size: clamp(2.4rem, 6.2vw, 4.8rem);
  max-width: 15ch;
}
.hero-intro {
  max-width: 40ch;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--muted);
  margin: 1.5rem 0 2.25rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Hero MIT Hintergrundbild: helle Schrift, Monogramm in Weiß */
.hero:has(.hero-bg) { color: #fff; }
.hero:has(.hero-bg) .hero-intro { color: rgba(255, 255, 255, .88); }
.hero:has(.hero-bg) .hero-mark {
  background: none;
  color: #fff;
  opacity: .14;
}
.hero:has(.hero-bg) .btn {
  background: #fff;
  color: var(--brand-2);
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .45);
}
.hero:has(.hero-bg) .btn:hover { background: var(--paper-2); }
.hero:has(.hero-bg) .btn.ghost {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, .85);
  color: #fff;
}
.hero:has(.hero-bg) .btn.ghost:hover { background: rgba(255, 255, 255, .15); }

/* Monogramm per Schalter im Hero-Element ausblenden */
.hero:has(.hero-flag-no-mark) .hero-mark { display: none; }

/* ---------- Abschnitte ---------- */
.section { padding-block: clamp(4rem, 9vw, 7rem); }
/* keine Trennlinien zwischen Bereichen und Inhaltselementen */
.section-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); max-width: 40rem; }
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
/* kurzer Verlaufsbalken über jeder Abschnittsüberschrift */
.section-head h2::before,
.about-text h2::before {
  content: "";
  display: block;
  width: 3rem; height: 4px;
  border-radius: 2px;
  background: var(--grad);
  margin-bottom: 1.1rem;
}
.section-head p { color: var(--muted); margin: 1rem 0 0; }

/* ---------- Leistungen ---------- */
.service {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: .75rem 3rem;
  padding-block: 2rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}
/* Verlaufslinie über der ersten Leistung */
.section-head + .service { border-top: 0; }
.section-head + .service::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: var(--grad);
}
.service h3 {
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
  transition: color .2s;
}
.service p { margin: 0; color: var(--muted); max-width: 52ch; }
.service .tags {
  margin: .9rem 0 0; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; gap: .4rem;
}
.service .tags li {
  font-size: .88rem; font-weight: 600;
  padding: .3rem .8rem;
  border-radius: 999px;
  color: var(--accent-dark);
  background: var(--grad-soft);
}
.service:hover h3 {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (max-width: 44rem) {
  .service { grid-template-columns: 1fr; }
}

/* ---------- Über mich ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 1.25rem;
  background: var(--paper-2);
  display: grid; place-items: center;
  color: var(--muted);
  font-family: var(--display);
}
/* Verlaufsfläche versetzt hinter dem Foto */
.portrait::before {
  content: "";
  position: absolute; inset: 0;
  transform: translate(.9rem, .9rem);
  border-radius: inherit;
  background: var(--grad);
  z-index: -1;
}
.about { isolation: isolate; }
.portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.about-text h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: 1.25rem; }
.about-text .lead {
  font-size: 1.25rem; font-weight: 600; line-height: 1.45;
  margin: 0 0 1rem;
}
.rte p, .rte ul, .rte ol { max-width: 60ch; margin: 0 0 1rem; }
@media (max-width: 44rem) {
  .about { grid-template-columns: 1fr; }
  .portrait { max-width: 20rem; }
}

/* ---------- Bereichs-Hintergründe ---------- */
.section--tint { background: var(--paper-2); }
.section--tint + .section,
.section + .section--tint { border-top-color: transparent; }

.section--dark {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink);
  color: #eeecf4;
  border-top-color: transparent !important;
}
/* dezentes Verlaufsleuchten im dunklen Bereich */
.section--dark::before {
  content: "";
  position: absolute;
  width: 60rem; height: 60rem;
  right: -25rem; top: -30rem;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand-1) 35%, transparent), color-mix(in srgb, var(--brand-2) 15%, transparent) 55%, transparent 75%);
  z-index: -1;
  pointer-events: none;
}
.section--dark .section-head h2,
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark .section-head p,
.section--dark .service p { color: #bfb8d0; }
.section--dark a:not(.btn) { color: #fff; text-decoration-color: var(--brand-1); }
.section--dark a:not(.btn):hover { color: color-mix(in srgb, var(--brand-1) 25%, #fff); }
.section--dark .service { border-bottom-color: rgba(255, 255, 255, .12); }
.section--dark .service .tags li { color: #fff; background: rgba(255, 255, 255, .1); }
.section + .section--dark, .section--dark + .section { border-top-color: transparent; }

/* ---------- Zweispaltiger Bereich (z. B. Kontakt) ---------- */
.cols {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  column-gap: clamp(2rem, 6vw, 5rem);
  row-gap: 0;
  align-items: start;
}
/* Die Elemente der Hauptspalte direkt ins Raster holen:
   Überschrift über volle Breite, darunter Hauptspalte links und Seitenspalte rechts */
.col-main { display: contents; }
.col-main > * { grid-column: 1; }
.col-main > .section-head:first-child { grid-column: 1 / -1; }
.col-aside { grid-column: 2; grid-row: 1 / span 20; display: grid; gap: 2rem; align-content: start; }
.cols:has(> .col-main > .section-head:first-child) > .col-aside { grid-row: 2 / span 20; }
@media (max-width: 50rem) {
  .cols { grid-template-columns: 1fr; row-gap: 2.5rem; }
  .col-main > *, .col-aside,
  .cols:has(> .col-main > .section-head:first-child) > .col-aside { grid-column: 1; grid-row: auto; }
}

/* ---------- Kontaktdaten ---------- */
.contact-info { display: grid; gap: 1.5rem; align-content: start; }
.contact-info > div { display: grid; gap: .1rem; }
.contact-info h3 {
  font-family: var(--body); font-size: .95rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin-bottom: .2rem;
}
.section--dark .contact-info h3 { color: #bfb8d0; }
.contact-info p { margin: 0; font-size: 1.15rem; }
.contact-info .address { font-size: 1.15rem; line-height: 1.5; }
.contact-info .address p { margin: 0 0 .4rem; }
.contact-info .address p:last-child { margin-bottom: 0; }

/* ---------- Formular (EXT:form) – hell und dunkel ---------- */
.section form { display: grid; gap: 1.1rem; }
.section .form-element { display: grid; gap: .4rem; margin: 0; }
.section .form-label { font-weight: 600; font-size: .95rem; }
.section .form-control {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: .75rem;
  padding: .85rem 1rem;
  width: 100%;
}
.section--dark .form-control { border-color: transparent; }
.section textarea.form-control { min-height: 10rem; resize: vertical; }
.section .form-control:focus {
  outline: none;
  border-color: transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    var(--grad) border-box;
}
.section .form-control.is-invalid { border-color: var(--err); }
.section .invalid-feedback { color: var(--err); font-size: .9rem; font-weight: 600; }
.section--dark .form-control.is-invalid { border-color: #ff8a80; }
.section--dark .invalid-feedback { color: #ffb4ab; }
.section .form-text { color: var(--muted); font-size: .88rem; }
.section--dark .form-text { color: #bfb8d0; }
.section .required { color: var(--brand-1); margin-left: .15em; }
.section--dark .required { color: color-mix(in srgb, var(--brand-1) 50%, #fff); }

.section .form-check-wrapping-label {
  display: flex; gap: .75rem; align-items: flex-start;
  font-size: .92rem; color: var(--muted);
}
.section--dark .form-check-wrapping-label { color: #cfc9dc; }
.section .form-check-input {
  margin-top: .3rem; width: 1.1rem; height: 1.1rem; accent-color: var(--brand-1); flex: none;
}

.section .actions,
.section .form-navigation { margin: 0; }
.section .form-navigation > * { display: flex; gap: .75rem; }
.section .btn.btn-primary,
.section form button[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 1rem/1 var(--body);
  padding: 1rem 1.6rem;
  border-radius: 999px;
  border: 0;
  background: var(--grad);
  background-size: 160% 100%;
  color: var(--on-brand);
  cursor: pointer;
  box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--brand-2) 55%, transparent);
  transition: background-position .35s ease;
}
.section .btn.btn-primary:hover,
.section form button[type="submit"]:hover { background-position: 100% 50%; }

/* Bestätigung nach dem Absenden */
.section .plugin > p,
.section .plugin .confirmation {
  background: #d8f0e2; color: var(--ok);
  padding: 1rem 1.25rem; border-radius: .75rem; font-weight: 600;
}

/* ---------- Fußzeile ---------- */
.site-footer {
  position: relative;
  padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem;
  font-size: .95rem;
  color: var(--muted);
  background: var(--paper-2);
}
.site-footer::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--grad);
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem clamp(2rem, 5vw, 4rem);
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}
.footer-top > .footer-brand { flex: 2 1 18rem; }
.footer-top > .footer-nav { flex: 1 1 9rem; }
.footer-brand .brand { font-size: 3rem; }
.footer-brand p { margin: .75rem 0 0; max-width: 32ch; }
.footer-text { margin-top: 1rem; max-width: 36ch; }
.footer-text .text-element > h2 { font-size: 1.05rem; margin: 0 0 .4rem; }
.footer-text p { margin: 0 0 .6rem; }
.footer-text p:last-child { margin-bottom: 0; }
.footer-text a { color: var(--accent); }
.footer-logo { height: 96px; width: auto; max-width: 22rem; object-fit: contain; object-position: left center; }
.footer-title {
  font-family: var(--body);
  font-size: .8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: .75rem;
}
.footer-nav { display: grid; gap: .45rem; align-content: start; }
.footer-nav a {
  color: var(--ink); text-decoration: none; font-weight: 600;
  justify-self: start;
  background: linear-gradient(var(--brand-1), var(--brand-2)) left bottom / 0 2px no-repeat;
  transition: background-size .2s ease;
}
.footer-nav a:hover, .footer-nav a.is-active { color: var(--ink); background-size: 100% 2px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  padding-top: 1.25rem;
  font-size: .88rem;
}
.footer-bottom a { color: var(--muted); text-decoration: none; font-weight: 600; }
.footer-bottom a:hover { color: var(--accent); }
@media (max-width: 44rem) {
  .footer-top > .footer-brand { flex-basis: 100%; }
  .footer-logo { height: 72px; }
  .footer-brand .brand { font-size: 2.25rem; }
}

/* ---------- Unterseiten (Seitentitel, Textblöcke) ---------- */
/* gleiche Kante wie die Bereiche, aber lesefreundliche Zeilenlänge */
.wrap--narrow > * { max-width: 46rem; }
.page-head { padding-block: clamp(3rem, 8vw, 5rem) 0; }
.page-head h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-bottom: 2rem;
}
.page-head h1::after {
  content: "";
  display: block;
  width: 3rem; height: 4px; border-radius: 2px;
  background: var(--grad);
  margin-top: 1rem;
}
.text-block { padding-block: 1rem; }
.page-content > .text-block:first-child { padding-top: clamp(3rem, 8vw, 5rem); }
.page-content--after-head > .text-block:first-child { padding-top: 0; }
.page-content > .text-block:last-child,
.page-content > .text-block:has(+ .section) { padding-bottom: clamp(3rem, 8vw, 5rem); }
.page-content > .section + .text-block { padding-top: clamp(3rem, 8vw, 5rem); }
/* heller Bereich direkt unter dem Seitentitel: ohne Linie auch ohne großen Abstand */
.page-content--after-head > .section--light:first-child { padding-top: clamp(1rem, 3vw, 2rem); }
.text-block h2 { font-size: 1.4rem; margin: 2.5rem 0 .75rem; }
.text-block h3 { font-size: 1.1rem; margin: 1.5rem 0 .5rem; }
.text-block h4 { margin: 1.25rem 0 .35rem; }
.text-block .text-element > h2:first-child { margin-top: 0; }
.text-block p, .text-block li { max-width: 68ch; }
.text-element + .text-element { margin-top: 2rem; }

/* ---------- Referenzen: mehrere im selben Bereich bilden ein Raster ---------- */
.wrap:has(> .reference),
.col-main:has(> .reference) { --ref-min: 17rem; }
.section > .wrap:has(> .reference) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--ref-min)), 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: stretch;
}
.section > .wrap:has(> .reference) > :not(.reference) { grid-column: 1 / -1; }
.section > .wrap:has(> .reference) > .section-head { margin-bottom: clamp(.5rem, 2vw, 1.5rem); }

.reference {
  display: flex; flex-direction: column;
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -28px rgba(27, 21, 48, .45);
  transition: transform .2s ease, box-shadow .2s ease;
}
.reference:hover {
  transform: translateY(-3px);
  box-shadow: 0 1px 0 var(--line), 0 26px 50px -28px color-mix(in srgb, var(--brand-2) 50%, transparent);
}
@media (prefers-reduced-motion: reduce) { .reference, .reference:hover { transition: none; transform: none; } }
.reference-media { position: relative; aspect-ratio: 3 / 2; background: var(--grad); }
.reference-media img { width: 100%; height: 100%; object-fit: cover; }
.reference-body { display: flex; flex-direction: column; gap: .5rem; padding: 1.25rem 1.4rem 1.5rem; flex: 1; }
.reference-kicker {
  margin: 0;
  font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.reference h3 { font-size: 1.3rem; }
.reference-body p { margin: 0; color: var(--muted); }
.reference-link {
  margin-top: auto; padding-top: .5rem;
  font-weight: 600; text-decoration: none; color: var(--accent);
  align-self: flex-start;
  background: var(--grad) left bottom / 0 2px no-repeat;
  transition: background-size .2s ease;
}
.reference-link:hover { background-size: 100% 2px; color: var(--accent); }
.section--tint .reference { background: #fff; }
.section--dark .reference { background: rgba(255, 255, 255, .06); box-shadow: none; }
.section--dark .reference-body p { color: #bfb8d0; }
.section--dark .reference-link { color: #fff; }

/* ---------- Spamschutz: Ersatzzeichen in E-Mail-Links aus Texten ---------- */
.at-sign, .dot-sign { margin-inline: .15em; }

/* ---------- Mobil: kein Monogramm über Hintergrundbildern im Hero ---------- */
@media (max-width: 48rem) {
  .hero:has(.hero-bg) .hero-mark { display: none; }
}

/* =================================================================
   Portfolio-Übersicht und Galerie
   ================================================================= */

/* Geschützte Bilder: nicht auswählbar, nicht ziehbar, kein langes Drücken */
.protect { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.protect img { pointer-events: none; -webkit-user-drag: none; user-select: none; }

.page-content--after-head > .section--portfolio:first-child,
.page-content--after-head > .section--gallery:first-child { border-top: 0; padding-top: 0; }

/* ---------- Übersicht: Kacheln ---------- */
.portfolio-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
}
.portfolio-tile {
  position: relative;
  display: block;
  border-radius: 1rem;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  background: var(--grad);
  aspect-ratio: 4 / 3;
  box-shadow: 0 18px 40px -28px rgba(27, 21, 48, .55);
}
.portfolio-tile-media, .portfolio-tile-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.portfolio-tile-media img { transition: transform .5s ease; }
/* Verlauf von unten für gut lesbaren Namen */
.portfolio-tile::after {
  content: "";
  position: absolute; inset: 40% 0 0 0;
  background: linear-gradient(0deg, rgba(20, 14, 40, .8) 0%, rgba(20, 14, 40, 0) 100%);
  pointer-events: none;
}
.portfolio-tile-title {
  position: absolute; left: 1.2rem; right: 1.2rem; bottom: 1rem;
  z-index: 1;
  font-family: var(--display);
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.2;
}
.portfolio-tile-title::after {
  content: "";
  display: block;
  width: 2.5rem; height: 3px; border-radius: 2px;
  margin-top: .5rem;
  background: var(--grad);
  transition: width .3s ease;
}
.portfolio-tile:hover img, .portfolio-tile:focus-visible img { transform: scale(1.05); }
.portfolio-tile:hover .portfolio-tile-title::after,
.portfolio-tile:focus-visible .portfolio-tile-title::after { width: 4.5rem; }
.portfolio-tile:hover { color: #fff; }
.portfolio-empty { color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .portfolio-tile-media img, .portfolio-tile-title::after { transition: none; }
}

/* ---------- Galerie: Blocksatz-Raster, Bilder behalten ihr Seitenverhältnis ---------- */
.gallery-back {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-weight: 600; text-decoration: none; color: var(--accent);
}
.gallery-back:hover { color: var(--brand-1); }
.gallery-grid {
  --row: clamp(11rem, 22vw, 17rem);
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}
.gallery-grid::after { content: ""; flex-grow: 999; }
.gallery-item {
  flex-grow: calc(var(--w, 3) / var(--h, 2));
  flex-basis: calc(var(--w, 3) / var(--h, 2) * var(--row));
  aspect-ratio: var(--w, 3) / var(--h, 2);
  padding: 0; border: 0;
  background: var(--paper-2);
  border-radius: .5rem;
  overflow: hidden;
  cursor: pointer; /* Hand statt Lupe: "zoom-in" zeigt in Opera unter Windows einen Ladekreis */
  position: relative;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease, filter .3s ease;
}
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.03); filter: brightness(1.05); }
@media (max-width: 34rem) {
  .gallery-grid { --row: 8.5rem; gap: .4rem; }
}

/* ---------- Großansicht ---------- */
html.lb-open { overflow: hidden; }
.lb {
  position: fixed; inset: 0; z-index: 200;
  background: #0c0918;
  color: #fff;
  display: grid;
  grid-template-rows: 1fr auto;
  -webkit-touch-callout: none;
  user-select: none;
}
.lb[hidden] { display: none; }
.lb-stage { position: relative; min-height: 0; padding: clamp(.5rem, 3vw, 2.5rem) clamp(.5rem, 6vw, 5rem) 0; }
.lb-img {
  width: 100%; height: 100%;
  background: center / contain no-repeat;
  transition: opacity .25s ease;
}
.lb.is-loading .lb-img { opacity: .85; }
.lb-spinner {
  position: absolute; left: 50%; top: 50%;
  width: 2rem; height: 2rem; margin: -1rem;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .25);
  border-top-color: #fff;
  animation: lb-spin .8s linear infinite;
  opacity: 0; transition: opacity .2s;
}
.lb.is-loading .lb-spinner { opacity: 1; }
@keyframes lb-spin { to { transform: rotate(360deg); } }
.lb-bar {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
  padding: 1rem clamp(1rem, 6vw, 5rem) 1.3rem;
  font-size: .95rem;
}
.lb-info { display: grid; gap: .3rem; max-width: 60ch; }
.lb-info p { margin: 0; }
.lb-info [hidden] { display: none; }
.lb-title { font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: #fff; }
.lb-description { color: rgba(255, 255, 255, .8); line-height: 1.5; }
.lb-copyright {
  margin-top: .15rem !important;
  font: 300 .75rem/1.3 var(--body);
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .6);
}
.lb-counter { color: rgba(255, 255, 255, .6); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-btn {
  position: absolute;
  display: grid; place-items: center;
  width: 3rem; height: 3rem;
  border: 0; border-radius: 999px;
  font-size: 1.6rem; line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  cursor: pointer;
  transition: background .2s;
}
.lb-btn:hover, .lb-btn:focus-visible { background: var(--grad); }
.lb-btn[hidden] { display: none; }
.lb-close { top: 1rem; right: 1rem; font-size: 1.1rem; }
.lb-prev, .lb-next { top: 50%; margin-top: -1.5rem; font-size: 2rem; }
.lb-prev { left: clamp(.4rem, 2vw, 1.5rem); }
.lb-next { right: clamp(.4rem, 2vw, 1.5rem); }
@media (max-width: 34rem) {
  .lb-prev, .lb-next { top: auto; bottom: 3.6rem; margin: 0; }
}

/* =================================================================
   Referenzen und Kundenstimmen
   ================================================================= */

/* Leistungs-Stichworte (wie bei den Leistungen) */
.ref-tile .tags, .ref-facts .tags {
  display: flex; flex-wrap: wrap; gap: .4rem;
  margin: 0; padding: 0; list-style: none;
}
.ref-tile .tag, .ref-facts .tags li {
  font-size: .85rem; font-weight: 600;
  padding: .3rem .8rem;
  border-radius: 999px;
  color: var(--accent-dark);
  background: var(--grad-soft);
}

/* ---------- Übersicht: Kacheln ohne Bild ---------- */
.page-content--after-head > .section--references:first-child { border-top: 0; padding-top: 0; }
.ref-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
}
.ref-grid > li { display: flex; }
.ref-tile {
  position: relative;
  display: flex; flex-direction: column; gap: .6rem;
  width: 100%;
  padding: 1.6rem 1.6rem 1.4rem;
  border-radius: 1rem;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -30px rgba(27, 21, 48, .5);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
/* Verlaufskante oben */
.ref-tile::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: var(--grad);
  transform: scaleX(.18); transform-origin: left;
  transition: transform .35s ease;
}
.ref-tile:hover, .ref-tile:focus-visible {
  color: var(--ink);
  transform: translateY(-3px);
  box-shadow: 0 1px 0 var(--line), 0 26px 50px -30px color-mix(in srgb, var(--brand-2) 55%, transparent);
}
.ref-tile:hover::before, .ref-tile:focus-visible::before { transform: scaleX(1); }
.ref-tile-company {
  font-family: var(--display);
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  font-weight: 700; line-height: 1.2;
}
.ref-tile-project { color: var(--muted); margin-top: -.3rem; }
.ref-tile .tags { margin-top: .4rem; }
.ref-tile-more {
  margin-top: auto; padding-top: .8rem;
  font-weight: 600; font-size: .95rem; color: var(--accent);
}
@media (prefers-reduced-motion: reduce) { .ref-tile, .ref-tile::before { transition: none; } }

/* ---------- Detail: Steckbrief ---------- */
.section--reference-head { padding-top: clamp(3rem, 8vw, 5rem); }
.page-content > .section--reference-head:first-child { border-top: 0; }
.ref-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.ref-head h1::after {
  content: "";
  display: block;
  width: 3rem; height: 4px; border-radius: 2px;
  background: var(--grad);
  margin-top: 1rem;
}
.ref-project { margin: 1rem 0 0; font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 46rem; }
.ref-facts {
  display: flex; flex-wrap: wrap; gap: 1.25rem 3rem;
  margin: 2rem 0 0;
  padding: 1.25rem 0;
  border-block: 1px solid var(--line);
}
.ref-facts dt {
  font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin-bottom: .5rem;
}
.ref-facts dd { margin: 0; font-weight: 600; }
.ref-description { margin-top: 2rem; max-width: 46rem; }
.ref-description p { max-width: 68ch; }

/* ---------- Kundenstimme: alles in einem grauen Feld ---------- */
.testimonial {
  position: relative;
  margin: 0;
  padding: clamp(1.75rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 2.75rem) clamp(1.5rem, 3.5vw, 2.25rem);
  padding-top: clamp(3.25rem, 7vw, 4.25rem);
  border-radius: 1.1rem;
  background: var(--paper-2);
}
/* klassisches, großes Anführungszeichen (Serifenschrift) im Markenverlauf */
.testimonial-mark {
  position: absolute;
  left: clamp(1.1rem, 3vw, 2rem);
  top: clamp(-.4rem, -.5vw, -.2rem);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: clamp(6rem, 12vw, 8rem);
  font-weight: 700;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  pointer-events: none;
  user-select: none;
}
.testimonial-quote {
  margin: 0;
  font-size: clamp(1.1rem, 1.9vw, 1.3rem);
  line-height: 1.6;
}
.testimonial-quote p { margin: 0; }
.testimonial-author {
  display: flex; align-items: center; gap: .9rem;
  margin-top: 1.5rem;
}
.testimonial-photo {
  flex: none;
  width: 3.5rem; height: 3.5rem;
  border-radius: 50%;
  overflow: hidden;
  background: var(--grad);
  padding: 2px;
}
.testimonial-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.testimonial-meta { display: grid; gap: .1rem; line-height: 1.35; }
.testimonial-meta strong { font-weight: 600; }
.testimonial-meta span { color: var(--muted); font-size: .95rem; }
.testimonial-wrap + .testimonial-wrap { margin-top: 2rem; }
.section--tint .testimonial { background: #fff; }
.section--dark .testimonial { background: rgba(255, 255, 255, .07); }
.section--dark .testimonial-meta span { color: #bfb8d0; }

/* ---------- Kundenstimmen-Slider: nach links raus, von rechts rein ---------- */
.tslider { max-width: 52rem; overflow: hidden; }
.tslider-track { display: grid; }
.tslide {
  grid-area: 1 / 1;
  transform: translateX(105%);
  visibility: hidden;
  transition: transform .8s cubic-bezier(.65, 0, .35, 1), visibility 0s linear .8s;
}
.tslide.is-active {
  transform: none;
  visibility: visible;
  transition: transform .8s cubic-bezier(.65, 0, .35, 1), visibility 0s;
}
.tslide.is-prev {
  transform: translateX(-105%);
  visibility: visible;
  transition: transform .8s cubic-bezier(.65, 0, .35, 1), visibility 0s linear .8s;
}
.tslide.no-anim { transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .tslide, .tslide.is-active, .tslide.is-prev { transition: none; }
}

/* ---------- Bildreihe: 4 Bilder im Querformat, mobil 2 × 2 ---------- */
.page-content--after-head > .section--gallery-row:first-child { padding-top: clamp(1rem, 3vw, 2rem); }
.section--gallery-row { padding-block: clamp(1.5rem, 4vw, 2.5rem); }
.section--reference-head:has(+ .section--gallery-row) { padding-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.page-content > .section--gallery-row + .text-block,
.page-content > .section--reference-head + .text-block { padding-top: clamp(1rem, 3vw, 2rem); }
.gallery-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(.4rem, 1.2vw, .75rem);
}
.gallery-row .gallery-item {
  aspect-ratio: 3 / 2;
  flex: none;
}
.gallery-row .gallery-item.is-extra { display: none; }
.gallery-row-more {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--display);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 700;
  color: #fff;
  background: linear-gradient(120deg, color-mix(in srgb, var(--brand-1) 72%, transparent), color-mix(in srgb, var(--brand-2) 82%, transparent));
  transition: background .25s ease;
}
.gallery-row .gallery-item:hover .gallery-row-more { background: linear-gradient(120deg, color-mix(in srgb, var(--brand-1) 85%, transparent), color-mix(in srgb, var(--brand-2) 92%, transparent)); }
@media (max-width: 40rem) {
  .gallery-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
