/* ==========================================================================
   PhotoTo — Design Tokens (gemeinsames AssistUK-System, übernommen aus SpellTo)
   ========================================================================== */
:root {
  /* Primär (AssistUK-Blau) */
  --color-primary:        #4b698c;
  --color-primary-light:  #6388ad;
  --color-primary-dark:   #3a5a7c;
  --color-primary-bg:     #eef2f7;

  --color-secondary:      #ce0f0a;
  --color-secondary-dark: #a50c08;

  /* Neutral */
  --color-bg:             #fafafa;
  --color-surface:        #ffffff;
  --color-surface-alt:    #f5f5f5;
  --color-border:         #e0e0e0;
  --color-border-strong:  #bdbdbd;

  --color-text:           #1a1a1a;
  --color-text-secondary: #4a4a4a;
  --color-text-muted:     #595959;   /* a11y (WCAG 1.4.3): 6,7:1 auf #fafafa (war #6a6a6a = 5,2:1) */
  --color-text-inverse:   #ffffff;

  /* Feedback */
  --color-success:  #16a34a;
  --color-warning:  #d97706;
  --color-error:    #dc2626;
  --color-info:     #2563eb;

  /* Typografie */
  --font-headline: 'Oswald', 'Merriweather', Georgia, serif;
  --font-serif:    'Merriweather', Georgia, 'Times New Roman', serif;
  --font-body:     'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:     'DM Mono', 'Fira Code', 'Consolas', monospace;

  --text-xs: 0.875rem; --text-sm: 1rem; --text-base: 1.125rem; --text-lg: 1.25rem;
  --text-xl: 1.5rem; --text-2xl: 1.875rem; --text-3xl: 2.25rem; --text-4xl: 2.75rem; --text-5xl: 3.5rem;

  --font-normal: 400; --font-medium: 500; --font-bold: 700; --font-black: 800;
  --leading-tight: 1.25; --leading-normal: 1.6; --leading-loose: 1.8;

  /* Spacing (8px-Raster) */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem;

  /* Radii */
  --radius-sm: 0.375rem; --radius-md: 0.5rem; --radius-lg: 0.75rem; --radius-xl: 1rem; --radius-full: 9999px;

  /* Schatten */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.10);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);

  /* Transitions */
  --transition-fast: 150ms ease; --transition-base: 250ms ease; --transition-slow: 400ms ease;
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Fokus-Ring (WCAG 2.4.7 / 2.4.11): konsistenter, deutlich sichtbarer Ring.
     --focus-ring = farbiger Kern; --focus-halo = heller Außenkontrast, damit der
     Ring auf JEDEM Hintergrund (auch farbigen Zellrändern) ≥3:1 absetzt. */
  --focus-ring:  #1d4ed8;          /* kräftiges Blau, 6,3:1 auf #fafafa */
  --focus-halo:  #ffffff;
  --focus-width: 3px;
  --focus-offset: 2px;
}

/* ── Hochkontrast-Thema (Kontrast-Knopf) ── */
:root[data-theme="kontrast"] {
  --color-bg:             #000000;
  --color-surface:        #0c0c0c;
  --color-surface-alt:    #161616;
  --color-border:         #ffffff;
  --color-border-strong:  #ffffff;
  --color-text:           #ffffff;
  --color-text-secondary: #f0f0f0;
  --color-text-muted:     #d4d4d4;
  --color-text-inverse:   #000000;
  --color-primary:        #ffd400;
  --color-primary-light:  #ffe24d;
  --color-primary-dark:   #e6be00;
  --color-primary-bg:     #1a1a00;
  --shadow-md: 0 0 0 2px #ffffff;
  --shadow-lg: 0 0 0 2px #ffffff;
  --shadow-xl: 0 0 0 3px #ffffff;
  /* a11y: Fokus-Ring im Hochkontrast-Thema hell auf schwarz (≈14:1) */
  --focus-ring:  #ffd400;
  --focus-halo:  #000000;
  --focus-width: 4px;
}

/* ── Reduzierte Bewegung ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
