/* ====================================================================
   premium-polish-2026-05.css — Premium-Design-Pass
   ────────────────────────────────────────────────────────────────────
   Lädt nach viewport-layout.css. Visual-Polish für 10/10-Premium-Look.
   - Smoother Hover-States
   - Konsistente Card-Schatten
   - Premium Focus-Ringe (a11y + visual)
   - Smooth Scroll
   - Bessere Typografie-Rhythmus
   ==================================================================== */

/* ── Smooth Scroll + Custom Scrollbar ─────────────────────────────── */
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Premium Custom Scrollbar (Webkit) */
::-webkit-scrollbar {
  width: 12px; height: 12px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #1E40AF, #0EA5E9);
  border-radius: 6px;
  border: 2px solid rgba(15, 23, 42, 0.4);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #2563EB, #38BDF8);
}

/* ── Premium Focus-Ringe (WCAG 2.4.7) ─────────────────────────────── */
html body :where(a, button, input, textarea, select, [role="button"], [tabindex]):focus-visible {
  outline: 2px solid #38BDF8;
  outline-offset: 3px;
  border-radius: 4px;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
  transition: outline-offset 0.15s, box-shadow 0.15s;
}

/* ── Premium Card-Schatten (konsistent über alle Pages) ─────────── */
html body .card,
html body .glass-card,
html body .pricing-card,
html body .feature-card,
html body .testimonial-card,
html body [class*="-card"]:not([class*="cookie"]) {
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out, border-color 0.25s;
  will-change: transform, box-shadow;
}

@media (hover: hover) {
  html body .card:hover,
  html body .glass-card:hover,
  html body .pricing-card:hover,
  html body .feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.3);
  }
}

/* ── Premium Button-Polish ────────────────────────────────────────── */
html body .btn,
html body .btn-primary,
html body .cta,
html body button:not([hidden]):not([disabled]):not(.nav-burger):not(.faq-q) {
  transition: transform 0.18s, box-shadow 0.18s, background 0.2s, filter 0.2s;
  will-change: transform, box-shadow;
  letter-spacing: 0.02em;
}

@media (hover: hover) {
  html body .btn:hover,
  html body .btn-primary:hover,
  html body .cta:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22), 0 4px 10px rgba(56, 189, 248, 0.18);
  }
  html body .btn:active,
  html body .btn-primary:active,
  html body .cta:active {
    transform: translateY(0);
    transition-duration: 0.05s;
  }
}

/* ── Premium Image-Hover (für Galerien etc.) ────────────────────── */
@media (hover: hover) {
  html body .gallery-item img,
  html body .reference-card img,
  html body figure.zoom-on-hover img {
    transition: transform 0.4s ease-out, filter 0.3s;
  }
  html body .gallery-item:hover img,
  html body .reference-card:hover img,
  html body figure.zoom-on-hover:hover img {
    transform: scale(1.04);
    filter: brightness(1.08) saturate(1.1);
  }
}

/* ── Heading-Rhythmus (Premium-Typografie) ───────────────────────── */
html body h1, html body h2, html body h3 {
  letter-spacing: -0.02em;
  font-weight: 800;
}
html body h1 { letter-spacing: -0.03em; }
html body h2 { letter-spacing: -0.025em; }

/* Body-Text Rhythmus */
html body p {
  hyphens: auto;
  text-wrap: pretty;
}
html body h1, html body h2, html body h3, html body h4 {
  text-wrap: balance;
}

/* ── Premium Section-Trenner ──────────────────────────────────────── */
html body section + section,
html body .section + .section {
  position: relative;
}

/* ── Smooth Section-Reveal ───────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  html body .fade-up,
  html body .reveal,
  html body section[data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  }
  html body .fade-up.in-view,
  html body .reveal.in-view,
  html body section[data-reveal].in-view {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Premium Selection-Color ──────────────────────────────────────── */
html body ::selection {
  background: rgba(56, 189, 248, 0.35);
  color: #fff;
}

/* ── Premium Image-Loading-Placeholder (Skeleton) ────────────────── */
html body img[loading="lazy"]:not([src*=".svg"]) {
  background: linear-gradient(90deg, rgba(56,189,248,0.06) 0%, rgba(56,189,248,0.12) 50%, rgba(56,189,248,0.06) 100%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.4s ease-in-out infinite;
}
html body img[loading="lazy"][src]:not([src=""]) {
  animation: none;
  background: transparent;
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Premium Anti-Flicker bei Font-Load ─────────────────────────── */
html body {
  font-display: swap;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Premium Touch-Highlight verbergen (Mobile) ──────────────────── */
@media (hover: none) {
  html body * {
    -webkit-tap-highlight-color: rgba(56, 189, 248, 0.18);
  }
}

/* ── Premium reduced-motion fallback ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html body *,
  html body *::before,
  html body *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
