/* Radaria site — custom styles on top of Tailwind CDN
   Pattern coerente con Cattura.Ai (smooth scroll, focus a11y, reveal-on-scroll). */

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
}

/* Fonts self-hosted preferiti (gestire via assets/fonts/ in step successivo).
   Per ora fall-through su system fonts da Tailwind config. */

/* ───── Animazioni custom ───── */

@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}
.animate-pulse-soft { animation: pulse-soft 2.2s ease-in-out infinite; }

@keyframes radar-sweep {
  0%   { transform: rotate(0deg); opacity: 0.9; }
  100% { transform: rotate(360deg); opacity: 0.9; }
}
.animate-radar { transform-origin: center; animation: radar-sweep 4s linear infinite; }

/* ───── Reveal on scroll ───── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ───── Focus visible a11y ───── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid #00d9c0;
  outline-offset: 2px;
  border-radius: 8px;
}

/* ───── Scrollbar dark theme ───── */
@media (hover: hover) and (pointer: fine) {
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: #0a0a0b; }
  ::-webkit-scrollbar-thumb {
    background: rgba(0, 217, 192, 0.25);
    border-radius: 8px;
    border: 2px solid #0a0a0b;
  }
  ::-webkit-scrollbar-thumb:hover { background: rgba(0, 217, 192, 0.55); }
}

/* ───── Scroll-margin per anchor sotto navbar sticky ───── */
section { scroll-margin-top: 5rem; }

/* ───── Selection ───── */
::selection {
  background: rgba(0, 217, 192, 0.4);
  color: #0a0a0b;
}

/* ───── Details/summary polish ───── */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details > summary::marker { display: none; }

/* ───── Grid pattern background (size override per il tailwind config) ───── */
.bg-grid-light {
  background-size: 32px 32px !important;
}

/* ───── Tabella comparativa: numeri/simboli sempre allineati center via JetBrains Mono ───── */
table td.font-mono,
table th.font-mono { font-variant-numeric: tabular-nums; }

/* ───── Print styles minimal (per chi salva la pagina) ───── */
@media print {
  header, footer, #cookieBanner { display: none; }
  body { background: white; color: black; }
  .bg-grid-light, .bg-radial-brand { display: none; }
}
