:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #5d6878;
  --line: #e4e8ee;
  --paper: #ffffff;
  --soft: #f4f6f9;
  --blue: #0b56b8;
  --blue-dark: #083b80;
  --gold: #d7a441;
  --navy: #092947;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  color: var(--ink);
  background: var(--soft);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--soft);
}

body,
button,
input,
textarea,
select {
  font: inherit;
}

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

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

.container {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(16, 35, 60, 0.06);
  backdrop-filter: blur(10px);
}

.header-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  color: var(--blue);
  font-weight: 800;
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 3px solid var(--blue);
  border-radius: 50%;
  background: #f8fbff;
  color: var(--blue);
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.brand-text {
  max-width: 150px;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
  overflow-x: auto;
}

.site-nav a {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 0.94rem;
  font-weight: 650;
}

.site-nav a:hover {
  color: var(--blue-dark);
}

.site-nav a.active {
  color: var(--blue-dark);
  border-bottom: 2px solid var(--gold);
}

.header-cta {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0 20px;
  border-radius: 3px;
  background: var(--blue);
  color: white;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.84rem;
  letter-spacing: 0.04em;
}

.hero {
  position: relative;
  min-height: 720px;
  display: flex;
  align-items: center;
  color: white;
  background:
    linear-gradient(90deg, rgba(4, 25, 48, 0.86) 0%, rgba(4, 25, 48, 0.72) 43%, rgba(4, 25, 48, 0.28) 100%),
    url("img/lavori/lavoro-23.jpeg") center / cover;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 7px;
  background: linear-gradient(90deg, var(--blue), var(--gold));
}

.hero-inner {
  position: relative;
  width: min(760px, 100%);
  padding: 86px 0 96px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--gold);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 24px;
  max-width: 860px;
  font-size: clamp(2.55rem, 6vw, 5.35rem);
  line-height: 0.98;
  font-weight: 850;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 20px;
  font-size: clamp(2rem, 3.2vw, 3.25rem);
  line-height: 1.08;
  font-weight: 850;
  text-transform: uppercase;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.28rem;
  line-height: 1.2;
}

.hero p:not(.eyebrow) {
  max-width: 670px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.08rem;
}

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

.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 26px;
  border: 0;
  border-radius: 3px;
  background: var(--blue);
  color: white;
  box-shadow: 0 18px 35px rgba(11, 86, 184, 0.24);
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.button:hover,
.header-cta:hover {
  background: var(--blue-dark);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px rgba(11, 86, 184, 0.3);
}

.button-light {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow: none;
}

.button-light:hover {
  background: rgba(255, 255, 255, 0.24);
}

.button-white {
  background: white;
  color: var(--blue);
  box-shadow: 0 18px 35px rgba(3, 18, 37, 0.22);
}

.button-white:hover {
  background: #f1f6ff;
  color: var(--blue-dark);
}

.section {
  padding: 92px 0;
}

.page-hero {
  position: relative;
  min-height: 430px;
  display: flex;
  align-items: center;
  color: white;
  background:
    linear-gradient(90deg, rgba(4, 25, 48, 0.9) 0%, rgba(4, 25, 48, 0.74) 52%, rgba(4, 25, 48, 0.34) 100%),
    url("img/lavori/lavoro-24.jpeg") center / cover;
}

.page-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--blue), var(--gold));
}

.page-hero-inner {
  position: relative;
  padding: 74px 0 84px;
}

.page-hero .eyebrow {
  color: var(--gold);
}

.page-hero p:not(.eyebrow) {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.08rem;
}

.page-hero-azienda {
  background:
    linear-gradient(90deg, rgba(4, 25, 48, 0.9) 0%, rgba(4, 25, 48, 0.72) 54%, rgba(4, 25, 48, 0.34) 100%),
    url("img/lavori/lavoro-32.jpeg") center / cover;
}

.page-hero-servizi {
  background:
    linear-gradient(90deg, rgba(4, 25, 48, 0.9) 0%, rgba(4, 25, 48, 0.72) 54%, rgba(4, 25, 48, 0.34) 100%),
    url("img/lavori/lavoro-19.jpeg") center / cover;
}

.page-hero-lavori {
  background:
    linear-gradient(90deg, rgba(4, 25, 48, 0.88) 0%, rgba(4, 25, 48, 0.66) 54%, rgba(4, 25, 48, 0.24) 100%),
    url("img/lavori/lavoro-40.jpeg") center / cover;
}

.page-hero-contatti {
  background:
    linear-gradient(90deg, rgba(4, 25, 48, 0.9) 0%, rgba(4, 25, 48, 0.74) 54%, rgba(4, 25, 48, 0.34) 100%),
    url("img/lavori/lavoro-23.jpeg") center / cover;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 56px;
  align-items: center;
}

.reverse {
  grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1fr);
}

.copy-block p {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.04rem;
}

.text-link {
  display: inline-flex;
  margin-top: 8px;
  color: var(--blue);
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.text-link::after {
  content: "";
  width: 34px;
  height: 2px;
  align-self: center;
  margin-left: 12px;
  background: var(--gold);
}

.section-link {
  margin-top: 30px;
}

.image-panel {
  position: relative;
  min-height: 430px;
  margin: 0;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 28px 70px rgba(15, 32, 55, 0.18);
}

.image-panel::before {
  content: "";
  position: absolute;
  inset: 18px;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.68);
  pointer-events: none;
}

.image-panel img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
}

.emergency-band {
  padding: 58px 0;
  background: var(--navy);
  color: white;
}

.emergency-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 36px;
  align-items: center;
}

.emergency-band .eyebrow {
  color: var(--gold);
}

.emergency-band h2 {
  margin-bottom: 10px;
  font-size: clamp(1.8rem, 3vw, 2.65rem);
}

.emergency-band p:not(.eyebrow) {
  max-width: 760px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 38px;
}

.section-heading h2 {
  margin-bottom: 0;
}

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

.service-card {
  overflow: hidden;
  border-radius: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(16, 35, 60, 0.08);
}

.service-card img {
  width: 100%;
  aspect-ratio: 1.28;
  object-fit: cover;
}

.service-card div {
  padding: 28px;
}

.service-card h3 {
  color: var(--blue-dark);
  text-transform: uppercase;
}

.service-card p,
.reasons-grid p,
.contact-grid p {
  color: var(--muted);
}

.service-list {
  display: grid;
  gap: 26px;
}

.service-row {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 26px;
  border-radius: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(16, 35, 60, 0.07);
}

.service-row img {
  width: 100%;
  aspect-ratio: 1.35;
  object-fit: cover;
  border-radius: 3px;
}

.service-row h2 {
  margin-bottom: 14px;
  font-size: clamp(1.65rem, 2.5vw, 2.45rem);
}

.service-row p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
}

.renovation {
  background: var(--paper);
}

.work-gallery {
  background: #f8fafc;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  grid-auto-rows: 250px;
  gap: 18px;
}

.gallery-grid figure {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 4px;
  background: var(--paper);
  box-shadow: 0 18px 44px rgba(16, 35, 60, 0.08);
}

.gallery-feature {
  grid-row: span 2;
}

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

.gallery-page-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.gallery-page-grid figure {
  margin: 0;
  overflow: hidden;
  border-radius: 4px;
  background: var(--paper);
  box-shadow: 0 18px 44px rgba(16, 35, 60, 0.08);
}

.gallery-page-grid img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1.12;
  object-fit: cover;
}

.check-list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.check-list span {
  position: relative;
  padding-left: 34px;
  font-weight: 780;
}

.check-list span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: inset 0 0 0 4px white, 0 0 0 1px var(--blue);
}

.reasons {
  background: #eef2f6;
}

.reasons-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.reasons-grid article {
  min-height: 250px;
  padding: 34px 30px;
  border-radius: 4px;
  background: white;
  border-top: 5px solid var(--blue);
  box-shadow: 0 16px 40px rgba(16, 35, 60, 0.07);
}

.reasons-grid span {
  display: block;
  margin-bottom: 28px;
  color: var(--gold);
  font-size: 2.5rem;
  font-weight: 850;
  line-height: 1;
}

.contact {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
    url("img/lavori/lavoro-24.jpeg") center / cover;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.55fr);
  gap: 50px;
  align-items: start;
}

.contact-card {
  display: grid;
  gap: 22px;
  padding: 34px;
  border-radius: 4px;
  background: var(--navy);
  color: white;
  box-shadow: 0 28px 70px rgba(15, 32, 55, 0.22);
}

.contact-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-card p,
.contact-card a:not(.button) {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

.contact-card .button {
  width: 100%;
  margin-top: 8px;
}

.map-section {
  background: var(--paper);
}

.map-section iframe {
  width: 100%;
  min-height: 440px;
  display: block;
  border: 0;
}

.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #25d366;
  color: white;
  box-shadow: 0 18px 36px rgba(8, 32, 18, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.whatsapp-float:hover {
  background: #1fb85a;
  transform: translateY(-3px);
  box-shadow: 0 22px 42px rgba(8, 32, 18, 0.34);
}

.whatsapp-float svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
}

.footer {
  background: #061d34;
  color: rgba(255, 255, 255, 0.78);
}

.footer-inner {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 0.94rem;
}

.footer p {
  margin: 0;
}

@media (max-width: 1040px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 14px 0;
  }

  .site-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    padding-bottom: 4px;
  }

  .split-grid,
  .reverse,
  .contact-grid,
  .service-row {
    grid-template-columns: 1fr;
  }

  .cards-grid,
  .reasons-grid,
  .gallery-grid,
  .gallery-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-feature {
    grid-column: span 2;
    grid-row: span 1;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 28px, 1160px);
  }

  .header-inner {
    gap: 14px;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
  }

  .brand-text {
    max-width: 130px;
    font-size: 0.9rem;
  }

  .header-cta {
    min-height: 44px;
    padding: 0 14px;
    font-size: 0.76rem;
  }

  .site-nav {
    gap: 18px;
  }

  .hero {
    min-height: 640px;
    background:
      linear-gradient(90deg, rgba(4, 25, 48, 0.9), rgba(4, 25, 48, 0.72)),
      url("img/lavori/lavoro-23.jpeg") center / cover;
  }

  .hero-inner {
    padding: 62px 0 72px;
  }

  h1 {
    font-size: clamp(2.25rem, 13vw, 3.55rem);
  }

  h2 {
    font-size: clamp(1.85rem, 9vw, 2.55rem);
  }

  .hero-actions,
  .emergency-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .emergency-grid,
  .footer-inner {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .whatsapp-float {
    right: 16px;
    bottom: 16px;
    width: 56px;
    height: 56px;
  }

  .whatsapp-float svg {
    width: 31px;
    height: 31px;
  }

  .section {
    padding: 70px 0;
  }

  .cards-grid,
  .reasons-grid,
  .gallery-grid,
  .gallery-page-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-auto-rows: 230px;
  }

  .gallery-feature {
    grid-column: auto;
  }

  .image-panel,
  .image-panel img {
    min-height: 320px;
  }
}
