/* ---------------------------------------------------------------
   base.css — reset, typography defaults, focus, reduced-motion.
   See: _analysis/03-marketing-design-layer.md §2.5, §2.6
--------------------------------------------------------------- */

/* @font-face — single canonical font */
@font-face {
  font-family: "Söhne Buch";
  src: url("/assets/fonts/soehne-buch.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Modern reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  min-height: 100vh;
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: var(--type-body);
  color: var(--color-text-primary);
  background: var(--color-surface-page);
  text-rendering: optimizeLegibility;
}

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

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

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

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

p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
ul, ol { padding: 0; list-style: none; }

/* Typography defaults */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 400;
  letter-spacing: var(--tracking-title);
  text-wrap: balance;
  line-height: var(--leading-title);
}
h1 { font-size: var(--type-display); line-height: var(--leading-display); letter-spacing: var(--tracking-display); }
h2 { font-size: var(--type-title); }
h3 { font-size: var(--type-subtitle); }
h4 { font-size: var(--type-body-lg); }

p { font-size: var(--type-body); line-height: var(--leading-body); }

small, .caption { font-size: var(--type-caption); line-height: 1.4; }
code, pre, kbd, samp, .mono { font-family: var(--font-mono); }

/* Focus */
:focus { outline: none; }
:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
  border-radius: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: var(--space-4);
  padding: var(--space-3) var(--space-5);
  background: var(--color-action-primary);
  color: var(--color-text-on-dark);
  font-size: var(--type-body);
  border-radius: 4px;
  transform: translateY(-200%);
  transition: transform var(--motion-quick) var(--ease-standard);
  z-index: 1000;
}
.skip-link:focus-visible {
  transform: translateY(0);
}

/* :target offset so anchor links don't hide behind the header */
:target {
  scroll-margin-top: var(--space-16);
}

/* Selection */
::selection {
  background: var(--color-action-primary);
  color: var(--color-text-on-dark);
}

/* 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;
}

/* ---------------------------------------------------------------
   Reduced motion — global safety net + per-family contract.
   See: 03-marketing-design-layer.md §2.5
--------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  /* Background hero videos pause and show poster */
  video[autoplay] { display: none; }
  .video-bg__poster { display: block !important; }

  /* SVG stroke-draw animations snap to final state */
  .svg-stroke-draw {
    stroke-dashoffset: 0 !important;
  }
}
