:root {
  --color-bg: #ffffff;
  --color-surface: #f5f5f5;
  --color-ink: #101010;
  --color-muted: #666a70;
  --color-line: #dedede;
  --color-accent: #5cb978;
  --color-accent-dark: #3f965d;
  --color-blue: #16243a;
  --shadow-soft: 0 24px 70px rgba(10, 10, 10, 0.12);
  --radius: 8px;
  --header-height: 76px;
  --container: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  background: var(--color-bg);
}

body.menu-open {
  overflow: hidden;
}

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

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

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

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

.section {
  scroll-margin-top: var(--header-height);
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(222, 222, 222, 0.72);
  backdrop-filter: blur(18px);
}

.navbar {
  width: min(100% - 40px, var(--container));
  height: var(--header-height);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-logo {
  width: auto;
  height: clamp(44px, 4.2vw, 54px);
  max-width: min(260px, 42vw);
  display: block;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #252525;
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-menu a {
  position: relative;
  padding: 8px 0;
}

.nav-menu a::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.24s ease;
}

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

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--color-ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  position: relative;
  min-height: 92vh;
  padding-top: var(--header-height);
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #111;
}

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

.hero-media img {
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.36) 54%, rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: relative;
  width: min(100% - 40px, var(--container));
  margin: 0 auto;
  padding: 0 0 clamp(72px, 12vh, 132px);
  color: #fff;
}

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

.hero .eyebrow {
  color: #c9f2d5;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  max-width: 780px;
  margin-bottom: 20px;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.03;
  letter-spacing: 0;
}

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

.hero-subtitle {
  max-width: 620px;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.12rem, 2vw, 1.45rem);
}

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

.btn {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 800;
  line-height: 1.1;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: var(--color-accent);
  box-shadow: 0 16px 38px rgba(92, 185, 120, 0.3);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-accent-dark);
}

.btn-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
}

.about,
.services,
.quote,
.contacts {
  padding: clamp(74px, 10vw, 120px) 0;
}

.quote {
  background: var(--color-surface);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(40px, 6vw, 86px);
  align-items: center;
}

.section-copy p {
  max-width: 650px;
  color: var(--color-muted);
  font-size: 1.08rem;
}

.image-stack {
  position: relative;
  min-height: 500px;
}

.image-stack img {
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.image-main {
  height: 420px;
}

.image-small {
  position: absolute;
  right: -18px;
  bottom: 0;
  width: 46%;
  height: 220px;
  border: 8px solid var(--color-surface);
}

.section-heading {
  display: flex;
  margin-bottom: 38px;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}

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

.services-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.service-card {
  min-height: 244px;
  padding: 26px 24px 24px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-line);
  border-radius: 0;
  background: #fff;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.service-card:hover {
  border-color: rgba(92, 185, 120, 0.36);
  box-shadow: 0 18px 45px rgba(15, 20, 30, 0.08), inset 0 3px 0 var(--color-accent);
  transform: translateY(-6px);
}

.service-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 32px;
  display: inline-grid;
  place-items: center;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
  background: #fff;
  border-radius: 0;
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1;
}

.service-card p {
  margin-bottom: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.quote-layout {
  align-items: start;
}

.check-list {
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  color: var(--color-blue);
  font-weight: 800;
}

.check-list li {
  position: relative;
  margin-bottom: 12px;
  padding-left: 28px;
}

.check-list li::before {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--color-accent);
  content: "✓";
}

.quote-form {
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.form-row {
  margin-bottom: 18px;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-row label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.92rem;
  font-weight: 800;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 13px 14px;
  color: var(--color-ink);
  border: 1px solid #cfcfcf;
  border-radius: 6px;
  background: #fff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(92, 185, 120, 0.16);
}

.form-row textarea {
  resize: vertical;
}

.field-note {
  margin: 8px 0 0;
  color: var(--color-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.form-submit {
  width: 100%;
  border: 0;
  cursor: pointer;
}

.form-note {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--color-blue);
  font-weight: 800;
  text-align: center;
}

.privacy-note {
  margin: 14px 0 0;
  color: var(--color-muted);
  font-size: 0.88rem;
  text-align: center;
}

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

.contact-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1.2fr);
  gap: 22px;
}

.contact-panel,
.map-placeholder {
  min-height: 340px;
  border-radius: var(--radius);
}

.contact-panel {
  padding: 34px;
  color: #fff;
  background: var(--color-blue);
}

.contact-panel p {
  color: rgba(255, 255, 255, 0.84);
}

.contact-panel a {
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.42);
  text-underline-offset: 4px;
}

.map-placeholder {
  min-height: 340px;
  overflow: hidden;
  border: 1px solid var(--color-line);
  background: var(--color-surface);
}

.map-consent {
  min-height: 340px;
  padding: 34px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 12px;
  color: #fff;
  background:
    linear-gradient(rgba(16, 16, 16, 0.76), rgba(16, 16, 16, 0.76)),
    url("assets/hero-dettagli-tipografici2.png") center / cover;
}

.map-consent h3 {
  margin-bottom: 0;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
}

.map-consent p {
  max-width: 520px;
  color: rgba(255, 255, 255, 0.82);
}

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

.site-footer {
  color: #fff;
  background: #101010;
}

.footer-grid {
  padding: 54px 0;
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.9fr;
  gap: 38px;
}

.footer-brand {
  margin-bottom: 18px;
}

.footer-logo {
  width: min(260px, 100%);
  height: auto;
  padding: 10px 12px;
  display: block;
  border-radius: 6px;
  background: #fff;
}

.site-footer p,
.site-footer a {
  color: rgba(255, 255, 255, 0.72);
}

.site-footer h3 {
  color: #fff;
  font-size: 1rem;
}

.site-footer a {
  display: table;
  margin-bottom: 8px;
}

.site-footer a:hover {
  color: #fff;
}

.footer-link-button {
  display: table;
  margin: 0 0 8px;
  padding: 0;
  color: rgba(255, 255, 255, 0.72);
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.footer-link-button:hover,
.footer-link-button:focus-visible {
  color: #fff;
}

.footer-bottom {
  padding: 18px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.92rem;
}

.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cookie-banner {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 100;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-card {
  width: min(100%, 880px);
  padding: 26px;
  display: grid;
  gap: 18px;
  color: var(--color-ink);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.cookie-card h2 {
  margin-bottom: 8px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.cookie-card p {
  margin-bottom: 0;
  color: var(--color-muted);
}

.cookie-preferences {
  display: grid;
  gap: 10px;
}

.cookie-preferences[hidden] {
  display: none;
}

.cookie-option {
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--color-line);
  border-radius: 6px;
  font-weight: 800;
}

.cookie-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--color-accent);
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cookie-actions .btn[hidden] {
  display: none;
}

.cookie-secondary {
  color: var(--color-blue);
  border-color: var(--color-line);
  background: #fff;
}

.cookie-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.9rem;
}

.cookie-links a,
.legal-content a {
  color: var(--color-blue);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-body {
  background: var(--color-surface);
}

.legal-header {
  background: #fff;
  border-bottom: 1px solid var(--color-line);
}

.legal-nav {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.legal-main {
  padding: clamp(44px, 7vw, 86px) 0;
}

.legal-content {
  max-width: 900px;
  padding: clamp(26px, 5vw, 54px);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 20, 30, 0.08);
}

.legal-content h1 {
  margin-bottom: 10px;
  color: var(--color-ink);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
}

.legal-content h2 {
  margin: 34px 0 12px;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
}

.legal-content p {
  color: var(--color-muted);
}

.legal-updated {
  font-weight: 800;
}

.whatsapp-button {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 58px;
  height: 58px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: #fff;
  padding: 7px;
  box-shadow: 0 16px 36px rgba(10, 10, 10, 0.22);
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.whatsapp-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.whatsapp-button:hover,
.whatsapp-button:focus-visible {
  color: #fff;
  background: #fff;
  box-shadow: 0 20px 44px rgba(10, 10, 10, 0.28);
  transform: translateY(-3px);
}

@media (max-width: 1080px) {
  .services-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  :root {
    --header-height: 68px;
  }

  .container,
  .navbar,
  .hero-content {
    width: min(100% - 28px, var(--container));
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    right: 0;
    left: 0;
    max-height: calc(100vh - var(--header-height));
    padding: 18px 20px 28px;
    display: grid;
    gap: 6px;
    overflow-y: auto;
    background: #fff;
    border-bottom: 1px solid var(--color-line);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.12);
    transform: translateY(-120%);
    transition: transform 0.24s ease;
  }

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

  .nav-menu a {
    display: block;
    padding: 12px 0;
  }

  .hero {
    min-height: 88vh;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.84));
  }

  .split,
  .quote-layout,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .image-stack {
    min-height: auto;
  }

  .image-main {
    height: 360px;
  }

  .image-small {
    position: relative;
    right: auto;
    bottom: auto;
    width: 72%;
    height: 190px;
    margin: -70px 0 0 auto;
  }

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

@media (max-width: 620px) {
  .brand {
    gap: 9px;
    font-size: 0.95rem;
  }

  .brand-logo {
    height: 44px;
    max-width: 58vw;
  }

  .hero-content {
    padding-bottom: 58px;
  }

  .hero-actions,
  .btn {
    width: 100%;
  }

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

  .about,
  .services,
  .quote,
  .contacts {
    padding: 62px 0;
  }

  .contact-panel,
  .map-placeholder {
    min-height: 280px;
    padding: 26px;
  }

  .map-placeholder {
    padding: 0;
  }

  .map-consent {
    min-height: 280px;
    padding: 26px;
  }

  .cookie-banner {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .cookie-card {
    padding: 20px;
  }

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

  .legal-nav {
    padding: 12px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .whatsapp-button {
    right: 14px;
    bottom: 14px;
    width: 54px;
    height: 54px;
  }
}

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

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
