/* ==========================================================================
   AuPro — effects.css
   Futuristischer Feinschliff über alle Seiten: Glas-Header, Scroll-Progress,
   driftende Hexagon-Felder, Glow- und Shine-Akzente, Gradient-Zahlen.
   Alles CSS-first, performant (transform/opacity) und reduced-motion-bewusst.
   ========================================================================== */

/* ----- Grundstimmung: Selection, Scrollbar, sanftes Grün ----- */
::selection { background: var(--green-mid); color: var(--white); }
html { scrollbar-width: thin; scrollbar-color: var(--green-mid) transparent; }
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--green-mid); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--green-dark); }

/* ----- Scroll-Progress (JS setzt --sp via transform) ----- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: calc(var(--z-header) + 1);
  background: linear-gradient(90deg, var(--green-dark), var(--green-mid), var(--green-blue));
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

/* ----- Header: Glas-Effekt im gescrollten Zustand ----- */
.site-header.is-scrolled {
  background: rgba(255, 255, 255, .84);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 2px 24px rgba(19, 104, 84, .1);
}

/* ----- Driftendes Hexagon-Feld (Hero + Page-Hero + CTA-Band) -----
   Zwei Ebenen Hex-Outlines als Data-URI, gegenläufig langsam driftend. */
.hero::after,
.page-hero .page-hero__inner::before,
.cta-band::after {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='254' viewBox='0 0 220 254'%3E%3Cpath d='M89 12.1Q110 0 131 12.1L199.1 51.4Q220 63.5 220 87.7L220 166.3Q220 190.5 199.1 202.6L131 241.9Q110 254 89 241.9L20.9 202.6Q0 190.5 0 166.3L0 87.7Q0 63.5 20.9 51.4Z' fill='none' stroke='%236FB9AB' stroke-opacity='.16' stroke-width='1.5'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='139' viewBox='0 0 120 139'%3E%3Cpath d='M48.5 6.6Q60 0 71.5 6.6L108.6 28Q120 34.6 120 47.8L120 90.7Q120 103.9 108.6 110.5L71.5 131.9Q60 138.5 48.5 131.9L11.4 110.5Q0 103.9 0 90.7L0 47.8Q0 34.6 11.4 28Z' fill='none' stroke='%236FB9AB' stroke-opacity='.09' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 340px 393px, 260px 301px;
  animation: hexDrift 70s linear infinite;
}
.page-hero .page-hero__inner::before { z-index: -1; }
@keyframes hexDrift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-340px, -196px, 0); }
}

/* Hero: sanfter Glow-Puls hinter dem Claim */
.hero::before {
  content: "";
  position: absolute;
  left: -10%; top: 20%;
  width: min(720px, 70vw);
  aspect-ratio: 1;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle, rgba(111, 185, 171, .22), transparent 65%);
  animation: glowPulse 7s var(--ease-soft) infinite;
}
@keyframes glowPulse {
  0%, 100% { opacity: .55; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.08); }
}

/* Claim: dezenter Licht-Schimmer über dem Orbitron-Schriftzug */
.hero__claim {
  background: linear-gradient(110deg,
    var(--green-on-dark) 0%, var(--green-on-dark) 40%,
    #d9efe9 50%,
    var(--green-on-dark) 60%, var(--green-on-dark) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: claimSheen 5.5s var(--ease-soft) infinite;
}
@keyframes claimSheen {
  0%, 55%  { background-position: 110% 0; }
  85%, 100% { background-position: -35% 0; }
}

/* ----- Buttons: Shine-Sweep + grüner Glow ----- */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
  transform: translateX(-130%);
  pointer-events: none;
}
.btn:hover::after { transform: translateX(130%); transition: transform .65s var(--ease-out); }
.btn--primary:hover { box-shadow: 0 12px 32px rgba(19, 104, 84, .38); }
.btn--cream:hover   { box-shadow: 0 12px 32px rgba(0, 0, 0, .3); }

/* ----- Karten: Tech-Akzentlinie + Lift ----- */
.card { position: relative; }
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  background: linear-gradient(90deg, var(--green-dark), var(--green-mid), var(--green-blue));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-mid) var(--ease-out);
}
.card:hover::before { transform: scaleX(1); }
.card:hover { box-shadow: 0 16px 44px rgba(19, 104, 84, .16); }

/* ----- Service-Waben: Glow beim Hover ----- */
.hex--service:hover,
.hex--service:focus-within {
  filter: drop-shadow(0 14px 30px rgba(74, 148, 134, .45));
}

/* ----- Kennzahlen: Gradient-Ziffern ----- */
.stat__num {
  background: linear-gradient(120deg, var(--green-dark), var(--green-blue) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section--dark .stat__num,
.section--black .stat__num {
  background: linear-gradient(120deg, var(--green-on-dark), #a9d8cd 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ----- FAQ: weiches Auf-/Zuklappen (moderne Browser) + Hover-Akzent ----- */
.faq__item { interpolate-size: allow-keywords; transition: border-color var(--dur-fast) var(--ease-soft); }
.faq__item:hover { border-color: var(--green-mid); }
.faq__item::details-content {
  block-size: 0;
  overflow: clip;
  transition: block-size .35s var(--ease-out), content-visibility .35s allow-discrete;
}
.faq__item[open]::details-content { block-size: auto; }

/* ----- CTA-Band: Position-Kontext für Hex-Feld ----- */
.cta-band { position: relative; overflow: clip; }
.cta-band .container { position: relative; z-index: 1; }

/* ----- Page-Hero: Positionskontext (Hex-Feld liegt im Inner) ----- */
.page-hero .page-hero__inner { position: relative; }

/* ----- Footer: feine Tech-Linie oben ----- */
.site-footer {
  border-top: 1px solid transparent;
  background-image: linear-gradient(var(--gray-dark), var(--gray-dark)),
                    linear-gradient(90deg, var(--green-dark), var(--green-mid), var(--green-blue));
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

/* ----- Reveal: leichtes Blur-In für mehr Tiefe ----- */
.reveal { filter: blur(5px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out), filter var(--dur-slow) var(--ease-out); }
.reveal.is-visible { filter: blur(0); }

/* ----- Reduced Motion: alles Autonome aus ----- */
@media (prefers-reduced-motion: reduce) {
  .hero::after, .page-hero .page-hero__inner::before, .cta-band::after,
  .hero::before { animation: none; }
  .hero__claim { animation: none; background-position: 50% 0; }
  .btn::after { display: none; }
  .reveal { filter: none; transition: none; }
  .scroll-progress { display: none; }
  .faq__item::details-content { transition: none; }
}

/* ==========================================================================
   BRAND-LOGOS — einfarbige SVG-Nachbildungen (bis finale Logodateien vorliegen)
   ========================================================================== */
.brand-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 4.5vw, 60px);
  list-style: none;
  padding: 0;
  margin: 0;
}
.brand-logos li { display: flex; }
.brand-logo {
  height: 50px;
  width: auto;
  color: #AEB8B3;               /* eine einheitliche Graustufe für alle Marken */
  transition: color var(--dur-mid) var(--ease-soft), transform var(--dur-mid) var(--ease-out);
}
.brand-logos li:hover .brand-logo { color: var(--white); transform: translateY(-3px); }

/* Footer-Siegel: gleiche Optik, kleiner */
.footer__badges .brand-logo { height: 40px; color: #8F9994; }
.footer__badges .brand-logo:hover { color: var(--white); }

/* Mobile: Logos etwas kleiner, damit die Reihe ruhig bleibt */
@media (max-width: 560px) {
  .brand-logo { height: 40px; }
}

/* ==========================================================================
   BEWERBUNGS-DIALOG (Karriere) — Glas-Look, weiche Entrance
   ========================================================================== */
.apply-dialog {
  border: none;
  border-radius: 22px;
  padding: 0;
  width: min(92vw, 660px);
  background: transparent;
  overflow: visible;
  margin: auto; /* Reset (*{margin:0}) killt sonst die native Dialog-Zentrierung */
}
.apply-dialog::backdrop {
  background: rgba(18, 24, 22, .58);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}
.apply-dialog[open] { animation: dlgIn .38s var(--ease-out); }
@keyframes dlgIn {
  from { opacity: 0; transform: translateY(26px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
.apply-form {
  position: relative;
  background: var(--white);
  border-radius: 22px;
  padding: clamp(26px, 4.5vw, 46px);
  box-shadow: 0 32px 90px rgba(0, 0, 0, .4);
  max-height: 86vh;
  overflow: auto;
}
.apply-form::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(90deg, var(--green-dark), var(--green-mid), var(--green-blue));
}
.apply-form h2 { margin-bottom: var(--sp-2); }
.apply-form .apply-sub { color: var(--color-text-muted); margin-bottom: var(--sp-6); }
.apply-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--gray-mid);
  transition: color var(--dur-fast), background var(--dur-fast), transform var(--dur-fast);
}
.apply-close:hover { color: var(--gray-dark); background: var(--green-light); transform: rotate(90deg); }
.apply-grid { display: grid; gap: 0 var(--sp-5); }
@media (min-width: 620px) {
  .apply-grid { grid-template-columns: 1fr 1fr; }
  .apply-grid .field--full { grid-column: 1 / -1; }
}
.apply-form .form__status[data-state="success"] { font-size: var(--fs-body); }
body:has(.apply-dialog[open]) { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .apply-dialog[open] { animation: none; }
  .apply-close:hover { transform: none; }
}
