/* Scandinavian calm — design tokens */
:root {
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", var(--font-sans);

  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-2: #f1f5f9;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-accent: #4a7c6f;
  --color-accent-hover: #3d6a5f;
  --color-accent-soft: #e8f0ed;
  --color-focus: #2563eb;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lamp-on: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 4px 12px rgba(15, 23, 42, 0.12);
  --shadow-lamp-off: inset 0 0 0 1px var(--color-border);

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  --touch-min: 44px;
  --clock-size: clamp(2.5rem, 8vw, 5rem);
  --lamp-height: clamp(3rem, 9vw, 5.75rem);
  --transition-calm: 0.35s cubic-bezier(0.4, 0, 0.2, 1);

  --timer-max-width: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #0f172a;
    --color-surface: #1e293b;
    --color-surface-2: #334155;
    --color-text: #f1f5f9;
    --color-text-muted: #94a3b8;
    --color-border: #334155;
    --color-accent: #6b9b8a;
    --color-accent-hover: #7aab99;
    --color-accent-soft: #1e3a32;
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  --color-bg: #0f172a;
  --color-surface: #1e293b;
  --color-surface-2: #334155;
  --color-text: #f1f5f9;
  --color-text-muted: #94a3b8;
  --color-border: #334155;
  --color-accent: #6b9b8a;
  --color-accent-hover: #7aab99;
  --color-accent-soft: #1e3a32;
  color-scheme: dark;
}

/* TV / distance viewing */
:root.tv-mode,
:root[data-tv="true"] {
  --clock-size: clamp(4rem, 12vw, 8rem);
  --lamp-height: clamp(4rem, 10vh, 7rem);
  --touch-min: 56px;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-calm: 0.01ms;
  }
}
