/* ecotone HVA-Kalkulator · © 2026 Benjamin Bernhardt, ecotone. Farben, Maße, Schriften. */
/* Schriften lokal eingebunden (IBM Plex Sans, SIL Open Font License 1.1) */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-sans-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); }

:root {
  --font-body: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;

  --text-xs: clamp(0.75rem, 0.72rem + 0.12vw, 0.8125rem);
  --text-sm: clamp(0.8125rem, 0.79rem + 0.12vw, 0.875rem);
  --text-base: clamp(0.9375rem, 0.91rem + 0.12vw, 1rem);
  --text-lg: clamp(1.0625rem, 1.02rem + 0.2vw, 1.1875rem);
  --text-xl: clamp(1.25rem, 1.18rem + 0.35vw, 1.5rem);

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

  --radius-sm: 0.25rem; --radius-md: 0.375rem; --radius-lg: 0.625rem; --radius-full: 999px;
  --transition: 160ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Papier, Moos, Bernstein */
  --color-bg: #f4f2ea;
  --color-surface: #fbfaf5;
  --color-surface-2: #ffffff;
  --color-surface-offset: #ebe8dc;
  --color-divider: #e1ddce;
  --color-border: #cdc8b6;
  --color-text: #22251d;
  --color-text-muted: #5b5f50;
  --color-text-faint: #7d8071;
  --color-text-inverse: #f8f7f1;
  --color-primary: #3c6a35;
  --color-primary-hover: #315a2b;
  --color-primary-active: #264821;
  --color-primary-highlight: #dfe8d6;
  --color-warning: #8f5608;
  --color-warning-highlight: #f4e6c8;
  --color-error: #a2342a;
  --color-error-highlight: #f3dcd6;
  --color-success: #3c6a35;
  --color-info: #2f5d74;
  --color-info-highlight: #dbe7ec;
  --shadow-sm: 0 1px 2px oklch(0.25 0.02 110 / 0.07);
  --shadow-md: 0 4px 14px oklch(0.25 0.02 110 / 0.1);
  --shadow-lg: 0 14px 40px oklch(0.25 0.02 110 / 0.18);
  color-scheme: light;
}

[data-theme='dark'] {
  --color-bg: #151712;
  --color-surface: #1b1e17;
  --color-surface-2: #21241c;
  --color-surface-offset: #262a20;
  --color-divider: #2a2e23;
  --color-border: #3b4031;
  --color-text: #d9dacf;
  --color-text-muted: #a3a694;
  --color-text-faint: #8a8d7c;
  --color-text-inverse: #151712;
  --color-primary: #93c083;
  --color-primary-hover: #a6d096;
  --color-primary-active: #b7dca8;
  --color-primary-highlight: #2a3a25;
  --color-warning: #e0aa55;
  --color-warning-highlight: #3d3220;
  --color-error: #e58a7e;
  --color-error-highlight: #432622;
  --color-success: #93c083;
  --color-info: #8fbdd3;
  --color-info-highlight: #22333b;
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 14px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 14px 40px oklch(0 0 0 / 0.5);
  color-scheme: dark;
}

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

html {
  -moz-text-size-adjust: none; -webkit-text-size-adjust: none; text-size-adjust: none;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  line-height: 1.5;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
}

img, svg { display: block; max-width: 100%; }
ul[role='list'], ol[role='list'] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.2; font-weight: 600; }
p, li { text-wrap: pretty; }
button { cursor: pointer; background: none; border: none; }
a { color: var(--color-primary); text-underline-offset: 2px; }
a:hover { color: var(--color-primary-hover); }
table { border-collapse: collapse; }

::selection { background: color-mix(in srgb, var(--color-primary) 25%, transparent); }

:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: var(--radius-sm); }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
