/* RST Consulting — stili del tema (v1.6.1).
   Il nome del file contiene la versione: a ogni release va rinominato,
   perché la cache dell'hosting ignora i parametri ?ver=. */


:root {
  color-scheme: light;
  --navy: #152280;
  --white: #FFFFFF;
  --grey-light: #DBDBDB;
  --carbon: #1C1C1C;
  --steel: #6B7280;
  --blu-velo: #E7EBF9;
  --blu-velo-2: #F3F5FC;
  --max-w: 1080px;
  --font: "Archivo", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  font-weight: 400;
  color: var(--carbon);
  background: linear-gradient(165deg, var(--white) 0%, var(--blu-velo-2) 30%, var(--blu-velo) 55%, var(--blu-velo-2) 78%, var(--white) 100%);
  background-size: 100% 260%;
  background-attachment: scroll;
  animation: rst-respiro 26s ease-in-out infinite alternate;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@keyframes rst-respiro {
  from { background-position: 50% 0%; }
  to   { background-position: 50% 100%; }
}

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
  letter-spacing: -0.015em;
}

p { margin: 0; }

a { color: var(--navy); }

:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

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

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--steel);
  margin-bottom: 20px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--grey-light);
}

body.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--carbon);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.logo strong { color: var(--navy); font-weight: 700; }

nav.main-nav { display: flex; align-items: center; gap: 28px; }

nav.main-nav ul.menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav.main-nav a:not(.btn) {
  color: var(--carbon);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
nav.main-nav a:not(.btn):hover { color: var(--navy); }
nav.main-nav .current-menu-item > a,
nav.main-nav .current_page_item > a {
  color: var(--navy);
  font-weight: 700;
  border-bottom-color: var(--navy);
}

.btn {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 26px;
  border: 1px solid var(--navy);
  cursor: pointer;
  font-family: var(--font);
  transition: opacity 0.15s ease;
}
.btn:hover { opacity: 0.9; }

.btn-ghost {
  background: var(--white);
  color: var(--navy);
}
.btn-ghost:hover { opacity: 1; background: var(--grey-light); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--grey-light);
  padding: 8px 12px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--carbon);
  cursor: pointer;
}

/* ---------- Sezioni ---------- */

section { padding: 88px 0; }
section.grey { background: rgba(21, 34, 128, 0.045); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: 1.9rem; color: var(--navy); }
.section-head p { margin-top: 16px; color: var(--steel); }
section.grey .section-head p { color: var(--carbon); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 100px 0 96px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.foto {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.03);
}

.hero-foto {
  border: 1px solid var(--grey-light);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--white);
}

.banner-foto {
  padding: 0;
  line-height: 0;
  border-top: 1px solid var(--grey-light);
  border-bottom: 1px solid var(--grey-light);
}
.banner-foto img { height: 400px; }

.foto-larga {
  line-height: 0;
  border-top: 1px solid var(--grey-light);
  border-bottom: 1px solid var(--grey-light);
}
.foto-larga img { height: 340px; }

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  color: var(--navy);
  max-width: 17ch;
}

.hero .sub {
  margin-top: 22px;
  font-size: 1.15rem;
  color: var(--steel);
  max-width: 48ch;
}

.hero .btn { margin-top: 36px; }

/* Crocini da disegno tecnico, decorativi */
.mark {
  position: absolute;
  width: 22px;
  height: 22px;
  pointer-events: none;
}
.mark::before, .mark::after {
  content: "";
  position: absolute;
  background: var(--grey-light);
}
.mark::before { left: 50%; top: 0; width: 1px; height: 100%; }
.mark::after { top: 50%; left: 0; height: 1px; width: 100%; }
.mark.tl { top: 36px; left: 24px; }
.mark.tr { top: 36px; right: 24px; }
.mark.bl { bottom: 36px; left: 24px; }
.mark.br { bottom: 36px; right: 24px; }

/* ---------- Il problema ---------- */

.problema { border-top: 1px solid var(--grey-light); }
.problema .testo {
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  line-height: 1.5;
  max-width: 34ch;
  font-weight: 400;
}
.problema .testo strong { color: var(--navy); font-weight: 700; }

/* ---------- Griglie ---------- */

.grid-servizi {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.card {
  background: var(--white);
  border: 1px solid var(--grey-light);
  padding: 32px 28px;
}
section.grey .card { border-color: var(--grey-light); }

.card h3 { font-size: 1.15rem; color: var(--navy); }
.card p { margin-top: 12px; color: var(--steel); font-size: 0.97rem; }

.link-servizi {
  display: inline-block;
  margin-top: 36px;
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--navy);
  padding-bottom: 2px;
}

.grid-passi {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.passo .num {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.1em;
}
.passo h3 {
  margin-top: 14px;
  font-size: 1.15rem;
  color: var(--carbon);
}
.passo p { margin-top: 10px; color: var(--steel); font-size: 0.97rem; }
.passo {
  border-top: 2px solid var(--navy);
  padding-top: 22px;
}

.grid-perche {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-aree {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 56px;
}

/* ---------- Chi siamo: testo + ritratto ---------- */

.chi-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 64px;
  align-items: stretch;
}

.foto-ritratto {
  margin: 0;
  border: 1px solid var(--grey-light);
  position: relative;
  overflow: hidden;
  min-height: 360px;
}
.foto-ritratto img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  filter: saturate(0.9) contrast(1.02);
}

/* ---------- Contatti ---------- */

.grid-contatti {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: start;
}

.contatto-voce { margin-bottom: 28px; }
.contatto-voce .label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--steel);
  margin-bottom: 6px;
}
.contatto-voce .valore {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
}
.contatto-voce a { text-decoration: none; color: var(--navy); }
.contatto-voce a:hover { text-decoration: underline; }
.contatto-voce .nota { color: var(--steel); font-size: 0.95rem; font-weight: 400; }

/* ---------- Form ---------- */

form .campo { margin-bottom: 20px; }

form label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--steel);
  margin-bottom: 8px;
}

form input, form select, form textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--carbon);
  background: var(--white);
  border: 1px solid var(--grey-light);
  padding: 12px 14px;
  border-radius: 0;
}
form input:focus, form select:focus, form textarea:focus {
  outline: 2px solid var(--navy);
  outline-offset: 0;
  border-color: var(--navy);
}
form textarea { min-height: 130px; resize: vertical; }
form input[type="file"] { padding: 10px 14px; }

.form-candidatura { max-width: 680px; }

.campo-doppio {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.hint {
  font-size: 0.85rem;
  color: var(--steel);
  margin-top: 6px;
}

/* Campo honeypot antispam: nascosto ai visitatori */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.avviso {
  padding: 14px 18px;
  margin-bottom: 28px;
  font-size: 0.95rem;
  border: 1px solid var(--navy);
  color: var(--navy);
  background: var(--white);
  font-weight: 700;
}
.avviso.errore { border-color: var(--carbon); color: var(--carbon); }

/* ---------- Pagine interne ---------- */

.pagina-testata {
  padding: 88px 0 64px;
  border-bottom: 1px solid var(--grey-light);
}
.pagina-testata h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  color: var(--navy);
  max-width: 22ch;
}
.pagina-testata .sub {
  margin-top: 18px;
  color: var(--steel);
  font-size: 1.1rem;
  max-width: 55ch;
}

.servizio-dettaglio { padding: 72px 0; }
.servizio-dettaglio h2 { font-size: 1.6rem; color: var(--navy); max-width: 24ch; }
.servizio-dettaglio .intro { margin-top: 14px; max-width: 60ch; color: var(--carbon); }

.grid-dettaglio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.dettaglio-blocco {
  background: var(--white);
  border: 1px solid var(--grey-light);
  padding: 26px 24px;
}
section.grey .dettaglio-blocco { border-color: var(--grey-light); }

.dettaglio-blocco .label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--steel);
  margin-bottom: 10px;
}
.dettaglio-blocco p { font-size: 0.97rem; color: var(--carbon); }

.prosa { max-width: 62ch; }
.prosa p { margin-bottom: 22px; font-size: 1.05rem; }
.prosa p:last-child { margin-bottom: 0; }
.prosa h2 { color: var(--navy); font-size: 1.4rem; margin: 44px 0 14px; }
.prosa h3 { color: var(--carbon); font-size: 1.1rem; margin: 28px 0 10px; }
.prosa ul { margin: 0 0 22px; padding-left: 22px; }
.prosa li { margin-bottom: 10px; }
.prosa table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.95rem;
}
.prosa th, .prosa td {
  border: 1px solid var(--grey-light);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.prosa th {
  background: var(--grey-light);
  color: var(--carbon);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.cta-finale { text-align: left; border-top: 1px solid var(--grey-light); }
.cta-finale h2 { font-size: 1.7rem; color: var(--navy); }
.cta-finale p { margin-top: 14px; color: var(--steel); max-width: 50ch; }
.cta-finale .btn { margin-top: 28px; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--carbon);
  color: var(--grey-light);
  padding: 56px 0 40px;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.site-footer .brand { color: var(--white); font-weight: 700; font-size: 1.05rem; }
.site-footer p { margin-top: 10px; line-height: 1.7; }
.site-footer a { color: var(--grey-light); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer ul { list-style: none; margin: 10px 0 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer .footer-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--white);
}
.footer-bottom {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid #3a3a3a;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Cookie banner ---------- */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--grey-light);
  padding: 18px 0;
  z-index: 100;
  display: none;
}
.cookie-banner.visibile { display: block; }
.cookie-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cookie-inner p { font-size: 0.9rem; color: var(--carbon); max-width: 62ch; }
.cookie-azioni { display: flex; gap: 12px; }
.cookie-azioni .btn { padding: 9px 20px; font-size: 0.88rem; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  section { padding: 64px 0; }
  .hero { padding: 64px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-foto { aspect-ratio: 16 / 10; }
  .banner-foto img { height: 240px; }
  .foto-larga img { height: 220px; }
  .grid-passi, .grid-perche, .grid-dettaglio, .grid-aree { grid-template-columns: 1fr; gap: 20px; }
  .campo-doppio { grid-template-columns: 1fr; gap: 0; }
  .grid-contatti { grid-template-columns: 1fr; gap: 48px; }
  .chi-grid { grid-template-columns: 1fr; gap: 40px; }
  .foto-ritratto { max-width: 420px; min-height: 0; }
  .foto-ritratto img { position: static; width: 100%; height: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .mark { display: none; }

  .nav-toggle { display: block; }
  nav.main-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--grey-light);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
    gap: 18px;
  }
  nav.main-nav.aperta { display: flex; }
  nav.main-nav ul.menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
}

@media (max-width: 600px) {
  .grid-servizi { grid-template-columns: 1fr; }
  .prosa table { display: block; overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  body { animation: none; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- Risultati (pagina Servizi) ---------- */

.risultati {
  background: var(--navy);
  color: var(--white);
}
.risultati .eyebrow { color: var(--grey-light); }
.risultati h2 { color: var(--white); font-size: 1.9rem; }
.risultati .intro { margin-top: 14px; max-width: 60ch; color: var(--grey-light); }

.grid-numeri {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 48px;
}
.numero {
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 26px 24px;
}
.numero .valore {
  font-size: 2.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.numero .etichetta {
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--grey-light);
}
.nota-numeri {
  margin-top: 28px;
  font-size: 0.95rem;
  color: var(--grey-light);
  max-width: 70ch;
}

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

/* ---------- Ingresso dei contenuti allo scorrimento ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visibile { opacity: 1; transform: none; }

.grid-servizi .reveal:nth-child(2), .grid-passi .reveal:nth-child(2),
.grid-perche .reveal:nth-child(2), .grid-aree .reveal:nth-child(2),
.grid-numeri .reveal:nth-child(2), .grid-dettaglio .reveal:nth-child(2) { transition-delay: 0.1s; }
.grid-servizi .reveal:nth-child(3), .grid-passi .reveal:nth-child(3),
.grid-perche .reveal:nth-child(3), .grid-aree .reveal:nth-child(3),
.grid-numeri .reveal:nth-child(3), .grid-dettaglio .reveal:nth-child(3) { transition-delay: 0.2s; }
.grid-servizi .reveal:nth-child(4), .grid-aree .reveal:nth-child(4),
.grid-numeri .reveal:nth-child(4) { transition-delay: 0.3s; }

/* ---------- Lavora con noi: foto a sinistra del testo ---------- */

.lavora-grid {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 56px;
  align-items: stretch;
}
.foto-lavora {
  order: -1;
  margin: 0;
  border: 1px solid var(--grey-light);
  position: relative;
  overflow: hidden;
  min-height: 380px;
}
.foto-lavora img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  filter: saturate(0.9) contrast(1.02);
}
.lavora-grid .grid-servizi { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 860px) {
  .lavora-grid { grid-template-columns: 1fr; gap: 40px; }
  .foto-lavora { order: 2; max-width: 420px; min-height: 0; }
  .foto-lavora img { position: static; width: 100%; height: auto; }
  .lavora-grid .grid-servizi { grid-template-columns: 1fr; }
}

/* ---------- Hero a tutta larghezza (Home) ---------- */

.hero-full {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--grey-light);
}
.hero-sfondo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 45%;
  filter: saturate(0.85) contrast(1.03);
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(13, 20, 74, 0.88) 0%, rgba(13, 20, 74, 0.62) 48%, rgba(13, 20, 74, 0.26) 100%);
}
.hero-contenuto {
  position: relative;
  z-index: 1;
  padding-top: 80px;
  padding-bottom: 80px;
}
.hero-contenuto .eyebrow { color: rgba(255, 255, 255, 0.78); }
.hero-contenuto h1 {
  color: var(--white);
  max-width: 17ch;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}
.hero-contenuto .sub {
  margin-top: 22px;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 48ch;
}
.btn-hero {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
  margin-top: 36px;
}

@media (max-width: 860px) {
  .hero-full { min-height: 72vh; }
  .hero-scrim { background: linear-gradient(180deg, rgba(13, 20, 74, 0.82) 0%, rgba(13, 20, 74, 0.55) 100%); }
}
