/* ============================================================
   polish.css  ·  God-Level Politur-Layer (additiv, site-weit)
   Loest die universellen Luecken, ohne bestehende Layouts/Hovers
   anzufassen. Phase 1 des God-Level-Programms.
   ============================================================ */

/* Schatten- und Easing-Tokens (Single Source, von Komponenten nutzbar) */
:root {
  --ms-shadow-sm: 0 4px 14px rgba(74, 47, 61, 0.07);
  --ms-shadow-md: 0 14px 38px rgba(74, 47, 61, 0.10);
  --ms-shadow-lg: 0 30px 64px rgba(74, 47, 61, 0.14);
  --ms-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* 1. Focus-visible: sichtbarer Kupfer-Ring fuer Tastatur-Navigation.
      Zero-specificity (:where), damit Komponenten-Styles immer vorgehen. */
:where(a, button, summary, input, textarea, select, [tabindex], [role="button"]):focus-visible {
  outline: 2px solid #c8915e;
  outline-offset: 3px;
  border-radius: 5px;
}
/* Maus-Fokus bleibt unsichtbar (Browser regelt das ueber :focus-visible). */
:where(a, button, summary):focus:not(:focus-visible) {
  outline: none;
}

/* 2. Marken-Selection */
::selection {
  background: rgba(193, 29, 111, 0.16);
  color: #2D2028;
}

/* 3. Sanftes Scrollen (nur ohne Reduced-Motion-Wunsch) */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* 4. Bilder defensiv: nie ueberlaufen */
img {
  max-width: 100%;
  height: auto;
}

/* 5. Einheitliches Scroll-Reveal (Klasse wird von reveal.js gesetzt).
      Nur ohne Reduced-Motion-Wunsch; ohne JS bleibt alles sichtbar. */
@media (prefers-reduced-motion: no-preference) {
  .gl-reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ms-ease), transform .9s var(--ms-ease); }
  .gl-reveal.gl-in { opacity: 1; transform: none; }
}

/* 6. Reduced-Motion: fuer Menschen, die keine Bewegung wollen, alles ruhig stellen */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
