/* ─── Wavy design tokens ───
   Allineati al Design System app v1.0 (docs/Wavy_Design_System.md della repo app).
   Fonte palette: object WavyColors (ui/theme/Color.kt).
   Shared across all pages. Page-specific tokens (--maxw, --sidebar-w,
   --hero-bg-*, --dot-bg-*) stay inline in their respective pages.
*/
:root{
  /* Core brand (DS §3.1 — REGOLA D'ORO: nessun colore fuori da questi token) */
  --navy:       #1C3A6E;  /* Navy — brand primario */
  --navy-deep:  #070B14;  /* NavyDeep — bg dark */
  --navy-soft:  #3C506E;  /* NavySlate — navy chiaro per gradienti/accenti */
  --navy-surface: #0F1827;/* NavySoft — surface dark */
  --coral:      #C25A3F;  /* Coral — accento caldo, ~15% max */
  --coral-soft: #EC7258;  /* CoralSoft */
  --coral-light:#FF8A6F;  /* CoralLight — accento su dark */
  --sea:        #2F8F86;  /* SeaTeal — supporting marittimo */
  --teal-deep:  #1F5562;  /* TealDeep */
  --teal-bright:#4FC4B8;  /* TealBright — accento teal su dark */
  --brass:      #A07E2C;  /* Brass — metallico */
  --brass-light:#C9A961;  /* BrassLight — brass su sfondo scuro */
  --brass-warm: #B5894A;  /* BrassWarm */
  --foam:       #EFE7D2;  /* SeaFoam — background tema chiaro */
  --paper:      #FCF8EE;  /* Paper — background card/pill chiaro */
  --sand:       #DDD0AE;  /* Sand — bordi/divider chiaro */

  /* Semantic tokens via light-dark() — replicano il mapping colorScheme dell'app */
  --ink:              light-dark(#2C2820, #E8ECF3);  /* TextDeep / TextOnDark */
  --bg:               light-dark(#EFE7D2, #070B14);  /* SeaFoam / NavyDeep */
  --bg-elev:          light-dark(#FCF8EE, #0F1827);  /* Paper / NavySoft */
  --bg-soft:          light-dark(#FCF8EE, #0F1827);  /* surface alternata */
  --bg-sand:          light-dark(#E6DBBF, #18253B);  /* Surface3 / Surface3Dark */
  --text:             light-dark(#2C2820, #E8ECF3);  /* TextDeep / TextOnDark */
  --text-dim:         light-dark(#6B614A, #A6B0C3);  /* TextMute / TextMuteDark */
  --text-mute:        light-dark(#6B614A, #A6B0C3);  /* TextMute (AA-safe, TextDim fallisce il contrasto su web) */
  --border:           light-dark(#D4C293, #233047);  /* Outline / OutlineDark */
  --border-soft:      light-dark(#E0D3B2, #1A2538);  /* OutlineSoft / OutlineSoftDark */
  --accent:           light-dark(#2F8F86, #FF8A6F);  /* colorScheme.primary */
  --brass-text:       light-dark(#A07E2C, #C9A961);  /* brassText() helper */
  --topbar-bg:        light-dark(rgba(239,231,210,.92), rgba(7,11,20,.78));
  --topbar-bg-scroll: light-dark(rgba(239,231,210,.96), rgba(7,11,20,.94));

  /* light-dark() non supporta liste di numeri grezzi: override manuale.
     Light: ombre tintate brass scuro (DS §3.4), non nero puro. */
  --shadow-rgb: 142, 106, 42;

  /* Typography (DS §3.2 — Bricolage display; Fraunces è legacy, rimossa) */
  --display: "Bricolage Grotesque", system-ui, -apple-system, sans-serif;
  --deco:    "Cormorant Garamond", Georgia, serif; /* serif decorativo (displayMedium) */
  --ui:      "Inter Tight", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --pad: clamp(20px, 4.2vw, 52px);

  /* Spaziature (DS §3.3 — scala 4px + valori-firma) */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --space-9: 96px; --space-10: 128px;
  --space-micro: 2px; --space-tight: 6px; --space-compact: 10px;
  --space-card: 14px; --space-hero: 20px;

  /* Raggi (DS §3.3 — WavyShapes M3 + WavyShapeCompact) */
  --radius-sm:      8px;   /* small — chip compact */
  --radius-compact: 10px;  /* WavyShapeCompact — valore-firma */
  --radius-md:      12px;  /* medium — card/chip/pill */
  --radius-lg:      14px;  /* large — card firma Wavy */
  --radius-xl:      20px;  /* extraLarge — dialog/sheet */
  --radius-pill:    999px;

  /* Ombre (DS §3.4 — tinte brass in light, nero in dark via --shadow-rgb) */
  --shadow-sm: 0 1px 2px rgba(var(--shadow-rgb), .10), 0 2px 4px rgba(var(--shadow-rgb), .08);
  --shadow-md: 0 4px 8px rgba(var(--shadow-rgb), .12), 0 8px 16px rgba(var(--shadow-rgb), .10);
  --shadow-lg: 0 8px 16px rgba(var(--shadow-rgb), .14), 0 24px 48px rgba(var(--shadow-rgb), .18);

  /* Motion */
  --transition-fast: 150ms ease-out;
  --transition-base: 250ms ease-out;
  --transition-slow: 400ms cubic-bezier(.16, 1, .3, 1);
  --transition-underline: 300ms cubic-bezier(.2,.65,.25,1);

  --ls-eyebrow: .22em;
  --topbar-h: 64px;
  --focus-ring-w: 2px;

  color-scheme: light dark;
}
:root[data-theme="light"]{ color-scheme: light; }
:root[data-theme="dark"]{ color-scheme: dark; --shadow-rgb: 0, 0, 0; --focus-ring-w: 3px; }
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]):not([data-theme="dark"]){ --shadow-rgb: 0, 0, 0; --focus-ring-w: 3px; }
}

/* ─── Print stylesheet ─── */
@media print{
  :root{ color-scheme: light; }
  *{ background:transparent !important; box-shadow:none !important; text-shadow:none !important; }
  body{ color:#000; background:#fff; font-size:11pt; line-height:1.5; }
  header.top, footer, .skip, .float-cta, .cta-mini, .feat-cta, .top nav, .hero-carousel-dots,
  .topbar-search, .theme-toggle, .mobile-drawer, .scroll-spy{
    display:none !important;
  }
  main, .wrap{ max-width:100% !important; padding:0 !important; }
  a{ color:#000; text-decoration:underline; }
  a[href^="http"]::after, a[href^="/"]::after{
    content:" (" attr(href) ")"; font-size:9pt; color:#444;
  }
  a[href^="#"]::after, a[href*="javascript:"]::after{ content:""; }
  h1,h2,h3{ page-break-after:avoid; break-after:avoid; }
  img, picture, .feat, article, blockquote, table{ page-break-inside:avoid; break-inside:avoid; }
  .reveal, .reveal-stagger > *{ opacity:1 !important; transform:none !important; }
}
