/* ──────────────────────────────────────────────────────────────
   servizi.css, stile condiviso delle pagine servizio
   Stessi token del sito principale (index.html).
   Non toccare i colori qui senza aggiornare anche index.html.
   ────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #0D0B09;
  --bg-2:    #141210;
  --bg-3:    #1C1916;
  --cream:   #EDE7DC;
  --cream-2: #9A9089;
  --cream-3: #877D73;
  --rust:    #C4714A;
  --line:    rgba(237,231,220,.07);
  --fs:      'Syne', sans-serif;
  --fp:      'Playfair Display', Georgia, serif;
  --e-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --e-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--fs);
  font-weight: 400;
  overflow-x: hidden;
}

/* grana */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 9000; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='.04'/%3E%3C/svg%3E");
  opacity: .55;
}

a { color: inherit; text-decoration: none; }
a:focus-visible, summary:focus-visible, .btn-mail:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
}
::selection { background: var(--rust); color: #0D0B09; }

.scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 9500;
  height: 2px; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%;
  background: var(--rust);
  pointer-events: none;
  opacity: .9;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  padding: 1.6rem 2.8rem;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid transparent;
  transition: padding .4s var(--e-out), background .4s ease,
              border-color .4s ease, transform .45s var(--e-out),
              backdrop-filter .4s ease;
}
nav.nav-scrolled {
  padding: .95rem 2.8rem;
  background: rgba(13, 11, 9, .72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
nav.nav-hidden { transform: translateY(-105%); }
.nav-logo {
  font-family: var(--fp);
  font-style: italic;
  font-size: 1rem;
  color: var(--cream);
  opacity: .75;
  transition: opacity .2s;
}
.nav-logo:hover { opacity: 1; }
.nav-links {
  display: flex; gap: 1.8rem; list-style: none;
  flex-wrap: wrap; justify-content: flex-end;
}
.nav-links a {
  font-size: .74rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cream-2);
  font-weight: 600;
  transition: color .2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--cream); }

/* ── ANIMAZIONI DI ENTRATA ── */
html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s var(--e-quart), transform .8s var(--e-quart);
}
html.js .reveal.is-visible { opacity: 1; transform: none; }

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

/* ── HERO DI PAGINA ── */
.page-hero {
  padding: 11rem 2.8rem 4rem;
  max-width: 1160px;
  margin: 0 auto;
}
.breadcrumb {
  font-size: .7rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cream-3);
  font-weight: 600;
  margin-bottom: 2.4rem;
}
.breadcrumb a { color: var(--cream-3); transition: color .2s; }
.breadcrumb a:hover { color: var(--rust); }
.breadcrumb span { opacity: .45; margin: 0 .5rem; }

.page-h1 {
  font-family: var(--fp);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(2.6rem, 6.4vw, 5.4rem);
  line-height: .95;
  letter-spacing: -.02em;
  max-width: 15ch;
  text-wrap: balance;
}
.page-h1 strong { font-style: normal; font-weight: 700; }

.page-lead {
  margin-top: 2.6rem;
  max-width: 62ch;
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.9;
  color: var(--cream-2);
}
.page-lead strong { color: var(--cream); font-weight: 600; }

/* riquadro risposta rapida */
.quick {
  margin-top: 3.4rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.quick div {
  padding: 1.8rem 1.6rem 1.8rem 0;
}
.quick div + div { border-left: 1px solid var(--line); padding-left: 1.6rem; }
.quick dt {
  font-size: .68rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--cream-3);
  font-weight: 600;
  margin-bottom: .8rem;
}
.quick dd { font-size: .92rem; line-height: 1.6; color: var(--cream); }

/* ── CORPO A DUE COLONNE ── */
.page-body {
  max-width: 1160px;
  margin: 0 auto;
  padding: 5rem 2.8rem 2rem;
  display: grid;
  grid-template-columns: 1fr 2.3fr;
  gap: 6rem;
  align-items: start;
}
.page-index { position: sticky; top: 7.5rem; }
.page-index .section-tag {
  font-size: .68rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--cream-3);
  font-weight: 600;
  display: block;
  margin-bottom: 1.6rem;
}
.page-index ol { list-style: none; counter-reset: idx; }
.page-index li { counter-increment: idx; }
.page-index a {
  display: block;
  padding: .55rem 0;
  font-size: .8rem;
  letter-spacing: .04em;
  color: var(--cream-3);
  border-bottom: 1px solid var(--line);
  transition: color .2s, padding-left .25s var(--e-out);
}
.page-index a::before {
  content: counter(idx, decimal-leading-zero);
  font-size: .64rem;
  margin-right: .7rem;
  opacity: .55;
}
.page-index a:hover { color: var(--cream); padding-left: .4rem; }
.page-index a.is-current { color: var(--rust); }

.page-content > section { padding-bottom: 4.6rem; }
.page-content h2 {
  font-family: var(--fp);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.15;
  margin-bottom: 1.8rem;
  text-wrap: balance;
}
.page-content h3 {
  font-size: .95rem;
  letter-spacing: .02em;
  font-weight: 700;
  margin: 2.2rem 0 .8rem;
  color: var(--cream);
}
.page-content p {
  font-size: 1rem;
  line-height: 1.95;
  color: var(--cream-2);
  max-width: 68ch;
}
.page-content p + p { margin-top: 1.2rem; }
.page-content p strong { color: var(--cream); font-weight: 600; }
.page-content a.inline {
  color: var(--cream);
  border-bottom: 1px solid var(--cream-3);
  transition: border-color .2s, color .2s;
}
.page-content a.inline:hover { color: var(--rust); border-color: var(--rust); }

/* elenco puntato */
.list-plain { list-style: none; margin-top: 1.4rem; max-width: 68ch; }
.list-plain li {
  position: relative;
  padding: .75rem 0 .75rem 1.5rem;
  border-bottom: 1px solid var(--line);
  color: var(--cream-2);
  font-size: .95rem;
  line-height: 1.7;
}
.list-plain li::before {
  content: '';
  position: absolute; left: 0; top: 1.35rem;
  width: 5px; height: 5px;
  background: var(--rust);
  border-radius: 50%;
}
.list-plain li strong { color: var(--cream); font-weight: 600; }

/* lista numerata: come lavoro */
.steps { list-style: none; counter-reset: st; margin-top: 1.6rem; }
.steps li {
  counter-increment: st;
  position: relative;
  padding: 1.4rem 0 1.4rem 3.6rem;
  border-bottom: 1px solid var(--line);
  max-width: 68ch;
}
.steps li::before {
  content: counter(st, decimal-leading-zero);
  position: absolute; left: 0; top: 1.5rem;
  font-size: .72rem;
  letter-spacing: .1em;
  color: var(--rust);
  font-weight: 700;
}
.steps b {
  display: block;
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: .4rem;
  color: var(--cream);
}
.steps span { font-size: .93rem; line-height: 1.75; color: var(--cream-2); }

/* tabella */
.tbl-wrap { overflow-x: auto; margin-top: 1.8rem; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  min-width: 560px;
}
caption {
  text-align: left;
  font-size: .7rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cream-3);
  font-weight: 600;
  padding-bottom: 1rem;
}
th, td {
  text-align: left;
  padding: 1.1rem 1.2rem 1.1rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.65;
}
thead th {
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cream-3);
  font-weight: 600;
  border-bottom-color: rgba(237,231,220,.16);
}
tbody th {
  font-weight: 700;
  color: var(--cream);
  width: 26%;
  padding-right: 1.6rem;
}
tbody td { color: var(--cream-2); }
tbody tr:hover td, tbody tr:hover th { background: var(--bg-2); }

/* nota */
.note {
  margin-top: 1.8rem;
  border-left: 2px solid var(--rust);
  padding: .3rem 0 .3rem 1.4rem;
  font-size: .92rem;
  line-height: 1.8;
  color: var(--cream-2);
  max-width: 66ch;
}

/* lavori collegati */
.works { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 1.8rem; }
.work {
  display: block;
  border: 1px solid var(--line);
  background: var(--bg-2);
  transition: border-color .3s, transform .35s var(--e-out);
}
.work:hover { border-color: rgba(237,231,220,.2); transform: translateY(-3px); }
.work-img { aspect-ratio: 16/10; overflow: hidden; }
.work-img img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(.55) contrast(1.05);
  transition: filter .5s ease, transform .6s var(--e-out);
}
.work:hover .work-img img { filter: none; transform: scale(1.05); }
.work-txt { padding: 1.1rem 1.2rem 1.3rem; }
.work-t { font-size: .88rem; font-weight: 700; line-height: 1.35; }
.work-m {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cream-3);
  margin-top: .5rem;
  font-weight: 600;
}

/* FAQ */
.faq { margin-top: 1.6rem; max-width: 74ch; }
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1.3rem 2.4rem 1.3rem 0;
  position: relative;
  font-size: .96rem;
  font-weight: 600;
  color: var(--cream);
  transition: color .2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--rust); }
.faq summary::after {
  content: '+';
  position: absolute; right: 0; top: 1.15rem;
  font-size: 1.1rem;
  color: var(--rust);
  transition: transform .3s var(--e-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p {
  padding: 0 0 1.4rem;
  font-size: .94rem;
  line-height: 1.9;
  color: var(--cream-2);
}

/* altri servizi */
.altri { max-width: 1160px; margin: 0 auto; padding: 2rem 2.8rem 5rem; }
.altri-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.altro {
  display: block;
  padding: 2rem 1.6rem 2.2rem 0;
  border-bottom: 1px solid var(--line);
  transition: background .3s;
}
.altro + .altro { border-left: 1px solid var(--line); padding-left: 1.6rem; }
.altro:hover { background: var(--bg-2); }
.altro-t {
  font-family: var(--fp);
  font-style: italic;
  font-size: 1.25rem;
  margin-bottom: .6rem;
}
.altro:hover .altro-t { color: var(--rust); }
.altro-d { font-size: .85rem; line-height: 1.7; color: var(--cream-3); }

/* ── CONTATTI + FOOTER (come home) ── */
.contatti { padding: 7rem 2.8rem 6rem; max-width: 1160px; margin: 0 auto; border-top: 1px solid var(--line); }
.contatti-top { border-bottom: 1px solid var(--line); padding-bottom: 3.4rem; margin-bottom: 3.4rem; }
.contatti-h {
  font-family: var(--fp);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  line-height: .9;
  letter-spacing: -.02em;
  max-width: 800px;
}
.contatti-h strong { font-style: normal; font-weight: 700; }
.contatti-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: end; }
.contatti-text { font-size: 1rem; color: var(--cream-2); line-height: 2; }
.contatti-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 2rem; }
.btn-mail {
  display: inline-block;
  font-size: .76rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  border: 1px solid var(--cream-3);
  padding: 1.1rem 2.4rem;
  color: var(--cream);
  font-weight: 600;
  transition: background .25s ease, border-color .25s ease, transform .15s var(--e-out);
}
.btn-mail:hover { background: var(--rust); border-color: var(--rust); }
.btn-mail:active { transform: scale(.985); }
.wa-link {
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cream-3);
  font-weight: 600;
  transition: color .2s;
}
.wa-link:hover { color: var(--rust); }
.social-links { display: flex; gap: 1.8rem; list-style: none; }
.social-links a {
  font-size: .74rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cream-3);
  font-weight: 600;
  transition: color .2s;
}
.social-links a:hover { color: var(--cream); }

footer {
  border-top: 1px solid var(--line);
  padding: 2rem 2.8rem;
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1160px; margin: 0 auto;
}
.footer-copy { font-size: .72rem; letter-spacing: .12em; color: var(--cream-3); font-weight: 500; }
.footer-sig { font-family: var(--fp); font-style: italic; font-size: .9rem; color: var(--cream-3); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .page-body { grid-template-columns: 1fr; gap: 2.4rem; }
  .page-index { position: static; }
  .page-index ol { display: flex; flex-wrap: wrap; gap: 0 1.2rem; }
  .page-index a { border-bottom: none; padding: .3rem 0; }
  .works { grid-template-columns: 1fr 1fr; }
  .altri-grid { grid-template-columns: 1fr; }
  .altro + .altro { border-left: none; padding-left: 0; }
}
@media (max-width: 768px) {
  nav { padding: 1.3rem 1.4rem; }
  nav.nav-scrolled { padding: .9rem 1.4rem; }
  .nav-links { gap: 1.1rem; }
  .nav-links a { font-size: .64rem; letter-spacing: .14em; }
  .page-hero { padding: 8rem 1.4rem 3rem; }
  .page-body { padding: 3rem 1.4rem 1rem; }
  .altri { padding: 1rem 1.4rem 3rem; }
  .quick { grid-template-columns: 1fr; }
  .quick div + div { border-left: none; border-top: 1px solid var(--line); padding-left: 0; }
  .works { grid-template-columns: 1fr; }
  .contatti { padding: 4rem 1.4rem 3.5rem; }
  .contatti-bottom { grid-template-columns: 1fr; gap: 2rem; }
  .contatti-actions { align-items: flex-start; }
  footer { padding: 1.6rem 1.4rem; }
}

.works.works--2 { grid-template-columns: repeat(2, 1fr); }

/* ── FUNNEL: nota, modulo, barra fissa mobile ── */
.cta-note {
  font-size: .78rem; color: var(--cream-3); line-height: 1.6;
  margin-top: 1.4rem; font-weight: 400; text-align: right;
}
.form-lead { margin-top: 2.6rem; width: 100%; max-width: 460px; text-align: left; }
.form-lead-h {
  font-size: .72rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--cream-3); font-weight: 600; margin-bottom: 1.2rem;
}
.fl-row { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1rem; }
.fl-row label {
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cream-3); font-weight: 600;
}
.fl-row input, .fl-row textarea {
  font-family: var(--fs); font-size: .92rem; color: var(--cream);
  background: var(--bg-2); border: 1px solid var(--line);
  padding: .85rem 1rem; width: 100%; transition: border-color .2s;
}
.fl-row textarea { min-height: 100px; resize: vertical; }
.fl-row input:focus, .fl-row textarea:focus { outline: none; border-color: var(--rust); }
.fl-hp { position: absolute; left: -9999px; }
.fl-send { font-family: var(--fs); cursor: pointer; background: transparent; margin-top: .4rem; }

.sticky-cta { display: none; }
@media (max-width: 780px) {
  .cta-note { text-align: left; }
  .form-lead { max-width: 100%; }
  .sticky-cta {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
    display: grid; grid-template-columns: 1fr 1fr;
    background: var(--bg-2); border-top: 1px solid var(--line);
    transform: translateY(110%); transition: transform .35s var(--e-out);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .sticky-cta.on { transform: none; }
  .sticky-cta a {
    text-align: center; padding: 1.05rem .6rem;
    font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
    font-weight: 600; color: var(--cream);
  }
  .sticky-cta a + a { border-left: 1px solid var(--line); }
  .sticky-cta .sc-wa { background: var(--rust); }
}
