/* YourYoga Design-Tokens – zentrale Farb-, Typografie- und Abstandsdefinitionen.
 * Alle Tokens werden hier definiert und nicht pro Seite dupliziert.
 * Farbkontraste sind nach WCAG 2.2 AA geprüft.
 */

/* Lokale Variablen-Fonts (DSGVO-konform, ohne externes CDN).
 * Quellen: google/fonts (OFL), lokal ausgeliefert aus static/public/fonts.
 * Fraunces: variable Weights (100..900) + optical size + SOFT/WONK axes.
 * Source Sans 3: variable Weights (200..900).
 */
@font-face {
  font-family: "Fraunces";
  src: url("/static/public/fonts/Fraunces-Variable.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/static/public/fonts/SourceSans3-Variable.ttf") format("truetype-variations");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Farbpalette (verbindlich) */
  --color-primary: #243e30;           /* YourYoga-Grün: dunkles Waldgrün */
  --color-primary-rgb: 36 62 48;     /* Transparente Markenakzente */
  --color-primary-dark: #192e23;      /* Dunkleres Grün für Hover/Focus */
  --color-primary-light: #395440;     /* Helleres Grün */
  --color-background: #f6f4ed;        /* Warmes Cremeweiß */
  --color-background-rgb: 246 244 237;
  --color-text: #273c30;              /* Dunkles Textgrün */
  --color-text-muted: #5b685c;        /* Gedämpftes Textgrün */
  --color-accent: #5e6845;            /* Olive, auch für kleinen Text */
  --color-secondary: #737c55;         /* Helleres Olive für große Schrift/Deko */
  --color-sage: #e3e8dc;              /* Heller Salbei */
  --color-sand: #eae4d8;              /* Warmer Sand */
  --color-gold: #a78a61;              /* Gedämpftes Sandgold (nur Deko) */
  --color-surface: #FFFFFF;           /* Weiß für Formulare/Modale */
  --color-border: #d8ded1;            /* Rahmenfarbe */
  --color-error: #9a0016;             /* Fehlerrot */
  --color-focus: #0b4f9c;             /* Fokusblau (AA-konform) */

  /* Typografie */
  --font-heading: "Fraunces", Georgia, serif;
  --font-heading-weight: 400;
  --font-heading-spacing: -.035em;
  --font-body: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-size-base: 1rem;            /* 16px */
  --font-size-small: 0.875rem;       /* 14px */
  --font-size-large: 1.125rem;       /* 18px */
  --line-height: 1.6;

  /* Abstände und Layout */
  --container-max: 70rem;            /* 1120px */
  --gutter: 1rem;
  --radius: 0.75rem;
  --radius-pill: 2rem;
  --radius-panel: 1.25rem;
  --panel-padding: clamp(1rem, 2.5vw, 1.5rem);
  --control-height: 3rem;
  --dialog-backdrop: rgb(32 37 31 / 60%);
  --shadow-card: 0 4px 16px rgb(32 37 31 / 5%);

  /* Toggle-Bar spezifisch */
  --togglebar-height: 3.25rem;
  --togglebar-item-min-width: 2.75rem;
  --togglebar-gap: 0.25rem;
}

/* Reduced Motion: alle Animationen entfernen oder auf Minimum reduzieren */
@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;
    scroll-behavior: auto !important;
  }
}

/* Basis-Reset und Box-Modell */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

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

/* Screen-reader only */
.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;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -3rem;
  left: var(--gutter);
  background: var(--color-primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  z-index: 100;
  transition: top 0.15s ease-out;
}

.skip-link:focus {
  top: 0.5rem;
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

/* Fokus-Stile */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius);
}

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