/* =========================================================================
   Reset + Base Typography
   ========================================================================= */

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

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

  /* Anchor base colors at the html level. WordPress/core stylesheets often
     inject body-level rules (global-styles, classic-theme-styles); placing
     our background + color here guarantees our tokens win even if those
     aren't fully dequeued. color-scheme tells the browser how to paint
     form elements, scrollbars, etc. */
  background: var(--surface);
  color: var(--text);
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
}

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

/* html body gives us specificity (0,0,0,2) — beats any body {} rule
   from WordPress core or plugins that might bleed through. */
html body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: clamp(2.5rem, 6vw, var(--fs-5xl)); font-weight: var(--fw-extrabold); }
h2 { font-size: clamp(2rem, 4vw, var(--fs-3xl)); }
h3 { font-size: clamp(1.5rem, 3vw, var(--fs-2xl)); line-height: var(--lh-snug); }
h4 { font-size: var(--fs-xl); font-weight: var(--fw-semibold); line-height: var(--lh-snug); }
h5 { font-size: var(--fs-lg); font-weight: var(--fw-semibold); line-height: var(--lh-snug); }
h6 { font-size: var(--fs-md); font-weight: var(--fw-semibold); line-height: var(--lh-snug); }

p {
  margin: 0;
  max-width: var(--prose-max);
}

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

a:hover { color: var(--accent-hover); }
a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-subtle);
  border-radius: var(--radius-sm);
}

ul, ol { margin: 0; padding: 0; }

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

code, pre, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.95em;
}

code {
  background: var(--surface-subtle);
  color: var(--text);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

pre {
  margin: 0;
  padding: var(--s-5);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: var(--lh-base);
}

pre code {
  background: none;
  border: none;
  padding: 0;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--s-8) 0;
}

::selection {
  background: var(--accent);
  color: var(--accent-text);
}

/* Skip-Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--s-4);
  background: var(--accent);
  color: var(--accent-text);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius);
  font-weight: var(--fw-medium);
  z-index: var(--z-toast);
  transition: top var(--transition);
}

.skip-link:focus { top: var(--s-4); }

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--page-pad);
  padding-right: var(--page-pad);
}

.prose {
  max-width: var(--prose-max);
}

.prose p + p { margin-top: var(--s-5); }
.prose h2 { margin-top: var(--s-10); margin-bottom: var(--s-4); }
.prose h3 { margin-top: var(--s-8); margin-bottom: var(--s-3); }

/* Section-Abstände */
.section {
  padding-top: clamp(var(--s-10), 10vw, var(--s-14));
  padding-bottom: clamp(var(--s-10), 10vw, var(--s-14));
}

.section-sm {
  padding-top: clamp(var(--s-8), 6vw, var(--s-10));
  padding-bottom: clamp(var(--s-8), 6vw, var(--s-10));
}

/* Utilities */
.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-4);
}

.text-muted { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }
.text-accent { color: var(--accent); }

.text-lg { font-size: var(--fs-lg); line-height: var(--lh-base); }
.text-md { font-size: var(--fs-md); line-height: var(--lh-relaxed); }

.lead {
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  line-height: var(--lh-relaxed);
  color: var(--text-muted);
  max-width: 56ch;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
  letter-spacing: -0.01em;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
