/*
Theme Name: BFG-Planung
Theme URI:
Author: BFG-Planung
Description: Maßgeschneidertes One-Page Theme für BFG-Planung – Gebäudeautomation & Planung
Version: 1.12.10
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bfg-planung
*/

/* ===== Schrift „Prompt" – selbst gehostet (DSGVO-konform) ===== */
@font-face {
  font-family: "Prompt";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("assets/fonts/prompt-latin-ext-300.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Prompt";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("assets/fonts/prompt-latin-300.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Prompt";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/prompt-latin-ext-400.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Prompt";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/prompt-latin-400.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Prompt";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/prompt-latin-ext-600.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Prompt";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/prompt-latin-600.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Prompt";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/prompt-latin-ext-700.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Prompt";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/prompt-latin-700.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===== Reset & Basis ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "Prompt", sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

/* Drückt den Footer an das Seitenende, auch wenn der Inhalt nicht bildschirmfüllend ist. */
#main {
  flex: 1 0 auto;
}

/* ===== Variablen ===== */
:root {
  /* Markenfarben – BFG Styleguide 2026-05-10 */
  --accent: #00569a; /* Blau Hell  */
  --accent-warm: #459761; /* Grün       */
  --bg-dark: #004378; /* Blau Dunkel */
  --text-dark: #3c3c3c; /* Grau       */

  /* Abgeleitete UI-Farbtöne */
  --bg-light: #f0f4f8;
  --bg-mid: #dde5ee;
  --bg-warm: #b8c8db;
  --bg-deepest: #002040;
  --text-mid: #5a5a5a;
  --text-light: #f8fafc;
  --nav-height: 72px;
}

/* ===== Einblend-Animation ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ===== Skip-Link (Accessibility) ===== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--bg-dark);
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  transition:
    background 0.35s ease,
    box-shadow 0.35s ease;
}

.nav.scrolled {
  background: var(--bg-dark);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
  text-decoration: none;
}

.nav__logo-img {
  height: 56px;
  max-height: 56px;
  width: auto;
  max-width: 220px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}

.nav__links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

.nav__links a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.nav__links a:hover {
  opacity: 1;
}

/* Mobiles Hamburger-Menü */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  outline: none;
}

.nav__toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--text-light);
  transition:
    transform 0.3s,
    opacity 0.3s;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  opacity: 0;
  transition: opacity 1.8s ease;
}

.hero__bg-slide.is-active {
  opacity: 1;
}

/* Fluss-Wrapper; ::before zeichnet den blauen Hintergrund mit Diagonale, ohne Kindelemente zu beschneiden */
.hero__overlay {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  padding-bottom: 12vh;
  isolation: isolate;
}

.hero__overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #004378; /* Blau Dunkel */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15vh), 0 100%);
  z-index: 0;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  color: var(--text-light);
  padding: calc(var(--nav-height) + 3.5rem) 8% 0;
  max-width: 920px;
  text-align: center;
  margin: 0 auto;
}

.hero__eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 1.1rem;
}

.hero__headline {
  font-size: clamp(1.8rem, 3.4vw, 3.1rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  text-wrap: balance;
}

.hero__subline {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 300;
  opacity: 0.82;
  margin-bottom: 2.5rem;
  max-width: 520px;
  line-height: 1.65;
  margin-left: auto;
  margin-right: auto;
}

.hero__cta {
  display: inline-block;
  border: 2px solid rgba(255, 255, 255, 0.75);
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.85rem 2.2rem;
  transition:
    background 0.25s,
    border-color 0.25s;
}

.hero__cta:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
}

.hero__pause {
  position: absolute;
  bottom: 2.5rem;
  right: 2rem;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-light);
  cursor: pointer;
  transition: background 0.25s;
}

.hero__pause:hover {
  background: rgba(0, 0, 0, 0.45);
}

.hero__pause-icon {
  width: 16px;
  height: 16px;
}

.hero__pause-icon--play {
  display: none;
}

.hero__pause[aria-pressed="true"] .hero__pause-icon--pause {
  display: none;
}

.hero__pause[aria-pressed="true"] .hero__pause-icon--play {
  display: block;
}

.hero__scroll-cue {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  opacity: 0.85;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.35));
  animation: bounce 2.2s ease-in-out infinite;
}

.hero__scroll-cue svg {
  width: 32px;
  height: 32px;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

/* ===== Gemeinsame Abschnitts-Stile ===== */
.section {
  padding: 7rem 5%;
}

.section__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-warm);
  margin-bottom: 0.75rem;
}

.section__title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 300;
  letter-spacing: 0.03em;
  line-height: 1.2;
  color: var(--text-dark);
  margin-bottom: 2rem;
}

.section__divider {
  width: 48px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 2.5rem;
}

/* ===== Über uns ===== */
.about {
  background: var(--bg-light);
}

.about .section__label {
  color: var(--text-dark);
  font-size: 0.95rem;
}

.about .section__title {
  font-size: 1.05rem;
  font-weight: 300;
  letter-spacing: normal;
  line-height: 1.75;
  color: var(--text-mid);
  max-width: 620px;
}

.about__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}

.lp-tab {
  display: block;
  width: 100%;
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: none;
  border-left: 3px solid var(--bg-warm);
  padding: 0.9rem 1.25rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  font-family: "Prompt", sans-serif;
  line-height: 1;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.lp-tab:hover,
.lp-tab--active {
  border-left-color: var(--accent);
  background: rgba(0, 86, 154, 0.06);
}

.lp-tab__title {
  display: block;
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
}

.about__extras {
  display: flex;
  align-items: flex-start;
}

.extras-card {
  background: var(--bg-mid);
  border-radius: 4px;
  padding: 2rem 2.25rem;
  width: 100%;
}

.extras-card__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.extras-card__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.extras-card__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.97rem;
  color: var(--text-mid);
  animation: lp-item-in 0.3s ease both;
}

.extras-card__list li.has-heading {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}

.extras-card__item-heading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  color: var(--text-dark);
  font-size: 0.97rem;
}

.extras-card__item-desc {
  padding-left: 1.65rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-mid);
}

.extras-card__list li svg {
  flex-shrink: 0;
  color: var(--accent-warm);
}

.extras-card__list li > svg {
  margin-top: 3px;
}

@keyframes lp-item-in {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== Kontakt ===== */
.contact {
  background: var(--bg-deepest);
  color: var(--text-light);
}

.contact .section__title {
  color: var(--text-light);
}

.contact .section__label,
.contact .contact__info-label {
  color: var(--text-light);
}

.contact .section__divider {
  background: var(--text-light);
}

.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.contact__info-block {
  margin-bottom: 2rem;
}

.contact__info-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.contact__info-value {
  font-size: 1rem;
  color: rgba(250, 250, 248, 0.85);
  line-height: 1.6;
}

.contact__info-value a {
  color: rgba(250, 250, 248, 0.85);
  text-decoration: none;
  transition: color 0.2s;
}

.contact__info-value a:hover {
  color: var(--text-light);
}

.contact__area {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(250, 250, 248, 0.12);
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(250, 250, 248, 0.6);
}

/* Formular */
.form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(250, 250, 248, 0.8);
}

.form__input,
.form__textarea {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text-light);
  font-family: "Prompt", sans-serif;
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
  outline: none;
  transition:
    border-color 0.2s,
    background 0.2s;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}

.form__input::placeholder,
.form__textarea::placeholder {
  color: rgba(250, 250, 248, 0.3);
}

.form__input:focus,
.form__textarea:focus {
  border-color: var(--accent-warm);
  background: rgba(255, 255, 255, 0.1);
}

.form__textarea {
  resize: vertical;
  min-height: 150px;
}

.form__submit {
  align-self: flex-start;
  background: var(--accent);
  color: var(--text-light);
  border: none;
  font-family: "Prompt", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 1rem 2.5rem;
  cursor: pointer;
  transition: background 0.25s;
}

.form__submit:hover {
  background: var(--accent-warm);
}

/* Fallback ohne CF7: mailto-CTA + Admin-Hinweis */
.contact__fallback {
  margin: 0;
}

.contact__fallback .form__submit {
  display: inline-block;
  text-decoration: none;
}

.contact__admin-hint {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(250, 250, 248, 0.85);
  background: rgba(255, 255, 255, 0.06);
  border-left: 3px solid var(--accent-warm);
}

/* Contact Form 7 – Anpassungen (entsprechen den nativen Formular-Stilen) */
.wpcf7 .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.wpcf7 .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.wpcf7 .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.wpcf7 label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(250, 250, 248, 0.8);
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 textarea {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text-light);
  font-family: "Prompt", sans-serif;
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
  outline: none;
  transition:
    border-color 0.2s,
    background 0.2s;
  appearance: none;
  border-radius: 0;
  width: 100%;
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 textarea:focus {
  border-color: var(--accent-warm);
  background: rgba(255, 255, 255, 0.1);
}

.wpcf7 textarea {
  resize: vertical;
  min-height: 150px;
}

.wpcf7 input[type="submit"] {
  align-self: flex-start;
  background: var(--accent);
  color: var(--text-light);
  border: none;
  font-family: "Prompt", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 1rem 2.5rem;
  cursor: pointer;
  transition: background 0.25s;
  border-radius: 0;
}

.wpcf7 input[type="submit"]:hover {
  background: var(--accent-warm);
}

/* ===== Referenzen ===== */
.references {
  background: var(--bg-mid);
}

.references .section__label {
  color: var(--text-dark);
}

.references__filter {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.filter-btn {
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.45rem 1.1rem;
  font-family: "Prompt", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  background: transparent;
  transition:
    background 0.2s,
    color 0.2s;
}

.filter-btn--active,
.filter-btn:hover {
  background: var(--accent);
  color: var(--text-light);
}

.references__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.references__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 0;
}

.ref-card {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.ref-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.35s ease;
  z-index: 2;
}

.ref-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0, 67, 120, 0.22);
}

.ref-card:hover::before {
  transform: scaleX(1);
}

.ref-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.ref-card:hover img {
  transform: scale(1.08);
}

.ref-card__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    0deg,
    rgba(0, 67, 120, 0.82) 0%,
    rgba(0, 86, 154, 0.15) 65%,
    transparent 100%
  );
  padding: 3rem 1.1rem 0.9rem;
  transition: background 0.35s ease;
}

.ref-card:hover .ref-card__caption {
  background: linear-gradient(
    0deg,
    rgba(0, 67, 120, 0.92) 0%,
    rgba(0, 86, 154, 0.4) 60%,
    transparent 100%
  );
}

.ref-card__title {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
}

/* Lightbox */
.ref-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 67, 120, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.ref-lightbox--open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ref-lightbox__close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  padding: 0.25rem 0.5rem;
}

.ref-lightbox__close:hover {
  opacity: 1;
}

.ref-lightbox__img {
  max-width: min(90vw, 72ch);
  max-height: 55vh;
  width: auto;
  object-fit: contain;
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.6);
  border-radius: 4px;
}

.ref-lightbox__stage {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.25rem;
}

.ref-lightbox__nav {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  opacity: 0.65;
  transition: opacity 0.2s;
  user-select: none;
  -webkit-user-select: none;
  flex-shrink: 0;
}

.ref-lightbox__nav:hover {
  opacity: 1;
}

.ref-lightbox__nav:disabled {
  opacity: 0.18;
  cursor: default;
  pointer-events: none;
}

.ref-lightbox__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 1rem;
  width: min(90vw, 72ch);
  max-height: 22vh;
  overflow-y: auto;
  text-align: left;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border-left: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 0 4px 4px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.ref-lightbox__title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(250, 250, 248, 0.95);
}

.ref-lightbox__desc {
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: rgba(250, 250, 248, 0.85);
  line-height: 1.65;
  white-space: pre-line;
}

@media (max-width: 480px) {
  .ref-lightbox__nav {
    font-size: 2rem;
    padding: 0.4rem 0.5rem;
  }

  .ref-lightbox__meta {
    max-height: 28vh;
  }
}

/* ===== Software-Übersicht ===== */
.software {
  background: var(--bg-dark);
  padding: 4rem 5%;
  text-align: center;
}

.software__title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.software__subtext {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.software__logo-name {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.software__logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
}

.software__logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.7;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.software__logo:hover {
  opacity: 1;
  transform: translateY(-4px) scale(1.06);
}

.software__logo img {
  display: block;
  width: auto;
  height: 48px;
  max-width: 150px;
  object-fit: contain;
}

.software__logo span {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-deepest);
  color: rgba(250, 250, 248, 0.65);
  text-align: center;
  padding: 1.75rem 5%;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex-shrink: 0;
}

.footer__links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}

.footer__links a {
  color: rgba(250, 250, 248, 0.65);
  text-decoration: none;
  transition: color 0.2s;
}

.footer__links a:hover {
  color: rgba(250, 250, 248, 0.8);
}

/* ===== Rechtstexte ===== */
.legal {
  max-width: 920px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 4rem) 5% 6rem;
}

.legal h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 300;
  letter-spacing: 0.03em;
  color: var(--text-dark);
  margin-bottom: 2.5rem;
}

.legal h2 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 2.5rem 0 0.6rem;
}

.legal p,
.legal address {
  font-size: 0.97rem;
  color: var(--text-mid);
  line-height: 1.8;
  font-style: normal;
}

.legal a {
  color: var(--accent);
  text-decoration: none;
}

.legal a:hover {
  text-decoration: underline;
}

/* ===== Responsives Layout ===== */
@media (max-width: 900px) {
  .services__grid {
    grid-template-columns: 1fr 1fr;
  }

  .references__grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero__overlay {
    padding-bottom: 12vh;
  }

  .hero__overlay::before {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 13vh), 0 100%);
  }
}

@media (max-width: 768px) {
  /* iOS unterstützt background-attachment:fixed nicht – Fallback auf scroll */
  .hero__bg-slide {
    background-attachment: scroll;
  }

  .hero__content {
    padding-top: calc(var(--nav-height) + 2.5rem);
    padding-left: 6%;
    padding-right: 6%;
  }

  .hero__overlay {
    padding-bottom: 12vh;
  }

  .hero__overlay::before {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 11vh), 0 100%);
  }

  .hero__pause {
    display: none;
  }

  .nav__links {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    z-index: 99;
  }

  .nav__links.open {
    display: flex;
  }

  .nav__links a {
    font-size: 1.1rem;
  }

  .nav__toggle {
    display: flex;
    z-index: 101;
    margin-left: auto;
    margin-right: 1rem;
  }

  .about__inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .services__grid {
    grid-template-columns: 1fr;
  }

  .references__grid {
    grid-template-columns: 1fr;
  }

  .contact__inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .form__row {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 5rem 6%;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  .hero__content {
    padding-top: calc(var(--nav-height) + 1.5rem);
  }

  .hero__overlay {
    padding-bottom: 12vh;
  }

  .hero__overlay::before {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9vh), 0 100%);
  }
}

/* ===== Reduzierte Bewegung (WCAG 2.3.3) ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .fade-in {
    opacity: 1 !important;
    transform: none !important;
  }
}
