/* ============================================================
   Italiano Full Immersion — Theme tokens
   Light & Dark, italian-flavoured palette
   ============================================================ */

:root {
  /* Accenti (usati in entrambi i temi) */
  --it-red:        #c8102e;
  --it-red-deep:   #9b0a23;
  --it-green:      #008c45;
  --it-green-deep: #006633;
  --it-gold:       #d4a017;

  /* Tipografia */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Playfair Display', 'Georgia', serif;

  /* Layout */
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow:    0 6px 24px -8px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg: 0 24px 60px -20px rgba(0,0,0,.25), 0 8px 24px -10px rgba(0,0,0,.15);

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

/* LIGHT (default) */
:root,
[data-theme="light"] {
  --bg:           #fbf7f0;
  --bg-elev:      #ffffff;
  --bg-soft:      #f1ead9;
  --bg-strong:    #e9dfc6;
  --border:       #e6dcc4;
  --border-soft:  #efe7d3;
  --text:         #1a1614;
  --text-soft:    #4a4239;
  --text-muted:   #8a7f6f;
  --accent:       var(--it-red);
  --accent-soft:  #f9e1e6;
  --accent-text:  #ffffff;
  --success:      var(--it-green);
  --warn:         #c47b00;
  --warn-soft:    #fcefd0;
  --danger:       var(--it-red);
  --info:         #1d6db3;
  --info-soft:    #e0eef9;
  --topbar-bg:    rgba(251, 247, 240, 0.85);
  --card-glow:    0 1px 0 rgba(255,255,255,.7) inset, 0 0 0 1px rgba(0,0,0,.02);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg:           #0c0d10;
  --bg-elev:      #14161b;
  --bg-soft:      #1a1d24;
  --bg-strong:    #232733;
  --border:       #2a2e3a;
  --border-soft:  #1f222b;
  --text:         #f3efe6;
  --text-soft:    #c5bfb1;
  --text-muted:   #8b857a;
  --accent:       #e63a52;
  --accent-soft:  #2a121a;
  --accent-text:  #ffffff;
  --success:      #2ec27e;
  --warn:         #e0a334;
  --warn-soft:    #2c2010;
  --danger:       #e63a52;
  --info:         #4aa3ff;
  --info-soft:    #0d1a2a;
  --topbar-bg:    rgba(12, 13, 16, 0.85);
  --card-glow:    0 1px 0 rgba(255,255,255,.04) inset, 0 0 0 1px rgba(255,255,255,.04);
  color-scheme: dark;
}

/* Smooth theme transition */
html { background: var(--bg); }
body, .topbar, .card, .pill, .btn, input, select, textarea {
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
