/* ==========================================================================
   AuPro — components.css
   Wiederverwendbare Bausteine (Phase-2-tauglich):
   Hexagon (Signature), Buttons, Karten, Formular, Header/Nav, Drawer, Footer,
   Badges, Reveal-Utilities.
   Hexagon-Geometrie: gerundetes „pointy-top"-Hexagon, viewBox 0 0 200 231.
   Bildmasken nutzen <clipPath id="hexClip"> (objectBoundingBox) aus index.html.
   ========================================================================== */

/* ==========================================================================
   1. HEXAGON (Signature-Element)
   ========================================================================== */

/* Basis-Box: hält das Seitenverhältnis des pointy-top-Hexagons (200:231). */
.hex {
  position: relative;
  aspect-ratio: 200 / 231;
}

/* gezeichnete Form (Outline/Füllung) als SVG-Layer */
.hex__shape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.hex__shape path {
  fill: transparent;
  stroke: var(--color-border);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  transition: fill var(--dur-mid) var(--ease-soft),
              stroke var(--dur-mid) var(--ease-soft);
}

/* Inhalt zentriert im sicheren Bereich der Wabe */
.hex__content {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  text-align: center;
  /* horizontaler Sicherheitsabstand zu den schrägen Kanten */
  padding: 14% 18%;
}

/* ----- Variante: Service-Kachel (Honeycomb) ----- */
.hex--service {
  cursor: pointer;
  transition: transform var(--dur-mid) var(--ease-out),
              filter var(--dur-mid) var(--ease-out);
}
.hex--service .hex__title {
  font-family: var(--ff-display);
  font-weight: var(--fw-bold);
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  text-transform: uppercase;
  letter-spacing: .01em;
  color: var(--gray-dark);
  line-height: 1.15;
  transition: color var(--dur-mid) var(--ease-soft);
}
.hex--service .hex__teaser {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  max-width: 22ch;
  transition: color var(--dur-mid) var(--ease-soft);
}
.hex--service .hex__icon {
  width: clamp(34px, 4vw, 46px);
  height: clamp(34px, 4vw, 46px);
  color: var(--green-dark);
  transition: color var(--dur-mid) var(--ease-soft);
}

/* Hover/Aktiv: Füllung green-mid, Text weiß, leicht angehoben + Schatten */
.hex--service:hover,
.hex--service:focus-within,
.hex--service.is-active {
  transform: translateY(-6px);
  filter: drop-shadow(var(--shadow-md));
}
.hex--service:hover .hex__shape path,
.hex--service:focus-within .hex__shape path,
.hex--service.is-active .hex__shape path {
  fill: var(--green-mid);
  stroke: var(--green-mid);
}
.hex--service:hover :is(.hex__title, .hex__teaser, .hex__icon),
.hex--service:focus-within :is(.hex__title, .hex__teaser, .hex__icon),
.hex--service.is-active :is(.hex__title, .hex__teaser, .hex__icon) {
  color: var(--white);
}
/* ganze Kachel klickbar */
.hex--service .hex__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* Service-Kacheln auf dunklem Grund (Referenz Dark-PDF) */
.section--dark .hex--service .hex__shape path,
.section--black .hex--service .hex__shape path {
  stroke: rgba(255, 255, 255, .14);
}
.section--dark .hex--service .hex__title,
.section--black .hex--service .hex__title { color: var(--offwhite); }
.section--dark .hex--service .hex__teaser,
.section--black .hex--service .hex__teaser { color: var(--gray-mid); }
.section--dark .hex--service .hex__icon,
.section--black .hex--service .hex__icon { color: var(--green-on-dark); }

/* ----- Variante: Bildmaske ----- */
.hex-img {
  aspect-ratio: 200 / 231;
  clip-path: url(#hexClip);
  overflow: hidden;
  background: var(--green-light);
}
.hex-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}
.hex-img:hover img { transform: scale(1.05); } /* dezenter Bild-Zoom (§11) */

/* ----- Variante: Icon-Container ----- */
.hex-icon {
  position: relative; /* Containing-Block für absolutes .hex__shape */
  display: inline-grid;
  place-items: center;
  width: 84px;
  aspect-ratio: 200 / 231;
  color: var(--green-dark);
}
.hex-icon .hex__shape path { fill: var(--green-light); stroke: none; }
.hex-icon svg.hex__glyph { position: relative; z-index: 1; width: 42%; height: 42%; }

/* ----- Variante: Großes Info-Hexagon (DMU) ----- */
.hex-info { position: relative; aspect-ratio: 200 / 231; }
.hex-info .hex__content { padding: 16% 16%; gap: var(--sp-4); text-align: left; align-items: flex-start; }
.hex-info--dark .hex__shape path { fill: var(--gray-dark); stroke: none; }
.hex-info--light .hex__shape path { fill: var(--green-light); stroke: none; }
.hex-info .hex__title { font-family: var(--ff-display); font-weight: var(--fw-bold); color: var(--green-dark); font-size: var(--fs-h3); }
.hex-info--dark .hex__title { color: var(--green-on-dark); } /* Kontrast auf dunklem Grund */
.hex-info--dark .hex__text { color: var(--offwhite); }
.hex-info--light .hex__text { color: var(--gray-dark); }
/* Teal-Variante (Entscheider): eigene Farbe, helle Schrift für Kontrast */
.hex-info--mid .hex__shape path { fill: var(--green-mid); stroke: none; }
.hex-info--mid .hex__title { color: var(--white); }
.hex-info--mid .hex__text { color: var(--offwhite); }
.hex-info .hex__text { font-size: var(--fs-small); }

/* ----- Variante: Watermark (zarte Hintergrunddeko) ----- */
.hex-watermark {
  position: absolute;
  z-index: var(--z-watermark);
  pointer-events: none;
  aspect-ratio: 200 / 231;
  color: var(--green-light);
}
.hex-watermark .hex__shape path { fill: currentColor; stroke: none; }
.section--dark .hex-watermark,
.section--black .hex-watermark { color: rgba(255, 255, 255, .04); }

/* Sektionsinhalt soll über Watermarks liegen */
.section > .container { position: relative; z-index: var(--z-content); }

/* ==========================================================================
   2. BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: .85em 1.6em;
  border-radius: var(--radius-btn);
  font-family: var(--ff-display);
  font-weight: var(--fw-semibold);
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-soft),
              color var(--dur-fast) var(--ease-soft),
              transform var(--dur-fast) var(--ease-soft),
              box-shadow var(--dur-fast) var(--ease-soft);
}
.btn:active { transform: translateY(0); }

/* Primär: grün, weißer Text */
.btn--primary { background: var(--green-dark); color: var(--white); }
.btn--primary:hover {
  background: var(--green-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Hell/Outline für dunkle Hintergründe */
.btn--ghost {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, .55);
}
.btn--ghost:hover {
  background: var(--white);
  color: var(--gray-dark);
  transform: translateY(-2px);
  border-color: var(--white);
}

/* Cremefarbener Solid-Button für dunkle Flächen (z. B. Hero-CTA) */
.btn--cream {
  background: var(--offwhite);
  color: var(--green-dark);
}
.btn--cream:hover {
  background: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-dark);
}

.btn--lg { font-size: 1.0625rem; padding: 1em 1.9em; }

/* ==========================================================================
   3. KARTEN (Case Study)
   ========================================================================== */
.card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-mid) var(--ease-out),
              box-shadow var(--dur-mid) var(--ease-out);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
/* Case-Study-Thumbnail: Rechteck (abgerundet) — Hexagon bleibt der DMU vorbehalten (D4) */
.card__media {
  width: 96px;
  flex: none;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--green-light);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__head { display: flex; align-items: center; gap: var(--sp-4); }
.card__title { font-size: var(--fs-h3); }
.card__list { display: flex; flex-direction: column; gap: var(--sp-2); padding: 0; list-style: none; }
.card__list li {
  position: relative;
  padding-left: 1.5em;
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}
.card__list li::before {
  content: "";
  position: absolute;
  left: 0; top: .45em;
  width: 12px; height: 14px;
  background: var(--green-mid);
  /* Mini-Hexagon als Bullet */
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

/* ==========================================================================
   4. FORMULAR
   ========================================================================== */
.field { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-5); }
.field__label {
  font-family: var(--ff-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-small);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--green-dark);
}
.field__req { color: var(--green-blue); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 1.05em 1.15em;
  background: #E6E9E7;
  border: 1.5px solid transparent;
  border-radius: var(--radius-input);
  color: var(--gray-dark);
  transition: border-color var(--dur-fast) var(--ease-soft),
              background var(--dur-fast) var(--ease-soft);
}
.field textarea { min-height: 150px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: var(--gray-mid); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  background: var(--white);
  border-color: var(--green-blue);
}
.field[aria-invalid] input,
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"],
.field select[aria-invalid="true"] { border-color: #C0392B; background: #FBECEA; }

.field__error {
  font-size: var(--fs-small);
  color: #C0392B;
  min-height: 1.1em;
}

/* Checkbox-Zeilen (Datenschutz, Captcha-Fallback) */
.check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-3);
  align-items: start;
  margin-bottom: var(--sp-4);
  font-size: var(--fs-small);
}
.check input[type="checkbox"] {
  width: 22px; height: 22px;
  margin-top: 2px;
  accent-color: var(--green-dark);
  flex: none;
}

/* Honeypot: vollständig versteckt (auch vor AT, aria-hidden im HTML) */
.hp-field {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* Submit-Status */
.form__status { margin-top: var(--sp-4); font-size: var(--fs-small); min-height: 1.2em; }
.form__status[data-state="success"] { color: var(--green-dark); font-weight: var(--fw-medium); }
.form__status[data-state="error"]   { color: #C0392B; }
.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }

/* ==========================================================================
   5. HEADER / NAV
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  height: var(--header-h);
  background: transparent;
  transition: height var(--dur-mid) var(--ease-soft),
              background var(--dur-mid) var(--ease-soft),
              box-shadow var(--dur-mid) var(--ease-soft);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  width: 100%;
}
.site-header__logo { display: inline-flex; align-items: center; }
.site-header__logo { flex: none; }
.site-header__logo img { height: 72px; width: 186px; max-width: none; flex: none; transition: height var(--dur-mid) var(--ease-soft), width var(--dur-mid) var(--ease-soft); }
/* über dem Hero: weißes Logo sichtbar, grünes versteckt */
.site-header__logo .logo--green { display: none; }
.site-header__logo .logo--white { display: block; }

/* gescrollter Zustand: kompakt, hell, Schatten, grünes Logo */
.site-header.is-scrolled {
  height: var(--header-h-shrink);
  background: var(--white);
  box-shadow: 0 2px 18px rgba(0, 0, 0, .08);
}
.site-header.is-scrolled .logo--green { display: block; }
.site-header.is-scrolled .logo--white { display: none; }
.site-header.is-scrolled .site-header__logo img { height: 66px; width: 171px; }

/* Desktop-Nav */
.nav { display: flex; align-items: center; gap: clamp(.4rem, .9vw, .95rem); }
.nav__list { display: flex; align-items: center; gap: clamp(.35rem, .85vw, .9rem); list-style: none; padding: 0; }
.nav__link {
  font-family: var(--ff-display);
  font-weight: var(--fw-semibold);
  font-size: .84rem;
  text-decoration: none;
  color: var(--white);
  padding: .4em 0;
  position: relative;
  white-space: nowrap;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-fast) var(--ease-soft);
}
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }
.site-header.is-scrolled .nav__link { color: var(--gray-dark); }
.site-header.is-scrolled .nav__link:hover,
.site-header.is-scrolled .nav__link[aria-current="page"] { color: var(--green-dark); }

/* Header-CTA: aus dem Layout entfernt bis gescrollt — verhindert Nav-Wrap */
.site-header__cta {
  overflow: hidden;
  max-width: 0;
  padding-inline: 0;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: max-width var(--dur-mid) var(--ease-soft),
              padding var(--dur-mid) var(--ease-soft),
              opacity var(--dur-mid) var(--ease-soft);
}
.site-header.is-scrolled .site-header__cta {
  max-width: 500px;
  padding-inline: 1.4em;
  font-size: .9rem;
  opacity: 1;
  pointer-events: auto;
}

/* Telefonnummer im Header (D5) — dezent, klickbar, schwächt CTA nicht */
.site-header__phone {
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  text-decoration: none;
  color: var(--white);
  transition: color var(--dur-fast) var(--ease-soft),
              background var(--dur-fast) var(--ease-soft);
}
.site-header__phone svg { width: 20px; height: 20px; }
.site-header__phone:hover { color: var(--green-on-dark); background: rgba(255, 255, 255, .08); }
.site-header.is-scrolled .site-header__phone { color: var(--gray-dark); }
.site-header.is-scrolled .site-header__phone:hover { color: var(--green-dark); background: rgba(19, 104, 84, .08); }

/* Phase-2-Navigationspunkte: keine sichtbare Kennzeichnung (Kunde ordnet selbst ein).
   Klick löst weiterhin den dezenten „kommt bald"-Hinweis via JS aus. */

/* Hamburger */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  color: var(--white);
}
.site-header.is-scrolled .nav-toggle { color: var(--gray-dark); }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  content: "";
  display: block;
  width: 26px; height: 2.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur-fast) var(--ease-soft), opacity var(--dur-fast);
}
.nav-toggle__bars::before { transform: translateY(-8px); }
.nav-toggle__bars::after  { transform: translateY(5.5px); }

/* Unter Desktop-Breite: volle Nav einklappen → Hamburger + Drawer (verhindert
   Umbruch im Header und macht die Navigation auf Tablet/Mobile bedienbar) */
@media (max-width: 1180px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ==========================================================================
   6. MOBILE DRAWER
   ========================================================================== */
.drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--gray-dark);
  color: var(--offwhite);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform var(--dur-mid) var(--ease-out), visibility var(--dur-mid);
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); padding-inline: var(--container-pad); }
.drawer__head img { height: 34px; }
.drawer__close { width: 44px; height: 44px; color: var(--white); font-size: 1.8rem; line-height: 1; }
.drawer__list { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-6) var(--container-pad); list-style: none; }
.drawer__link {
  font-family: var(--ff-display);
  font-weight: var(--fw-bold);
  font-size: 1.4rem;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  padding: var(--sp-2) 0;
}
.drawer__link:hover { color: var(--green-on-dark); }
.drawer__cta { margin-top: var(--sp-5); }
.drawer__phone { font-size: 1.05rem; text-transform: none; color: var(--green-on-dark); margin-top: var(--sp-3); }
body.no-scroll { overflow: hidden; }

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.site-footer { background: var(--gray-dark); color: var(--offwhite); padding-block: var(--section-pad) var(--sp-7); position: relative; overflow: clip; }
.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-7);
  align-items: start;
}
.footer__col h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--white); margin-bottom: var(--sp-4); }
.footer__nav { display: grid; gap: var(--sp-2); list-style: none; padding: 0; }
.footer__nav a { color: var(--gray-mid); text-decoration: none; font-size: var(--fs-small); }
.footer__nav a:hover { color: var(--green-on-dark); }
.footer__contact { font-size: var(--fs-small); color: var(--gray-mid); display: grid; gap: var(--sp-2); }
.footer__contact a { color: var(--gray-mid); }
.footer__social { display: flex; gap: var(--sp-3); margin-top: var(--sp-4); }
.footer__social a {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  color: var(--white);
}
.footer__social a:hover { background: var(--green-mid); }
.footer__social svg { width: 18px; height: 18px; }
.footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-3); margin-top: var(--sp-9); }
.footer__brand img { height: 100px; width: auto; }
.footer__claim { font-size: clamp(.8rem, 1.4vw, 1.05rem); }
.footer__badges { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center; }

/* ==========================================================================
   8. ZERTIFIKATS-/PARTNER-LOGOS (Trust-Band) & PLATZHALTER
   ========================================================================== */
.placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--sp-5);
  background: repeating-linear-gradient(45deg, #d9dddb, #d9dddb 10px, #d2d7d4 10px, #d2d7d4 20px);
  color: #5d6360;
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  border-radius: 8px;
}
.section--dark .placeholder,
.section--black .placeholder {
  background: repeating-linear-gradient(45deg, #2c302e, #2c302e 10px, #313633 10px, #313633 20px);
  color: #9aa19d;
}
.placeholder--cert { aspect-ratio: 3 / 2; min-width: 120px; }

/* Zertifikats-Badges (Trust-Band) */
.cert-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  min-width: 130px;
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  text-align: center;
}
.cert-badge__icon {
  font-size: 1.5rem;
  color: var(--green-on-dark);
  line-height: 1;
}
.cert-badge__name {
  font-family: var(--ff-display);
  font-weight: var(--fw-bold);
  font-size: .95rem;
  color: var(--white);
  letter-spacing: .04em;
}
.cert-badge__label {
  font-size: .72rem;
  color: var(--gray-mid);
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.3;
}

/* ==========================================================================
   8b. PLATZHALTER-BADGES (Entwurf-Kennzeichnung: Video folgt / Asset folgt)
   Wrapper .ph-wrap macht das Badge relativ zum Medium positionierbar,
   ohne von hex-clip-path/overflow abgeschnitten zu werden (Badge = Sibling).
   ========================================================================== */
.ph-wrap { position: relative; display: block; }

.ph-badge {
  position: absolute;
  left: 50%;
  bottom: 9%;
  transform: translateX(-50%);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .5em .9em;
  font-family: var(--ff-display);
  font-weight: var(--fw-semibold);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--white);
  background: rgba(19, 30, 28, .74);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: var(--radius-pill);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  pointer-events: none;
  animation: phPulse 2.6s var(--ease-soft) infinite;
}
/* Play-Dreieck für Video-Platzhalter */
.ph-badge__play {
  display: inline-grid;
  place-items: center;
  width: 1.1em; height: 1.1em;
  border-radius: 50%;
  background: var(--green-on-dark);
  color: var(--gray-dark);
  font-size: .8em;
  line-height: 1;
}
.ph-badge__play::before { content: "\25B6"; margin-left: 1px; }

@keyframes phPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(111, 185, 171, 0); }
  50%      { box-shadow: 0 0 0 5px rgba(111, 185, 171, .18); }
}
@media (prefers-reduced-motion: reduce) {
  .ph-badge { animation: none; }
}

/* ==========================================================================
   9. REVEAL-UTILITIES (Scroll-Animationen, §11)
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hex-img:hover img { transform: none; }
}
