/* ======================================================================
   asperas.it – foglio di stile unico
   Valori misurati sul tema Jupiter originale (9/11/2026):
   font Roboto Slab, blu #255c93, testo #777 14px/1.66, griglia 1140px,
   menu a hamburger sotto i 1140px, layout mobile sotto i 767px.
   ====================================================================== */

/* Roboto Slab variabile (pesi 300–700), solo caratteri latini: un unico file da 34 KB */
@font-face {
  font-family: "Roboto Slab"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(../fonts/roboto-slab-latin.woff2) format("woff2");
}

:root {
  --primary: #255c93;
  --text: #777;
  --muted: #808080;
  --nav: #909090;
  --label: #57323b;      /* etichette SEDE / EMAIL / TELEFONO */
  --header-h: 99px;
  --gutter: 20px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 10px); }
body {
  margin: 0;
  font: 400 14px/1.66 "Roboto Slab", Georgia, serif;
  color: var(--text); background: #fff; overflow-x: hidden;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
picture { display: contents; }
source { display: none; }
a { color: var(--text); text-decoration: none; transition: color .2s; }
a:hover, a:focus-visible { color: var(--primary); }
p { margin: 0 0 20px; }
strong, b { font-weight: 700; color: var(--primary); }
h1, h2, h3 { margin: 0; font-weight: 400; }
ul { margin: 0 0 20px; padding-left: 32px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.sr-only, .hp {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; background: #fff; padding: 10px 16px; }
.skip-link:focus { left: 10px; top: 10px; }
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 var(--gutter); }
.icon { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- Pulsante "Contattaci" */
.btn {
  display: inline-block; padding: 20px 28px; border: 0; border-radius: 0;
  font: 700 14px/14px "Roboto Slab", Georgia, serif; letter-spacing: 2px; text-align: center;
  color: #fff; background: var(--primary); cursor: pointer; transition: background-color .2s;
}
.btn:hover, .btn:focus-visible { color: #fff; background: #1c4673; }
.btn--light { background: #fff; color: var(--primary); }
.btn--light:hover, .btn--light:focus-visible { background: #e9eef4; color: var(--primary); }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.link-button:hover { text-decoration: underline; }
.cta { display: flex; align-items: flex-start; justify-content: center; min-height: 100px; padding: 10px var(--gutter) 36px; }

/* ---------------------------------------------------------------- Header
   Desktop (come Jupiter "sticky-style-fixed"): header fisso alto 99px; dopo 99px di
   scorrimento (classe .is-sticky aggiunta da site.js) si riduce a 56px, logo 55px,
   fondo bianco al 90%; torna normale in cima alla pagina. Transizioni 0,25–0,35 s.
   Sotto i 1140px l'header resta fisso a 91px senza ridursi (l'originale scorreva via: scelta di Davide). */
.site-header {
  --hh: var(--header-h);
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--hh);
  border-bottom: 1px solid #e3e3e3;
  transition: height .3s ease-in-out, border-color .3s;
}
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: #fff; transition: opacity .2s ease-out;
}
.site-header.is-sticky { --hh: 56px; border-bottom-color: #eee; }
.site-header.is-sticky::before { opacity: .9; }
body { padding-top: var(--header-h); }
.site-header__inner {
  height: 100%; max-width: 1140px; margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.site-logo { display: block; line-height: 0; align-self: flex-start; }
.site-logo__img { width: 225px; height: 90px; object-fit: contain; object-position: left center; transition: width .3s ease-in-out, height .3s ease-in-out; }
.site-header.is-sticky .site-logo__img { width: 137.5px; height: 55px; }
@media (prefers-reduced-motion: reduce) {
  .site-header, .site-header::before, .site-logo__img { transition: none; }
}
.nav-toggle { display: none; }

.site-nav__list { list-style: none; margin: 0 -20px 0 0; padding: 0; display: flex; }
.site-nav__item { position: relative; }
.site-nav__link {
  display: block; padding: 0 17px; border: 0; background: none; cursor: pointer;
  font: 400 14px/24px "Roboto Slab", Georgia, serif; text-transform: uppercase; color: var(--nav);
}
.site-nav__link span, .site-nav__link { text-underline-offset: 6px; }
.site-nav__link:hover, .site-nav__link:focus-visible,
.site-nav__item:hover > .site-nav__link { color: var(--primary); }
.site-nav__item.is-active > .site-nav__link { text-decoration: underline; text-decoration-thickness: 1px; }
.site-nav__link .icon--down { display: none; }
.site-nav__sub {
  position: absolute; top: calc((var(--hh) + 24px) / 2); left: 0; z-index: 60; min-width: 250px;
  list-style: none; margin: 0; padding: 10px 0; background: var(--primary);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility 0s .2s;
}
/* area "ponte" per non perdere l'hover scendendo verso il sottomenu */
.site-nav__item.has-sub::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: calc((var(--hh) - 24px) / 2 + 1px); }
.site-nav__item:hover > .site-nav__sub, .site-nav__item:focus-within > .site-nav__sub, .site-nav__sub.is-open {
  opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .2s;
}
.site-nav__sub a {
  display: block; padding: 10px 20px; font-size: 12px; line-height: 1.4; text-transform: uppercase; color: #b3b3b3;
}
.site-nav__sub a:hover, .site-nav__sub a:focus-visible, .site-nav__sub a[aria-current="page"] { color: #fff; }

@media (max-width: 1140px) {
  :root { --header-h: 91px; }
  /* mobile/tablet: header fisso alto 91px, senza riduzione (scelta di Davide, 9/11/2026) */
  .site-header, .site-header.is-sticky { --hh: var(--header-h); transition: none; }
  .site-header.is-sticky::before { opacity: 1; }
  .site-header.is-sticky .site-logo__img { width: 160px; height: 64px; }
  .site-logo { align-self: center; }
  .site-logo__img { width: 160px; height: 64px; }
  .nav-toggle {
    display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -10px;
    padding: 0; border: 0; background: none; color: #444; cursor: pointer; font-size: 26px;
  }
  .nav-toggle .icon { stroke-width: 2.6; }
  .nav-toggle .icon--close, .nav-open .nav-toggle .icon--menu { display: none; }
  .nav-open .nav-toggle .icon--close { display: block; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    background: #fff; border-top: 1px solid #e3e3e3; box-shadow: 0 8px 16px rgba(0, 0, 0, .08); display: none;
  }
  .nav-open .site-nav { display: block; }
  .site-nav__list { display: block; margin: 0; padding: 0 var(--gutter); }
  .site-nav__item { border-bottom: 1px solid #ededed; }
  .site-nav__item:last-child { border-bottom: 0; }
  .site-nav__link { width: 100%; padding: 13px 0; text-align: left; display: flex; justify-content: space-between; align-items: center; }
  .site-nav__link .icon--down { display: block; font-size: 18px; transition: transform .2s; }
  .sub-toggle[aria-expanded="true"] .icon--down { transform: rotate(180deg); }
  .site-nav__item.has-sub::after { display: none; }
  .site-nav__sub {
    position: static; min-width: 0; padding: 0 0 8px; background: none; box-shadow: none;
    opacity: 1; visibility: visible; transform: none; transition: none; display: none;
  }
  .site-nav__item:hover > .site-nav__sub, .site-nav__item:focus-within > .site-nav__sub { display: none; }
  .site-nav__sub.is-open { display: block !important; }
  .site-nav__sub a { padding: 9px 0 9px 15px; color: var(--nav); }
  .site-nav__sub a:hover, .site-nav__sub a[aria-current="page"] { color: var(--primary); }
}

/* ---------------------------------------------------------------- Barra del titolo e testata (pagine interne) */
.intro { background: var(--primary); padding: 15px 0; }
.intro__inner { max-width: 1140px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; }
.intro__title {
  flex: 1 1 100%; margin: 25px 20px 15px; color: #fff;
  font-size: 20px; line-height: 24px; letter-spacing: 2px; text-transform: uppercase;
}
.crumbs {
  flex: 1 1 100%; margin: 5px 20px 0; text-align: right;
  font-size: 10px; line-height: 14px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #fff;
}
.crumbs a { color: rgba(255, 255, 255, .5); }
.crumbs a:hover, .crumbs a:focus-visible { color: #fff; }
.ihero { line-height: 0; background: #ddd; }
.ihero__img { width: 100%; height: 400px; object-fit: cover; object-position: center; }
@media (max-width: 767px) {
  .intro { padding: 15px 0 10px; }
  .intro__inner { justify-content: center; }
  .intro__title { margin: 25px var(--gutter) 15px; font-size: 22px; line-height: 24px; text-align: left; }
  .crumbs { margin: 0 var(--gutter) 5px; text-align: center; font-size: 13px; line-height: 20px; }
  .ihero__img { height: auto; aspect-ratio: 1024 / 231; }
}

/* ---------------------------------------------------------------- Contenuto delle pagine interne */
.content { max-width: 1240px; margin: 0 auto; padding: 20px 0 0; }
.content li { line-height: 1.66; }
.content ul { margin-bottom: 15px; }
.content .gap { height: 23px; margin-bottom: 20px; }
.lead-title {
  margin: 0 0 18px; padding: 30px 0 50px;
  font-size: 36px; line-height: 1.3; font-weight: 700; text-transform: uppercase; color: var(--primary);
}
.page-cosa-facciamo .content { padding-top: 0; padding-bottom: 130px; }   /* come l'originale: spazio vuoto prima del pulsante */
@media (max-width: 1280px) { .content { padding-left: var(--gutter); padding-right: var(--gutter); } }
@media (max-width: 767px) {
  .content { padding: 55px 15px 0; }
  .lead-title { font-size: 24px; padding: 0 0 30px; }
}

/* ---------------------------------------------------------------- Home */
.home-hero { line-height: 0; }   /* l'immagine parte subito sotto il menu (richiesta di Davide: niente spazio come nell'originale) */
.home-hero__img { width: 100%; height: auto; }
.home-wrap { max-width: 1140px; margin: 0 auto; padding: 0 50px 0 20px; }   /* come la griglia WPBakery: 402–1472px a 1920 */
.home-intro { padding: 35px 0 69px; text-align: center; color: var(--muted); line-height: 1.3; }
.home-intro p { margin: 0 0 20px; }
.home-intro p:last-child { margin: 0; }
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.service { text-align: center; }
.service__icon {
  display: flex; align-items: center; justify-content: center; width: 100px; height: 100px; margin: 0 auto;
  border: 1.6px solid var(--primary); border-radius: 50%; background: #fff; color: var(--primary);
  transition: background-color .3s, color .3s;
}
.service:hover .service__icon { background: var(--primary); color: #fff; }
.svc-icon { width: 48px; height: 48px; fill: currentColor; }
.svc-icon--narrow { width: 27px; }
.service__title { padding: 27px 0 28px; font-size: 18px; line-height: 23.4px; text-transform: uppercase; }
.service__title a { color: var(--primary); }
.service__text { margin: 0; color: var(--text); }
.page-home .cta { padding-top: 49px; }
@media (max-width: 1140px) { .home-wrap { padding: 0 var(--gutter); } }
@media (max-width: 767px) {
  .home-hero { padding: 0 var(--gutter); }
  .home-wrap { padding: 0 35px; }
  .home-intro { padding: 38px 0 68px; line-height: 1.3; }
  .services { grid-template-columns: 1fr; gap: 40px; }
  .page-home .cta { padding-top: 50px; }
}

/* ---------------------------------------------------------------- Soci */
.soci { padding-top: 20px; }
.socio { display: grid; grid-template-columns: 288px 1fr; gap: 0 29px; margin-bottom: 20px; }
.socio__logo { display: flex; justify-content: center; align-items: flex-start; padding-top: 30px; }
.socio__logo img { width: auto; max-width: 100%; max-height: 130px; }
.socio__name { margin: 0 0 20px; font-size: 14px; line-height: 1.66; font-weight: 700; color: var(--primary); }
@media (max-width: 767px) {
  .socio { grid-template-columns: 1fr; gap: 10px; margin-bottom: 30px; }
  .socio__logo { justify-content: flex-start; padding-top: 0; }
}

/* ---------------------------------------------------------------- Contatti */
.contacts { max-width: 1140px; padding: 100px 50px 200px 20px; text-align: center; }
@media (max-width: 767px) { .contacts { padding: 60px 15px 80px; } }
.contacts__label { margin: 0 0 22px; font-size: 18px; line-height: 1.3; color: var(--label); }
.contacts__value { font-weight: 300; line-height: 24px; }
.contacts__value a { color: inherit; }
.contacts__value a:hover { color: var(--primary); }

/* ---------------------------------------------------------------- Footer */
.site-footer { background: var(--primary); color: #fff; padding: 45px 0 30px; text-align: center; font-weight: 300; }
.site-footer p { margin: 0; }
.site-footer a { color: #fff; }
.site-footer a:hover, .site-footer a:focus-visible { color: #fff; text-decoration: underline; }
.site-footer__data { font-size: 14px; line-height: 1.66; }
.site-footer__credits { margin: 45px 0 30px !important; line-height: 0; }
.site-footer__credits a { display: inline-block; }
.site-footer__credits-img { width: 180px; height: auto; }
.site-footer__legal { font-size: 12px; line-height: 1.6; color: rgba(255, 255, 255, .75); }
.site-footer__legal a, .site-footer__legal .link-button { color: rgba(255, 255, 255, .75); font-size: 12px; }
.site-footer__legal a:hover, .site-footer__legal .link-button:hover { color: #fff; }

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 45px; height: 45px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .25); color: #fff; font-size: 22px;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s, background-color .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transition: opacity .3s, background-color .2s; }
.to-top:hover, .to-top:focus-visible { color: #fff; background: rgba(0, 0, 0, .45); }
.to-top .icon { stroke-width: 2.5; }

/* ---------------------------------------------------------------- Pagine semplici (privacy, cookie, 404) */
.prose { max-width: 1140px; margin: 0 auto; padding: 40px var(--gutter) 60px; }
.prose h1 { font-size: 28px; line-height: 1.3; color: var(--primary); font-weight: 700; margin: 0 0 20px; }
.prose h2 { font-size: 20px; color: var(--primary); margin: 30px 0 10px; font-weight: 700; }
.prose h3 { font-size: 16px; margin: 20px 0 8px; font-weight: 700; color: #555; }
.prose a { color: var(--primary); text-decoration: underline; }
.prose strong { color: inherit; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 13px; }
.prose th, .prose td { border: 1px solid #ddd; padding: 8px; text-align: left; vertical-align: top; }
.prose th { background: #f2f5f9; }
.table-wrap { overflow-x: auto; }
/* ---------------------------------------------------------------- Banner cookie */
.cookie {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  background: var(--primary); color: #fff;
  padding: 18px max(var(--gutter), calc((100% - 1140px) / 2));
  box-shadow: 0 -4px 16px rgba(0, 0, 0, .25);
  display: grid; grid-template-columns: 1fr auto; gap: 6px 30px; align-items: center;
}
.cookie[hidden] { display: none; }
.cookie { max-height: 100vh; max-height: 100dvh; overflow-y: auto; }
.cookie__title { grid-column: 1; margin: 0; font-weight: 700; font-size: 15px; padding-right: 30px; }
.cookie__text { grid-column: 1; margin: 0; font-size: 13px; line-height: 1.5; }
.cookie__text a { color: #fff; text-decoration: underline; }
.cookie__prefs { grid-column: 1 / -1; display: grid; gap: 8px; margin: 8px 0; font-size: 13px; }
.cookie__prefs[hidden] { display: none; }
.cookie__opt { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.cookie__opt input { margin-top: 3px; width: 16px; height: 16px; flex-shrink: 0; accent-color: #fff; }
.cookie__actions { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.cookie__prefs:not([hidden]) ~ .cookie__actions { grid-column: 1 / -1; grid-row: auto; }
.cookie .btn { padding: 11px 18px; }
.cookie .btn[hidden] { display: none; }
.btn--outline { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px #fff; }
.btn--outline:hover, .btn--outline:focus-visible { background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 2px #fff; }
.cookie__close { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; padding: 0; border: 0; background: none; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cookie__close .icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }
@media (max-width: 899px) {
  .cookie { grid-template-columns: 1fr; padding: 16px var(--gutter); }
  .cookie__actions { grid-column: 1; grid-row: auto; justify-content: stretch; }
  .cookie__actions .btn { flex: 1 1 auto; }
}


/* ---------------------------------------------------------------- Animazioni all'ingresso nello schermo
   Come "mk-animate-element" di Jupiter: data-animate="flip-y" (bollini dei servizi in home)
   e data-animate="fade-in" (testo introduttivo, titolo di Cosa facciamo). site.js aggiunge
   .is-in quando l'elemento entra nello schermo. Senza JS o con "riduci movimento" tutto è visibile. */
@media (prefers-reduced-motion: no-preference) {
  .js [data-animate] { opacity: 0; }
  .js [data-animate].is-in { opacity: 1; }
  .js [data-animate="flip-y"].is-in { animation: anim-flip-y .6s cubic-bezier(.77, 0, .175, 1) both; }
  .js [data-animate="fade-in"].is-in { animation: anim-fade .7s cubic-bezier(.445, .05, .55, .95) both; }
}
@keyframes anim-flip-y {
  from { transform: perspective(400px) rotateY(90deg); opacity: 0; }
  to   { transform: perspective(400px) rotateY(0); opacity: 1; }
}
@keyframes anim-fade { from { opacity: .1; } to { opacity: 1; } }
