/* Inter servito dal sito stesso, non da Google Fonts: nessuna richiesta a
   terzi, quindi niente da dichiarare nell'informativa. Un solo file variabile
   (pesi 100-900, solo alfabeto latino, 48 KB) al posto di un file per peso.
   Licenza SIL OFL, in assets/fonts/OFL.txt. Prima il CSS chiedeva Inter senza
   caricarlo, e ognuno vedeva il carattere del proprio sistema. */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter.woff2") format("woff2");
}

:root {
  --navy: #07182e;
  --navy-2: #0a2445;
  --blue: #123b84;
  --gold: #d5bb5a;
  --gold-bright: #ecd77e;
  --steel: #95a2aa;
  --mist: #eef2f1;
  --white: #ffffff;
  --ink: #101720;
  --muted: #5e6974;
  --line: rgba(7, 24, 46, 0.14);
  --container: min(1240px, calc(100vw - 80px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--gold);
  color: var(--navy);
  padding: 10px 16px;
}

.skip-link:focus {
  top: 12px;
}

/* Numero di telefono scritto solo dove serve leggerlo: con mouse (computer).
   Su touch resta "Chiamaci" e il link tel: apre la chiamata. */
.tel-pc {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .tel-pc {
    display: inline;
  }

  .tel-mobile {
    display: none;
  }
}

.utility-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: 34px;
  background: var(--navy);
  color: var(--white);
  border-bottom: 2px solid var(--gold);
  transition: transform 220ms ease;
}

.utility-bar.is-scrolled {
  transform: translateY(-100%);
}

.utility-inner {
  width: min(1400px, calc(100% - 64px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.utility-inner > span {
  color: rgba(255, 255, 255, 0.58);
}

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

.utility-contacts a {
  color: var(--white);
  transition: color 160ms ease;
}

.utility-contacts a:hover,
.utility-contacts a:focus-visible {
  color: var(--gold-bright);
}

.site-header {
  position: fixed;
  top: 34px;
  left: 0;
  right: 0;
  z-index: 55;
  height: 90px;
  background: rgba(255, 255, 255, 0.97);
  color: var(--navy);
  border-bottom: 1px solid rgba(7, 24, 46, 0.12);
  box-shadow: 0 14px 40px rgba(3, 14, 26, 0.08);
  backdrop-filter: blur(16px);
  transition: top 220ms ease, height 220ms ease, box-shadow 220ms ease;
}

.site-header.is-scrolled .brand-logo {
  max-height: 58px;
}

.site-header.is-scrolled {
  top: 0;
  height: 74px;
  box-shadow: 0 16px 44px rgba(3, 14, 26, 0.16);
}

.header-inner {
  width: min(1400px, calc(100% - 64px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 310px;
  max-height: 76px;
  transition: max-height 220ms ease;
  object-fit: contain;
  object-position: left center;
}

.nav {
  display: flex;
  align-items: center;
  gap: 27px;
  font-size: 0.88rem;
  font-weight: 700;
}

.nav > a {
  position: relative;
}

.nav > a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.nav > a:hover::after,
.nav > a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-cta {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 15px;
  background: var(--gold);
  border: 1px solid var(--gold);
  padding: 11px 12px 11px 18px;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: var(--gold-bright);
  color: var(--navy);
  transform: translateY(-1px);
}

.cta-arrow {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 1rem;
  line-height: 1;
}

.cta-arrow-light {
  background: var(--white);
  color: var(--navy);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: inherit;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 850px;
  height: 100svh;
  display: grid;
  align-items: center;
  color: var(--white);
  isolation: isolate;
  background: var(--navy);
}

.hero-media,
.hero-shade,
.hero-grid {
  position: absolute;
  inset: 0;
}

.hero-media {
  z-index: -4;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.02);
}

.hero-shade {
  z-index: -3;
  background:
    radial-gradient(circle at 76% 45%, rgba(213, 187, 90, 0.15), transparent 34%),
    linear-gradient(90deg, rgba(5, 18, 34, 0.94) 0%, rgba(5, 18, 34, 0.7) 47%, rgba(5, 18, 34, 0.16) 100%),
    linear-gradient(0deg, rgba(5, 18, 34, 0.45), transparent 50%);
}

.hero-grid {
  z-index: -2;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.13) 1px, transparent 1px);
  background-size: 110px 110px;
  mask-image: linear-gradient(90deg, black, transparent 76%);
}

.hero::after {
  content: "";
  position: absolute;
  right: 6vw;
  top: 13%;
  width: min(34vw, 520px);
  height: min(34vw, 520px);
  border: 1px solid rgba(213, 187, 90, 0.42);
  border-radius: 50%;
  z-index: -1;
  box-shadow: 0 0 0 80px rgba(255, 255, 255, 0.025), 0 0 0 160px rgba(255, 255, 255, 0.018);
}

.hero-content {
  width: var(--container);
  margin: 145px auto 0;
}

.eyebrow,
.section-kicker {
  margin: 0 0 23px;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--gold-bright);
}

.eyebrow span {
  width: 34px;
  height: 1px;
  background: currentColor;
}

.hero h1 {
  max-width: 980px;
  margin: 0;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(3.5rem, 6.9vw, 7.1rem);
  line-height: 0.97;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

.hero h1 em {
  color: var(--gold-bright);
  font-style: normal;
  font-weight: 600;
}

.hero-content > p {
  max-width: 620px;
  margin: 34px 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 30px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.84rem;
  font-weight: 700;
}

.hero-proof span {
  position: relative;
  padding-left: 16px;
}

.hero-proof span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  background: var(--gold);
}

.button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  border: 1px solid transparent;
  padding: 14px 22px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--gold);
  color: var(--navy);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--gold-bright);
}

.button-ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.45);
}

.button-ghost:hover,
.button-ghost:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
}

.hero-rail {
  position: absolute;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(864px, 68vw);
  padding-right: 174px; /* spazio per il pulsante WhatsApp fisso (152px + 22px) */
  background: rgba(7, 24, 46, 0.86);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
}

.hero-rail span {
  padding: 24px 26px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.hero-rail span b {
  display: block;
  margin-bottom: 5px;
  color: var(--gold-bright);
  font-size: 0.68rem;
}

.hero-rail span + span {
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.scroll-cue {
  position: absolute;
  left: max(24px, calc((100vw - 1240px) / 2));
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
}

.scroll-cue i {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  color: var(--white);
  font-style: normal;
  font-size: 1rem;
}

.section {
  padding: 120px max(40px, calc((100vw - 1240px) / 2));
}

.section-head h2,
.about h2,
.process h2,
.contact h2 {
  margin: 0;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.028em;
}

.section-head h2,
.about h2 {
  font-size: clamp(2.5rem, 4.4vw, 4.8rem);
}

.section-head > p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

/* il reset globale su <a> rende i link nel testo indistinguibili: qui servono visibili */
.section-head > p a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 160ms ease;
}

.section-head > p a:hover,
.section-head > p a:focus-visible {
  color: var(--navy);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.5fr);
  gap: 90px;
  align-items: end;
  margin-bottom: 54px;
}

.service-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.85fr;
  grid-template-rows: repeat(2, 310px);
  gap: 18px;
}

.service-card {
  position: relative;
  overflow: hidden;
  display: block;
  padding: 32px;
  color: var(--white);
  isolation: isolate;
}

.service-card h3 {
  margin: 0 0 10px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.65rem;
  line-height: 1.15;
}

.service-card p {
  margin: 0;
  max-width: 430px;
  line-height: 1.65;
}

.service-card-main {
  grid-row: 1 / 3;
  min-height: 638px;
}

.service-card-secondary {
  min-height: 310px;
}

.card-media,
.card-overlay {
  position: absolute;
  inset: 0;
}

.card-media {
  background: linear-gradient(145deg, #506070, #17283b);
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 650ms cubic-bezier(.2,.8,.2,1);
}

/* le inquadrature erano tarate una per una con background-position:
   object-position fa la stessa cosa su un <img> */
.card-media-build {
  object-position: center 20%;
}

.card-media-earth {
  object-position: center 58%;
}

.card-media-crane {
  object-position: center 45%;
}

.service-card:hover .card-media,
.service-card:focus-visible .card-media {
  transform: scale(1.035);
}

.card-overlay {
  z-index: 0;
  background: linear-gradient(180deg, rgba(7, 24, 46, 0.2) 5%, rgba(7, 24, 46, 0.92) 100%);
}

.card-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-content > span {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.service-card p {
  color: rgba(255, 255, 255, 0.67);
}

.service-action {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  color: var(--gold-bright);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.service-action b {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  font-size: 1rem;
  transition: transform 180ms ease;
}

.service-link:hover .service-action b,
.service-link:focus-visible .service-action b {
  transform: translateX(4px);
}

.feature-service {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
  margin-top: 18px;
  overflow: hidden;
  color: var(--white);
  isolation: isolate;
}

.feature-media,
.feature-overlay {
  position: absolute;
  inset: 0;
}

.feature-media {
  z-index: -2;
  width: 100%;
  height: 100%;
  background: #304050;
  object-fit: cover;
  object-position: center 42%;
  transition: transform 650ms cubic-bezier(.2,.8,.2,1);
}

.feature-overlay {
  z-index: -1;
  background: linear-gradient(90deg, rgba(5, 18, 34, 0.96) 0%, rgba(5, 18, 34, 0.78) 50%, rgba(5, 18, 34, 0.24) 100%);
}

.feature-service:hover .feature-media,
.feature-service:focus-visible .feature-media {
  transform: scale(1.025);
}

.feature-number {
  position: absolute;
  top: 28px;
  right: 32px;
  color: var(--gold-bright);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.feature-copy {
  width: min(720px, 68%);
  padding: 50px 48px;
}

.feature-copy .section-kicker {
  margin-bottom: 14px;
}

.feature-copy h3 {
  max-width: 620px;
  margin: 0 0 14px;
  font-size: clamp(2rem, 3.4vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.028em;
}

.feature-copy > p:not(.section-kicker) {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(400px, 0.95fr);
  gap: 90px;
  align-items: center;
  background: var(--white);
}

.about-visual {
  position: relative;
  min-height: 670px;
}

/* un <img> in posizione assoluta non si stira fra quattro lati come farebbe un
   div: con un inset asimmetrico serve un contenitore */
.about-image {
  position: absolute;
  inset: 0 70px 0 0;
}

.about-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* la velatura stava nello sfondo insieme alla foto: ora e' uno strato a parte */
.about-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(7, 24, 46, 0.12);
  pointer-events: none;
}

.about-copy .lead {
  margin: 34px 0 42px;
  color: var(--muted);
  font-size: 1.12rem;
}

.about-points {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.about-points > div {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.about-points strong {
  color: var(--navy);
}

.about-points p {
  margin: 0;
  color: var(--muted);
}

.process {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 120px;
  background: var(--navy);
  color: var(--white);
}

.section-kicker-light {
  color: var(--gold-bright);
}

.process h2 {
  font-size: clamp(2.8rem, 5vw, 5.4rem);
}

.process-intro > p:last-child {
  max-width: 430px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 1.06rem;
}

.process-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, 0.17);
}

.process-list li {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 22px;
  padding: 27px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.17);
}

.process-list span {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.process-list h3 {
  margin: 0 0 7px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.35rem;
}

.process-list p {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
}

.work {
  background: var(--mist);
}

.work-gallery {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 18px;
  align-items: end;
}

.work-gallery figure {
  margin: 0;
}

.work-photo {
  width: 100%;
  height: 390px;
  background: linear-gradient(135deg, #617080, #192c40);
  object-fit: cover;
  filter: saturate(0.82);
  transition: filter 250ms ease;
}

.work-main .work-photo {
  height: 570px;
}

.work-gallery figure:hover .work-photo {
  filter: saturate(1);
}

.work-gallery figcaption {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 2px 0;
}

.work-gallery figcaption span {
  color: var(--muted);
}

.work-gallery figcaption b {
  color: var(--navy);
}

.contact {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, #0d3470, #06172c 72%);
  color: var(--white);
}

.contact::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -130px;
  top: -170px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  box-shadow: 0 0 0 85px rgba(255, 255, 255, 0.025), 0 0 0 170px rgba(255, 255, 255, 0.02);
}

.contact > * {
  position: relative;
  z-index: 1;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(520px, 1.16fr);
  gap: clamp(55px, 8vw, 115px);
  align-items: start;
}

.contact h2 {
  max-width: 700px;
  font-size: clamp(3rem, 5.5vw, 6rem);
}

.contact-copy > p:not(.section-kicker) {
  max-width: 590px;
  margin: 30px 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.1rem;
}

.contact-promise {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 16px;
  max-width: 590px;
  padding: 21px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.contact-promise:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.contact-promise > span {
  color: var(--gold-bright);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.contact-promise p {
  margin: 0;
  color: rgba(255, 255, 255, 0.67);
}

.contact-promise strong {
  display: block;
  margin-bottom: 3px;
  color: var(--white);
}

.contact-panel {
  padding: clamp(28px, 4vw, 48px);
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.24);
}

.contact-panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 30px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.contact-panel-head span {
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.contact-panel-head b {
  color: var(--navy);
  font-size: 1.1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 19px;
}

.form-grid label {
  display: grid;
  gap: 7px;
}

.form-grid label > span {
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 800;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(7, 24, 46, 0.22);
  border-radius: 0;
  background: #f8faf9;
  color: var(--ink);
  padding: 12px 14px;
  font: inherit;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.form-grid textarea {
  min-height: 125px;
  resize: vertical;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  background: var(--white);
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(18, 59, 132, 0.12);
}

.form-wide {
  grid-column: 1 / -1;
}

.privacy-check {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: start;
  margin: 20px 0;
  padding: 6px 0;
  color: var(--muted);
  font-size: 0.82rem;
  cursor: pointer;
}

.privacy-check input {
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--blue);
}

.privacy-check a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.button-gold {
  background: var(--gold);
  color: var(--navy);
}

.button-gold:hover,
.button-gold:focus-visible {
  background: var(--gold-bright);
}

.form-submit {
  width: 100%;
}

.form-note,
.form-status {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.form-status {
  min-height: 1.2em;
  color: #9a350c;
  font-weight: 700;
}

.contact-directory {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.contact-channel {
  position: relative;
  min-height: 142px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 15px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.055);
  transition: background 180ms ease, transform 180ms ease;
}

.contact-channel + .contact-channel {
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.contact-channel:hover,
.contact-channel:focus-visible {
  z-index: 1;
  background: var(--gold);
  color: var(--navy);
  transform: translateY(-4px);
}

.contact-channel > span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.contact-channel:hover > span,
.contact-channel:focus-visible > span {
  color: rgba(7, 24, 46, 0.65);
}

.contact-channel strong {
  overflow-wrap: anywhere;
  font-size: 0.98rem;
  line-height: 1.35;
}

.contact-channel i {
  position: absolute;
  right: 20px;
  top: 18px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-style: normal;
  font-size: 0.95rem;
}

footer {
  min-height: 170px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 44px;
  padding: 35px max(40px, calc((100vw - 1240px) / 2));
  background: #04101f;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.85rem;
}

.footer-brand .brand-logo {
  width: 230px;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

footer > p {
  margin: 0;
  line-height: 1.7;
}

.footer-top {
  color: var(--white);
}

.footer-top span {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  margin-left: 8px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 50%;
}

.footer-links {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--white);
}

.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 45;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 8px 9px 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: #1ea959;
  color: var(--white);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.25);
  font-size: 0.88rem;
  font-weight: 800;
  transition: opacity 200ms ease, transform 200ms ease;
}

.whatsapp-float.is-nascosto {
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
}

.whatsapp-icon-wrap {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--white);
  color: #127a3d;
}

.whatsapp-icon {
  display: block;
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.form-submit .whatsapp-icon {
  width: 22px;
  height: 22px;
}

:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 3px;
}

.legal-body {
  background: #f3f5f4;
}

.legal-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 14px max(24px, calc((100vw - 1120px) / 2));
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.legal-header .brand-logo {
  width: min(300px, 60vw);
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  font-weight: 800;
}

.legal-back span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
}

.legal-page {
  width: min(850px, calc(100% - 40px));
  margin: 0 auto;
  padding: 85px 0 95px;
}

.legal-page h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.032em;
}

.legal-updated {
  margin: 18px 0 55px;
  color: var(--muted);
}

.legal-page section {
  padding: 30px 0;
  border-top: 1px solid var(--line);
}

.legal-page section:last-child {
  border-bottom: 1px solid var(--line);
}

.legal-page h2 {
  margin: 0 0 13px;
  color: var(--navy);
  font-size: 1.35rem;
}

.legal-page p {
  margin: 0 0 12px;
  color: #4c5864;
}

.legal-page a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-footer {
  min-height: auto;
  padding-top: 28px;
  padding-bottom: 28px;
}

.legal-footer a {
  color: var(--white);
}

@media (max-width: 1050px) {
  /* la foto hero e' molto larga: su viewport stretti il centro non inquadra nulla di
     riconoscibile, il 70% tiene struttura e operai */
  .hero-media {
    object-position: 70% center;
  }

  :root {
    --container: min(100% - 48px, 900px);
  }

  .header-inner {
    width: calc(100% - 48px);
  }

  .utility-inner {
    width: calc(100% - 48px);
  }

  .utility-inner > span {
    display: none;
  }

  /* backdrop-filter rende l'header blocco contenitore dei discendenti position:fixed:
     il menu restava chiuso nel riquadro dell'header (390x144) invece di coprire lo
     schermo. Con background all'opacita' 0.97 la sfocatura non era comunque visibile. */
  .site-header {
    backdrop-filter: none;
  }

  .menu-toggle {
    position: relative;
    z-index: 2;
    width: 48px;
    height: 48px;
    display: grid;
    place-content: center;
    gap: 7px;
    cursor: pointer;
  }

  .menu-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: currentColor;
    transition: transform 180ms ease;
  }

  .menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(4.5px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-4.5px) rotate(-45deg);
  }

  .menu-toggle[aria-expanded="true"] {
    color: var(--white);
  }

  .nav {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 17px;
    padding: 100px 34px 44px;
    background: var(--navy);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: clamp(1.9rem, 6vw, 3rem);
    transform: translateX(100%);
    transition: transform 260ms ease;
  }

  .nav.is-open {
    transform: translateX(0);
  }

  /* i link ereditavano il navy dell'header e finivano navy su navy: invisibili */
  .nav > a:not(.nav-cta) {
    color: var(--white);
  }

  .nav-cta {
    margin-top: 18px;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
  }

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

  .contact-copy {
    max-width: 760px;
  }

  .contact-directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-channel:nth-child(3) {
    border-left: 0;
  }

  .contact-channel:nth-child(n + 3) {
    border-top: 1px solid rgba(255, 255, 255, 0.16);
  }

  .hero {
    min-height: 760px;
  }

  .hero-rail {
    display: none;
  }

  .scroll-cue {
    left: 24px;
  }

  .section-head {
    grid-template-columns: 1fr;
    gap: 28px;
  }

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

  .about-visual {
    min-height: 590px;
  }

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

@media (max-width: 720px) {
  /* Le varianti ridotte non servono piu' qui: le foto sono <img> con srcset, e
     il browser sceglie da solo la misura in base allo spazio reale, non a una
     soglia di larghezza. */

  :root {
    --container: calc(100% - 40px);
  }

  .utility-bar {
    display: none;
  }

  .site-header,
  .site-header.is-scrolled {
    top: 0;
    height: 72px;
  }

  .header-inner {
    width: calc(100% - 28px);
  }

  .brand-logo {
    width: 205px;
    max-height: 50px;
  }

  .hero {
    min-height: 100svh;
    height: auto;
    align-items: start;
    padding: 116px 0 58px;
  }

  .hero-media {
    object-position: 58% center;
    transform: none;
  }

  .hero-content {
    width: calc(100% - 40px);
    margin: 0 auto;
  }

  .hero h1 {
    font-size: clamp(2.75rem, 12.5vw, 4.4rem);
  }

  .hero-content > p {
    margin: 24px 0 28px;
    font-size: 1rem;
  }

  .hero-actions {
    align-items: stretch;
  }

  .hero-actions .button {
    width: 100%;
    justify-content: space-between;
  }

  .hero-proof {
    display: grid;
    gap: 8px;
    margin-top: 24px;
  }

  .scroll-cue {
    display: none;
  }

  .section {
    padding: 82px 20px;
  }

  .section-head h2,
  .about h2 {
    font-size: 2.5rem;
  }

  .service-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .service-card {
    min-height: 390px;
  }

  .service-card-main {
    grid-row: auto;
    min-height: 470px;
  }

  .feature-service {
    min-height: 520px;
    align-items: flex-end;
  }

  .feature-media {
    /* qui il pannello diventa verticale: serve spostarsi sulla casa e sul piazzale,
       al centro resterebbe solo mare e ulivi */
    object-position: 75% 42%;
  }

  .feature-overlay {
    background: linear-gradient(180deg, rgba(5, 18, 34, 0.08) 15%, rgba(5, 18, 34, 0.94) 88%);
  }

  .feature-copy {
    width: 100%;
    padding: 120px 26px 30px;
  }

  .feature-copy h3 {
    font-size: 2.25rem;
  }

  .about {
    padding-top: 75px;
  }

  .about-visual {
    min-height: 470px;
  }

  .about-image {
    /* il margine destro serviva al pannello del logo, ora rimosso: senza, la foto
       restava piu' stretta del testo sotto */
    inset: 0;
  }

  .about-points > div {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .process h2 {
    font-size: 3.2rem;
  }

  .work-gallery {
    grid-template-columns: 1fr;
  }

  .work-main .work-photo,
  .work-photo {
    height: 390px;
  }

  .work-gallery figcaption {
    flex-direction: column;
    gap: 2px;
  }

  .contact h2 {
    font-size: 3.2rem;
  }

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

  .form-wide {
    grid-column: auto;
  }

  .contact-panel {
    margin: 0 -4px;
    padding: 28px 20px;
  }

  .contact-panel-head {
    align-items: start;
    flex-direction: column;
    gap: 5px;
  }

  .contact-directory {
    grid-template-columns: 1fr;
  }

  .contact-channel + .contact-channel,
  .contact-channel:nth-child(3),
  .contact-channel:nth-child(4) {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 4px 22px;
  }

  .footer-links a,
  .footer-top {
    padding: 11px 0;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
    padding: 45px 20px;
  }

  footer > p {
    text-align: left;
    margin: 0;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .whatsapp-float {
    right: 14px;
    bottom: max(14px, calc(env(safe-area-inset-bottom) + 8px));
    width: 58px;
    height: 58px;
    min-height: 58px;
    justify-content: center;
    gap: 0;
    padding: 0;
    border-radius: 50%;
  }

  .whatsapp-float .whatsapp-icon-wrap {
    width: 40px;
    height: 40px;
  }

  .whatsapp-float .whatsapp-label {
    display: none;
  }

  .legal-header {
    min-height: 76px;
    padding: 10px 16px;
  }

  .legal-header .brand-logo {
    width: min(220px, 67vw);
  }

  .legal-back {
    font-size: 0;
  }

  .legal-back span {
    margin: 0;
    font-size: 1rem;
  }

  .legal-page {
    padding-top: 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Immobili in vendita (opzione B)
   ========================================================================== */

.imm-intro,
.imm-elenco,
.imm-dettaglio {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.imm-intro {
  padding: 60px 0 34px;
}

.imm-intro h1 {
  margin: 0 0 14px;
  font-size: clamp(2.3rem, 4.4vw, 3.6rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.028em;
}

.imm-intro > p {
  max-width: 60ch;
  margin: 0;
  color: var(--muted);
}

.imm-filtri {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}

.imm-filtri label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.imm-filtri select {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--white);
  font: inherit;
}

.imm-elenco {
  padding-bottom: 80px;
}

.imm-griglia {
  display: grid;
  /* auto-fill e non auto-fit: con due soli immobili le colonne devono restare
     della loro misura, non allargarsi a mezza pagina ciascuna */
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.imm-scheda {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.imm-scheda:hover,
.imm-scheda:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(7, 24, 46, 0.14);
}

.imm-foto {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #ccd4da center / cover no-repeat;
}

.imm-venduto,
.imm-badge-venduto {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.imm-venduto {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 12px;
}

.imm-testo {
  padding: 22px;
}

.imm-comune {
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.imm-testo h2 {
  margin: 8px 0 10px;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.imm-prezzo {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 800;
}

.imm-dati,
.imm-vuoto {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.imm-vuoto {
  padding: 60px 0 90px;
  font-size: 1.05rem;
}

.imm-dettaglio {
  padding: 50px 0 90px;
}

.imm-dettaglio h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.imm-badge-venduto {
  padding: 8px 14px;
  margin: 0 0 14px;
}

.imm-prezzo-grande {
  margin: 0 0 30px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--blue);
}

.imm-galleria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 34px;
}

.imm-galleria img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #ccd4da;
}

.imm-galleria img:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
}

.imm-tabella {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0;
  margin: 0 0 34px;
  border-top: 1px solid var(--line);
}

.imm-tabella > div {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.imm-tabella dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.imm-tabella dd {
  margin: 4px 0 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.imm-descrizione {
  max-width: 68ch;
  margin-bottom: 34px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .imm-intro,
  .imm-elenco,
  .imm-dettaglio {
    width: calc(100% - 32px);
  }

  .imm-intro {
    padding: 34px 0 26px;
  }

  .imm-filtri {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .imm-galleria img:first-child {
    aspect-ratio: 4 / 3;
  }
}

/* Galleria lavori: stessa impaginazione degli immobili, senza i dati di vendita */
.lav-filtri {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.lav-filtri a {
  padding: 9px 16px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  transition: background 160ms ease, color 160ms ease;
}

.lav-filtri a:hover,
.lav-filtri a:focus-visible {
  color: var(--navy);
}

.lav-filtri a.attivo {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.lav-griglia {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.lav-scheda {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.lav-scheda:hover,
.lav-scheda:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(7, 24, 46, 0.14);
}

.lav-foto {
  aspect-ratio: 3 / 2;
  background: #ccd4da center / cover no-repeat;
}

.lav-testo {
  padding: 20px;
}

.lav-meta {
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.lav-testo h2 {
  margin: 8px 0 0;
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

/* 404: le uscite devono essere evidenti, chi ci arriva e' gia' in difficolta' */
.quattro-link {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.quattro-link a {
  padding: 12px 18px;
  border: 1px solid var(--line);
  background: var(--white);
  font-weight: 700;
  transition: background 160ms ease, color 160ms ease;
}

.quattro-link a:hover,
.quattro-link a:focus-visible {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

/* ==========================================================================
   Guscio delle pagine generate (immobili, lavori, 404)
   Chi arriva qui da una ricerca deve poter raggiungere servizi e contatti:
   prima aveva come sole uscite la homepage e una scheda.
   Nessun JavaScript: la CSP del sito non ammette script inline, e un menu a
   scomparsa qui non serve.
   ========================================================================== */

/* flex in colonna: una pagina corta (scheda non trovata) non deve lasciare
   il footer a meta' schermo con il vuoto sotto */
.pag-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f3f5f4;
}

.pag-body main {
  flex: 1 0 auto;
}

.imm-intro a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pag-utility {
  position: static;
}

.pag-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 30px;
  min-height: 84px;
  padding: 10px max(24px, calc((100vw - 1240px) / 2));
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(3, 14, 26, 0.08);
}

.pag-marchio .brand-logo {
  width: min(260px, 52vw);
  max-height: 64px;
}

.pag-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 27px;
  font-size: 0.88rem;
  font-weight: 700;
}

.pag-nav a {
  transition: color 160ms ease;
}

.pag-nav a:not(.nav-cta):hover,
.pag-nav a:not(.nav-cta):focus-visible {
  color: var(--blue);
}

/* Fascia scura in testa agli elenchi: riprende hero e sezione "Come
   lavoriamo" della homepage, cosi' le pagine sembrano dello stesso sito. */
.pag-testata {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--white);
}

.pag-testata::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -160px;
  width: 460px;
  height: 460px;
  border: 1px solid rgba(213, 187, 90, 0.35);
  border-radius: 50%;
  pointer-events: none;
}

.pag-testata-inner {
  position: relative;
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 72px 0 64px;
}

.pag-testata .section-kicker {
  margin-bottom: 16px;
}

.pag-testata h1 {
  max-width: 18ch;
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.028em;
}

.pag-testata p:last-child {
  max-width: 56ch;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.05rem;
}

.pag-testata + .imm-elenco {
  padding-top: 48px;
}

.pag-testata + .imm-elenco > .imm-filtri,
.pag-testata + .imm-elenco > .lav-filtri {
  margin: 0 0 32px;
}

/* Elenco vuoto */
.pag-vuoto {
  max-width: 760px;
  padding: 40px 44px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
}

.pag-vuoto p {
  max-width: 58ch;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 1.02rem;
}

.pag-vuoto .pag-vuoto-titolo {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.pag-vuoto-azioni {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button-scuro {
  color: var(--navy);
  border-color: var(--navy);
}

.button-scuro:hover,
.button-scuro:focus-visible {
  background: var(--navy);
  color: var(--white);
}

/* Testo esteso a fisarmonica: a sinistra titolo e invito, a destra le voci */
.pag-info {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 100px;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 40px 80px;
  align-items: start;
}

.pag-info-testa {
  position: sticky;
  top: 110px;
}

.pag-info-testa h2 {
  margin: 0 0 18px;
  font-size: clamp(1.9rem, 3.2vw, 2.8rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.025em;
}

.pag-info-testa > p {
  margin: 0;
  color: var(--muted);
}

.pag-info-chiusura {
  margin-top: 34px;
  padding: 30px 30px 32px;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.76);
}

.pag-info-chiusura h3 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.pag-info-chiusura p {
  margin: 0;
  line-height: 1.7;
}

.pag-info-chiusura a {
  color: var(--gold-bright);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pag-info-voci {
  border-top: 1px solid var(--line);
}

.pag-voce {
  border-bottom: 1px solid var(--line);
}

.pag-voce summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  cursor: pointer;
  list-style: none;
}

.pag-voce summary::-webkit-details-marker {
  display: none;
}

.pag-voce summary h3 {
  margin: 0;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  transition: color 160ms ease;
}

.pag-voce summary:hover h3,
.pag-voce summary:focus-visible h3 {
  color: var(--blue);
}

/* piu' che diventa meno, disegnato in CSS: nessun font di icone da caricare */
.pag-voce-segno {
  position: relative;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: background 180ms ease, border-color 180ms ease;
}

.pag-voce-segno::before,
.pag-voce-segno::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 2px;
  background: var(--navy);
  transform: translate(-50%, -50%);
  transition: transform 180ms ease, background 180ms ease;
}

.pag-voce-segno::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.pag-voce[open] .pag-voce-segno {
  background: var(--gold);
  border-color: var(--gold);
}

.pag-voce[open] .pag-voce-segno::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.pag-voce-corpo {
  padding: 0 60px 26px 0;
}

.pag-voce-corpo p {
  max-width: 68ch;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.pag-voce-corpo p:last-child {
  margin-bottom: 0;
}

.pag-voce-corpo strong {
  color: var(--ink);
}

.pag-voce-corpo a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pag-footer-contatti {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--white);
}

.pag-footer-contatti a:hover,
.pag-footer-contatti a:focus-visible,
footer .footer-links a:hover {
  color: var(--gold-bright);
}

@media (max-width: 960px) {
  .pag-info {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* su una colonna l'invito va in fondo, dopo le voci e non prima: la
     testata si scioglie e i suoi pezzi diventano righe della griglia */
  .pag-info-testa {
    display: contents;
  }

  .pag-info-testa > * {
    margin-top: 0;
    margin-bottom: 0;
  }

  .pag-info-voci {
    order: 1;
  }

  .pag-info-chiusura {
    order: 2;
    margin-top: 10px;
  }
}

@media (max-width: 720px) {
  .pag-header {
    position: static;
    padding: 14px 16px;
  }

  .pag-nav {
    width: 100%;
    gap: 6px 18px;
    font-size: 0.86rem;
  }

  .pag-nav a:not(.nav-cta) {
    padding: 8px 0;
  }

  .pag-nav .nav-cta {
    width: 100%;
    justify-content: space-between;
  }

  .pag-testata-inner {
    width: calc(100% - 32px);
    padding: 48px 0 44px;
  }

  .pag-testata::after {
    width: 260px;
    height: 260px;
    right: -120px;
    top: -110px;
  }

  .pag-vuoto {
    padding: 28px 22px;
  }

  .pag-vuoto-azioni .button {
    width: 100%;
  }

  .pag-info {
    width: calc(100% - 32px);
    padding-bottom: 70px;
  }

  .pag-voce-corpo {
    padding-right: 0;
  }
}

/* Apertura foto a schermo intero, senza JavaScript: la CSP non ammette script
   inline e :target basta. Il tasto Indietro del telefono chiude, che e' il
   comportamento che la gente si aspetta. */
.imm-galleria a {
  display: block;
  cursor: zoom-in;
}

.imm-galleria a:first-child {
  grid-column: 1 / -1;
}

.imm-galleria a:first-child img {
  aspect-ratio: 16 / 9;
}

.lente {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  place-items: center;
  padding: 56px 16px;
  background: rgba(5, 18, 34, 0.95);
}

.lente:target {
  display: grid;
}

.lente-fondo {
  position: absolute;
  inset: 0;
  cursor: zoom-out;
}

.lente > img {
  position: relative;
  max-width: min(1400px, 100%);
  max-height: 100%;
  object-fit: contain;
}

.lente-chiudi,
.lente-prec,
.lente-succ {
  position: absolute;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  font-size: 1.9rem;
  line-height: 1;
  transition: background 160ms ease;
}

.lente-chiudi:hover,
.lente-prec:hover,
.lente-succ:hover,
.lente-chiudi:focus-visible,
.lente-prec:focus-visible,
.lente-succ:focus-visible {
  background: rgba(255, 255, 255, 0.28);
}

.lente-chiudi {
  top: 14px;
  right: 14px;
  font-size: 1.6rem;
}

.lente-prec {
  left: 14px;
}

.lente-succ {
  right: 14px;
}

.lente-conta {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

@media (max-width: 720px) {
  .lente {
    padding: 64px 8px;
  }

  .lente-prec,
  .lente-succ {
    bottom: 16px;
    width: 48px;
    height: 48px;
  }

  .lente-prec {
    left: 24px;
  }

  .lente-succ {
    right: 24px;
  }
}

/* Azzera i filtri: compare solo quando ce n'e' uno attivo */
.imm-filtri button {
  align-self: end;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: var(--white);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.imm-filtri button:hover {
  background: var(--navy-2);
}

.imm-azzera {
  align-self: end;
  padding: 12px 4px;
  color: var(--blue);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Le foto delle schede sono <img> e non sfondi: Google Immagini non indicizza
   background-image, e uno sfondo non puo' portare srcset. */
.imm-foto img,
.lav-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* I riquadri della sezione Lavori in homepage sono riscritti con i cantieri
   veri quando ce ne sono almeno due pubblicati. */
.work-gallery a {
  display: block;
  color: inherit;
}

.work-gallery .work-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* nota sulle immagini illustrative: da togliere insieme alle foto generate,
   quando arrivano quelle vere dei cantieri (vedi sources/README.md) */
.footer-nota {
  font-size: 0.85em;
  opacity: 0.7;
}
