/* Token del design system. Nessun colore, raggio o ombra fuori da qui. */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-ext.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --bg: #f5f6f2;
  --surface: #ffffff;
  --surface-2: #eaf0e8;
  --ink: #18352d;
  --ink-2: #4e625a;
  --line: #dbe2d9;
  --line-strong: #a8bdb0;
  --control-line: #73877d;

  --brand: #146c5b;       /* verde petrolio */
  --on-brand: #ffffff;
  --accent: #146c5b;      /* accento approvato */
  --accent-soft: #e5efdc;
  --accent-ink: #21583e;
  --focus: #146c5b;

  --ok-bg: #e0f3e8;     --ok-ink: #0d552a;
  --warn-bg: #fcedcc;   --warn-ink: #5e3d00;
  --danger-bg: #fbe3e0; --danger-ink: #82150f;
  --neutral-bg: #e9ecf1; --neutral-ink: #3b4455;

  --radius-s: 6px;
  --radius-m: 16px;
  --rail-bg: #103c36;
  --rail-ink: #f1f4eb;
  --rail-muted: #bacfc1;
  --rail-line: #356358;
  --rail-hover: #1d4b40;
  --rail-active: #d8f08b;
  --rail-active-ink: #173d2d;
  --shadow-stage: 0 28px 65px rgb(0 0 0 / .2);
  --shadow-float: 0 8px 24px rgb(15 23 41 / 0.14);

  --step--1: 0.8125rem;  /* 13 */
  --step-0: 0.9375rem;   /* 15 */
  --step-1: 1.125rem;
  --step-2: 1.5rem;
  --step-3: clamp(2.25rem, 1.4rem + 3.6vw, 4rem);
  --leading: 1.5;

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.5rem;  --space-6: 2rem;   --space-7: 3rem;    --space-8: 5rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --section: clamp(4rem, 9vw, 8rem);
  --maxw: 76rem;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --dur: 140ms;
}

/* Tema scuro: neutri veri a gradini di luminosità, niente navy saturo. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b1412; --surface: #111f1b; --surface-2: #1a2c25;
    --ink: #edf3e9; --ink-2: #a5b6aa;
    --line: #2a4034; --line-strong: #425e4c;
    --control-line: #7d9382;
    --brand: #c4e897; --on-brand: #183728;
    --accent: #c4e897; --accent-soft: #203d2b; --accent-ink: #d2edb6; --focus: #c4e897;
    --ok-bg: #12301e; --ok-ink: #8fdba8;
    --warn-bg: #36290a; --warn-ink: #f0c971;
    --danger-bg: #3a1613; --danger-ink: #f4a39d;
    --neutral-bg: #23272d; --neutral-ink: #c4c9d2;
    --shadow-float: 0 8px 24px rgb(0 0 0 / 0.5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1412; --surface: #111f1b; --surface-2: #1a2c25;
  --ink: #edf3e9; --ink-2: #a5b6aa;
  --line: #2a4034; --line-strong: #425e4c;
  --control-line: #7d9382;
  --brand: #c4e897; --on-brand: #183728;
  --accent: #c4e897; --accent-soft: #203d2b; --accent-ink: #d2edb6; --focus: #c4e897;
  --ok-bg: #12301e; --ok-ink: #8fdba8;
  --warn-bg: #36290a; --warn-ink: #f0c971;
  --danger-bg: #3a1613; --danger-ink: #f4a39d;
  --neutral-bg: #23272d; --neutral-ink: #c4c9d2;
  --shadow-float: 0 8px 24px rgb(0 0 0 / 0.5);
}
