/* ==========================================================================
   base.css – Design-Tokens, Fonts, Reset, Typografie
   körperNaH Physiotherapie · Vanilla CSS, kein Framework
   ========================================================================== */

/* ---------- Lokale Fonts (kein CDN) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/inter-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/inter-700.woff2") format("woff2");
}

/* ---------- Design-Tokens ---------- */
:root {
  /* Farben – abgeleitet vom Logo (Mint-Türkis #0ac5a8, Blaugrau #bec2cb) */
  --color-primary: #0a7d67;        /* Logo-Türkis, abgedunkelt für ≥4.5:1 Kontrast auf Weiß */
  --color-primary-dark: #075e4e;
  --color-primary-light: #e0f5f0;
  --color-accent: #0ac5a8;         /* Original-Logofarbe, nur dekorativ (zu hell für Text) */
  --color-bg: #fcfdfd;             /* kühles Weiß, passend zum Logo-Grau */
  --color-surface: #ffffff;
  --color-surface-alt: #f2f7f5;
  --color-text: #22322e;
  --color-text-muted: #5a6b66;
  --color-border: #dbe4e1;
  --color-focus: #1f6feb;

  /* Typografie – fluide Skala */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --text-sm: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem);
  --text-xl: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  --text-2xl: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  --text-3xl: clamp(2.125rem, 1.6rem + 2.6vw, 3.25rem);

  /* Abstände */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 6.5rem;

  /* Sonstiges */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 3px rgb(20 40 35 / 0.08);
  --shadow-md: 0 6px 24px rgb(20 40 35 / 0.10);
  --container-max: 72rem;
  --header-height: 4.5rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

@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;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ---------- Typografie ---------- */
h1,
h2,
h3,
h4 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-primary-dark);
  text-wrap: balance;
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p {
  max-width: 68ch;
}

a {
  color: var(--color-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--color-primary-dark);
}

ul,
ol {
  padding-left: 1.25rem;
}

strong {
  font-weight: 600;
}

address {
  font-style: normal;
}

/* ---------- Fokus & Barrierefreiheit ---------- */
:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 100;
  padding: var(--space-3) var(--space-5);
  background: var(--color-primary-dark);
  color: #fff;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

::selection {
  background: var(--color-primary);
  color: #fff;
}
