/* =========================================================
   TOKENS — Elektroservice Ernst
   All design tokens as CSS custom properties
   ========================================================= */

:root {

  /* —— Color Palette ——————————————————————————————————————
     Inspired by: copper wire, electrical precision,
     warm Swabian craftsmanship.
  */

  /* Backgrounds */
  --color-bg:            #faf8f4;   /* warm parchment — primary bg */
  --color-surface:       #f2ece3;   /* slightly toasted — cards, panels */
  --color-surface-dark:  #ede5da;   /* deeper surface */
  --color-ink:           #161310;   /* near-black with warmth — primary text */
  --color-ink-secondary: #5a5049;   /* warm mid-gray — secondary text */
  --color-ink-muted:     #9a8c80;   /* muted/caption text */
  --color-rule:          #e2d8ce;   /* hairline dividers */
  --color-rule-dark:     #c8b6a4;   /* stronger dividers */

  /* Accent — Elektroservice Ernst Lime Green */
  --color-accent:        #a8f848;   /* brand lime green */
  --color-accent-dark:   #78c020;   /* darker green — hover on light */
  --color-accent-light:  #bef870;   /* lighter green — on dark backgrounds */
  --color-accent-pale:   #edfcd6;   /* very pale green — bg tints */

  /* Semantic */
  --color-focus:         var(--color-accent);
  --color-success:       #3d7a5a;
  --color-error:         #c0392b;

  /* Dark layer */
  --color-dark:          #0e0c09;
  --color-dark-surface:  #1a1612;
  --color-dark-rule:     #2e2820;
  --color-light-on-dark: #f5f0e8;

  /* —— Typography ———————————————————————————————————————— */

  /* Font Families */
  --font-display: 'Cormorant Garamond', 'Georgia', 'Times New Roman', serif;
  --font-ui:      'Syne', 'Helvetica Neue', system-ui, sans-serif;
  --font-body:    'DM Sans', 'Helvetica Neue', system-ui, sans-serif;

  /* Font Sizes — fluid with clamp */
  --fs-xs:    clamp(0.70rem,  0.65rem + 0.25vw, 0.75rem);
  --fs-sm:    clamp(0.813rem, 0.77rem + 0.22vw, 0.875rem);
  --fs-base:  clamp(0.938rem, 0.88rem + 0.29vw, 1rem);
  --fs-md:    clamp(1.063rem, 0.97rem + 0.47vw, 1.125rem);
  --fs-lg:    clamp(1.188rem, 1.05rem + 0.69vw, 1.375rem);
  --fs-xl:    clamp(1.375rem, 1.15rem + 1.13vw, 1.75rem);
  --fs-2xl:   clamp(1.75rem,  1.35rem + 2.00vw, 2.5rem);
  --fs-3xl:   clamp(2.25rem,  1.55rem + 3.50vw, 3.75rem);
  --fs-4xl:   clamp(3.00rem,  1.80rem + 6.00vw, 5.5rem);
  --fs-hero:  clamp(3.5rem,   1.50rem + 10.0vw, 8.5rem);

  /* Line Heights */
  --lh-tight:   1.15;
  --lh-snug:    1.30;
  --lh-base:    1.55;
  --lh-relaxed: 1.70;
  --lh-loose:   1.90;

  /* Letter Spacing */
  --ls-tight:   -0.02em;
  --ls-normal:  0em;
  --ls-wide:    0.04em;
  --ls-wider:   0.08em;
  --ls-caps:    0.12em;

  /* Font Weights */
  --fw-light:    300;
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;

  /* —— Spacing (8px grid) ——————————————————————————————— */

  --space-1:   0.25rem;   /*  4px */
  --space-2:   0.5rem;    /*  8px */
  --space-3:   0.75rem;   /* 12px */
  --space-4:   1rem;      /* 16px */
  --space-5:   1.25rem;   /* 20px */
  --space-6:   1.5rem;    /* 24px */
  --space-8:   2rem;      /* 32px */
  --space-10:  2.5rem;    /* 40px */
  --space-12:  3rem;      /* 48px */
  --space-16:  4rem;      /* 64px */
  --space-20:  5rem;      /* 80px */
  --space-24:  6rem;      /* 96px */
  --space-32:  8rem;      /* 128px */
  --space-40: 10rem;      /* 160px */

  /* Fluid section padding */
  --section-gap:    clamp(var(--space-16), 10vw, var(--space-32));
  --section-gap-sm: clamp(var(--space-10), 6vw,  var(--space-20));

  /* —— Layout ———————————————————————————————————————————— */

  --container-max:  1320px;
  --container-wide: 1080px;
  --container-text:  720px;
  --gutter:         clamp(1rem, 4vw, 2.5rem);
  --col-gap:        clamp(1rem, 2vw, 1.5rem);

  /* —— Borders & Radii ——————————————————————————————————— */

  --radius-sm:  3px;
  --radius-md:  6px;
  --radius-lg:  12px;
  --radius-xl:  20px;
  --radius-full: 9999px;
  --border-width: 1px;
  --border: var(--border-width) solid var(--color-rule);

  /* —— Shadows ——————————————————————————————————————————— */

  --shadow-xs:  0 1px 2px rgba(22, 19, 16, 0.06);
  --shadow-sm:  0 2px 8px rgba(22, 19, 16, 0.08);
  --shadow-md:  0 8px 24px rgba(22, 19, 16, 0.10);
  --shadow-lg:  0 20px 48px rgba(22, 19, 16, 0.12);
  --shadow-xl:  0 40px 80px rgba(22, 19, 16, 0.15);

  /* —— Motion / Animation ——————————————————————————————— */

  --ease-out-expo:    cubic-bezier(0.16, 1, 0.30, 1);
  --ease-out-quart:   cubic-bezier(0.25, 1, 0.50, 1);
  --ease-in-out-sine: cubic-bezier(0.37, 0, 0.63, 1);
  --ease-spring:      cubic-bezier(0.34, 1.56, 0.64, 1);

  --duration-fast:   150ms;
  --duration-base:   250ms;
  --duration-slow:   400ms;
  --duration-xslow:  700ms;

  /* —— Z-Layers ——————————————————————————————————————————— */

  --z-base:    0;
  --z-raised:  10;
  --z-overlay: 100;
  --z-modal:   200;
  --z-header:  500;
  --z-top:     1000;

  /* —— Header ————————————————————————————————————————————— */
  --header-height: 72px;
  --header-height-scrolled: 60px;
}
