/* ==========================================================================
   Hero4Paws – Basis: Reset, Typografie, Hilfsklassen
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--c-paper);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 500;
  line-height: var(--lh-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

svg {
  fill: currentColor;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--lh-tight);
  letter-spacing: 0.005em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); }
h4 { font-size: var(--fs-h4); line-height: var(--lh-snug); }

p,
ul,
ol,
dl,
table,
blockquote,
figure {
  margin: 0 0 var(--space-4);
}

p {
  text-wrap: pretty;
}

strong,
b {
  font-weight: 700;
}

a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--c-green);
  transition: color var(--dur) var(--ease), text-decoration-color var(--dur) var(--ease);
}

a:hover {
  color: var(--accent-text);
}

:focus-visible {
  outline: 3px solid var(--c-green);
  outline-offset: 3px;
  border-radius: 4px;
}

.theme-green :focus-visible {
  outline-color: var(--c-black);
}

::selection {
  background: var(--c-green);
  color: var(--c-black);
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--space-7) 0;
}

/* Hilfsklassen ------------------------------------------------------------ */

[hidden] {
  display: none !important;
}

.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-4);
  z-index: 1000;
  padding: var(--space-3) var(--space-4);
  background: var(--c-green);
  color: var(--c-black);
  font-weight: 700;
  border-radius: var(--r-sm);
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-4);
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--fill {
  fill: currentColor;
  stroke: none;
}

.text-muted { color: var(--fg-muted); }
.text-accent { color: var(--accent-text); }
.text-center { text-align: center; }
.lead { font-size: var(--fs-lg); line-height: 1.6; color: var(--fg-muted); }
.small { font-size: var(--fs-sm); }
.nowrap { white-space: nowrap; }

.stack > * + * { margin-top: var(--space-4); }

/* Sanftes Einblenden beim Scrollen (nur mit JS, siehe main.js) */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Abstands-Helfer */
.mt-0 { margin-top: 0; }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-7 { margin-top: var(--space-7); }
.mb-0 { margin-bottom: 0; }
.mb-5 { margin-bottom: var(--space-5); }
.mb-7 { margin-bottom: var(--space-7); }
