/* ============================================================
   A.G. di Guernieri — stili custom (complemento a Tailwind)
   ============================================================ */

/* ---------- Font self-hosted (privacy: nessuna chiamata a Google Fonts) ---------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('../fonts/spacegrotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('../fonts/spacegrotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --brand-700: #1b3a8c;
  --accent-500: #e1182d;
}

html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.font-display {
  font-family: "Space Grotesk", "Inter", system-ui, sans-serif;
}

/* Header: barra bianca solida (logo a colori sempre leggibile) */
#siteHeader {
  background-color: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e8edf3;
  transition: box-shadow .25s ease;
}
#siteHeader.is-scrolled {
  box-shadow: 0 1px 0 rgba(15, 23, 42, .06), 0 8px 24px -16px rgba(15, 23, 42, .4);
}

/* Link di navigazione attivo */
.nav-link.active {
  color: var(--brand-700);
  font-weight: 600;
}

/* Reveal allo scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* Pattern decorativo dell'hero */
.hero-grid {
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* Foto galleria a bassa risoluzione: rendering più morbido in grande */
.gallery-img {
  image-rendering: auto;
}

/* Filtro attivo — selettore con specificità maggiore per battere le utility Tailwind */
[data-filter].filter-active {
  background-color: var(--brand-700);
  color: #fff;
  border-color: var(--brand-700);
}

/* Lightbox */
#lightbox {
  background: rgba(15, 23, 42, .82);
  backdrop-filter: blur(4px);
}

/* Pagine legali (Privacy / Cookie) */
.legal-prose { color: #334155; line-height: 1.7; font-size: 0.975rem; }
.legal-prose > div > p:first-child { font-size: 1.05rem; color: #475569; }
.legal-prose h2 {
  font-family: "Space Grotesk", "Inter", system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2.25rem;
  margin-bottom: .65rem;
}
.legal-prose h3 {
  font-weight: 600;
  color: #0f172a;
  margin-top: 1.5rem;
  margin-bottom: .4rem;
}
.legal-prose p { margin-bottom: 1rem; }
.legal-prose ul {
  list-style: disc;
  padding-left: 1.4rem;
  margin: 0 0 1rem;
}
.legal-prose ul li { margin-bottom: .5rem; }
.legal-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.25rem;
  font-size: .9rem;
}
.legal-prose th, .legal-prose td {
  border: 1px solid #e2e8f0;
  padding: .6rem .75rem;
  text-align: left;
  vertical-align: top;
}
.legal-prose th { background: #f1f5f9; font-weight: 600; color: #1e293b; }
.legal-prose a { color: var(--brand-700); text-decoration: underline; }
.legal-prose a:hover { color: #152c66; }
