/* ============================================================
   Base: Reset + Typography + Utilities
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

/* Sicherheitsnetz gegen horizontale Scrollbalken (clip statt hidden,
   damit position:sticky im Header weiter funktioniert) */
html, body {
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--teal-deep);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}

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

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

button {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(36px, 5.2vw, 64px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(28px, 3.6vw, 46px);
  font-weight: 600;
  line-height: 1.08;
}

h3 {
  font-size: clamp(20px, 2.1vw, 26px);
  line-height: 1.2;
  font-weight: 600;
}

h4 {
  font-size: clamp(17px, 1.4vw, 19px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
  color: var(--ink-mid);
  font-size: 16px;
  line-height: 1.65;
}

.lead {
  font-size: clamp(16px, 1.3vw, 19px);
  color: var(--ink-mid);
  line-height: 1.65;
  max-width: 62ch;
}

em {
  font-style: normal;
  font-family: var(--font-display);
  font-weight: 600;
}

strong {
  font-weight: 600;
  color: var(--ink);
}

ul, ol {
  margin: 0 0 1em;
  padding-left: 1.2em;
}

li {
  color: var(--ink-mid);
  line-height: 1.6;
  margin-bottom: 0.35em;
}

/* Content-Tabellen (z. B. Kosten, Rechner) */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5em;
  font-size: 15px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  color: var(--ink-mid);
  line-height: 1.5;
  vertical-align: top;
}

th {
  background: var(--teal-tint);
  color: var(--teal-dark);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: var(--bg-soft); }

/* Focus (Meridian: 2px Ring, 2px Offset) */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* Utilities */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container-narrow {
  max-width: var(--max-narrow);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container-wide {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: var(--section-y) 0;
  position: relative;
}

.section--sm {
  padding: var(--section-y-sm) 0;
}

.section--cream { background: var(--bg-cream); }
.section--soft  { background: var(--bg-soft); }
.section--teal-soft { background: var(--teal-tint); }

.section--gradient-soft {
  background:
    radial-gradient(circle at 12% 8%, rgba(0, 162, 184, 0.10), transparent 40%),
    radial-gradient(circle at 88% 100%, rgba(232, 198, 111, 0.10), transparent 38%),
    linear-gradient(180deg, #FDFDFD 0%, #F2F8FA 100%);
}

.section-head {
  max-width: var(--max-narrow);
  margin: 0 auto clamp(40px, 5vw, 68px);
  text-align: center;
}

.section-head .lead {
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin: 0 0 18px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

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

.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

.u-gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.u-warm-gradient-text {
  background: linear-gradient(90deg, var(--teal-deep), var(--warm-deep));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

h1 em.u-gradient-text,
h2 em.u-gradient-text {
  font-style: normal;
  font-weight: 700;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 9999;
}

.skip-link:focus {
  left: 12px;
  color: var(--white);
}

/* Reveal (set by JS) */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--delay, 0ms);
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
