.btn,
button.btn {
  cursor: pointer;
  font-family: inherit;
}

button.btn {
  border: 0;
}

button.btn-white,
.btn-white {
  background: #fff;
  color: #0f0f0f;
}

button.btn-ghost,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .42) !important;
  background: transparent;
  color: #fff !important;
}

button.btn-green,
.btn-green {
  background: #1a7a38;
  color: #fff;
}

.btn,
.nav-links a,
.footer-col a,
.footer-bottom a,
.serv-mini-card,
.work-card,
.mid-cta a,
.wa-assistant-trigger,
.wa-option,
.wa-next,
.wa-back,
.wa-close {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(240, 165, 26, .85);
  outline-offset: 3px;
}

.btn,
.nav-links .cta {
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease, color .22s ease, border-color .22s ease;
}

.btn:hover,
.nav-links .cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(15, 15, 15, .12);
}

.btn:active,
.nav-links .cta:active {
  transform: translateY(0);
}

.hero-bg {
  background:
    radial-gradient(circle at 72% 42%, rgba(26, 122, 56, .16), transparent 32%),
    linear-gradient(90deg, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .44) 45%, rgba(0, 0, 0, .18) 100%) !important;
}

.hero-img {
  opacity: .84 !important;
}

.hero-content {
  padding-top: 20px;
  padding-bottom: 20px;
}

.hero-sub {
  color: rgba(255, 255, 255, .76) !important;
}

.trust-item {
  transition: background .22s ease, transform .22s ease;
}

.trust-item:hover {
  background: #fafaf8;
  transform: translateY(-2px);
}

.content-photo {
  display: block;
  width: 100%;
  object-fit: cover;
}

.about-photo-placeholder.content-photo {
  height: auto;
  aspect-ratio: 4 / 5;
  object-position: center;
}

.photo-box.content-photo {
  height: auto;
  aspect-ratio: 3 / 4;
  object-position: center;
}

.servizio-visual {
  overflow: hidden;
  padding: 0 !important;
}

.servizio-visual img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  transition: transform .55s ease, filter .55s ease;
}

.servizio-row:hover .servizio-visual img {
  transform: scale(1.026);
  filter: saturate(1.03) contrast(1.02);
}

.serv-tag,
.zone-tag,
.about-proof-item,
.info-card,
.contact-form,
.cv-form {
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease;
}

.serv-tag:hover,
.zone-tag:hover,
.about-proof-item:hover,
.info-card:hover {
  transform: translateY(-2px);
  border-color: rgba(26, 122, 56, .28) !important;
}

.mid-cta {
  margin: 32px auto 0;
  max-width: 1280px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  background: #0f0f0f;
  color: #fff;
}

.mid-cta strong {
  display: block;
  font: 700 1.25rem / 1.2 'Cormorant Garamond', serif;
  margin-bottom: 4px;
}

.mid-cta span {
  display: block;
  color: rgba(255, 255, 255, .66);
  font-size: .84rem;
  line-height: 1.55;
}

.mid-cta a,
.mid-cta button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  font: 700 .78rem / 1 'DM Sans', sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.mid-cta a:hover,
.mid-cta button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .22);
}

.work-gallery {
  padding: 6rem 6vw;
  background: #f6f4ef;
}

.work-gallery-head {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: end;
  max-width: 1280px;
  margin: 0 auto 35px;
}

.work-gallery-head > p {
  color: #666;
  line-height: 1.75;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 1280px;
  margin: auto;
}

.work-card {
  position: relative;
  margin: 0;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(15, 15, 15, .04);
  transition: transform .25s ease, box-shadow .25s ease;
}

.work-card:nth-child(1),
.work-card:nth-child(8),
.work-card:nth-child(13),
.work-card:nth-child(20),
.work-card:nth-child(27) {
  grid-column: span 2;
}

.work-open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #ddd;
  cursor: zoom-in;
  overflow: hidden;
}

.work-open::after {
  content: "Apri progetto";
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 8px 10px;
  background: rgba(15, 15, 15, .72);
  color: #fff;
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
}

.work-card img {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: transform .5s ease, filter .5s ease;
}

.work-card:nth-child(1) img,
.work-card:nth-child(8) img,
.work-card:nth-child(13) img,
.work-card:nth-child(20) img,
.work-card:nth-child(27) img {
  height: 340px;
}

.work-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 45px rgba(15, 15, 15, .1);
}

.work-open:hover img,
.work-card:focus-within img {
  transform: scale(1.04);
  filter: saturate(1.04) contrast(1.03);
}

.work-open:hover::after,
.work-card:focus-within .work-open::after {
  opacity: 1;
  transform: translateY(0);
}

.work-card figcaption {
  padding: 12px 14px;
  color: #444;
  font-size: .76rem;
}

.work-card figcaption .work-loc {
  display: block;
  color: #999;
  font-size: .66rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-top: 3px;
}

.work-lightbox {
  width: min(94vw, 1200px);
  max-width: none;
  padding: 0;
  border: 0;
  background: #111;
}

.work-lightbox::backdrop {
  background: rgba(0, 0, 0, .86);
}

.work-lightbox img {
  display: block;
  width: 100%;
  max-height: 88vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .65);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

.wa-assistant-trigger {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 18px 0 10px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: linear-gradient(135deg, #125429, #1a7a38);
  color: #fff;
  font: 700 13px / 1 'DM Sans', sans-serif;
  letter-spacing: .03em;
  box-shadow: 0 16px 42px rgba(18, 84, 41, .34);
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease;
}

.wa-kicker {
  font-family: 'DM Sans', sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.wa-assistant-trigger:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 54px rgba(18, 84, 41, .42);
}

.wa-assistant-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #d4e8d6;
  font-size: 15px;
}

.wa-assistant-panel {
  position: fixed;
  right: 20px;
  bottom: 88px;
  z-index: 901;
  width: min(420px, calc(100vw - 40px));
  max-height: min(680px, calc(100dvh - 120px));
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 1px solid rgba(20, 45, 30, .14);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 15, 15, .22);
  opacity: 0;
  transform: translateY(12px) scale(.98);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}

.wa-assistant-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.wa-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  background: #0f0f0f;
  color: #fff;
}

.wa-kicker {
  margin: 0 0 6px;
  color: #d4e8d6;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.wa-head h2 {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.55rem;
  line-height: 1.05;
}

.wa-head p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, .66);
  font-size: .78rem;
  line-height: 1.55;
}

.wa-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
}

.wa-body {
  overflow: auto;
  padding: 20px;
}

.wa-progress {
  height: 4px;
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ede8;
}

.wa-progress span {
  display: block;
  height: 100%;
  width: var(--wa-progress, 16%);
  border-radius: inherit;
  background: #1a7a38;
  transition: width .25s ease;
}

.wa-question {
  margin: 0 0 14px;
  color: #0f0f0f;
  font-size: .88rem;
  font-weight: 700;
}

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

.wa-option {
  min-height: 46px;
  padding: 12px;
  border: 1px solid #dde4df;
  border-radius: 12px;
  background: #fff;
  color: #2a2a2a;
  font: 600 .8rem / 1.25 'DM Sans', sans-serif;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.wa-option:hover,
.wa-option.is-selected {
  border-color: rgba(26, 122, 56, .42);
  background: #eef6f1;
  transform: translateY(-1px);
}

.wa-note {
  width: 100%;
  min-height: 116px;
  resize: vertical;
  padding: 13px;
  border: 1px solid #dde4df;
  border-radius: 12px;
  color: #2a2a2a;
  font: 400 .88rem / 1.6 'DM Sans', sans-serif;
}

.wa-summary {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid #dde4df;
  border-radius: 12px;
  background: #fafaf8;
  color: #566159;
  font-size: .8rem;
  line-height: 1.5;
}

.wa-summary strong {
  color: #0f0f0f;
}

.wa-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 20px 20px;
  border-top: 1px solid #edf1ee;
}

.wa-back,
.wa-next {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  font: 700 .76rem / 1 'DM Sans', sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}

.wa-back {
  border: 1px solid #d7dfda;
  background: #fff;
  color: #303b33;
}

.wa-next {
  border: 1px solid #1a7a38;
  background: #1a7a38;
  color: #fff;
}

.wa-next:disabled,
.wa-back:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.footer-bottom a {
  color: inherit;
  text-decoration: none;
}

.footer-bottom a:hover {
  text-decoration: underline;
}

.motion-ready .hero-brand-mark,
.motion-ready .hero-eyebrow,
.motion-ready .hero-title,
.motion-ready .hero-sub,
.motion-ready .hero-actions,
.motion-ready .trust-item,
.motion-ready .about-strip > *,
.motion-ready .section-bridge-inner,
.motion-ready .serv-mini-card,
.motion-ready .servizio-row,
.motion-ready .zone > *,
.motion-ready .work-gallery-head,
.motion-ready .work-card,
.motion-ready .info-card,
.motion-ready .contact-form,
.motion-ready .cv-form,
.motion-ready .cta-strip > *,
.motion-ready .storia-text > *,
.motion-ready .tl-item,
.motion-ready .valore-card,
.motion-ready .team-card,
.motion-ready .oggi-item,
.motion-ready .garanzie-item,
.motion-ready .profilo-card,
.motion-ready .processo-card,
.motion-ready .info-block,
.motion-ready .wa-block,
.motion-ready .next-steps,
.motion-ready .content-photo {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}

.is-visible {
  opacity: 1 !important;
  transform: none !important;
}

.hero-img,
.content-photo,
.servizio-visual img,
.work-card img {
  will-change: transform;
}

@media (max-width: 900px) {
  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-gallery-head {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .work-card:nth-child(1),
  .work-card:nth-child(8),
  .work-card:nth-child(13),
  .work-card:nth-child(20),
  .work-card:nth-child(27) {
    grid-column: span 1;
  }

  .work-card img,
  .work-card:nth-child(1) img,
  .work-card:nth-child(8) img,
  .work-card:nth-child(13) img,
  .work-card:nth-child(20) img,
  .work-card:nth-child(27) img {
    height: 260px;
  }
}

@media (max-width: 768px) {
  .servizio-visual img {
    min-height: 260px;
    max-height: 420px;
  }

  .hero-img {
    object-position: 58% center;
  }

  .mid-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .mid-cta a,
  .mid-cta button {
    width: 100%;
  }

  .wa-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .hero-bg {
    background:
      radial-gradient(circle at 72% 38%, rgba(26, 122, 56, .12), transparent 30%),
      linear-gradient(90deg, rgba(0, 0, 0, .74) 0%, rgba(0, 0, 0, .46) 100%) !important;
  }

  .wa-assistant-trigger {
    right: 14px;
    bottom: 14px;
    width: 54px;
    padding: 0;
    justify-content: center;
  }

  .wa-assistant-label {
    display: none;
  }

  .wa-assistant-panel {
    left: 10px;
    right: 10px;
    bottom: 78px;
    width: auto;
    max-height: calc(100dvh - 92px);
  }

  .wa-head,
  .wa-body,
  .wa-foot {
    padding-left: 16px;
    padding-right: 16px;
  }

  .wa-head h2 {
    font-size: 1.34rem;
  }

  .work-gallery {
    padding: 4rem 5vw;
  }

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

  .work-card img,
  .work-card:nth-child(1) img,
  .work-card:nth-child(8) img,
  .work-card:nth-child(13) img,
  .work-card:nth-child(20) img,
  .work-card:nth-child(27) img {
    height: 280px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }

  .hero-brand-mark,
  .hero-eyebrow,
  .hero-title,
  .hero-sub,
  .hero-actions,
  .trust-item,
  .about-strip > *,
  .section-bridge-inner,
  .serv-mini-card,
  .servizio-row,
  .zone > *,
  .work-gallery-head,
  .work-card,
  .info-card,
  .contact-form,
  .cv-form,
  .cta-strip > * {
    opacity: 1 !important;
    transform: none !important;
  }
}
