/* tokens.css — design token: font, colori light/dark, raggi, spaziature */

/* ---------- Font self-hosted (variabili, subset latin) ---------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin-wght.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-latin-wght.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans-latin-wght-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  /* ---------- Colori: light (default) ---------- */
  --bg: #f4f6f7;
  --surf: #ffffff;
  --fg: #2b2f30;
  --mut: #6b7375;
  --line: #dde2e4;
  --pill: #eef1f2;
  --acc: #008cba;
  --acc2: #007399;
  --logo-g: #4c5151;
  --logo-a: #37c3e0;
  --ft: #4b5051;
  --ft-fg: #d6dbdd;
  --sh: 0 4px 16px #0000000f;
  --series: #4f6b8a;
  --header-bg: color-mix(in srgb, var(--surf) 88%, transparent);
  --photo-overlay: linear-gradient(to top, #000000b3 0%, #00000059 35%, #0000 65%);

  /* ---------- Tipografia ---------- */
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-mono: Consolas, ui-monospace, monospace;

  --fs-sm: .875rem;
  --fs-base: clamp(1rem, .95rem + .2vw, 1.0625rem);
  --fs-lg: clamp(1.125rem, 1.05rem + .3vw, 1.25rem);
  --fs-h4: clamp(1.0625rem, 1rem + .3vw, 1.2rem);
  --fs-h3: clamp(1.2rem, 1.1rem + .5vw, 1.4rem);
  --fs-h2: clamp(1.4rem, 1.2rem + 1vw, 1.8rem);
  --fs-h1: clamp(2rem, 1.5rem + 2vw, 3rem);
  --fs-hero: clamp(2.25rem, 1.5rem + 3vw, 3.75rem);

  /* ---------- Forme e spaziature ---------- */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-pill: 999px;

  --sp-1: .25rem;
  --sp-2: .5rem;
  --sp-3: .75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;

  --gutter: clamp(1rem, 4vw, 3rem);
  --content: 1280px;
  --breakout: 1520px;
  --measure: 70ch;
  --header-h: 4.25rem;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Colori: dark ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c1f20;
    --surf: #26292b;
    --fg: #e9eef0;
    --mut: #8f9799;
    --line: #34393b;
    --pill: #313537;
    --acc2: #33a9d1;
    --logo-g: #e9eef0;
    --ft: #161819;
    --ft-fg: #8f9799;
    --sh: none;
    --series: #a9bcd3;
  }
}
:root[data-theme="dark"] {
    --bg: #1c1f20;
    --surf: #26292b;
    --fg: #e9eef0;
    --mut: #8f9799;
    --line: #34393b;
    --pill: #313537;
    --acc2: #33a9d1;
    --logo-g: #e9eef0;
    --ft: #161819;
    --ft-fg: #8f9799;
    --sh: none;
    --series: #a9bcd3;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
