/* ==========================================================================
   Merava Private — Modern CSS Reset
   --------------------------------------------------------------------------
   Pragmatischer Reset (kein Normalize-Overkill). Setzt nur Defaults zurück,
   die in der Praxis mit Frameworks und Custom-Designs Probleme machen.
   Inspiration: Andy Bell + Josh Comeau, gestrafft für unsere Bedürfnisse.
   ========================================================================== */

/* Border-Box global */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* [hidden]-Attribute soll IMMER unsichtbar sein — Browser-UA-Default
   `[hidden] { display: none }` hat zu niedrige Specificity gegen Klassen
   mit `display: grid/flex/inline-flex`. !important hier ist semantisch
   korrekt: das Attribut bedeutet wörtlich "nicht anzeigen". */
[hidden] {
  display: none !important;
}

/* Margins nullen */
* {
  margin: 0;
}

/* HTML / Body — Smooth Scroll, voll Höhe, Font-Smoothing */
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Media — sinnvolle Defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Form-Elemente: Schrift erben statt Browser-Default */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* Buttons — Reset Browser-Look (Styling kommt aus base.css) */
button {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

/* Listen — Marker raus, falls Klasse für Layout (UL als Nav etc.).
   Echte Content-Listen bekommen ihren Marker via base.css zurück. */
ul,
ol {
  padding-inline-start: 0;
}

ul[role="list"],
ol[role="list"],
ul.unstyled,
ol.unstyled {
  list-style: none;
}

/* Wort-Umbruch: KEINE automatische Silbentrennung (würde "Premium" zu
   "Pre-mium" splitten — User-Wunsch: ganze Wörter rutschen in die nächste
   Zeile). overflow-wrap:break-word bleibt als Fallback für extreme Fälle
   (sehr lange URLs, zu schmaler Mobile-Container) — dort darf der Browser
   ein zu langes Wort umbrechen, sonst würde es horizontal überlaufen. */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
  hyphens: manual;
}

/* Tables */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Outline — eigene Fokus-Strategie in base.css */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Selection */
::selection {
  background: var(--color-gold);
  color: var(--color-white);
}

/* Scrollbar Tuning (optional, dezent) */
@supports (scrollbar-color: auto) {
  html {
    scrollbar-color: var(--color-anthracite-mute) transparent;
  }
}
