/* =========================================================================
   SICURECO Veneto — foglio di stile condiviso
   Stile: moderno e pulito. Palette istituzionale (petrolio) + verde
   prevenzione/ambiente, con un accento ambra usato con parsimonia.
   ========================================================================= */

:root {
  /* Palette derivata dal logo SICURECO: grafite + arancione brand */
  --petrol: #2c3036;       /* grafite strutturale (titoli, sezioni scure) */
  --petrol-2: #1f2329;     /* grafite profondo (footer) */
  --green: #db802f;        /* arancione brand (azioni primarie) */
  --green-d: #b9651d;      /* arancione scuro (hover, link) */
  --amber: #db802f;        /* accento (stesso arancione del marchio) */
  --ink: #23272d;
  --muted: #6b7178;
  --paper: #f5f6f7;
  --card: #ffffff;
  --line: #e6e8eb;

  --font-display: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --maxw: 1140px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(31, 35, 41, .06), 0 12px 30px rgba(31, 35, 41, .08);
  --shadow-sm: 0 1px 2px rgba(31, 35, 41, .05), 0 6px 16px rgba(31, 35, 41, .06);
  --ease: cubic-bezier(.16, .68, .32, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--card);
  line-height: 1.62;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--green-d); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--petrol);
  line-height: 1.12;
  letter-spacing: -.015em;
  margin: 0 0 .5em;
  font-weight: 700;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.18rem; }

p { margin: 0 0 1rem; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--paper { background: var(--paper); }
.section--petrol {
  background: linear-gradient(160deg, var(--petrol) 0%, var(--petrol-2) 100%);
  color: #dbe7ee;
}
.section--petrol h2 { color: #fff; }

.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .76rem;
  font-weight: 600;
  color: var(--green-d);
  margin: 0 0 .9rem;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--amber);
  display: inline-block;
}
.section--petrol .eyebrow { color: #f0b27f; }

.lead { font-size: 1.12rem; color: var(--muted); max-width: 60ch; }
.section--petrol .lead { color: #b9cdd8; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .98rem;
  padding: .82em 1.4em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .18s var(--ease), background .18s, border-color .18s, color .18s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-d); }
.btn--ghost { background: transparent; color: var(--petrol); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--petrol); }
.btn--light { background: #fff; color: var(--petrol); }
.section--petrol .btn--ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.section--petrol .btn--ghost:hover { border-color: #fff; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--petrol);
  letter-spacing: -.02em;
}
.brand:hover { text-decoration: none; }
.brand__mark { width: 30px; height: 30px; flex: none; }
.brand__logo { height: 38px; width: auto; display: block; }
.brand__name { font-size: 1.18rem; line-height: 1; }
.brand__name span { color: var(--green-d); font-weight: 600; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav__links a {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .97rem;
  padding: .5rem .8rem;
  border-radius: 8px;
}
.nav__links a:hover { background: var(--paper); text-decoration: none; }
.nav__links a.is-active { color: var(--green-d); }

.nav__cta { margin-left: 8px; }

.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  width: 44px; height: 42px;
  cursor: pointer;
  color: var(--petrol);
}

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 7vw, 90px) 0 clamp(40px, 6vw, 76px); }
.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.hero h1 { margin-bottom: .35em; }
.hero h1 .accent {
  background: linear-gradient(transparent 64%, rgba(219, 128, 47, .30) 0);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6rem; }

/* Signature: pannello "la sicurezza che conviene" */
.benefit-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 26px 14px;
  position: relative;
  overflow: hidden;
}
.benefit-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--green) 0 70%, var(--amber) 70% 100%);
}
.benefit-card h3 { margin-bottom: 1.1rem; font-size: 1.05rem; }
.benefit {
  display: flex;
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.benefit:first-of-type { border-top: 0; }
.benefit__ico {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(219, 128, 47, .12);
  color: var(--green-d);
  display: grid; place-items: center;
}
.benefit__ico svg { width: 20px; height: 20px; }
.benefit b { display: block; color: var(--petrol); font-family: var(--font-display); font-size: 1rem; }
.benefit span { color: var(--muted); font-size: .92rem; line-height: 1.45; }

/* ---------- Generic grids & cards ---------- */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d3dde4; }
.card__ico {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--petrol);
  color: #fff;
  display: grid; place-items: center;
  margin-bottom: 16px;
}
.card__ico svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: .45rem; }
.card p { color: var(--muted); font-size: .97rem; margin-bottom: 0; }
.card ul { color: var(--muted); font-size: .95rem; margin: .4rem 0 0; padding-left: 1.1rem; }
.card ul li { margin-bottom: .25rem; }

.section__head { max-width: 64ch; margin-bottom: clamp(30px, 4vw, 52px); }
.section__head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section__head.center .eyebrow { justify-content: center; }

/* ---------- Method steps (sequenza reale, numerazione giustificata) ---------- */
.steps { counter-reset: step; display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.step {
  position: relative;
  padding: 30px 26px 26px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
}
.step__num {
  counter-increment: step;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--petrol-2);
  background: var(--amber);
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  margin-bottom: 16px;
}
.step__num::before { content: counter(step, decimal-leading-zero); }
.step h3 { color: #fff; margin-bottom: .4rem; }
.step p { color: #b9cdd8; font-size: .96rem; margin: 0; }

/* ---------- Stats band ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
.stat b {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.9rem);
  color: var(--petrol);
  letter-spacing: -.02em;
}
.stat span { color: var(--muted); font-size: .96rem; }

/* ---------- CTA strip ---------- */
.cta-strip { text-align: center; }
.cta-strip .btn { margin-top: 1.4rem; }

/* ---------- News ---------- */
.post {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.post:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post__top { height: 7px; background: linear-gradient(90deg, var(--petrol), var(--green)); }
.post__body { padding: 26px; display: flex; flex-direction: column; flex: 1; }
.post__meta { font-family: var(--font-display); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--green-d); margin-bottom: .6rem; }
.post h3 { margin-bottom: .5rem; }
.post p { color: var(--muted); font-size: .96rem; }
.post a.post__link { font-family: var(--font-display); font-weight: 600; margin-top: auto; }

/* ---------- Contatti ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: start; }
.info-row { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row .info-ico {
  flex: none; width: 40px; height: 40px; border-radius: 10px;
  background: rgba(44, 48, 54, .07); color: var(--petrol);
  display: grid; place-items: center;
}
.info-row .info-ico svg { width: 20px; height: 20px; }
.info-row b { display: block; font-family: var(--font-display); color: var(--petrol); }
.info-row span, .info-row a { color: var(--muted); }

.form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--font-display); font-weight: 500; font-size: .92rem; color: var(--petrol); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fcfdfe;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(219, 128, 47, .20);
}
.field textarea { resize: vertical; min-height: 130px; }
.form__check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--muted); margin: 4px 0 18px; }
.form__check input { width: auto; margin-top: 3px; }

.map-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.map-card__visual {
  height: 220px;
  background:
    radial-gradient(circle at 38% 44%, var(--amber) 0 8px, transparent 9px),
    linear-gradient(135deg, #dfeaf0, #eef4f7);
  position: relative;
}
.map-card__visual span {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  font-size: .85rem; color: var(--petrol); background: #fff;
  padding: 6px 12px; border-radius: 999px; box-shadow: var(--shadow-sm);
  font-family: var(--font-display); font-weight: 500;
}
.map-card__foot { padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* ---------- Page header (interne) ---------- */
.page-hero {
  background: linear-gradient(160deg, var(--petrol) 0%, var(--petrol-2) 100%);
  color: #dbe7ee;
  padding: clamp(54px, 8vw, 86px) 0 clamp(46px, 6vw, 70px);
}
.page-hero h1 { color: #fff; }
.page-hero .lead { color: #b9cdd8; }
.page-hero .eyebrow { color: #f0b27f; }
.breadcrumb { font-size: .85rem; color: #9fbac8; margin-bottom: 1rem; }
.breadcrumb a { color: #cfe1ea; }

/* ---------- Prose ---------- */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; color: var(--petrol); }
.prose ul { padding-left: 1.2rem; color: var(--ink); }
.prose ul li { margin-bottom: .4rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--petrol-2); color: #a9c2cf; padding: 56px 0 28px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.site-footer h4 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.site-footer a { color: #cfe0e9; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer ul li { margin-bottom: .5rem; }
.footer-brand .brand__name { color: #fff; }
.footer-brand p { color: #8fabba; margin-top: .8rem; max-width: 34ch; }
.footer-bottom {
  margin-top: 40px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: .85rem; color: #7f9aa9;
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .grid--3, .steps, .stats { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav__links {
    position: fixed;
    inset: 70px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 8px 16px 18px;
    box-shadow: var(--shadow);
    transform: translateY(-130%);
    transition: transform .3s var(--ease);
    max-height: calc(100vh - 70px);
    overflow: auto;
  }
  .nav__links.is-open { transform: none; }
  .nav__links a { padding: .85rem .6rem; border-radius: 8px; }
  .nav__cta { margin: 8px 0 0; }
  .nav__toggle { display: grid; place-items: center; }
  .grid--3, .grid--2, .steps, .stats, .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover, .post:hover { transform: none; }
}

/* Focus visibility (quality floor) */
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }

/* ---------- Banner cookie ---------- */
.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 60;
  max-width: var(--maxw);
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner::before {
  content: "";
  position: absolute; top: 0; left: 0; bottom: 0;
  width: 5px; border-radius: var(--radius) 0 0 var(--radius);
  background: var(--green);
}
.cookie-banner__text { flex: 1 1 320px; font-size: .92rem; color: var(--muted); margin: 0; padding-left: 8px; }
.cookie-banner__text a { color: var(--green-d); }
.cookie-banner__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-banner .btn { padding: .6em 1.2em; font-size: .9rem; }

/* Link legali nel footer */
.footer-bottom a { color: #9fb0ba; }
.footer-bottom a:hover { color: #fff; }

/* Prose: data di aggiornamento e note */
.legal-meta { color: var(--muted); font-size: .9rem; margin-bottom: 1.5rem; }
.legal-note {
  background: var(--paper);
  border-left: 3px solid var(--amber);
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  font-size: .92rem;
  color: var(--muted);
  margin: 1.5rem 0;
}
