/* battisti davide - HSE&Quality Consultant
   Foglio di stile del sito battistidavide.it
   Impostato su BD-CD v1.1: Poppins, antracite #231F20, arancio #F58232.
   Nessuna risorsa esterna: font ospitati in locale, zero cookie, zero tracciamenti. */

/* ---------- Font (ospitati sul sito, non su Google Fonts) ---------- */
@font-face { font-family: Poppins; font-weight: 300; font-style: normal; font-display: swap;
             src: url(fonts/poppins-300.woff2) format('woff2'); }
@font-face { font-family: Poppins; font-weight: 400; font-style: normal; font-display: swap;
             src: url(fonts/poppins-400.woff2) format('woff2'); }
@font-face { font-family: Poppins; font-weight: 500; font-style: normal; font-display: swap;
             src: url(fonts/poppins-500.woff2) format('woff2'); }
@font-face { font-family: Poppins; font-weight: 600; font-style: normal; font-display: swap;
             src: url(fonts/poppins-600.woff2) format('woff2'); }

/* ---------- Variabili ---------- */
:root {
  --ink:      #231F20;   /* antracite, corpo del testo */
  --ink-soft: #6E6A6B;   /* grigio, testo secondario */
  --accent:   #F58232;   /* arancio, accento */
  --accent-d: #B8551A;   /* arancio scuro, per testo piccolo e link */
  --tint:     #FDF1E8;   /* fondo tenue */
  --grey:     #F5F5F3;   /* fondo neutro delle sezioni alternate */
  --line:     #E3DFDC;
  --nav-h:    48px;
  --wrap:     980px;
  font-size: 100%;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: Poppins, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--accent-d); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent-d); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 22px; }
.narrow { max-width: 720px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------- Tipografia ---------- */
h1, h2, h3 { font-weight: 600; letter-spacing: -0.022em; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(2.4rem, 6.4vw, 4.1rem); }
h2 { font-size: clamp(1.85rem, 4.2vw, 2.75rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); letter-spacing: -0.01em; line-height: 1.2; }
p  { margin: 0 0 1.1em; }
.lead { font-size: clamp(1.12rem, 2.1vw, 1.42rem); color: var(--ink-soft); line-height: 1.42; font-weight: 300; }
.eyebrow {
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--accent-d); margin: 0 0 14px;
}
.small { font-size: 0.82rem; line-height: 1.5; color: var(--ink-soft); }
strong, b { font-weight: 500; color: var(--ink); }

/* ---------- Barra di navigazione ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: rgba(255,255,255,0.82);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 26px; height: 100%; }
.nav__brand { display: flex; align-items: center; margin-right: auto; }
.nav__brand img { height: 17px; width: auto; display: block; }
.nav a { color: var(--ink); font-size: 0.79rem; font-weight: 400; letter-spacing: 0.01em; }
.nav a:hover { color: var(--accent-d); text-decoration: none; }
.nav__links { display: flex; gap: 26px; align-items: center; }

/* ---------- Bottoni ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; justify-content: center; margin-top: 30px; }
.btn {
  display: inline-block; padding: 11px 24px; border-radius: 980px;
  background: var(--accent); color: var(--ink); font-weight: 500; font-size: 0.95rem;
  transition: filter .2s ease;
}
.btn:hover { filter: brightness(0.94); text-decoration: none; }
.btn--ghost { background: transparent; color: var(--accent-d); padding: 11px 4px; }
.btn--ghost:hover { text-decoration: underline; filter: none; }

/* ---------- Sezioni ---------- */
section { padding: clamp(64px, 9vw, 116px) 0; }
.sec--tint { background: var(--tint); }
.sec--grey { background: var(--grey); }
.sec--center { text-align: center; }
.sec__head { max-width: 760px; margin-inline: auto; text-align: center; margin-bottom: clamp(38px, 5vw, 62px); }
.sec__head p { margin-bottom: 0; }
.sec__head h2 + .lead { margin-top: 16px; }

/* ---------- Hero ---------- */
.hero { padding: clamp(78px, 12vw, 148px) 0 clamp(58px, 8vw, 104px); text-align: center; }
.hero h1 { margin-bottom: 20px; }
.hero .lead { max-width: 640px; margin-inline: auto; }
.hero__mark { width: min(300px, 62vw); margin: 0 auto 34px; display: block; }

/* ---------- Griglie ---------- */
.grid { display: grid; gap: 12px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: clamp(26px, 3.4vw, 40px);
}
.sec--tint .card, .sec--grey .card { border-color: transparent; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-soft); margin-bottom: 0; font-size: 0.97rem; }
.card__num {
  display: block; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent-d); margin-bottom: 12px;
}
.card--tint { background: var(--tint); }
a.card { color: inherit; display: block; transition: transform .22s ease; }
a.card:hover { text-decoration: none; transform: translateY(-2px); }
a.card .more { display: inline-block; margin-top: 14px; color: var(--accent-d); font-size: 0.92rem; font-weight: 400; }

/* ---------- Riquadri delle tre aree ---------- */
a.card--area { display: flex; flex-direction: column; background: #fff; }
.card--area h3 { margin-bottom: 10px; }
.card--area .more { margin-top: auto; padding-top: 20px; }

/* etichette delle norme dentro i riquadri d'area */
ul.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 18px 0 0; }
ul.tags li {
  font-size: 0.75rem; font-weight: 500; color: var(--ink);
  background: var(--tint); border-radius: 980px; padding: 4px 11px; line-height: 1.5;
}

/* ---------- Numeri / fatti ---------- */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 44px; text-align: center; }
.fact { padding: 30px 18px; background: #fff; border-radius: 20px; }
.sec--tint .fact { background: rgba(255,255,255,0.7); }
.fact strong { display: block; font-size: clamp(1.5rem, 3.2vw, 2.1rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.fact span { display: block; margin-top: 8px; font-size: 0.84rem; color: var(--ink-soft); }

/* ---------- Pagina servizi: intestazioni d'area e blocchi ---------- */
.area { text-align: center; padding: clamp(56px, 7.5vw, 96px) 0; }
.area h2 { margin-bottom: 14px; }
.area .lead { max-width: 660px; margin-inline: auto; margin-bottom: 0; }
.area .eyebrow { margin-bottom: 12px; }

.svc { padding: clamp(50px, 6.5vw, 78px) 0; }
.svc + .svc { padding-top: 0; }
.svc + .svc > .wrap { border-top: 1px solid var(--line); padding-top: clamp(50px, 6.5vw, 78px); }
.svc__t { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 16px; }
.svc .lead { margin-bottom: 24px; }

/* ---------- Elenchi ---------- */
ul.plain { list-style: none; padding: 0; margin: 0 0 1.1em; }
ul.plain li { padding-left: 22px; position: relative; margin-bottom: 9px; }
ul.plain li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}

/* ---------- Contatti ---------- */
.contact-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 40px; text-align: center; }
.contact-list a { font-size: clamp(1rem, 1.9vw, 1.18rem); font-weight: 500; color: var(--ink); letter-spacing: -0.01em; }
.contact-list a:hover { color: var(--accent-d); }
.contact-list span { display: block; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }

/* ---------- Pagine di testo ---------- */
.page { padding-top: clamp(56px, 8vw, 92px); }
.page h2 { font-size: clamp(1.25rem, 2.4vw, 1.55rem); margin: 44px 0 14px; }
.page h2:first-of-type { margin-top: 34px; }
.page h3 { font-size: 1.05rem; margin: 26px 0 8px; }
.page table { width: 100%; border-collapse: collapse; margin: 18px 0 26px; font-size: 0.93rem; }
.page th, .page td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.page th { background: var(--tint); font-weight: 500; }
.tbl-scroll { overflow-x: auto; }

/* ---------- Piede ---------- */
.foot { background: var(--grey); padding: 52px 0 40px; font-size: 0.8rem; color: var(--ink-soft); }
.foot__mark { height: 30px; width: auto; display: block; margin-bottom: 22px; opacity: 0.9; }
.foot__cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 30px; }
.foot h4 { font-size: 0.8rem; font-weight: 500; color: var(--ink); margin: 0 0 12px; letter-spacing: 0; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 8px; }
.foot a { color: var(--ink-soft); }
.foot a:hover { color: var(--accent-d); }
.foot__bar { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); line-height: 1.7; }

/* ---------- Comparsa al primo scorrimento ----------
   Il contenuto e' visibile per default: si nasconde solo se il JavaScript
   e' attivo (classe .js sull'elemento radice), cosi' un browser senza
   script mostra comunque tutta la pagina. */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Adattamento ai piccoli schermi ---------- */
@media (max-width: 820px) {
  .grid--3, .facts, .foot__cols { grid-template-columns: 1fr 1fr; }
  .contact-list { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  h1 br, h2 br { display: none; }   /* niente interruzioni forzate sugli schermi stretti */
  .grid--3, .grid--2, .facts, .foot__cols { grid-template-columns: 1fr; }
  .nav__links { gap: 17px; }
  .nav a { font-size: 0.75rem; }
  .btns { flex-direction: column; align-items: stretch; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  a.card:hover { transform: none; }
}

@media print {
  .nav, .btns, .reveal { position: static; opacity: 1; transform: none; }
  body { font-size: 11pt; }
}
