/* =========================================================================
   base.css — Reset, Typografie, Layout-Primitive
   ========================================================================= */

/* ---------- @font-face: Montserrat (lokal, DSGVO-konform) -------------- */
/* HINWEIS: Lege die woff2-Dateien in assets/fonts/ ab.
   Quelle: https://gwfh.mranftl.com/fonts/montserrat (latin + latin-ext) */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/montserrat-400.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/montserrat-500.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/montserrat-600.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/montserrat-700.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/montserrat-800.woff2") format("woff2");
}

/* ---------- Modern Reset (Andy-Bell-style) ---------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  color: var(--color-ink);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

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

a {
  color: var(--color-brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: var(--lh-heading);
  color: inherit;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* ---------- Headings (Mobile-First) ---------------------------------- */
h1, .h1 {
  font-size: var(--fs-h1-mobile);
  font-weight: 800;
  line-height: var(--lh-tight);
  text-transform: uppercase;
  letter-spacing: 0;
}
h2, .h2 {
  font-size: var(--fs-h2-mobile);
  font-weight: 700;
  text-transform: uppercase;
}
h3, .h3 {
  font-size: var(--fs-h3-mobile);
  font-weight: 700;
}
h4, .h4 {
  font-size: 1.125rem;
  font-weight: 700;
}

@media (min-width: 768px) {
  h1, .h1 { font-size: var(--fs-h1-tablet); }
  h2, .h2 { font-size: var(--fs-h2-tablet); }
  h3, .h3 { font-size: var(--fs-h3-tablet); }
  h4, .h4 { font-size: 1.25rem; }
}

@media (min-width: 1024px) {
  h1, .h1 { font-size: var(--fs-h1-desktop); }
  h2, .h2 { font-size: var(--fs-h2-desktop); }
  h3, .h3 { font-size: var(--fs-h3-desktop); }
  h4, .h4 { font-size: var(--fs-h4); }
}

/* Eyebrow (Section-Vorlauf) */
.eyebrow {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: var(--space-2);
}
.eyebrow--on-dark {
  color: rgba(255, 255, 255, 0.95);
}

/* Anker-Ziele bekommen Abstand zum Sticky-Header */
:target,
[id]:not(body):not(html) {
  scroll-margin-top: 5rem;
}

/* ---------- Layout-Primitive ----------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter-mobile);
}
@media (min-width: 768px) {
  .wrap { padding-inline: var(--gutter-tablet); }
}
@media (min-width: 1024px) {
  .wrap { padding-inline: var(--gutter-desktop); }
}

.section {
  padding-block: var(--section-py-mobile);
}
@media (min-width: 768px) {
  .section { padding-block: var(--section-py-tablet); }
}
@media (min-width: 1024px) {
  .section { padding-block: var(--section-py-desktop); }
}

.section--cream { background: var(--color-cream); }
.section--brand {
  background: var(--color-brand);
  color: var(--color-white);
}
.section--brand h1, .section--brand h2,
.section--brand h3, .section--brand h4 {
  color: var(--color-white);
}
.section--ink {
  background: var(--color-ink);
  color: var(--color-white);
}

.stack > * + * { margin-block-start: var(--space-4); }
.stack-lg > * + * { margin-block-start: var(--space-8); }

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: var(--space-6);
}

.flow > * + * { margin-block-start: 1em; }

/* ---------- Accessibility-Helfer ------------------------------------- */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-2);
  z-index: var(--z-toast);
  padding: var(--space-3) var(--space-4);
  background: var(--color-brand);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--transition-fast);
}
.skip-link:focus {
  top: var(--space-2);
  text-decoration: none;
}

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

/* ---------- Reduced Motion ------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Print ---------------------------------------------------- */
@media print {
  .site-header,
  .site-footer,
  .skip-link {
    display: none !important;
  }
  body {
    color: black;
    background: white;
  }
}
