/* ==========================================================
   Braave Digital Agency — foglio di stile condiviso
   ========================================================== */

/* ---------- Font: Inter ospitato in locale (nessuna connessione a Google Fonts) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/inter-500.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/inter-800.woff2") format("woff2");
}

/* ---------- Variabili ---------- */
:root {
  --c-bg:            #050B14;
  --c-text:          #F0F4F8;
  --c-muted:         #9CA3AF;
  --c-accent:        #22D3EE;
  --c-accent-hover:  #1BA8BE;
  --c-accent-soft:   #22D3EE26;
  --c-black:         #000000;
  --c-card:          rgba(240, 244, 248, 0.05);
  --c-footer-fine:   #FFFFFF85;

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

  --container: 1200px;
  --gutter: 20px;
  --section-y: 100px;
  --section-y-light: 80px;
  --gap: 20px;
  --header-h: 80px;

  --radius-img: 4px;
  --radius-card: 8px;
  --transition: 0.3s ease;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  overflow-x: clip;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

img {
  height: auto;
}

h1, h2, h3, p, ul, ol {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

h2 {
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
}

.center {
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--c-accent);
  color: var(--c-bg);
  border-radius: 999px;
  font-weight: 600;
}
.skip-link:focus {
  top: 16px;
}

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

/* ---------- Etichetta sopra i titoli ---------- */
.eyebrow {
  margin-bottom: 20px;
  color: var(--c-accent);
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.lead {
  margin-top: 20px;
  color: var(--c-muted);
}

/* ---------- Bottoni ---------- */
.btn {
  display: inline-block;
  padding: 12px 50px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  cursor: pointer;
  transition: transform var(--transition), background-color var(--transition), border-color var(--transition), color var(--transition);
}

.btn:hover {
  transform: translateY(-8px);
}

.btn-primary {
  background: var(--c-accent);
  color: var(--c-bg);
}
.btn-primary:hover {
  background: var(--c-accent-hover);
}

.btn-secondary {
  background: var(--c-bg);
  color: var(--c-text);
  border-color: var(--c-text);
}
.btn-secondary:hover {
  background: var(--c-accent-hover);
  border-color: var(--c-accent-hover);
}

.btn-wide {
  padding: 12px 80px;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

/* ==========================================================
   HEADER
   ========================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: transparent;
  transition: background-color var(--transition);
}

.site-header.is-scrolled,
.site-header.is-open {
  background: var(--c-bg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo img {
  width: 180px;
  height: auto;
}

.main-nav ul {
  display: flex;
  gap: 50px;
}

.main-nav a {
  font-size: 15px;
  font-weight: 400;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--c-accent);
}

.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--c-text);
  cursor: pointer;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  position: absolute;
  left: 10px;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle-bar {
  top: 21px;
}
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  left: 0;
}
.nav-toggle-bar::before { top: -8px; }
.nav-toggle-bar::after  { top: 8px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bar {
  background: transparent;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
  transform: translateY(8px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
  transform: translateY(-8px) rotate(-45deg);
}

/* ==========================================================
   SFONDI FOTOGRAFICI
   ========================================================== */
.photo-bg {
  position: relative;
  background-color: var(--c-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.photo-bg--servizi {
  background-image:
    linear-gradient(rgba(5, 11, 20, 0.45), rgba(5, 11, 20, 0.45)),
    url("../images/home-servizi-branco.webp");
}

.photo-bg--chi-siamo {
  background-image:
    linear-gradient(to left, rgba(240, 244, 248, 0.6) 0%, rgba(240, 244, 248, 0.5) 45%, rgba(240, 244, 248, 0) 75%),
    url("../images/home-chi-siamo.webp");
  background-position: left center;
}

.photo-bg--contatti {
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0) 60%),
    linear-gradient(rgba(5, 11, 20, 0.45), rgba(5, 11, 20, 0.45)),
    url("../images/home-contatti.webp");
}

/* Le foto restano ferme durante lo scorrimento sui dispositivi con mouse
   (computer); su telefoni e tablet touch no, perché lì l'effetto non funziona bene */
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .photo-bg {
    background-attachment: fixed;
  }
}

/* ==========================================================
   HERO
   ========================================================== */
.hero {
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: calc(var(--header-h) + 40px) 80px;
  background-color: var(--c-black);
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.34) 40%, rgba(0, 0, 0, 0) 70%),
    url("../images/home-hero.webp");
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
}

.hero-content {
  max-width: 62%;
}

.hero-title {
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.hero-text {
  margin-block: 24px 40px;
  max-width: 640px;
}

/* ==========================================================
   DIGITAL AGENCY
   ========================================================== */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.intro-title {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
}

.intro-title span {
  display: block;
  margin-top: 24px;
  color: var(--c-accent);
}

.intro-text p + p {
  margin-top: 24px;
}

/* ==========================================================
   SERVIZI
   ========================================================== */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.services-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 40px;
}

.service {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.service-icon {
  flex: none;
  width: 45px;
  height: 45px;
  fill: none;
  stroke: var(--c-accent);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service-icon .fill {
  fill: var(--c-accent);
}

.service p {
  margin-top: 4px;
  color: var(--c-muted);
  font-size: 14px;
}

/* Sopra la foto della home il grigio non ha abbastanza contrasto: testo bianco */
.photo-bg--servizi .service p {
  color: var(--c-text);
}

/* ==========================================================
   METODO
   ========================================================== */
.metodo {
  padding-top: 0;
}

.metodo-head {
  margin-bottom: 60px;
  text-align: right;
}

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

.step-num {
  display: block;
  color: var(--c-accent);
  font-size: 16px;
}

.step h3 {
  margin-block: 16px 8px;
}

.step p {
  font-size: 14px;
}

/* ==========================================================
   PROGETTI
   ========================================================== */
.section-head-center {
  max-width: 640px;
  margin: 0 auto 60px;
  text-align: center;
}

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

.project a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
  transition: transform var(--transition);
}

.project a:hover {
  transform: translateY(-10px);
}

.project img {
  width: auto;
  height: 120px;
  object-fit: contain;
}

/* ==========================================================
   CHI SIAMO (sezione chiara, testo scuro a destra)
   ========================================================== */
.chi-siamo {
  color: var(--c-bg);
  padding-block: 160px;
}

.chi-siamo-content {
  /* il testo resta nella metà destra, lontano dal cavallo */
  max-width: min(660px, 50%);
  margin-left: auto;
  text-align: right;
}

.eyebrow--dark {
  color: var(--c-bg);
}

.chi-siamo h2 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 500;
  margin-bottom: 40px;
}

.chi-siamo p:not(.eyebrow) {
  margin-bottom: 40px;
}

.chi-siamo .btn-secondary {
  border-color: var(--c-bg);
}

/* al passaggio del mouse / tocco il bordo segue lo sfondo, come negli altri bottoni */
.chi-siamo .btn-secondary:hover {
  border-color: var(--c-accent-hover);
}

/* ==========================================================
   VALORE AGGIUNTO
   ========================================================== */
.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 60px;
}

.card {
  padding: 18px;
  border-radius: var(--radius-card);
  background: var(--c-card);
}

.value-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 24px;
  border-radius: 6px;
  background: var(--c-accent-soft);
}

.value-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: var(--c-accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.value h3 {
  margin-bottom: 16px;
}

.value p {
  color: var(--c-muted);
  font-size: 17px;
}

/* ==========================================================
   CONTATTI
   ========================================================== */
.contatti {
  padding-block: 140px;
}

.contatti-content {
  max-width: 480px;
}

.contatti h2 {
  white-space: nowrap;
}

.contatti h2 {
  margin-bottom: 20px;
}

.contatti p {
  font-size: 16px;
}

.contact-list {
  margin-block: 30px;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 500;
}

.contact-list li + li {
  margin-top: 20px;
}

.contact-list svg {
  flex: none;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--c-text);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-list a:hover {
  color: var(--c-accent);
}

/* ==========================================================
   FOOTER
   ========================================================== */
.site-footer {
  padding-block: 60px 30px;
  background: var(--c-bg);
  font-size: 14px;
}

.footer-logo {
  display: block;
  width: 220px;
  margin: 0 auto 60px;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  text-align: center;
}

.footer-title {
  max-width: 260px;
  margin: 0 auto 24px;
  font-size: 25px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0;
}

.social {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.social a {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: var(--c-accent);
  color: var(--c-bg);
  transition: background-color var(--transition), transform var(--transition);
}

.social a:hover {
  background: var(--c-accent-hover);
  transform: translateY(-3px);
}

.social svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.footer-contacts {
  display: inline-block;
  text-align: left;
}

.footer-contacts li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-contacts li + li {
  margin-top: 6px;
}

.footer-contacts svg {
  flex: none;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--c-accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-contacts a:hover,
.footer-bottom a:hover {
  color: var(--c-accent);
}

.footer-fiscal {
  margin-top: 40px;
  font-size: 12px;
  line-height: 1.6;
}

.footer-bottom {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 20px;
  margin-top: 60px;
  color: var(--c-footer-fine);
  font-size: 12px;
  text-align: center;
}

/* ==========================================================
   ANIMAZIONE IN ENTRATA (solo con JavaScript attivo)
   ========================================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

/* ==========================================================
   TABLET (≤ 1024px)
   ========================================================== */
@media (max-width: 1024px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--c-bg);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height var(--transition), visibility var(--transition);
  }

  .main-nav.is-open {
    max-height: 400px;
    visibility: visible;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 10px var(--gutter) 24px;
  }

  .main-nav a {
    display: block;
    padding: 14px 0;
    font-size: 17px;
    border-bottom: 1px solid rgba(240, 244, 248, 0.08);
  }

  .hero-content {
    max-width: 75%;
  }

  .services-grid,
  .intro-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }

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

  .projects,
  .values {
    gap: 24px;
  }
}

/* ==========================================================
   MOBILE (≤ 767px)
   ========================================================== */
@media (max-width: 767px) {
  :root {
    --section-y: 90px;
    --gutter: 24px;
    --header-h: 68px;
  }

  body {
    font-size: 16px;
    line-height: 1.65;
  }

  .eyebrow {
    margin-bottom: 16px;
  }

  .hero-text {
    margin-block: 28px 40px;
  }

  .intro-grid,
  .services-grid {
    gap: 48px;
  }

  .services-list,
  .steps,
  .values {
    gap: 48px;
  }

  .logo img {
    width: 140px;
  }

  .hero {
    /* inquadra orecchio e occhio del cavallo, non solo la criniera;
       l'occhio resta a destra, fuori dal bottone "Scopri cosa facciamo" */
    background-position: 85% center;
    background-image:
      linear-gradient(rgba(5, 11, 20, 0.55), rgba(5, 11, 20, 0.55)),
      url("../images/home-hero.webp");
  }

  .hero-content {
    max-width: 100%;
  }

  /* Servizi + Metodo: su telefono la sezione è altissima e la foto a tutto sfondo
     verrebbe ingrandita e sfocata. Qui i cavalli stanno interi in alto e sfumano
     nello sfondo scuro, come nella pagina Contatti; etichetta e titolo
     stanno sopra la parte bassa della foto, già sfumata
     (--sv-img = larghezza della foto, almeno 900px; altezza = 0,56 × larghezza) */
  .photo-bg--servizi {
    --sv-img: max(250vw, 900px);
    padding-top: calc(var(--sv-img) * 0.35 - var(--section-y));
    background-image:
      linear-gradient(to bottom, rgba(5, 11, 20, 0) calc(var(--sv-img) * 0.26), rgba(5, 11, 20, 0.8) calc(var(--sv-img) * 0.35), var(--c-bg) calc(var(--sv-img) * 0.5)),
      url("../images/home-servizi-branco.webp");
    background-size: 100% 100%, var(--sv-img) auto;
    background-position: 0 0, 47% top;
  }

  /* servizi, metodo e progetti hanno lo stesso sfondo: una linea sottile
     a metà dello spazio separa metodo e progetti (sopra i servizi non serve,
     c'è già la foto). Lo spazio totale tra le sezioni resta quello di prima. */
  #servizi {
    padding-bottom: 45px;
  }

  .metodo > .container::before,
  .progetti > .container::before {
    content: "";
    display: block;
    height: 0;
    border-top: 1px solid rgba(240, 244, 248, 0.14);
  }

  .metodo > .container::before {
    margin-bottom: 45px;
  }

  .progetti {
    padding-top: 35px;
  }

  .progetti > .container::before {
    margin-bottom: 55px;
  }

  /* sfondo unico fino ai progetti: basta lo spazio della sezione successiva */
  .photo-bg--servizi .metodo {
    padding-bottom: 20px;
  }

  .btn {
    padding-inline: 36px;
  }

  .btn-wide {
    padding-inline: 32px;
  }

  .services-list,
  .steps,
  .projects,
  .values,
  .footer-cols,
  .footer-bottom {
    grid-template-columns: 1fr;
  }

  .metodo-head {
    text-align: left;
    margin-bottom: 40px;
  }

  .projects {
    gap: 30px;
  }

  .project a {
    height: 120px;
  }

  .project img {
    height: 100px;
  }

  .chi-siamo {
    padding-block: 110px;
    background-image:
      linear-gradient(rgba(240, 244, 248, 0.65), rgba(240, 244, 248, 0.65)),
      url("../images/home-chi-siamo.webp");
  }

  .chi-siamo-content {
    max-width: 100%;
  }

  .contatti {
    padding-block: 110px;
  }

  .site-footer {
    padding-block: 80px 40px;
  }

  .footer-cols {
    gap: 64px;
  }

  .footer-title {
    font-size: 22px;
  }

  .footer-bottom {
    gap: 12px;
  }
}

/* ==========================================================
   ELEMENTI CONDIVISI DALLE PAGINE INTERNE
   ========================================================== */
.accent {
  color: var(--c-accent);
}

.title-lines {
  line-height: 1.1;
}

/* Sezione con foto e testo in una colonna (sinistra o destra) */
.photo-section {
  padding-block: 160px;
}

.photo-section-content {
  max-width: 640px;
}

.photo-section-content h2 {
  margin-bottom: 30px;
}

.photo-section--right .photo-section-content {
  max-width: min(480px, 50%);
  margin-left: auto;
}

/* ==========================================================
   PAGINA CHI SIAMO
   ========================================================== */
.hero--chi-siamo {
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0) 60%),
    url("../images/chi-siamo-hero.webp");
  background-position: center;
}

.hero-title--strong {
  font-weight: 600;
  line-height: 1.05;
}

.photo-bg--sito {
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 65%),
    url("../images/chi-siamo-sito.webp");
}

.photo-bg--idea {
  background-image:
    linear-gradient(to left, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0) 60%),
    linear-gradient(rgba(5, 11, 20, 0.45), rgba(5, 11, 20, 0.45)),
    url("../images/chi-siamo-contatti.webp");
}

.team h2 {
  margin-bottom: 60px;
}

.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.person {
  display: flex;
  align-items: center;
  gap: 24px;
}

.person img {
  flex: none;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
}

.person h3 {
  margin-bottom: 8px;
}

.person p {
  font-size: 16px;
}

@media (max-width: 1024px) {
  .team-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 767px) {
  /* testo in basso, così l'occhio del cavallo resta libero */
  .hero--chi-siamo {
    align-items: flex-end;
    padding-bottom: 96px;
    background-position: 55% center;
    background-image:
      linear-gradient(to top, rgba(5, 11, 20, 0.9) 0%, rgba(5, 11, 20, 0.25) 55%, rgba(5, 11, 20, 0.15) 100%),
      url("../images/chi-siamo-hero.webp");
  }

  .photo-section {
    padding-block: 110px;
  }

  .photo-section-content h2 {
    margin-bottom: 28px;
  }

  /* l'immagine si sposta a destra per inquadrare il cavallo sulla montagna */
  .photo-bg--sito {
    background-position: 70% center;
    background-image:
      linear-gradient(rgba(5, 11, 20, 0.55), rgba(5, 11, 20, 0.55)),
      url("../images/chi-siamo-sito.webp");
  }

  .photo-section--right .photo-section-content {
    max-width: 100%;
    margin-left: 0;
  }

  .team h2 {
    margin-bottom: 56px;
  }

  .team-grid {
    gap: 64px;
  }

  .person {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .person img {
    width: 120px;
    height: 120px;
  }
}

/* ==========================================================
   PAGINA PORTFOLIO
   ========================================================== */
.hero--portfolio {
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0) 60%),
    url("../images/portfolio-hero.webp");
  background-position: center;
}

/* ---------- Griglia progetti (due per riga) ----------
   Al passaggio del mouse su un progetto lo sfondo della sezione prende
   i suoi colori e il progetto accanto mostra il racconto (vedi main.js). */
.wk {
  background-color: var(--c-bg);
  color: var(--c-text);
  transition: background-color 0.6s ease, color 0.6s ease;
}

.wk-inner {
  max-width: calc(1000px + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(72px, 9vw, 120px) var(--gutter) 120px;
}

.wk-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(72px, 10vw, 140px);
}

.wk-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 11vw, 150px);
}

.wk-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.wk-media {
  position: relative;
  aspect-ratio: 4 / 5;
}

.wk-link,
.wk-img,
.wk-panel {
  position: absolute;
  inset: 0;
  border-radius: 6px;
}

.wk-link {
  z-index: 1;
}

.wk-img {
  overflow: hidden;
  background: var(--bg);
  transition: opacity 0.45s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.wk-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wk-panel {
  z-index: 2;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: clamp(24px, 3.2vw, 44px);
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.4s ease 0.08s, transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) 0.08s, visibility 0s linear 0.55s;
}

/* didascalia sotto l'immagine */
.wk-cap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: opacity 0.3s ease;
}

.wk-client {
  color: var(--c-accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.wk-line {
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* racconto: testo per il riquadro e, senza mouse, descrizione sotto la didascalia */
.wk-story {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wk-card > .wk-story .wk-kicker,
.wk-card > .wk-story .wk-title {
  display: none;
}

.wk-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.wk-title {
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.wk-text {
  max-width: 34ch;
  font-size: 16px;
  line-height: 1.6;
  opacity: 0.9;
}

/* riquadro vuoto accanto a un progetto rimasto da solo nella riga (creato da main.js) */
.wk-card--ghost {
  display: none;
}

/* effetto al passaggio del mouse: solo con mouse e schermo largo */
@media (hover: hover) and (min-width: 901px) {
  .wk-card--ghost {
    display: flex;
  }
  .wk-story {
    display: none;
  }
  .wk-panel {
    display: flex;
  }
  .wk-card.is-source .wk-img {
    transform: scale(1.02);
  }
  .wk-card.is-text .wk-img,
  .wk-card.is-text .wk-cap {
    opacity: 0;
  }
  .wk-card.is-text .wk-panel {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0.08s, 0.08s, 0s;
  }
}

/* ---------- Riquadro "Il tuo progetto" ---------- */
.photo-bg--progetto {
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0) 60%),
    url("../images/portfolio-contatti.webp");
}

.glass-box {
  max-width: 650px;
  padding: 48px;
  border-radius: 16px;
  background: rgba(5, 11, 20, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.glass-box h2 {
  margin-bottom: 28px;
}

.glass-box p {
  margin-bottom: 40px;
}

@media (max-width: 1024px) {
  /* tablet e telefono: immagine spostata sugli zoccoli e testo in basso */
  .hero--portfolio {
    align-items: flex-end;
    padding-bottom: 96px;
    background-position: 82% center;
    background-image:
      linear-gradient(to top, rgba(5, 11, 20, 0.9) 0%, rgba(5, 11, 20, 0.25) 55%, rgba(5, 11, 20, 0.15) 100%),
      url("../images/portfolio-hero.webp");
  }
}

@media (max-width: 767px) {
  .wk-inner {
    padding-block: 90px 110px;
  }

  .wk-grid {
    gap: 64px;
  }

  .wk-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 64px;
  }

  .photo-bg--progetto {
    background-position: 65% center;
  }

  .glass-box {
    padding: 36px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wk,
  .wk-img,
  .wk-panel,
  .wk-cap {
    transition: none;
  }
  .wk-card.is-source .wk-img {
    transform: none;
  }
}

/* ==========================================================
   PAGINA SERVIZI
   ========================================================== */
.hero--servizi {
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 65%),
    url("../images/servizi-hero.webp");
  background-position: center;
}

.btn-group--center {
  justify-content: center;
}

/* ---------- Indice: quattro card ---------- */
.sv-index h2 {
  margin-bottom: 60px;
}

.sv-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.sv-cards .reveal {
  transition-delay: calc(var(--i, 0) * 0.12s);
}

.sv-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 28px 24px 64px;
  overflow: hidden;
  border: 1px solid rgba(240, 244, 248, 0.08);
  border-radius: var(--radius-card);
  background: var(--c-card);
  transition: transform var(--transition), border-color var(--transition);
}

/* alone ciano che si accende al passaggio del mouse */
.sv-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 0%, rgba(34, 211, 238, 0.22), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.sv-card:hover {
  transform: translateY(-10px);
  border-color: rgba(34, 211, 238, 0.5);
}

.sv-card:hover::before {
  opacity: 1;
}

.sv-card-num {
  margin-bottom: 28px;
  color: var(--c-accent);
  font-size: 16px;
}

.sv-card .service-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 24px;
}

.sv-card-name {
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 600;
}

.sv-card-tag {
  color: var(--c-muted);
  font-size: 14px;
}

.sv-card-arrow {
  position: absolute;
  left: 24px;
  bottom: 22px;
  color: var(--c-accent);
  font-size: 22px;
  transition: transform var(--transition);
}

.sv-card:hover .sv-card-arrow {
  transform: translateX(8px);
}

/* icone che si "disegnano" quando compaiono */
.js .draw path,
.js .draw circle:not(.fill) {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.6s cubic-bezier(0.65, 0, 0.35, 1);
  transition-delay: calc(var(--i, 0) * 0.12s + 0.3s);
}

.js .draw .fill {
  opacity: 0;
  transition: opacity 0.4s ease;
  transition-delay: calc(var(--i, 0) * 0.12s + 1.4s);
}

.js .is-visible .draw path,
.js .is-visible .draw circle:not(.fill) {
  stroke-dashoffset: 0;
}

.js .is-visible .draw .fill {
  opacity: 1;
}

/* ---------- Racconto dei servizi ---------- */
.sv {
  padding-bottom: var(--section-y);
}

.sv-grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 80px;
  align-items: start;
}

/* riquadro fermo a sinistra (solo desktop) */
.sv-visual {
  position: sticky;
  top: calc(var(--header-h) + 40px);
}

.sv-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: calc(100vh - var(--header-h) - 150px);
}

.sv-media {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-card);
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.8s ease, transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.sv-media.is-active {
  opacity: 1;
  transform: none;
}

.sv-media img,
.sv-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* numero grande a contorno, sopra l'immagine */
.sv-bignum {
  position: absolute;
  right: 20px;
  bottom: 4px;
  z-index: 2;
  color: transparent;
  font-size: clamp(90px, 10vw, 150px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  -webkit-text-stroke: 1.5px rgba(240, 244, 248, 0.6);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.sv-bignum.is-changing {
  opacity: 0;
  transform: translateY(16px);
}

/* barra di avanzamento con i nomi dei servizi */
.sv-progress {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.sv-progress li {
  flex: 1;
  color: var(--c-muted);
  font-size: 12px;
  line-height: 1.3;
  transition: color 0.4s ease;
}

.sv-progress li::before {
  content: "";
  display: block;
  height: 2px;
  margin-bottom: 10px;
  border-radius: 2px;
  background:
    linear-gradient(var(--c-accent), var(--c-accent)) left / 0% 100% no-repeat,
    rgba(240, 244, 248, 0.15);
  transition: background-size 0.6s ease;
}

.sv-progress li.is-active,
.sv-progress li.is-done {
  color: var(--c-text);
}

.sv-progress li.is-active::before,
.sv-progress li.is-done::before {
  background-size: 100% 100%, auto;
}

/* segnaposto finché non arriva la foto */
.sv-ph {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  width: 100%;
  height: 100%;
  padding: 24px;
  border: 1px dashed rgba(34, 211, 238, 0.35);
  border-radius: var(--radius-card);
  background:
    radial-gradient(circle at 70% 20%, rgba(34, 211, 238, 0.16), transparent 55%),
    linear-gradient(160deg, #0b1a2b, var(--c-bg));
  text-align: center;
}

.sv-ph-icon {
  width: 110px;
  height: 110px;
  fill: none;
  stroke: var(--c-accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.8;
}

.sv-ph-icon .fill {
  fill: var(--c-accent);
}

.sv-ph-label {
  color: var(--c-accent);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sv-ph-file {
  color: var(--c-muted);
  font-size: 12px;
}

/* i servizi, a destra */
.sv-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - var(--header-h));
  padding-block: 60px;
}

.sv-item-media {
  display: none;
  margin: 0 0 32px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-card);
}

.sv-item-num {
  margin-right: 6px;
}

.sv-item h2 {
  margin-bottom: 24px;
}

.sv-lead {
  margin-bottom: 28px;
}

.sv-checks li {
  position: relative;
  padding-left: 34px;
  font-size: 16px;
}

.sv-checks li + li {
  margin-top: 12px;
}

.sv-checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322D3EE' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 13px no-repeat,
    var(--c-accent-soft);
}

.sv-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(240, 244, 248, 0.1);
}

.sv-meta-label {
  display: block;
  margin-bottom: 12px;
  color: var(--c-muted);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips li {
  padding: 6px 14px;
  border: 1px solid rgba(240, 244, 248, 0.2);
  border-radius: 999px;
  font-size: 13px;
}

.sv-owner {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--c-muted);
  font-size: 13px;
  line-height: 1.35;
}

.sv-owner img {
  width: 48px;
  height: 48px;
  border: 2px solid var(--c-accent);
  border-radius: 50%;
  object-fit: cover;
}

.sv-owner strong {
  color: var(--c-text);
  font-size: 15px;
  font-weight: 600;
}

/* ---------- Nastro di parole che scorre ---------- */
.marquee {
  overflow: hidden;
  padding-block: 32px;
  border-block: 1px solid rgba(240, 244, 248, 0.08);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 45s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee span {
  display: flex;
  align-items: center;
  color: transparent;
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  -webkit-text-stroke: 1px rgba(240, 244, 248, 0.45);
}

.marquee span::after {
  content: "";
  width: 10px;
  height: 10px;
  margin-inline: 36px;
  border-radius: 50%;
  background: var(--c-accent);
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Domande frequenti ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}

.faq-list details {
  border-bottom: 1px solid rgba(240, 244, 248, 0.12);
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 24px;
  font-size: 20px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  transition: color var(--transition);
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  flex: none;
  color: var(--c-accent);
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  transition: transform var(--transition);
}

.faq-list summary:hover {
  color: var(--c-accent);
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
}

.faq-list details p {
  padding-bottom: 24px;
  color: var(--c-muted);
  font-size: 16px;
}

.faq-list details[open] p {
  animation: faq-open 0.4s ease;
}

@keyframes faq-open {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* ---------- Chiamata finale ---------- */
/* cavallo al galoppo: testo a sinistra, sopra la coda nella nebbia */
.photo-bg--servizi-cta {
  background-image:
    linear-gradient(to right, rgba(5, 11, 20, 0.75), rgba(5, 11, 20, 0.2) 55%, rgba(5, 11, 20, 0) 80%),
    url("../images/servizi-contatti.webp");
  background-position: center 30%;
}

.cta-content {
  max-width: 520px;
}

.cta-text {
  margin: 24px 0 40px;
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .hero--servizi {
    align-items: flex-end;
    padding-bottom: 96px;
    background-position: 70% center;
    background-image:
      linear-gradient(to top, rgba(5, 11, 20, 0.92) 0%, rgba(5, 11, 20, 0.35) 60%, rgba(5, 11, 20, 0.2) 100%),
      url("../images/servizi-hero.webp");
  }

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

  .sv-grid {
    grid-template-columns: 1fr;
  }

  .sv-visual {
    display: none;
  }

  .sv-list {
    display: flex;
    flex-direction: column;
    gap: 50px;
  }

  .sv-item {
    min-height: 0;
    padding-block: 0;
  }

  /* la linea separa un servizio dall'altro... */
  .sv-item + .sv-item {
    padding-top: 50px;
    border-top: 1px solid rgba(240, 244, 248, 0.14);
  }

  /* ...mentre "Ideale per" sta in un riquadro, così resta legato al suo servizio */
  .sv-meta {
    margin-top: 32px;
    padding: 18px;
    border-top: 0;
    border-radius: var(--radius-card);
    background: var(--c-card);
  }

  .sv-item-media {
    display: block;
  }

  .faq-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .photo-bg--servizi-cta {
    background-position: 78% 30%;
    background-image:
      linear-gradient(rgba(5, 11, 20, 0.55), rgba(5, 11, 20, 0.55)),
      url("../images/servizi-contatti.webp");
  }
}

/* ---------- Telefono ---------- */
@media (max-width: 767px) {
  .sv-index h2 {
    margin-bottom: 40px;
  }

  .sv-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .sv-index h2 br {
    display: none;
  }

  /* card compatte: icona a sinistra, testo al centro, freccia a destra */
  .sv-card {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    column-gap: 16px;
    padding: 20px;
  }

  .sv-card-num {
    display: none;
  }

  .sv-card .service-icon {
    grid-row: span 2;
    width: 44px;
    height: 44px;
    margin: 0;
  }

  .sv-card-name {
    margin: 0;
    font-size: 18px;
  }

  .sv-card-tag {
    grid-column: 2;
    font-size: 13px;
  }

  .sv-card-arrow {
    position: static;
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .sv-list {
    gap: 45px;
  }

  .sv-item-media {
    aspect-ratio: 4 / 5;
  }

  .sv-ph-icon {
    width: 80px;
    height: 80px;
  }

  .faq-list summary {
    font-size: 18px;
  }

  .marquee {
    padding-block: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }
  .js .draw path,
  .js .draw circle:not(.fill) {
    stroke-dashoffset: 0;
    transition: none;
  }
  .js .draw .fill {
    opacity: 1;
    transition: none;
  }
  .sv-media,
  .sv-bignum,
  .sv-card {
    transition: none;
  }
}

/* ==========================================================
   PAGINA CONTATTI
   ========================================================== */
.hero--contatti {
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0) 75%),
    url("../images/contatti-hero.webp");
  background-position: 70% center;
}

/* ---------- Tre modi per contattarci ---------- */
.ct-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 60px;
}

.ct-cards > li {
  display: flex;
}

.ct-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 28px;
  border: 1px solid transparent;
  transition: transform var(--transition), border-color var(--transition);
}

.ct-card:hover {
  transform: translateY(-10px);
  border-color: rgba(34, 211, 238, 0.4);
}

.ct-card-role {
  margin-top: 6px;
  color: var(--c-muted);
  font-size: 14px;
}

.ct-card-value {
  margin-block: 24px;
  font-size: 20px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.ct-card-action {
  margin-top: auto;
  color: var(--c-accent);
  font-size: 16px;
  font-weight: 600;
}

.ct-card-action span {
  display: inline-block;
  transition: transform var(--transition);
}

.ct-card:hover .ct-card-action span {
  transform: translateX(6px);
}

.ct-hours {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 40px;
  color: var(--c-muted);
  font-size: 16px;
}

.ct-hours strong {
  color: var(--c-text);
  font-weight: 500;
}

.ct-hours svg,
.ct-details svg {
  flex: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--c-accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Dove siamo: testo e mappa ---------- */
.ct-place-section {
  padding-top: 0;
}

.ct-place {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 80px;
  align-items: center;
}

.ct-place-text h2 {
  margin-bottom: 30px;
}

.ct-place-text strong {
  font-weight: 600;
}

.ct-details {
  margin-block: 36px 40px;
}

.ct-details li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  font-size: 16px;
}

.ct-details li + li {
  margin-top: 20px;
}

.ct-details svg {
  margin-top: 2px;
}

/* Mappa disegnata con i colori del sito */
.ct-map {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(240, 244, 248, 0.08);
  border-radius: var(--radius-card);
  background: radial-gradient(circle at 43% 54%, #0B1A2A 0%, var(--c-bg) 70%);
  transition: border-color var(--transition);
}

.ct-map:hover {
  border-color: rgba(34, 211, 238, 0.4);
}

.ct-map svg {
  width: 100%;
  height: auto;
}

.ct-map-dot {
  fill: rgba(240, 244, 248, 0.09);
}

.ct-map-lake path {
  fill: none;
  stroke: rgba(34, 211, 238, 0.22);
  stroke-width: 16;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ct-map-lake-label {
  fill: rgba(34, 211, 238, 0.7);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.ct-map-rings circle {
  fill: none;
  stroke: rgba(34, 211, 238, 0.28);
  stroke-width: 1;
  stroke-dasharray: 3 6;
}

.ct-map-km text {
  fill: rgba(34, 211, 238, 0.75);
  font-size: 12px;
}

.ct-map-towns circle {
  fill: var(--c-muted);
}

.ct-map-towns text {
  fill: var(--c-muted);
  font-size: 16px;
}

.ct-map-pin-dot {
  fill: var(--c-accent);
  stroke: var(--c-bg);
  stroke-width: 3;
}

.ct-map-pulse {
  fill: none;
  stroke: var(--c-accent);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: ct-pulse 2.8s ease-out infinite;
}

.ct-map-pulse--late {
  animation-delay: 1.4s;
}

@keyframes ct-pulse {
  from {
    opacity: 0.9;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(4.5);
  }
}

.ct-map-pin-label {
  fill: var(--c-text);
  font-size: 22px;
  font-weight: 600;
}

.ct-map-pin-sub {
  fill: var(--c-accent);
  font-size: 15px;
}

.ct-map-cta {
  position: absolute;
  left: 16px;
  top: 16px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--c-accent);
  color: var(--c-bg);
  font-size: 14px;
  font-weight: 600;
  transition: background-color var(--transition);
}

.ct-map:hover .ct-map-cta {
  background: var(--c-accent-hover);
}

/* ---------- Chiamata finale ---------- */
.photo-bg--ct-cta {
  background-image:
    linear-gradient(to right, rgba(5, 11, 20, 0.7), rgba(5, 11, 20, 0.2) 60%, rgba(5, 11, 20, 0) 85%),
    url("../images/contatti-due-cavalli.webp");
}

.photo-bg--ct-cta .photo-section-content {
  max-width: 560px;
}

.photo-bg--ct-cta .btn-group {
  margin-top: 40px;
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .hero--contatti {
    align-items: flex-end;
    padding-bottom: 96px;
    background-position: 68% center;
    background-image:
      linear-gradient(to top, rgba(5, 11, 20, 0.9) 0%, rgba(5, 11, 20, 0.3) 55%, rgba(5, 11, 20, 0.15) 100%),
      url("../images/contatti-hero.webp");
  }

  /* due telefoni affiancati, email sotto a tutta larghezza */
  .ct-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .ct-cards > li:last-child {
    grid-column: 1 / -1;
  }

  .ct-place {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .ct-map {
    max-width: 620px;
  }

  /* i due cavalli in alto, il testo sotto su fondo scuro
     (--ct-img = larghezza della foto, almeno 750px; altezza = 0,56 × larghezza) */
  .photo-bg--ct-cta {
    --ct-img: max(100vw, 750px);
    padding-top: calc(var(--ct-img) * 0.46);
    background-image:
      linear-gradient(to bottom, rgba(5, 11, 20, 0) calc(var(--ct-img) * 0.3), var(--c-bg) calc(var(--ct-img) * 0.54)),
      url("../images/contatti-due-cavalli.webp");
    background-size: 100% 100%, var(--ct-img) auto;
    background-position: 0 0, 69% top;
    background-attachment: scroll;
  }

  /* la mappa sotto il testo ha già il suo bottone */
  .ct-place-text .btn {
    display: none;
  }

  .ct-details {
    margin-bottom: 0;
  }
}

/* ---------- Telefono ---------- */
@media (max-width: 767px) {
  .ct-cards {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 48px;
  }

  /* icona a sinistra, testi accanto: card più basse */
  .ct-card {
    display: grid;
    grid-template-columns: 46px 1fr;
    column-gap: 18px;
    align-items: start;
    padding: 20px;
  }

  .ct-card .value-icon {
    grid-row: 1 / span 4;
    margin-bottom: 0;
  }

  .ct-card-role {
    margin-top: 2px;
  }

  .ct-card-value {
    margin-block: 12px 10px;
    font-size: 18px;
  }

  .ct-card-value--email {
    font-size: 16px;
    overflow-wrap: normal;
  }

  .ct-hours {
    align-items: flex-start;
    margin-top: 36px;
  }

  /* la mappa si rimpicciolisce: scritte più grandi per restare leggibili */
  .ct-map-towns text { font-size: 26px; }
  .ct-map-km text,
  .ct-map-lake-label { font-size: 20px; letter-spacing: 0.04em; }
  .ct-map-pin-label { font-size: 34px; }
  .ct-map-pin-sub { font-size: 24px; }

  .ct-hours svg {
    margin-top: 3px;
  }

  .ct-place {
    gap: 56px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .ct-map-pulse {
    animation: none;
    opacity: 0;
  }
  .ct-card,
  .ct-card-action span {
    transition: none;
  }
  .ct-card:hover,
  .ct-card:hover .ct-card-action span {
    transform: none;
  }
}

/* ==========================================================
   PAGINA SERVIZI: TEST "QUALE SERVIZIO FA PER TE?"
   ========================================================== */
/* senza JavaScript il test non funziona: la sezione resta nascosta */
html:not(.js) .quiz-section {
  display: none;
}

.quiz-section {
  padding-top: 0;
}

.quiz-grid {
  display: grid;
  grid-template-columns: 4fr 7fr;
  gap: 80px;
  align-items: center;
}

.quiz-intro h2 {
  margin-bottom: 24px;
}

.quiz-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  color: var(--c-muted);
  font-size: 14px;
}

.quiz-note::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-accent);
}

.quiz {
  min-height: 440px;
  padding: 40px;
  border: 1px solid rgba(240, 244, 248, 0.08);
  border-radius: var(--radius-card);
  background: var(--c-card);
}

.quiz-step {
  display: none;
}

.quiz-step.is-active {
  display: block;
  animation: quiz-in 0.4s ease;
}

@keyframes quiz-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* Partenza: le quattro icone dei servizi */
.quiz-start.is-active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  min-height: 360px;
}

.quiz-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
  text-align: center;
}

.quiz-preview li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--c-muted);
  font-size: 14px;
  line-height: 1.3;
}

.quiz-preview .service-icon,
.quiz-outcome-head .service-icon {
  width: 52px;
  height: auto;
  margin: 0;
}

/* Domande */
.quiz-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--c-accent);
  font-size: 14px;
}

.quiz-bar {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: rgba(240, 244, 248, 0.1);
}

.quiz-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--c-accent);
}

.quiz-question {
  margin-block: 28px;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.25;
}

.quiz-question:focus {
  outline: none;
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.quiz-option {
  padding: 18px 20px;
  border: 1px solid rgba(240, 244, 248, 0.15);
  border-radius: var(--radius-card);
  background: transparent;
  color: var(--c-text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition), background-color var(--transition), transform var(--transition);
}

.quiz-option:hover {
  border-color: var(--c-accent);
  transform: translateY(-3px);
}

.quiz-option[aria-pressed="true"] {
  border-color: var(--c-accent);
  background: var(--c-accent-soft);
}

.quiz-back {
  margin-top: 24px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--c-muted);
  font-family: var(--font);
  font-size: 14px;
  cursor: pointer;
  transition: color var(--transition);
}

.quiz-back:hover {
  color: var(--c-accent);
}

/* Risultato */
.quiz-outcome-head {
  display: flex;
  align-items: center;
  gap: 20px;
}

.quiz-outcome-head .service-icon {
  width: 64px;
}

.quiz-outcome-label {
  color: var(--c-accent);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.quiz-outcome-name {
  font-size: clamp(30px, 3.5vw, 40px);
  line-height: 1.15;
}

.quiz-outcome-name:focus {
  outline: none;
}

.quiz-outcome-why {
  margin-top: 24px;
  color: var(--c-muted);
  font-size: 17px;
}

.quiz-also {
  margin-top: 16px;
  font-size: 16px;
}

.quiz-also a {
  color: var(--c-accent);
  font-weight: 600;
}

.quiz-owner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  font-size: 15px;
}

.quiz-owner img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 28px;
  margin-top: 32px;
}

.quiz-link {
  color: var(--c-accent);
  font-size: 16px;
  font-weight: 600;
}

.quiz-link:hover {
  color: var(--c-accent-hover);
}

/* Link al test dalla home */
.services-quiz {
  margin-top: 50px;
  color: var(--c-muted);
  font-size: 16px;
  text-align: right;
}

.services-quiz a {
  color: var(--c-accent);
  font-weight: 600;
}

.services-quiz a:hover {
  color: var(--c-accent-hover);
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .quiz-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .quiz-intro br {
    display: none;
  }
}

/* ---------- Telefono ---------- */
@media (max-width: 767px) {
  .quiz {
    min-height: 0;
    padding: 24px;
  }

  .quiz-start.is-active {
    min-height: 0;
    gap: 32px;
  }

  .quiz-preview {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 12px;
  }

  .quiz-options {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .quiz-option {
    padding: 15px 18px;
  }

  .quiz-question {
    margin-block: 22px;
  }

  .quiz-outcome-head .service-icon {
    width: 52px;
  }

  .quiz-actions .btn {
    width: 100%;
  }

  .services-quiz {
    margin-top: 40px;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .quiz-step.is-active {
    animation: none;
  }
  .quiz-option,
  .quiz-option:hover {
    transition: none;
    transform: none;
  }
}
