/* ═══════════════════════════════════════════════════════════════
   STS — Base: Reset, Typografie, globale Styles
   ═══════════════════════════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-base);
  color: var(--color-text);
  background: var(--color-bg);
  letter-spacing: var(--tracking-base);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Headings ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-heading);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 700; }
h4 { font-size: var(--fs-h4); font-weight: 700; line-height: var(--lh-snug); }

/* ── Paragraphs & Links ── */
p {
  line-height: var(--lh-relaxed);
  color: var(--color-text-dim);
}

p + p { margin-top: var(--space-sm); }

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-hover);
}

/* ── Listen ── */
ul, ol {
  list-style: none;
}

/* ── Bilder & Media ── */
img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  font-style: italic;
  background-repeat: no-repeat;
  background-size: cover;
  shape-margin: 0.75rem;
}

/* ── Formular-Reset ── */
input, textarea, select, button {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  user-select: none;
}

/* ── Selection ── */
::selection {
  background: var(--color-accent);
  color: #fff;
}

/* ── Fokus (Tastatur-Navigation) ── */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

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

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-alt);
}
::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-faint);
}

/* ── Utility: Container ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.container--wide {
  max-width: var(--max-width-wide);
}

/* ── Utility: Section ── */
.section {
  padding-block: var(--space-section);
}

.section--alt {
  background: var(--color-bg-alt);
}

.section--dark {
  background: var(--color-dark);
  color: var(--color-text-on-dark);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--color-text-on-dark);
}

.section--dark p {
  color: var(--color-text-on-dark-dim);
}

/* ── Utility: Eyebrow (kleines Label über Headlines) ── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-heading);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.eyebrow::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

.section--dark .eyebrow {
  color: var(--color-accent-hover);
}

/* ── Utility: Section-Header (Eyebrow + Headline + Subtitle) ── */
.section__header {
  max-width: 720px;
  margin-bottom: var(--space-xl);
}

.section__header--center {
  margin-inline: auto;
  text-align: center;
}

.section__header--center .eyebrow {
  justify-content: center;
}

.section__title {
  margin-bottom: var(--space-sm);
}

.section__subtitle {
  font-size: var(--fs-body-lg);
  line-height: var(--lh-relaxed);
  color: var(--color-text-dim);
}

.section--dark .section__subtitle {
  color: var(--color-text-on-dark-dim);
}

/* ── Utility: Visually Hidden (für Screenreader) ── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Utility: Highlight in Headlines ── */
.highlight {
  color: var(--color-accent);
}

.section--dark .highlight {
  color: var(--color-accent-hover);
}

/* ── Utility: No-scroll (für offene Menüs/Modals) ── */
body.no-scroll {
  overflow: hidden;
}

/* ── Reveal-Animation (wird via JS aktiviert) ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal[data-delay="100"] { transition-delay: 100ms; }
.reveal[data-delay="200"] { transition-delay: 200ms; }
.reveal[data-delay="300"] { transition-delay: 300ms; }
.reveal[data-delay="400"] { transition-delay: 400ms; }
.reveal[data-delay="500"] { transition-delay: 500ms; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
