/* ==========================================================================
   Lucid Page Media – Base / Reset / Layout-Utilities
   ========================================================================== */

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

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

body {
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video, picture { display: block; max-width: 100%; height: auto; }
picture { display: contents; }
img { -webkit-user-drag: none; }

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul, ol { list-style: none; padding: 0; }
input, textarea, select, button { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  color: var(--color-text);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.015em; }
h4 { font-size: var(--fs-h4); letter-spacing: -0.01em; }
p  { text-wrap: pretty; }

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--teal-500); color: var(--ink-950); }

/* --- Layout ------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide   { max-width: var(--container-wide); }
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.section--dark {
  background: var(--color-bg-dark);
  color: var(--color-text-invert);
}
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 {
  color: #ffffff;
}
.section--alt { background: var(--color-bg-alt); }
.section--cream { background: var(--cream-50); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-strong);
}
.section--dark .eyebrow { color: var(--teal-500); }

.lead { font-size: var(--fs-lead); color: var(--color-text-soft); line-height: var(--lh-normal); }
.section--dark .lead { color: rgba(234, 253, 250, 0.78); }

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

/* Visually hidden (a11y) */
.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;
}

/* Skip-Link */
.skip-link {
  position: absolute; left: 0; top: -60px; z-index: 1000;
  background: var(--ink-950); color: #fff; padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius-sm) 0; transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 0; }

/* Scroll-Reveal – Progressive Enhancement:
   Ohne JS (kein .reveal-ready) sind alle Elemente normal sichtbar (SEO/No-JS).
   Mit JS setzt das Inline-Head-Script .reveal-ready synchron vor dem Paint. */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
  will-change: opacity, transform;
}
.reveal-ready [data-reveal].is-visible { opacity: 1; transform: none; }
.reveal-ready [data-reveal][data-delay="1"] { transition-delay: 80ms; }
.reveal-ready [data-reveal][data-delay="2"] { transition-delay: 160ms; }
.reveal-ready [data-reveal][data-delay="3"] { transition-delay: 240ms; }
.reveal-ready [data-reveal][data-delay="4"] { transition-delay: 320ms; }
