/* ============================================================
   BASE — Reset, Typo-Defaults, Layout-Primitives
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--fw-regular);
  color: var(--ink-soft);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: 1;
  color: var(--ink);
}

p { margin: 0; }

a {
  color: inherit;
  text-decoration: none;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

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

/* <picture> ist nur die Formatweiche (AVIF/WebP/PNG) und soll im
   Layout nicht mitzählen — `display: contents` reicht das <img>
   direkt an den Elternteil durch. Ohne das erzeugte der Wrapper
   eine eigene Inline-Box und verschöbe Bilder um die Zeilenhöhe. */
picture { display: contents; }

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

/* Das Browser-Stylesheet versteckt [hidden] bereits — aber jede
   Autoren-Regel mit `display` schlägt es, unabhängig von der
   Spezifität. Hier steht es deshalb noch einmal als Autoren-Regel,
   damit `hidden` verlässlich versteckt (siehe auch `.modal[open]`
   in components.css, wo genau das schiefging). */
[hidden] { display: none; }

input, textarea, select { font: inherit; color: inherit; }

strong, b { font-weight: var(--fw-bold); }

:focus-visible {
  outline: 2px solid var(--focus-ring, var(--brand));
  outline-offset: 3px;
  border-radius: 4px;
}

/* Auf talents-Rot wäre ein roter Fokusring unsichtbar — Ring und
   Untergrund hätten dieselbe Farbe. Diese drei Flächen drehen ihn
   deshalb auf Weiß: 4,97:1 gegen das Rot und damit deutlich über
   der 3:1-Schwelle für Bedienelemente.

   Der Ring liegt durch `outline-offset` außerhalb des Elements,
   also auf dem roten Grund — auch bei den weißen Buttons und beim
   weißen Menü-Kreis über der roten Sektion. */
.countdown,
.newsletter,
[data-nav-theme="brand"] .nav {
  --focus-ring: var(--white);
}

::selection {
  background: var(--brand);
  color: var(--white);
}

/* ---------- Layout-Primitives ----------
   Der Content ist maximal `--container` breit; die seitliche
   Luft liegt AUSSERHALB der Max-Breite, damit der Inhalt auf
   großen Screens exakt 1260px (bzw. 1440px im Hero) misst. */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--container-px));
  margin-inline: auto;
  padding-inline: var(--container-px);
}

.container--hero {
  max-width: calc(var(--container-hero) + 2 * var(--container-px));
}

.section {
  position: relative;
  padding-block: var(--section-py);
  background: var(--surface);
}

/* ---------- Text-Utilities ---------- */
.u-brand { color: var(--brand); }

/* Markenwort „talents" im Fließtext — immer bold kursiv */
.wordmark {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: var(--fw-bold);
}

/* Verhindert einen Umbruch mitten im Begriff (z. B. am Bindestrich
   von „talents-Newsletter") */
.u-nowrap { white-space: nowrap; }

/* Sprungmarke — liegt außerhalb des Bildes und fährt beim
   Fokussieren herein. `position: fixed`, damit sie auch mitten auf
   der Seite erreichbar bleibt, und über der Nav (z-index), weil die
   sonst darüber läge. */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: calc(var(--z-nav) + 1);
  padding: 14px 24px;
  border-radius: 0 0 var(--radius-xs) 0;
  background: var(--brand);
  color: var(--white);
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  line-height: 1;
  transform: translateY(-110%);
  transition: transform var(--dur) var(--ease);
}

.skip-link:focus {
  transform: none;
}

/* Das Sprungziel ist kein Bedienelement — ein Fokusrahmen um den
   halben Seiteninhalt wäre irritierend. Der Sprung selbst zeigt
   deutlich genug an, wo man gelandet ist. */
main:focus {
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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