/*
  Direzione visiva v2: moderna, elegante, fluida.
  Serif di carattere per i titoli (Fraunces — curve morbide, non rigida),
  sans pulito per il corpo (Inter), superfici arrotondate con profondità
  leggera, sfondo a gradiente ambientale, micro-animazioni ovunque.
*/
/* I @font-face di Fraunces e Inter stanno in assets/fonts.css, collegato
   da index.php prima di questo foglio: i caratteri sono serviti da noi, non
   da Google. Vedi la nota in testa a quel file. */

:root {
  --indigo-deep: #1b3a63;
  --indigo: #2f5a8c;
  --indigo-soft: #7da0c4;
  --lavender: #e8f0f8;
  --coral: #b2532e;
  --coral-soft: #f3e1d6;
  --surface: #fbfaf9;
  --surface-card: #ffffff;
  --ink: #211e30;
  --steel: #6f6b80;
  --line: #dde5ee;
  /* Fondo delle righe alternate (scheda persona): appena percettibile, serve
     a guidare l'occhio lungo la riga, non a disegnare una tabella. */
  --zebra-row: #e9eff7;
  --ok-green: #3d6b4f;
  --warn-bg: #fdeee0;
  --warn-ink: #a15b1d;
  --danger: #c23b3b;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "Inter", "Segoe UI", sans-serif; /* niente più monospazio: coerenza col tono fluido */

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 9px;
  --ease: cubic-bezier(.22,1,.36,1);
  --shadow-soft: 0 2px 10px rgba(27,58,99,0.07);
  --shadow-lift: 0 18px 40px rgba(27,58,99,0.16);
}

:root[data-theme="dark"] {
  --surface: #14181f;
  --surface-card: #1c222c;
  --ink: #e9edf4;
  --steel: #9aa7b8;
  --line: #2b3644;
  --zebra-row: #232b37;
  --lavender: #1a2b3d;
  --coral-soft: #3a271e;
  --warn-bg: #3a2a17;
  --warn-ink: #e8a768;
  --shadow-soft: 0 2px 10px rgba(0,0,0,0.35);
  --shadow-lift: 0 18px 40px rgba(0,0,0,0.5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #14181f;
    --surface-card: #1c222c;
    --ink: #e9edf4;
    --steel: #9aa7b8;
    --line: #2b3644;
    --zebra-row: #232b37;
    --lavender: #1a2b3d;
    --coral-soft: #3a271e;
    --warn-bg: #3a2a17;
    --warn-ink: #e8a768;
    --shadow-soft: 0 2px 10px rgba(0,0,0,0.35);
    --shadow-lift: 0 18px 40px rgba(0,0,0,0.5);
  }
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body.bp-body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--surface);
  position: relative;
}

/* Sfondo ambientale: due bagliori sfumati che respirano lentamente */
.bp-gridlayer {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: var(--surface);
}
.bp-gridlayer::before, .bp-gridlayer::after {
  content: "";
  position: absolute;
  width: 60vmax; height: 60vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  animation: bp-drift 22s ease-in-out infinite alternate;
}
.bp-gridlayer::before {
  background: radial-gradient(circle, var(--indigo-soft), transparent 70%);
  top: -20vmax; left: -15vmax;
}
.bp-gridlayer::after {
  background: radial-gradient(circle, var(--coral-soft), transparent 70%);
  bottom: -25vmax; right: -15vmax;
  animation-delay: -9s;
}
@keyframes bp-drift {
  from { transform: translate(0,0) scale(1); }
  to { transform: translate(3vmax,4vmax) scale(1.08); }
}

.bp-banner {
  background: color-mix(in srgb, var(--surface-card) 88%, transparent);
  backdrop-filter: blur(14px);
  color: var(--ink);
  padding: 12px 26px;
  font-size: 0.86rem;
  display: flex;
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}
.bp-banner a {
  color: var(--indigo);
  text-decoration: none;
  font-weight: 600;
  transition: opacity .2s var(--ease);
}
.bp-banner a:hover { opacity: 0.7; }
.bp-banner .bp-tag { margin-left: auto; color: var(--steel); }

/* Superficie elevata standard: card morbida con profondità leggera */
.bp-plate {
  position: relative;
  background: var(--surface-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition: box-shadow .35s var(--ease), transform .35s var(--ease), border-color .35s var(--ease);
}
.bp-plate:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-4px);
  border-color: var(--indigo-soft);
}
/* i vecchi angoli di registro non servono più nella direzione fluida */
.bp-plate::before, .bp-plate::after { content: none; }

.bp-eyebrow {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--coral);
}

.bp-h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
  background: linear-gradient(100deg, var(--indigo-deep), var(--indigo) 60%, var(--coral));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.02;
}

.bp-tag-count { font-size: 0.78rem; color: var(--steel); }

/* Utility di ingresso: comparsa morbida con leggero movimento verso l'alto */
.bp-rise {
  animation: bp-rise .7s var(--ease) both;
}
@keyframes bp-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.bp-stagger > * { animation: bp-rise .6s var(--ease) both; }
.bp-stagger > *:nth-child(1) { animation-delay: .03s; }
.bp-stagger > *:nth-child(2) { animation-delay: .09s; }
.bp-stagger > *:nth-child(3) { animation-delay: .15s; }
.bp-stagger > *:nth-child(4) { animation-delay: .21s; }
.bp-stagger > *:nth-child(5) { animation-delay: .27s; }
.bp-stagger > *:nth-child(6) { animation-delay: .33s; }
.bp-stagger > *:nth-child(n+7) { animation-delay: .38s; }
