/* FEROS Vorschau "Apple": Feinschliff nach Apples Designprinzipien
   Materialien, Wegweiser in der Navigation, Typografie je Größe, sofortiges Feedback, weiche Akkordeons. */

:root {
  --ap-ease: cubic-bezier(0.32, 0.72, 0, 1);      /* kritisch gedämpft, ohne Überschwingen */
  --ap-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ap-material: rgba(255, 255, 255, 0.72);
}

/* ---------- 1 Materialien: Kopfzeile und untere Leiste als Glas, Inhalt läuft darunter ---------- */
body .site-header { transition: background-color 240ms ease, box-shadow 240ms ease; }
html.ap-scrolled body .site-header {
  background: var(--ap-material);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  box-shadow: none;
}
/* Scroll-Kante statt harter Linie: weicher Schatten nur, wenn Inhalt darunter liegt */
body .site-header::after {
  content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 14px; pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 40, 70, 0.10), transparent);
  opacity: 0; transition: opacity 240ms ease;
}
html.ap-scrolled body .site-header::after { opacity: 1; }

body .trust-bar {
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 -10px 30px rgba(0, 61, 99, 0.08);
}
@media (max-width: 900px) {
  body .navigation {
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  }
}
@media (prefers-reduced-transparency: reduce) {
  html.ap-scrolled body .site-header, body .trust-bar, body .navigation { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  html.ap-scrolled body .site-header, body .trust-bar { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  html.ap-scrolled body .site-header { border-bottom: 1px solid #04455e; }
  body .trust-bar { border-top: 1px solid #04455e; }
}

/* ---------- 2 Wegweiser: aktiver Abschnitt in der Navigation ---------- */
@media (min-width: 901px) {
  body .navigation { position: relative; }
  body .navigation a { border-bottom-color: transparent !important; transition: color 200ms ease; }
  body .navigation a[aria-current] { color: var(--navy, #04455e); }
  .ap-ind {
    position: absolute; left: 0; bottom: 4px; width: 100px; height: 2px; border-radius: 2px;
    background: var(--blue, #008DDA); transform-origin: 0 50%; pointer-events: none; opacity: 0;
    transition: transform 420ms var(--ap-ease), opacity 200ms ease;
  }
  .ap-ind.is-on { opacity: 1; }
  @media (hover: hover) and (pointer: fine) {
    body .navigation a:hover { color: var(--navy, #04455e); }
  }
}

/* ---------- 3 Typografie: Laufweite und Zeilenhöhe passend zur Größe ---------- */
body h1, body h2 { text-wrap: balance; }
body h2 { letter-spacing: -0.015em; }
body h3 { text-wrap: balance; letter-spacing: -0.005em; }
body main p, body main li { text-wrap: pretty; }
body .service-card p, body .faq-item p, body .about p, body .contact p { line-height: 1.6; }
body small, body .trust-bar small, body .service-detail p { letter-spacing: 0.01em; }
body .fx-stats small { letter-spacing: 0.005em; }

/* ---------- 4 Sofortiges Feedback beim Drücken (pointer-down, 100 ms) ---------- */
body .header-call, body .hero-call, body .hero-callback, body .form-submit, body .trust-call, body .about-contact,
body .fx-btn, body .pp-btn, body .pc-link, body .fx-partner-link {
  transition: transform 100ms ease-out, box-shadow 160ms ease, background-color 160ms ease;
}
body .header-call:active, body .hero-call:active, body .hero-callback:active, body .form-submit:active, body .trust-call:active,
body .about-contact:active, body .fx-btn:active, body .pp-btn:active, body .pc-link:active { transform: scale(0.97); }
body .navigation a:active, body .site-footer a:active { opacity: 0.6; transition: opacity 60ms ease; }
body .faq-item summary:active { opacity: 0.7; }

/* ---------- 5 Karten: leichtes Anheben nur mit Maus ---------- */
@media (hover: hover) and (pointer: fine) {
  body .service-card { transition: transform 280ms var(--ap-out), box-shadow 280ms var(--ap-out); }
  body .service-card:hover { transform: translateY(-3px); box-shadow: 0 22px 44px rgba(0, 51, 90, 0.20); }
}

/* ---------- 6 Akkordeons öffnen weich und lassen sich mittendrin umkehren ---------- */
body main details { interpolate-size: allow-keywords; }
body main details::details-content {
  block-size: 0; overflow: clip;
  transition: block-size 340ms var(--ap-ease), content-visibility 340ms allow-discrete;
}
body main details[open]::details-content { block-size: auto; }
body .faq-item summary span { transition: transform 340ms var(--ap-ease); }

/* ---------- 7 Fokus sichtbar und ruhig ---------- */
body :focus-visible { outline-offset: 3px; }
body input, body textarea { transition: border-color 160ms ease, box-shadow 160ms ease; }
body input:focus-visible, body textarea:focus-visible { box-shadow: 0 0 0 4px rgba(0, 141, 218, 0.18); }

@media (prefers-reduced-motion: reduce) {
  body .service-card:hover { transform: none; }
  body main details::details-content { transition: none; }
  .ap-ind { transition: opacity 200ms ease; }
  body .header-call:active, body .hero-call:active, body .hero-callback:active, body .form-submit:active, body .trust-call:active,
  body .about-contact:active, body .fx-btn:active, body .pp-btn:active, body .pc-link:active { transform: none; }
}
