/* ============================================================
   UAIFAI — foglio di stile principale
   Palette: verde mediterraneo · sabbia · terracotta
   ============================================================ */

:root {
  /* Colori brand */
  --forest:   #1f3b30;   /* verde profondo (testi/sfondi scuri) */
  --olive:    #4d6b4f;   /* verde oliva */
  --sage:     #8aa07f;   /* verde salvia */
  --terra:    #c56a3f;   /* terracotta (accento) */
  --terra-dk: #a8552f;
  --ochre:    #cf9a45;   /* ocra/oro */
  --sand:     #f3ead8;   /* sabbia chiara (sfondo) */
  --sand-dk:  #e7dac2;
  --cream:    #fbf6ec;   /* crema (card) */
  --ink:      #23302a;   /* testo principale */
  --muted:    #5d6b60;   /* testo secondario */
  --line:     rgba(31, 59, 48, 0.12);

  --maxw: 1140px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 40px -24px rgba(31, 59, 48, 0.45);
  --shadow-sm: 0 8px 24px -16px rgba(31, 59, 48, 0.4);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; max-width: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 .4em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1rem; }
a { color: var(--terra-dk); text-decoration: none; }
img { max-width: 100%; display: block; }

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

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--tight { padding: clamp(48px, 6vw, 80px) 0; }

/* ---- elementi tipografici ricorrenti ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--terra-dk);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--terra);
  display: inline-block;
}

.section-head { max-width: 640px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); color: var(--forest); }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.section-head.center { margin-inline: auto; text-align: center; }

/* ---- bottoni ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 600;
  font-size: .98rem;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: var(--terra); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--terra-dk); transform: translateY(-2px); }
.btn--ghost { background: transparent; border-color: rgba(255,255,255,.4); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--dark { background: var(--forest); color: var(--sand); }
.btn--dark:hover { background: #16291f; transform: translateY(-2px); }
.btn--outline { background: transparent; border-color: var(--forest); color: var(--forest); }
.btn--outline:hover { background: var(--forest); color: var(--sand); }

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 246, 236, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}
.brand {
  display: flex;
  align-items: center;
  gap: .85rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--forest);
  letter-spacing: -.015em;
}
.brand__logo-img {
  height: 42px;
  width: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(31, 59, 48, 0.15);
  transition: transform 0.2s ease;
}
.brand:hover .brand__logo-img {
  transform: scale(1.05) rotate(-2deg);
}
.brand small {
  display: block;
  font-family: var(--sans);
  font-size: .62rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}
.nav__links a:not(.btn) {
  color: var(--ink);
  font-weight: 600;
  font-size: .94rem;
  position: relative;
  padding: 0.5rem 0.2rem;
  transition: color 0.2s ease;
}
.nav__links a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--terra);
  transition: width 0.2s ease;
}
.nav__links a:not(.btn):hover {
  color: var(--terra);
}
.nav__links a:not(.btn):hover::after {
  width: 100%;
}
.nav__cta {
  margin-left: .5rem;
}
.nav__cta::after {
  display: none !important;
}
.nav__toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--forest);
}


/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  color: var(--sand);
  background:
    radial-gradient(1100px 520px at 78% -10%, rgba(207,154,69,.28), transparent 60%),
    radial-gradient(900px 500px at 8% 110%, rgba(197,106,63,.30), transparent 55%),
    linear-gradient(160deg, #234034 0%, var(--forest) 55%, #16291f 100%);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: .5;
  pointer-events: none;
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 48px;
  align-items: center;
  padding: clamp(70px, 11vw, 130px) 0 clamp(80px, 11vw, 130px);
}
.hero .eyebrow { color: var(--ochre); }
.hero .eyebrow::before { background: var(--ochre); }
.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.1rem);
  color: #fff;
}
.hero h1 em { font-style: italic; color: var(--ochre); }
.hero__lead {
  font-size: 1.18rem;
  color: rgba(243,234,216,.86);
  max-width: 540px;
  margin-bottom: 2rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero__stats {
  display: flex;
  gap: 2.4rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.hero__stats .num { font-family: var(--serif); font-size: 1.9rem; color: var(--ochre); display:block; }
.hero__stats .lbl { font-size: .85rem; color: rgba(243,234,216,.7); }

/* scheda decorativa nel hero */
.hero__card {
  background: rgba(251,246,236,.07);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(6px);
}
.hero__card h3 { color: #fff; font-size: 1.25rem; }
.hero__card ul { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .75rem; }
.hero__card li { display: flex; align-items: center; gap: .7rem; font-size: .96rem; color: rgba(243,234,216,.9); }
.hero__card li svg { width: 20px; height: 20px; color: var(--ochre); flex: none; }
/* Global SVG Icon Professional Enhancements */
svg {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), stroke-width 0.2s ease, color 0.2s ease;
}

/* ============================================================
   "PERCHÉ" / VALORI
   ============================================================ */
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.value-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.value-card:hover { 
  transform: translateY(-5px); 
  box-shadow: var(--shadow); 
}
.value-card .ico {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: rgba(197, 106, 63, 0.08);
  color: var(--terra-dk);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  transition: background 0.3s ease, color 0.3s ease;
}
.value-card:hover .ico {
  background: rgba(197, 106, 63, 0.16);
  color: var(--terra);
}
.value-card .ico svg { 
  width: 24px; 
  height: 24px; 
}
.value-card:hover .ico svg {
  transform: scale(1.15) rotate(5deg);
}
.value-card h3 { 
  font-size: 1.18rem; 
  color: var(--forest); 
  margin-top: 0.5rem;
}
.value-card p { 
  color: var(--muted); 
  font-size: .96rem; 
  margin: 0; 
}

/* ============================================================
   SERVIZI
   ============================================================ */
.services { background: var(--sand-dk); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  position: relative;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
  overflow: hidden;
}
.service-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; background: var(--terra);
  transform: scaleY(0); transform-origin: top;
  transition: transform .25s ease;
}
.service-card:hover { 
  transform: translateY(-5px); 
  box-shadow: var(--shadow); 
}
.service-card:hover::before { transform: scaleY(1); }
.service-card .ico {
  width: 54px; height: 54px;
  border-radius: 14px;
  background: linear-gradient(150deg, var(--olive), var(--forest));
  color: var(--sand);
  display: grid; place-items: center;
  margin-bottom: 18px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease;
}
.service-card:hover .ico {
  transform: scale(1.05);
}
.service-card .ico svg { 
  width: 28px; 
  height: 28px; 
}
.service-card:hover .ico svg {
  transform: scale(1.15) rotate(-5deg);
}
.service-card h3 { font-size: 1.32rem; color: var(--forest); margin-bottom: .15em; }
.service-card .lead { font-weight: 600; color: var(--terra-dk); font-size: .95rem; margin-bottom: .6rem; }
.service-card .desc { color: var(--muted); font-size: .96rem; }
.service-card ul { list-style: none; margin: .4rem 0 1.2rem; padding: 0; display: grid; gap: .55rem; }
.service-card ul li { position: relative; padding-left: 1.5rem; font-size: .92rem; color: var(--ink); }
.service-card ul li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sage);
}
.service-card .foot { margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: .76rem; font-weight: 500;
  background: rgba(138,160,127,.18);
  color: var(--olive);
  padding: 3px 10px; border-radius: 999px;
}
.pill-billing {
  position: absolute; top: 22px; right: 22px;
  font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.pill-billing.progetto { background: rgba(207,154,69,.18); color: #9a6f1f; }
.pill-billing.abbonamento { background: rgba(77,107,79,.16); color: var(--olive); }

/* ============================================================
   MODELLI DI PREZZO
   ============================================================ */
.billing { background: var(--forest); color: var(--sand); }
.billing .section-head h2 { color: #fff; }
.billing .section-head p { color: rgba(243,234,216,.8); }
.billing .eyebrow { color: var(--ochre); }
.billing .eyebrow::before { background: var(--ochre); }
.billing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.billing-card {
  background: rgba(251,246,236,.06);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  padding: 34px;
}
.billing-card .badge {
  display: inline-block;
  font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--forest); background: var(--ochre);
  padding: 5px 14px; border-radius: 999px; margin-bottom: 18px;
}
.billing-card h3 { color: #fff; font-size: 1.55rem; }
.billing-card > p { color: rgba(243,234,216,.82); }
.billing-card ul { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .7rem; }
.billing-card li { display: flex; gap: .6rem; align-items: flex-start; color: rgba(243,234,216,.92); font-size: .98rem; }
.billing-card li svg { width: 20px; height: 20px; color: var(--ochre); flex: none; margin-top: 2px; }
.billing-note { text-align: center; margin-top: 28px; color: rgba(243,234,216,.7); font-size: .95rem; }

/* ============================================================
   SETTORI
   ============================================================ */
.sectors-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}
.sector {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 12px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.sector:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
.sector .s-ico {
  width: 58px; height: 58px; border-radius: 16px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent, var(--olive)) 15%, white);
  color: var(--accent, var(--olive));
  transition: transform .25s ease, background .25s ease, color .25s ease;
}
.sector .s-ico svg { width: 28px; height: 28px; stroke-width: 1.7; }
.sector:hover .s-ico { background: var(--accent, var(--olive)); color: #fff; transform: translateY(-2px) rotate(-5deg); }
.sector .s-lbl { font-size: .9rem; font-weight: 600; color: var(--ink); line-height: 1.25; }

/* ============================================================
   PROCESSO
   ============================================================ */
.process { background: var(--sand-dk); }
.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
}
.step .n {
  font-family: var(--serif);
  font-size: 2.6rem;
  color: rgba(197,106,63,.28);
  line-height: 1;
  margin-bottom: .3rem;
}
.step h3 { font-size: 1.2rem; color: var(--forest); }
.step p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ============================================================
   FAQ
   ============================================================ */
.faq-list { max-width: 820px; margin-inline: auto; display: grid; gap: 14px; }
details.faq {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px 24px;
}
details.faq summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.12rem;
  color: var(--forest);
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+";
  font-family: var(--sans);
  font-size: 1.6rem;
  color: var(--terra);
  transition: transform .2s ease;
  line-height: 1;
}
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq p { color: var(--muted); margin: 0 0 18px; font-size: .98rem; }

/* ============================================================
   CONTATTI
   ============================================================ */
.contact { background: var(--forest); color: var(--sand); }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
.contact .eyebrow { color: var(--ochre); }
.contact .eyebrow::before { background: var(--ochre); }
.contact h2 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.7rem); }
.contact__lead { color: rgba(243,234,216,.82); font-size: 1.05rem; }
.contact__info { display: grid; gap: 16px; margin-top: 28px; }
.contact__info a, .contact__info span { color: var(--sand); display: flex; align-items: center; gap: .7rem; font-size: 1rem; }
.contact__info svg { width: 22px; height: 22px; color: var(--ochre); flex: none; }

.form {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 32px;
  color: var(--ink);
  box-shadow: var(--shadow);
}
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 600; color: var(--forest); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: .98rem;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--terra);
  box-shadow: 0 0 0 3px rgba(197,106,63,.15);
}
.field .err { color: var(--terra-dk); font-size: .82rem; margin-top: 4px; }
.hp { position: absolute; left: -9999px; opacity: 0; }
.form .btn { width: 100%; justify-content: center; margin-top: 6px; }
.alert-success {
  background: rgba(77,107,79,.14);
  border: 1px solid var(--olive);
  color: var(--olive);
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: .95rem;
  font-weight: 500;
}

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  background: linear-gradient(135deg, var(--terra) 0%, var(--terra-dk) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(36px, 5vw, 60px);
  text-align: center;
  box-shadow: var(--shadow);
}
.cta-banner h2 { color: #fff; font-size: clamp(1.7rem, 3.5vw, 2.6rem); }
.cta-banner p { color: rgba(255,255,255,.9); max-width: 540px; margin: 0 auto 1.6rem; }
.cta-banner .btn--dark { background: var(--forest); }
.cta-banner .btn--light { background: #fff; color: var(--terra-dk); }
.cta-banner .actions { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: #16291f; color: rgba(243,234,216,.75); padding: 56px 0 28px; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.footer .brand { color: #fff; }
.footer p { font-size: .95rem; max-width: 320px; }
.footer h4 { color: #fff; font-size: 1rem; font-family: var(--sans); margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer a { color: rgba(243,234,216,.75); font-size: .94rem; }
.footer a:hover { color: var(--ochre); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: .85rem; color: rgba(243,234,216,.55);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; gap: 36px; }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .sectors-grid { grid-template-columns: repeat(4, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer__top { grid-template-columns: 1fr 1fr; }
}
/* Navbar → menu hamburger: scatta presto perché con molte voci
   (Servizi, Esempi, Aree, Blog, FAQ, Brochure + CTA) i link non ci stanno. */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 74px; left: 0; right: 0;
    background: var(--cream); padding: 18px 24px;
    border-bottom: 1px solid var(--line); gap: 1rem;
  }
  .nav__toggle { display: inline-flex; align-items: center; }
}
@media (max-width: 680px) {
  .values-grid, .services-grid, .billing-grid, .process-grid { grid-template-columns: 1fr; }
  .sectors-grid { grid-template-columns: repeat(3, 1fr); }
  .form .row { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; }
  .hero__stats { gap: 1.6rem; }
}

/* fade-in leggero allo scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   HERO · VETRINA BENTO  (mostra subito tutta l'offerta)
   Sovrascrive il layout hero precedente.
   ============================================================ */
:root { --sea: #2f7c84; } /* azzurro mediterraneo, accento aggiuntivo */

.hero__inner {
  display: flex;
  flex-direction: column;
  grid-template-columns: none;      /* annulla la griglia 2-colonne precedente */
  gap: clamp(34px, 5vw, 54px);
  padding-block: clamp(56px, 8vw, 96px) clamp(56px, 8vw, 92px);
  padding-inline: 24px;             /* ripristina i lati (la regola hero precedente li azzerava) */
}
.hero__intro h1 { overflow-wrap: break-word; }
.hero__intro { max-width: 780px; }
.hero__intro h1 { font-size: clamp(2.2rem, 5vw, 3.7rem); color: #fff; margin-bottom: .5em; }
.hero__intro h1 em { font-style: italic; color: var(--ochre); }
.hero__intro .hero__lead { max-width: 640px; margin-bottom: 1.7rem; }
.hero__cues { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-top: 1.6rem; }
.hero__cues span { display: inline-flex; align-items: center; gap: .45rem; font-size: .9rem; color: rgba(243,234,216,.78); }
.hero__cues svg { width: 17px; height: 17px; color: var(--ochre); }

/* la griglia */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(128px, 1fr);
  grid-auto-flow: dense;
  gap: 14px;
}
.bento__tile {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 128px;
  border-radius: 16px;
  padding: 18px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  background: var(--forest);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 12px 28px -20px rgba(0,0,0,.7);
  transition: transform .22s ease, box-shadow .22s ease;
}
.bento__tile:hover { transform: translateY(-5px); box-shadow: 0 28px 52px -22px rgba(0,0,0,.65); }

/* immagine di sfondo */
.bento__bg {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.bento__tile:hover .bento__bg { transform: scale(1.06); }

/* velo scuro + tinta d'accento per leggibilità del testo */
.bento__veil {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(22,41,31,.10) 0%, rgba(22,41,31,.48) 52%, rgba(22,41,31,.90) 100%),
    color-mix(in srgb, var(--accent, var(--terra)) 28%, transparent);
  transition: opacity .25s ease;
}

/* contenuto sopra l'immagine */
.bento__body { position: relative; z-index: 2; }
.bento__tile .b-ico {
  width: 42px; height: 42px; border-radius: 11px;
  display: grid; place-items: center;
  margin-bottom: 12px;
  background: color-mix(in srgb, var(--accent, var(--terra)) 72%, white);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(0,0,0,.7);
}
.bento__tile .b-ico svg { width: 22px; height: 22px; }
.bento__tile h3 { font-size: 1.14rem; color: #fff; margin: 0; line-height: 1.18; text-shadow: 0 1px 10px rgba(0,0,0,.4); }
.bento__tile p { font-size: .86rem; color: rgba(255,255,255,.88); margin: 4px 0 0; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.bento__tile .b-go {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.20); backdrop-filter: blur(4px);
  color: #fff;
  opacity: 0; transform: translateY(-4px);
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
}
.bento__tile .b-go svg { width: 18px; height: 18px; }
.bento__tile:hover .b-go { opacity: 1; transform: none; background: var(--accent, var(--terra)); }

/* tassello in evidenza */
.bento__tile--feature { grid-column: span 2; grid-row: span 2; padding: 26px; }
.bento__tile--feature .b-ico { width: 52px; height: 52px; border-radius: 13px; }
.bento__tile--feature .b-ico svg { width: 28px; height: 28px; }
.bento__tile--feature h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.bento__tile--feature p { font-size: 1.05rem; max-width: 34ch; margin-top: 8px; }

/* tassello foto finale (1 cella: con 8 servizi + foto la griglia riempie 4x3) */
.bento__photo { grid-column: span 1; }
.bento__photo h3 { font-size: 1.15rem; }

@media (max-width: 880px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento__tile--feature { grid-column: span 2; grid-row: span 1; min-height: 210px; }
  .bento__photo { grid-column: span 2; }
}
@media (max-width: 540px) {
  .bento { grid-template-columns: 1fr; }
  .bento__tile--feature, .bento__photo { grid-column: span 1; }
  .bento__tile { min-height: 158px; }
}

/* ============================================================
   PORTFOLIO / ESEMPI
   ============================================================ */
.portfolio { background: var(--sand-dk); }
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.work {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.work:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.work__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.work__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.work:hover .work__media img { transform: scale(1.05); }
.work__type {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  background: rgba(31,59,48,.86); color: var(--sand);
  padding: 5px 11px; border-radius: 999px; backdrop-filter: blur(4px);
}
.work__body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.work__sector {
  font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--terra-dk); margin-bottom: 6px;
}
.work__body h3 { font-size: 1.25rem; color: var(--forest); margin-bottom: .4rem; }
.work__body p { font-size: .94rem; color: var(--muted); margin: 0 0 16px; }
.work__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }

.portfolio-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 16px 24px; margin-top: 40px; text-align: center;
}
.portfolio-cta p { margin: 0; font-family: var(--serif); font-size: 1.3rem; color: var(--forest); }

@media (max-width: 980px) { .portfolio-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .portfolio-grid { grid-template-columns: 1fr; } }

/* logo nel footer */
.footer .brand__logo-img { height: 40px; width: auto; border-radius: 8px; }
.footer__legal { display: inline-flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.footer__legal a { color: rgba(243,234,216,.7); }
.footer__legal a:hover { color: var(--ochre); }

/* consenso privacy nel form */
.consent { display: flex; align-items: flex-start; gap: .6rem; margin: 4px 0 14px; cursor: pointer; }
.consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--terra); flex: none; }
.consent span { font-size: .86rem; color: var(--muted); line-height: 1.45; }
.consent a { color: var(--terra-dk); text-decoration: underline; }

/* ============================================================
   PAGINE LEGALI (privacy / cookie)
   ============================================================ */
.legal { padding: clamp(48px, 7vw, 88px) 0 clamp(56px, 8vw, 96px); background: var(--sand); }
.legal__inner { max-width: 800px; }
.legal__back { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .9rem; margin-bottom: 1.4rem; color: var(--terra-dk); }
.legal__back svg { width: 16px; height: 16px; transform: rotate(180deg); }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); color: var(--forest); }
.legal__lead { font-size: 1.1rem; color: var(--muted); margin-bottom: 2rem; }
.legal h2 { font-size: 1.3rem; color: var(--forest); margin: 2rem 0 .5rem; }
.legal p, .legal li { color: var(--ink); font-size: 1rem; }
.legal ul { padding-left: 1.2rem; display: grid; gap: .4rem; }
.legal a { color: var(--terra-dk); text-decoration: underline; }
.legal__note { margin-top: 2.4rem; padding: 16px 18px; background: var(--cream); border: 1px solid var(--line); border-radius: 12px; font-size: .9rem; color: var(--muted); }

/* ============================================================
   PULSANTE WHATSAPP FLOTTANTE
   ============================================================ */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  display: inline-flex; align-items: center; gap: .5rem;
  background: #25D366; color: #fff;
  padding: 12px 18px 12px 14px; border-radius: 999px;
  font-weight: 700; font-size: .95rem; text-decoration: none;
  box-shadow: 0 12px 28px -10px rgba(37,211,102,.7);
  transition: transform .2s ease, box-shadow .2s ease;
}
.wa-float svg { width: 24px; height: 24px; }
.wa-float:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -10px rgba(37,211,102,.8); color: #fff; }

/* ============================================================
   BANNER COOKIE
   ============================================================ */
.cookie-banner {
  position: fixed; left: 22px; bottom: 22px; z-index: 70;
  max-width: 420px;
  background: var(--cream); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px 20px;
  box-shadow: 0 20px 44px -18px rgba(31,59,48,.55);
  display: flex; flex-direction: column; gap: 12px;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; font-size: .9rem; color: var(--ink); }
.cookie-banner a { color: var(--terra-dk); text-decoration: underline; }
.cookie-banner .btn { align-self: flex-start; padding: .6rem 1.3rem; }
.cookie-banner__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-banner__actions .btn { align-self: auto; }

@media (max-width: 560px) {
  .wa-float span { display: none; }
  .wa-float { padding: 14px; }
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}
@media (max-width: 480px) {
  .hero__intro h1 { font-size: 1.95rem; line-height: 1.14; }
  .hero__lead { font-size: 1.02rem; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .section-head h2 { font-size: 1.7rem; }
}

/* ============================================================
   BADGE LATERALE "CILENTO" (+ bandiera italiana)
   ============================================================ */
.cilento-badge {
  position: fixed; left: 0; top: 58%; transform: translateY(-50%);
  z-index: 60;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 13px 13px 11px;
  background: rgba(251, 246, 236, 0.96);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-left: none;
  border-radius: 0 16px 16px 0;
  box-shadow: 4px 6px 20px -8px rgba(31, 59, 48, 0.35);
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}
.cilento-badge:hover { transform: translateY(-50%) translateX(5px); box-shadow: 6px 10px 26px -8px rgba(31, 59, 48, 0.45); }
.cilento-badge__flower { width: 56px; height: 56px; display: block; object-fit: contain; }
.cilento-badge__text { font-family: var(--serif); font-size: .92rem; font-weight: 600; color: var(--forest); line-height: 1; letter-spacing: .01em; }
.cilento-badge__flag {
  width: 34px; height: 13px; border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: linear-gradient(90deg, #008C45 0 33.33%, #ffffff 33.33% 66.66%, #CD212A 66.66% 100%);
}
@media (max-width: 980px) { .cilento-badge { display: none; } }

/* ============================================================
   PAGINA DOCUMENTO INTERNO (Kit Commerciale)
   ============================================================ */
.doc-bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--forest); color: var(--sand);
  padding: 12px 22px;
}
.doc-bar__brand { display: flex; align-items: center; gap: 10px; color: var(--sand); font-family: var(--serif); font-size: 1.1rem; text-decoration: none; }
.doc-bar__brand img { border-radius: 6px; }
.doc-bar__actions { display: flex; align-items: center; gap: 14px; }
.doc-bar__tag { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ochre); }
.doc-bar .btn { padding: .5rem 1.1rem; font-size: .88rem; }

.doc { background: var(--sand-dk); padding: clamp(20px, 4vw, 44px) 16px; }
.doc__inner {
  max-width: 880px; margin-inline: auto;
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(28px, 5vw, 64px);
  box-shadow: var(--shadow-sm);
}

/* tipografia del contenuto markdown */
.doc__inner h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); color: var(--forest); margin: 0 0 .3em; }
.doc__inner h2 {
  font-size: 1.5rem; color: var(--forest);
  margin: 2.4rem 0 .8rem; padding-bottom: .4rem;
  border-bottom: 2px solid var(--terra);
}
.doc__inner h3 { font-size: 1.18rem; color: var(--terra-dk); margin: 1.6rem 0 .5rem; }
.doc__inner p, .doc__inner li { color: var(--ink); font-size: 1rem; line-height: 1.7; }
.doc__inner ul, .doc__inner ol { padding-left: 1.3rem; margin: .6rem 0 1.1rem; }
.doc__inner li { margin-bottom: .4rem; }
.doc__inner li::marker { color: var(--terra); }
.doc__inner a { color: var(--terra-dk); text-decoration: underline; }
.doc__inner strong { color: var(--forest); }
.doc__inner hr { border: none; border-top: 1px solid var(--line); margin: 2.2rem 0; }
.doc__inner blockquote {
  margin: 1.2rem 0; padding: 12px 18px;
  background: rgba(207,154,69,.12); border-left: 4px solid var(--ochre);
  border-radius: 0 10px 10px 0; color: var(--muted);
}
.doc__inner blockquote p { margin: 0; }
.doc__inner code {
  background: var(--sand); border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 6px; font-size: .9em; color: var(--terra-dk);
}
/* tabelle */
.doc__inner table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.6rem; font-size: .94rem; }
.doc__inner th, .doc__inner td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.doc__inner thead th { background: var(--forest); color: var(--sand); font-weight: 600; }
.doc__inner tbody tr:nth-child(even) { background: rgba(31,59,48,.04); }
/* task list (checkbox) */
.doc__inner li input[type="checkbox"] { margin-right: .5rem; accent-color: var(--terra); }
.doc__inner .contains-task-list { list-style: none; padding-left: .2rem; }

@media print {
  .doc-bar { display: none; }
  .doc { background: #fff; padding: 0; }
  .doc__inner { box-shadow: none; border: none; max-width: none; }
}
@media (max-width: 560px) {
  .doc-bar__tag { display: none; }
  .doc__inner table { display: block; overflow-x: auto; }
}

/* ============================================================
   AREE SERVITE (SEO locale) + BLOG
   ============================================================ */

/* --- Indice aree --- */
.aree-block { margin-bottom: clamp(32px, 5vw, 56px); }
.aree-block__head { max-width: 760px; margin-bottom: 18px; }
.aree-block__head h2 { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--forest); }
.aree-block__head h2 span { color: var(--terra); font-family: var(--sans); font-size: 1rem; }
.aree-block__head p { color: var(--muted); margin-top: .5rem; }
.aree-count { font-weight: 600; color: var(--terra-dk); font-size: .9rem; }
.aree-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 18px;
}
.aree-list a {
  display: block; padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--ink); border: 1px solid var(--line); background: var(--cream);
  font-size: .95rem; transition: all .2s ease;
}
.aree-list a:hover { border-color: var(--terra); color: var(--terra-dk); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

/* --- Pagina comune --- */
.hero--local { background: var(--sand); }
.hero--local .hero__inner { padding-block: clamp(48px, 7vw, 80px) clamp(32px, 5vw, 48px); }
.local-services {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
.aree-context { background: var(--sand); }
.aree-context__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: start; }
.aree-context__grid h2 { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--forest); }
.aree-context__grid h3 { color: var(--forest); margin-bottom: 14px; }
.aree-context__grid p { color: var(--muted); margin-top: .5rem; }
.vicini-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.vicini-list a {
  display: inline-block; padding: 7px 14px; border-radius: 999px;
  background: var(--cream); border: 1px solid var(--line); color: var(--ink); font-size: .9rem; transition: all .2s ease;
}
.vicini-list a:hover { border-color: var(--terra); color: var(--terra-dk); }
.vicini-all { background: var(--forest) !important; color: #fff !important; border-color: var(--forest) !important; }
.local-cta { text-align: center; max-width: 640px; margin-inline: auto; }
.local-cta h2 { color: var(--forest); font-size: clamp(1.6rem, 3vw, 2.2rem); }
.local-cta p { color: var(--muted); margin: .6rem 0 1.4rem; }
.local-cta .hero__actions { justify-content: center; }

/* --- Blog --- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.blog-card {
  display: flex; flex-direction: column; background: var(--cream);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.blog-card__media { display: block; aspect-ratio: 16/9; overflow: hidden; }
.blog-card__media img { width: 100%; height: 100%; object-fit: cover; }
.blog-card__body { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.blog-card__body time { font-size: .82rem; color: var(--terra-dk); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.blog-card__body h2 { font-size: 1.25rem; line-height: 1.3; }
.blog-card__body h2 a { color: var(--forest); }
.blog-card__body p { color: var(--muted); font-size: .96rem; flex-grow: 1; }
.blog-card__more { font-weight: 600; color: var(--terra-dk); display: inline-flex; align-items: center; gap: .4rem; font-size: .92rem; }
.blog-card__more svg { width: 16px; height: 16px; }
.blog-empty { color: var(--muted); font-size: 1.05rem; }

/* --- Articolo blog (riusa .legal) --- */
.blog-post__meta { color: var(--muted); font-size: .9rem; margin-bottom: 1.4rem; }
.blog-post__body { margin-top: 1rem; }
.blog-post__body h2 { font-size: 1.4rem; color: var(--forest); margin: 2rem 0 .6rem; }
.blog-post__body h3 { font-size: 1.15rem; color: var(--forest); margin: 1.6rem 0 .4rem; }
.blog-post__body p, .blog-post__body li { color: var(--ink); font-size: 1.02rem; line-height: 1.75; }
.blog-post__body ul, .blog-post__body ol { padding-left: 1.3rem; display: grid; gap: .4rem; margin: .8rem 0; }
.blog-post__body a { color: var(--terra-dk); text-decoration: underline; }
.blog-post__body strong { color: var(--forest); }
.blog-post__body blockquote { border-left: 3px solid var(--terra); padding-left: 1rem; color: var(--muted); font-style: italic; margin: 1.2rem 0; }
.blog-post__cta { margin-top: 2.4rem; padding-top: 1.8rem; border-top: 1px solid var(--line); }
.blog-post__cta p { font-weight: 600; color: var(--forest); margin-bottom: 1rem; }

@media (max-width: 900px) {
  .local-services { grid-template-columns: repeat(2, 1fr); }
  .aree-context__grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .local-services { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .aree-list { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* ============================================================
   FIX CONTRASTO PAGINE COMUNE (/web-agency-*)
   ============================================================ */
/* Hero locale su sfondo sabbia: testo scuro leggibile */
.hero--local .hero__intro h1 { color: var(--forest); }
.hero--local .hero__intro h1 em { color: var(--terra-dk); }
.hero--local .hero__lead { color: var(--ink); }
.hero--local .hero__lead:first-of-type { font-size: 1.24rem; color: var(--forest); }
.hero--local .eyebrow { color: var(--terra-dk); }
.hero--local .eyebrow::before { background: var(--terra); }
.hero--local .btn--ghost { border-color: var(--forest); color: var(--forest); }
.hero--local .btn--ghost:hover { background: var(--forest); color: var(--sand); }

/* CTA finale sulla sezione scura: testo chiaro leggibile */
.contact .local-cta h2 { color: #fff; }
.contact .local-cta p { color: rgba(243, 234, 216, 0.85); }

/* ============================================================
   FIX: i bottoni dentro le pagine .legal (blog, privacy…) non
   devono ereditare il colore/underline della regola ".legal a"
   ============================================================ */
.legal .btn { text-decoration: none; }
.legal .btn--primary { color: #fff; }
.legal .btn--dark { color: var(--sand); }
.legal .btn--ghost, .legal .btn--outline { color: var(--forest); }
.legal .btn--ghost:hover, .legal .btn--outline:hover { color: var(--sand); }

/* ============================================================
   FIX MOBILE: menu hamburger + contenuti visibili da subito
   ============================================================ */
/* L'icona del menu non aveva dimensioni: su mobile non si vedeva */
.nav__toggle svg { width: 28px; height: 28px; display: block; }

/* L'hero (sopra la piega) non deve mai essere nascosto dal reveal */
.hero .reveal { opacity: 1; transform: none; }

/* Su mobile disattiviamo il fade-in allo scroll: tutto visibile da subito */
@media (max-width: 768px) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   PANNELLO DI CONFERMA INVIO FORM (alert "carino")
   ============================================================ */
.form-success {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 48px 34px;
}
.form-success__icon {
  width: 78px; height: 78px; border-radius: 50%;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--olive) 18%, white);
  color: var(--olive);
  margin-bottom: 10px;
  animation: successPop .5s cubic-bezier(.18,.9,.32,1.4) both;
}
.form-success__icon svg { width: 40px; height: 40px; stroke-width: 2.6; }
.form-success h3 { font-size: 1.6rem; color: var(--forest); margin: 0; }
.form-success p { color: var(--muted); margin: 0; max-width: 42ch; }
.form-success__actions { margin-top: 16px; }
@keyframes successPop {
  0%   { transform: scale(.4); opacity: 0; }
  60%  { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .form-success__icon { animation: none; } }

/* ============================================================
   BLOG · ARTICOLI CORRELATI ("Continua a leggere")
   ============================================================ */
.related { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.related__title { font-size: 1.35rem; color: var(--forest); margin-bottom: 18px; }
.related__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.legal .related__card {
  text-decoration: none;
  display: flex; flex-direction: column;
  background: var(--cream); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.legal .related__card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.related__media { aspect-ratio: 16 / 10; overflow: hidden; display: block; }
.related__media img { width: 100%; height: 100%; object-fit: cover; }
.related__name { font-weight: 600; color: var(--forest); font-size: .95rem; line-height: 1.3; padding: 12px 14px 16px; }
.related__more { margin-top: 16px; }
.blog-post__cta .btn--outline { margin-left: 8px; }
@media (max-width: 640px) {
  .related__grid { grid-template-columns: 1fr 1fr; }
  .blog-post__cta .btn--outline { margin-left: 0; }
}
@media (max-width: 420px) { .related__grid { grid-template-columns: 1fr; } }

/* ============================================================
   FORM CONTATTI · anti doppio-invio (spinner sul pulsante)
   ============================================================ */
.btn__spinner{
  display:none;
  width:18px;height:18px;
  border:2.5px solid rgba(255,255,255,.45);
  border-top-color:#fff;
  border-radius:50%;
  animation:btnspin .6s linear infinite;
}
.btn.is-loading{pointer-events:none;opacity:.9;cursor:default}
.btn.is-loading .btn__label{display:none}
.btn.is-loading .btn__spinner{display:inline-block}
@keyframes btnspin{to{transform:rotate(360deg)}}

/* ============================================================
   POPUP LEAD MAGNET · slide-in discreto (guida gratuita)
   ============================================================ */
.promo{
  position:fixed; z-index:70; right:20px; bottom:20px;
  width:340px; max-width:calc(100vw - 32px);
  background:var(--cream); border:1px solid var(--line);
  border-radius:16px; box-shadow:0 18px 50px rgba(31,59,48,.28);
  padding:20px 20px 18px;
  transform:translateY(26px); opacity:0;
  transition:transform .32s ease, opacity .32s ease;
}
.promo.is-visible{transform:translateY(0); opacity:1}
.promo[hidden]{display:none}
/* [hidden] deve vincere sui display:flex interni (form, ok, err) */
.promo [hidden]{display:none !important}
.promo__close{
  position:absolute; top:7px; right:10px; border:0; background:transparent;
  font-size:23px; line-height:1; color:var(--muted); cursor:pointer; padding:4px 8px;
}
.promo__close:hover{color:var(--forest)}
.promo__icon{font-size:26px; line-height:1; margin-bottom:5px}
.promo__title{font-family:var(--serif); font-size:1.2rem; color:var(--forest); margin-bottom:4px}
.promo__text{font-size:.9rem; color:var(--muted); margin-bottom:13px}
.promo__form{display:flex; flex-direction:column; gap:9px}
.promo__hp{position:absolute; left:-9999px; width:1px; height:1px; opacity:0}
.promo__input{
  width:100%; padding:11px 13px; border:1px solid var(--line); border-radius:9px;
  font:inherit; font-size:.92rem; background:#fff; color:var(--ink);
}
.promo__input:focus{outline:2px solid var(--olive); outline-offset:1px; border-color:var(--olive)}
.promo__consent{display:flex; gap:8px; align-items:flex-start; font-size:.76rem; color:var(--muted); line-height:1.35}
.promo__consent input{margin-top:2px; flex:none}
.promo__consent a{color:var(--terra-dk)}
.promo__submit{display:flex; align-items:center; justify-content:center; gap:8px; width:100%}
.promo__err{font-size:.8rem; color:#a8452f; margin:0}
.promo__ok{text-align:center}
.promo__oktext{font-size:.95rem; color:var(--forest); margin-bottom:10px; font-weight:600}
.promo__download{display:flex; align-items:center; justify-content:center; width:100%}
.promo__alt{font-size:.8rem; color:var(--muted); text-align:center; margin-top:12px}
.promo__alt a{color:var(--terra-dk); font-weight:600}
@media (max-width:520px){
  .promo{ right:10px; left:10px; bottom:10px; width:auto; max-width:none; padding:18px 16px 16px }
}
@media (prefers-reduced-motion:reduce){
  .promo{ transition:none; transform:none }
}

/* ============================================================
   BLOG · infinite scroll (sentinella + spinner)
   ============================================================ */
.blog-sentinel{display:flex;justify-content:center;padding:34px 0 10px}
.blog-spinner{width:28px;height:28px;border:3px solid var(--line);border-top-color:var(--olive);border-radius:50%;animation:btnspin .7s linear infinite}

/* ============================================================
   BARRA CTA MOBILE (Preventivo + WhatsApp)
   ============================================================ */
.mcta{
  position:fixed; left:0; right:0; bottom:0; z-index:55; display:none; gap:8px;
  padding:9px 12px calc(9px + env(safe-area-inset-bottom, 0px));
  background:rgba(251,246,236,.97); backdrop-filter:blur(8px);
  border-top:1px solid var(--line); box-shadow:0 -8px 24px -16px rgba(31,59,48,.5);
}
.mcta__btn{flex:1; display:inline-flex; align-items:center; justify-content:center; gap:6px;
  padding:12px 8px; border-radius:12px; font-weight:700; font-size:.92rem; text-decoration:none; line-height:1}
.mcta__btn--primary{background:var(--terra); color:#fff}
.mcta__btn--wa{background:#25D366; color:#fff}
.mcta__btn--wa svg{width:20px; height:20px}
@media (max-width:640px){
  .mcta{display:flex}
  .wa-float{display:none}          /* la barra include già WhatsApp */
  body{padding-bottom:70px}        /* spazio per non coprire il footer */
  .promo{bottom:78px}              /* popup sopra la barra */
  .cookie-banner{bottom:78px}      /* banner cookie sopra la barra */
}


/* ============================================================
   UAIFAI · TEMA PIXEL  (sovrascrive lo stile "mediterraneo" sopra)
   Idea: palette verde-sabbia-terracotta intatta, ma forme squadrate,
   ombre "dure" a scalino, font pixel per marchio/etichette e una
   griglia di pixel discreta sugli sfondi. Il segnale wifi è il
   motivo ricorrente.
   ============================================================ */
@font-face {
  font-family: "Press Start 2P";
  src: url("../fonts/PressStart2P-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  font-weight: 400;
  src: url("../fonts/Silkscreen-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  font-weight: 700;
  src: url("../fonts/Silkscreen-Bold.ttf") format("truetype");
  font-display: swap;
}

:root {
  --pixel:   "Press Start 2P", "Silkscreen", monospace;
  --pixel2:  "Silkscreen", "Press Start 2P", monospace;
  --serif:   "Space Grotesk", "Inter", system-ui, sans-serif;  /* titoli: geometrico, non più serif */
  --signal:  #7fe0b0;   /* verde "segnale pieno" per accenti su sfondo scuro */
  --radius:    4px;
  --radius-sm: 2px;
  --shadow:    6px 6px 0 rgba(31, 59, 48, .16);
  --shadow-sm: 4px 4px 0 rgba(31, 59, 48, .14);
  --px-line: rgba(31, 59, 48, .07);
}

/* griglia di pixel sul fondo chiaro */
body {
  background-color: var(--sand);
  background-image:
    linear-gradient(var(--px-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--px-line) 1px, transparent 1px);
  background-size: 28px 28px;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; letter-spacing: -0.02em; }

/* etichette in font pixel */
.eyebrow {
  font-family: var(--sans);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .16em;
  line-height: 1.6;
}
.eyebrow::before { width: 10px; height: 10px; background: var(--terra); box-shadow: 14px 0 0 var(--ochre); margin-right: 12px; }

/* titoli di sezione con sottolineatura a pixel */
.section-head h2 { position: relative; padding-bottom: .55em; }
.section-head h2::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 12px; height: 12px; background: var(--terra);
  box-shadow: 16px 0 0 var(--terra), 32px 0 0 var(--ochre), 48px 0 0 var(--ochre), 64px 0 0 var(--sage);
}
.section-head.center h2::after { left: 50%; transform: translateX(-38px); }

/* ---- bottoni: squadrati con ombra dura ---- */
.btn {
  border-radius: 0;
  border-width: 2px;
  font-family: var(--sans);
  box-shadow: 4px 4px 0 var(--forest);
  transition: transform .12s steps(2, end), box-shadow .12s steps(2, end), background .15s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--forest); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--forest); }
.btn--primary { border-color: var(--forest); }
.btn--ghost { border-color: rgba(255,255,255,.55); box-shadow: 4px 4px 0 rgba(255,255,255,.35); }
.btn--ghost:hover { box-shadow: 6px 6px 0 rgba(255,255,255,.35); }
.btn--dark { box-shadow: 4px 4px 0 var(--terra); }
.btn--dark:hover { box-shadow: 6px 6px 0 var(--terra); background: var(--forest); }
.btn--light, .cta-banner .btn--light { box-shadow: 4px 4px 0 var(--forest); }
.hero .btn--primary, .contact .btn--primary, .billing .btn--primary { box-shadow: 4px 4px 0 var(--ochre); }
.hero .btn--primary:hover, .contact .btn--primary:hover { box-shadow: 6px 6px 0 var(--ochre); }

/* ---- navbar ---- */
.nav {
  background: var(--cream);
  backdrop-filter: none;
  border-bottom: 3px solid var(--forest);
}
.brand { gap: .75rem; }
.brand__word {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: -.04em;
  color: var(--forest);
  line-height: 1;
}
.brand__word b { color: var(--terra); font-weight: 700; animation: signal 1.6s steps(2, end) infinite; }
.brand__word b:nth-of-type(2) { animation-delay: .8s; }
.brand:hover .brand__word b { animation-duration: .5s; }
@keyframes signal { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.brand__logo-img { animation: hover-logo 3s ease-in-out infinite; }
@keyframes hover-logo { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(-3deg); } }
.brand__logo-img {
  border-radius: 6px;
  box-shadow: 3px 3px 0 var(--terra);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.brand:hover .brand__logo-img { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--terra); }
.nav__links { gap: 1.5rem; }
.nav__links a:not(.btn) {
  font-family: var(--sans);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}
.brand { margin-right: 1.5rem; }
.nav__links a:not(.btn)::after { height: 3px; }
.nav__cta { font-size: .9rem; padding: .7rem 1.1rem; box-shadow: 3px 3px 0 var(--forest); }

/* ---- hero: griglia più marcata + cursore lampeggiante ---- */
.hero {
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(207,154,69,.22), transparent 60%),
    radial-gradient(800px 460px at 0% 110%, rgba(197,106,63,.26), transparent 55%),
    linear-gradient(160deg, #234034 0%, var(--forest) 55%, #16291f 100%);
  border-bottom: 6px solid var(--terra);
}
.hero::after {
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 1;
}
.hero__intro h1 { font-size: clamp(2.1rem, 5vw, 3.8rem); }
.hero__intro h1 em {
  font-style: normal;
  color: var(--forest);
  background: var(--ochre);
  padding: 0 .18em;
  box-shadow: 4px 4px 0 var(--terra);
}
.hero__intro h1::after {
  content: "";
  display: inline-block;
  width: .45em; height: .9em;
  margin-left: .18em;
  vertical-align: -0.08em;
  background: var(--signal);
  animation: blink 1s steps(1, end) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero .eyebrow { color: var(--signal); }
.hero .eyebrow::before { background: var(--signal); box-shadow: 14px 0 0 rgba(127,224,176,.5); }
.hero__stats .num { font-family: var(--serif); font-weight: 700; font-size: 1.9rem; }

/* "barre di segnale" decorative nel hero */
.hero__intro { position: relative; }
.hero__intro::before {
  content: "";
  position: absolute; right: 0; top: -8px;
  width: 14px; height: 14px;
  background: var(--signal);
  box-shadow:
    -20px 6px 0 var(--signal), -40px 12px 0 rgba(127,224,176,.55), -60px 18px 0 rgba(127,224,176,.25);
  opacity: .9;
  pointer-events: none;
}
@media (max-width: 880px) { .hero__intro::before { display: none; } }

/* ---- vetrina bento: tessere squadrate ---- */
.bento { gap: 12px; }
.bento__tile {
  border-radius: 0;
  border: 2px solid rgba(251,246,236,.16);
  box-shadow: 5px 5px 0 rgba(0,0,0,.35);
}
.bento__tile:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--accent, var(--terra)); border-color: var(--accent, var(--terra)); }
.bento__tile .b-ico { border-radius: 0; box-shadow: 3px 3px 0 rgba(0,0,0,.45); }
.bento__tile .b-go { border-radius: 0; }
.bento__tile--feature .b-ico { border-radius: 0; }
.bento__body h3 { font-family: var(--serif); }

/* ---- card generiche ---- */
.value-card, .service-card, .step, .billing-card, .work, .sector, details.faq, .hero__card {
  border-radius: 0;
  border: 2px solid rgba(31,59,48,.16);
}
.value-card:hover, .service-card:hover, .work:hover, .sector:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--terra);
  border-color: var(--forest);
}
.value-card .ico, .service-card .ico, .sector .s-ico { border-radius: 0; }
.service-card::before { width: 6px; }
.tag, .pill-billing, .work__type, .billing-card .badge { border-radius: 0; }
.pill-billing, .billing-card .badge, .work__type { font-family: var(--sans); font-weight: 700; letter-spacing: .06em; }
.step .n { font-family: var(--serif); font-weight: 700; font-size: 2.2rem; color: var(--terra); opacity: .85; }
.billing-card { border-color: rgba(255,255,255,.18); }
.billing-card:hover { border-color: var(--ochre); box-shadow: 6px 6px 0 rgba(207,154,69,.5); }

/* sezioni scure: griglia pixel */
.billing, .contact, .footer {
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 28px 28px;
}
.services {
  background-color: var(--sand-dk);
  background-image:
    linear-gradient(rgba(31,59,48,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31,59,48,.07) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* FAQ */
details.faq { padding-inline: 20px; }
details.faq summary { font-family: var(--serif); font-weight: 700; }
details.faq summary::after { font-family: var(--serif); font-weight: 700; font-size: 1.6rem; }
details.faq[open] { border-color: var(--terra); box-shadow: 4px 4px 0 var(--terra); }

/* form */
.field input, .field select, .field textarea {
  border-radius: 0;
  border-width: 2px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  box-shadow: 4px 4px 0 var(--terra);
  border-color: var(--terra);
}
.form { border-radius: 0; }

/* banner CTA */
.cta-banner { border-radius: 0; box-shadow: 8px 8px 0 var(--forest); }

/* footer: bordo superiore a pixel alternati */
.footer {
  border-top: 0;
  position: relative;
}
.footer::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 8px;
  background: repeating-linear-gradient(90deg, var(--terra) 0 16px, var(--ochre) 16px 32px, var(--forest) 32px 40px);
}
.footer .brand__logo-img { border-radius: 0; box-shadow: 3px 3px 0 var(--terra); }
.footer .brand__word { color: #fff; }
.footer h4 { font-family: var(--sans); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .9rem; }

/* elementi flottanti */
.wa-float, .cilento-badge, .cookie-banner, .promo, .mobile-cta { border-radius: 0 !important; }
.wa-float { box-shadow: 4px 4px 0 var(--forest); }
.cookie-banner, .promo { border: 2px solid var(--forest); box-shadow: 6px 6px 0 var(--forest); }

/* 404 / dashboard / brochure: logo squadrato */
.err__logo img, .dash__top img, .t-logo, .c-logo { border-radius: 0; image-rendering: pixelated; }

@media (prefers-reduced-motion: reduce) {
  .hero__intro h1::after, .brand__word b, .brand__logo-img { animation: none; }
}
