/* ==========================================================================
   STUDIO KONTUR – Basis: Reset, Typografie, Fokus, Hilfsklassen, Cursor
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--kopfleiste) + var(--s-4));
  background: var(--papier);
}

@media (min-width: 64rem) {
  html {
    scroll-padding-top: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--papier);
  color: var(--tinte);
  font-family: var(--schrift-text);
  font-size: var(--fs-text);
  line-height: var(--lh-text);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--schrift-display);
  font-weight: 800;
  line-height: var(--lh-titel);
  letter-spacing: var(--lw-display);
  font-variant-numeric: lining-nums;
  hyphens: auto; /* lieber „ÖFFNUNGS-ZEITEN“ als ein Umbruch ohne Trennstrich */
  text-wrap: balance;
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 800;
}

h4 {
  font-size: var(--fs-h4);
  font-weight: 800;
}

p,
li,
dd {
  hyphens: auto;
  text-wrap: pretty;
}

strong {
  font-weight: 650;
}

a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: var(--blau);
  color: var(--weiss);
}

/* --- Fokus: immer sichtbar, nie vom Cursor ersetzt --- */
:focus-visible {
  outline: var(--fokus-breite) solid var(--fokus-farbe);
  outline-offset: 3px;
}

/* Auf blauen und schwarzen Flächen wird der Fokusring weiß */
.auf-blau,
.auf-tinte {
  --fokus-farbe: var(--weiss);
}

[tabindex="-1"]:focus:not(:focus-visible) {
  outline: none;
}

/* --- Hilfsklassen --- */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.mono {
  font-family: var(--schrift-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--lw-mono);
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

[hidden] {
  display: none !important;
}

/* hält Angaben wie „ca. 60–90 Min.“ zusammen */
.nobr {
  white-space: nowrap;
}

/* --- Skip-Link --- */
/* Unsichtbar (aber vorlesbar), bis er per Tastatur den Fokus bekommt */
.skip {
  position: fixed;
  top: var(--s-3);
  left: var(--s-3);
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  background: var(--tinte);
  color: var(--weiss);
  font-family: var(--schrift-mono);
  font-weight: 500;
  text-decoration: none;
  --fokus-farbe: var(--blau);
}

.skip:not(:focus) {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Eigener Cursor (nur Maus/Trackpad, nicht bei Touch oder reduzierter Bewegung) ---
   Der Fokusring bleibt davon unberührt; Textfelder behalten den Textcursor. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html {
    cursor: url("../icons/cursor.svg") 16 16, crosshair;
  }

  a,
  button,
  label,
  select,
  summary,
  [role="tab"] {
    cursor: url("../icons/cursor-klick.svg") 15 15, pointer;
  }

  input:not([type="radio"], [type="checkbox"]),
  textarea {
    cursor: text;
  }

  :disabled,
  [aria-disabled="true"] {
    cursor: not-allowed;
  }
}
