/* ==========================================================================
   tokens.css — "Carta" — L'Acciughina (design v6.x · "Carta Viva" · palette Mare & Lino)
   Design tokens. Vanilla, no build. Mobile-first.
   WCAG 2.1 AA: text contrast >= 4.5:1, UI contrast >= 3:1.

   Palette (design "Mare & Lino" — costiero, di terra):
     cream       #EFE9DC   page bg; carta (light surface)
     seppia      #1E2A2E   ink on light; dark surface (footer, hero text)
     ruggine     #1C5A6B   accent primary petrolio (on cream OK)
     oro-spento  #C79A6A   accent highlight conchiglia (on cream NOT text; decorative)
     paper       #E7DFCD   support surface (cards, menu chapters)
     muted       #585449   secondary text on cream/paper; not on seppia

   Derived:
     muted-on-light: #585449  secondary text on cream/paper; >= 4.5:1
     muted-on-dark:  #C9C4BC  secondary text on seppia; >= 4.5:1
     line:           #7A7259  hairline on cream/paper; >= 3:1 UI
     line-light:     #A9A28E  hairline on seppia; >= 3:1 UI
     night-soft:     #26313A  raised surface on seppia (footer legacy)
     wine-soft:      #EAF1F3  raised surface on ruggine (legacy compat)

   Surfaces:
     dark:    var(--seppia)     light: var(--cream)   paper: var(--paper)   accent: var(--ruggine)
   ========================================================================== */

:root {
  /* ---- palette --------------------------------------------------------- */
  --cream: #13242B;
  --seppia: #EFE9DC;
  --ruggine: #C79A6A;
  --oro-spento: #E0BB8E;
  --paper: #1C2E37;
  --muted: #C7CFD2;

  /* ---- derived (light design "Carta Viva") ------------------------------ */
  --muted-on-dark: #EFE9DC;
  --line: #647A83;
  --line-light: #6B7D86;
  --night-soft: #1C2E37;

  /* surface aliases */

  /* ---- motion ---------------------------------------------------------- */
  --ease: cubic-bezier(.22,.7,.2,1);
  --dur-fast: 140ms;
  --dur: 240ms;

  /* ---- typography (max 2 self-hosted families; no CDN) ----------------- */
  --font-fraunces: "Fraunces", "Fraunces Fallback", Georgia, "Times New Roman", Times, serif;
  --font-inter: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* fluid type scale (clamp); body >= 16px — slightly smaller scale */
  --text-xs: clamp(0.72rem, 0.7rem + 0.1vw, 0.8rem);
  --text-sm: clamp(0.81rem, 0.79rem + 0.1vw, 0.88rem);
  --text-base: clamp(0.94rem, 0.91rem + 0.15vw, 1rem);
  --text-md: clamp(1.05rem, 1rem + 0.3vw, 1.16rem);
  --text-lg: clamp(1.2rem, 1.1rem + 0.6vw, 1.45rem);
  --text-xl: clamp(1.45rem, 1.25rem + 1.2vw, 2rem);
  --text-2xl: clamp(1.8rem, 1.4rem + 2vw, 2.8rem);
  --text-hero: clamp(2.2rem, 1.3rem + 5vw, 4.5rem);
  --text-dish: clamp(1.15rem, 1.05rem + 0.5vw, 1.35rem); /* menu dish-name scale */

  /* reading measure (line-length < 80ch) */
  --measure: 68ch;

  /* ---- spacing / layout ------------------------------------------------ */
  --gutter: clamp(1rem, 4vw, 2rem);
  --max: 1200px;
  --max-narrow: 760px;
  --header-h: 4rem;
  --header-h-scrolled: 3.25rem;
  --header-h-mobile: 3.5rem;

  /* spacing tokens for buttons/content rhythm */
  --space-inline: clamp(0.5rem, 1.5vw, 1rem);
  --space-block: clamp(1rem, 2.5vw, 1.5rem);
  --space-block-lg: clamp(1.5rem, 3.5vw, 2.5rem);

  /* breakpoints documented (CSS vars cannot be used in @media) */
  --bp-sm: 620px;
  --bp-md: 860px;
  --bp-lg: 1080px;

  /* safe area */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}