/* Sabia Antincendio — palette from logo & favicon */

:root {
  --color-red: #c62828;
  --color-red-dark: #8e0000;
  --color-grey: #6e6e6e;
  --color-grey-dark: #2e2e2e;
  --color-grey-light: #e5e5e5;
  --color-bg: #ffffff;
  --color-bg-soft: #f7f7f7;
  --color-bg-white: #ffffff;
  --color-ink: #2e2e2e;
  --color-ink-muted: #6e6e6e;
  --color-silver: #9e9e9e;
  --color-line: rgba(46, 46, 46, 0.12);
  --color-accent: var(--color-red);
  --font-display: "Barlow Condensed", system-ui, sans-serif;
  --font-sans: "Source Sans 3", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: calc(1px + 1.1rem + clamp(2.75rem, 10vw, 4.5rem));
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  overflow-x: hidden;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-ink);
  background: var(--color-bg-white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

main {
  background: var(--color-bg-white);
  overflow-x: hidden;
}

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

body.nav-open {
  overflow: hidden;
}

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

a {
  color: var(--color-red);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}

a:hover {
  color: var(--color-red-dark);
}

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

.container.narrow {
  width: min(720px, 92vw);
}

.center {
  text-align: center;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-red);
  margin: 0 0 1rem;
  line-height: 1.1;
}

.section-sub {
  color: var(--color-ink-muted);
  margin: 0 0 1.5rem;
  max-width: 36rem;
}

/* Header */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: var(--color-bg-white);
  border-bottom: 1px solid var(--color-line);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.55rem 4vw;
}

.brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.brand__logo {
  height: clamp(44px, 10vw, 72px);
  width: auto;
  max-width: min(72vw, 280px);
  object-fit: contain;
  object-position: left center;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.site-header .nav a {
  color: var(--color-grey-dark);
}

.site-header .nav a:hover {
  color: var(--color-red);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.nav__logo {
  display: none;
  line-height: 0;
}

.nav__logo img {
  height: clamp(100px, 28vw, 160px);
  width: auto;
  max-width: min(88vw, 360px);
  object-fit: contain;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 135;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-grey-dark);
  transition: transform 0.25s var(--ease-out);
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

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

body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    display: flex;
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.1rem;
    padding: 2rem 1.5rem;
    background: var(--color-bg-white);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease-out), visibility 0.35s;
    z-index: 125;
  }

  .nav.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .nav__logo {
    display: flex;
    justify-content: center;
    order: -1;
    padding-bottom: 0.75rem;
  }

  .nav__link {
    font-size: clamp(1.1rem, 5vw, 1.5rem);
    color: var(--color-grey-dark);
  }

  .nav__link:hover {
    color: var(--color-red);
  }

  .site-header__inner {
    position: relative;
  }

  .site-header .brand,
  .nav-toggle {
    position: relative;
    z-index: 130;
  }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.25s var(--ease-out), color 0.25s, border-color 0.25s;
}

.btn--primary {
  background: var(--color-red);
  color: #fff;
  border-color: var(--color-red);
}

.btn--primary:hover {
  background: var(--color-red-dark);
  border-color: var(--color-red-dark);
  color: #fff;
}

.btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.65);
}

.btn--outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--color-grey-dark);
  border-color: var(--color-line);
}

.btn--ghost:hover {
  border-color: var(--color-red);
  color: var(--color-red);
}

/* Hero */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + 2rem) 4vw 4rem;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.72) 0%,
    rgba(255, 255, 255, 0.55) 45%,
    rgba(198, 40, 40, 0.18) 100%
  );
}

.hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--color-grey-dark);
  max-width: min(40rem, 100%);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--color-bg-white);
  border-radius: 3px;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.08),
    inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.hero__logo {
  width: min(280px, 78vw);
  height: auto;
  margin: 0 auto 1rem;
  object-fit: contain;
  box-shadow: none;
  filter: none;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 2.2vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
  color: var(--color-grey);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 9vw, 4.25rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.05;
  margin: 0 0 0.75rem;
}

.hero__tagline {
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  margin: 0 0 1rem;
  color: var(--color-red);
  font-weight: 600;
}

.hero__statement {
  margin: 0 auto 1.75rem;
  max-width: 28rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--color-ink-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

.hero__icon-btn {
  width: 3rem;
  height: 3rem;
  padding: 0;
  border-radius: 50%;
}

.hero__icon-btn svg {
  width: 1.35rem;
  height: 1.35rem;
}

.hero .btn--outline {
  color: var(--color-grey-dark);
  border-color: var(--color-grey);
}

.hero .btn--outline:hover {
  background: rgba(198, 40, 40, 0.08);
  border-color: var(--color-red);
  color: var(--color-red);
}

.scroll-hint {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--color-grey);
  animation: float 3s ease-in-out infinite;
}

.scroll-hint__chevron {
  display: block;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

@keyframes float {
  0%,
  100% {
    opacity: 0.45;
    transform: translateX(-50%) translateY(0);
  }
  50% {
    opacity: 0.85;
    transform: translateX(-50%) translateY(6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint {
    animation: none;
  }
}

/* Intro */

.intro {
  padding: 4rem 0;
  background: var(--color-bg-white);
}

.lead {
  font-size: clamp(1.05rem, 2.5vw, 1.2rem);
  text-align: center;
  color: var(--color-ink-muted);
  margin: 0;
}

.lead strong {
  color: var(--color-red);
}

/* Servizi */

.servizi {
  background: var(--color-bg-soft);
}

.servizi__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: min(70vh, 640px);
}

.servizi__visual {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  background: var(--color-grey-light);
}

.servizi__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.servizi__content {
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 5vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--color-bg-white);
}

.servizi__cards {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.service-card {
  padding: 1.25rem 1.35rem;
  background: var(--color-bg-white);
  border-left: 4px solid var(--color-red);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.service-card__icon img {
  height: 2.5rem;
  width: auto;
  margin-bottom: 0.5rem;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-grey-dark);
  margin: 0 0 0.35rem;
}

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

.servizi__ateco {
  margin: 1.5rem 0 0;
  font-size: 0.85rem;
  color: var(--color-silver);
}

@media (max-width: 820px) {
  .servizi__split {
    grid-template-columns: 1fr;
  }

  .servizi__visual {
    min-height: 220px;
    max-height: 280px;
  }
}

/* Gallery */

.gallery {
  padding: 4rem 0 5rem;
  background: var(--color-bg-white);
  color: var(--color-ink);
}

.gallery .section-title {
  color: var(--color-red);
  margin-bottom: 2rem;
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  padding: 0 0.5rem;
}

.gallery__item {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--color-grey-light);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-out);
}

.gallery__item:hover img {
  transform: scale(1.04);
}

.gallery__item--wide {
  grid-column: span 2;
  aspect-ratio: 2 / 1;
}

.gallery__item--tall {
  grid-row: span 2;
  aspect-ratio: auto;
}

.gallery__item--brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-line);
}

.gallery__item--brand img {
  object-fit: contain;
  max-height: 100%;
  width: auto;
  margin: auto;
}

@media (max-width: 720px) {
  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery__item--wide {
    grid-column: span 2;
  }

  .gallery__item--tall {
    grid-row: span 1;
    aspect-ratio: 1;
  }
}

/* FAQ */

.faq {
  padding: 4.5rem 0;
  background: var(--color-bg-soft);
}

.faq__list {
  margin-top: 2rem;
}

.faq__item {
  border-bottom: 1px solid var(--color-line);
}

.faq__item:first-child {
  border-top: 1px solid var(--color-line);
}

.faq__item h3 {
  margin: 0;
}

.faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  color: var(--color-grey-dark);
  cursor: pointer;
}

.faq__question:hover {
  color: var(--color-red);
}

.faq__chevron {
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--color-red);
  border-bottom: 2px solid var(--color-red);
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease-out);
}

.faq__item--open .faq__chevron {
  transform: rotate(-135deg);
}

.faq__answer {
  padding: 0 0 1.15rem;
}

.faq__answer p {
  margin: 0;
  color: var(--color-ink-muted);
}

.faq__answer a {
  font-weight: 600;
}

/* Reviews */

.feedback {
  padding: 4.5rem 0;
  background: var(--color-bg-white);
  color: var(--color-ink);
}

.feedback .section-title {
  color: var(--color-red);
}

.feedback__intro {
  color: var(--color-ink-muted);
  margin: 0 auto 2rem;
}

.feedback__cta {
  max-width: 32rem;
  margin: 0 auto;
  text-align: center;
  padding: clamp(2rem, 4vw, 2.75rem);
  background: var(--color-bg-soft);
  border: 1px solid var(--color-line);
  border-radius: 3px;
}

.feedback__avatar {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.25rem;
  border: 3px solid var(--color-red);
}

.feedback__cta-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.75rem;
  color: var(--color-grey-dark);
}

.feedback__cta p {
  margin: 0 0 1.5rem;
  color: var(--color-ink-muted);
  line-height: 1.6;
}

.feedback__cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

.feedback .btn--ghost:hover {
  border-color: var(--color-red);
  color: var(--color-red);
}

/* Company data */

.company {
  padding: 4.5rem 0;
  background: var(--color-bg-soft);
}

.company__grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 2.5rem;
  align-items: start;
  margin-top: 1.5rem;
}

.company__list {
  margin: 0;
  display: grid;
  gap: 1rem;
}

.company__list > div {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-line);
}

.company__list dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-red);
  margin: 0 0 0.25rem;
}

.company__list dd {
  margin: 0;
  color: var(--color-ink);
}

.company__map-wrap {
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--color-line);
}

.company__map {
  display: block;
  width: 100%;
  height: min(380px, 55vh);
  border: 0;
}

@media (max-width: 820px) {
  .company__grid {
    grid-template-columns: 1fr;
  }
}

/* Contact */

.contact {
  padding: 4rem 0 5rem;
  background: var(--color-bg-white);
}

.contact-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
}

.contact-list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-line);
  align-items: start;
}

.contact-list__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-grey);
}

.contact-list a {
  color: var(--color-ink);
  font-weight: 500;
}

.contact-list address {
  font-style: normal;
  line-height: 1.6;
}

.contact-list__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.contact-list__whatsapp {
  display: inline-flex;
  color: #128c7e;
}

.contact-list__whatsapp-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.contact-list__facebook {
  display: inline-flex;
  align-items: center;
  color: #1877f2;
}

.contact-list__facebook:hover {
  color: #0d65d9;
}

.contact-list__facebook-icon {
  width: 1.35rem;
  height: 1.35rem;
}

.contact-list__sep {
  color: var(--color-silver);
  user-select: none;
}

.contact-list__vcard {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-ink) !important;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-color: var(--color-line);
}

.contact-list__vcard:hover {
  color: var(--color-red) !important;
  text-decoration-color: var(--color-red);
}

@media (max-width: 520px) {
  .contact-list li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

/* Footer */

.site-footer {
  background: var(--color-bg-white);
  color: var(--color-ink-muted);
  padding: 2.5rem 0 1.5rem;
  border-top: 1px solid var(--color-line);
}

.footer__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2rem;
}

.footer__logo {
  height: 3.5rem;
  width: auto;
}

.footer__copy p {
  margin: 0 0 0.35rem;
}

.footer__small {
  font-size: 0.88rem;
  opacity: 0.75;
}

.footer__bottom {
  margin-top: 2rem;
  padding: 0.35rem 0 0.85rem;
  border-top: 1px solid var(--color-line);
  text-align: center;
  font-size: 0.75rem;
  opacity: 0.65;
}

.footer__bottom p {
  margin: 0;
}

.footer__powered-by-img {
  height: 14px;
  width: auto;
  display: block;
}

.footer__copy strong {
  color: var(--color-grey-dark);
}

.site-footer a {
  color: inherit;
}

/* WhatsApp FAB */

.whatsapp-fab {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #25d366;
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
}

.whatsapp-fab:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.whatsapp-fab__icon {
  width: 1.35rem;
  height: 1.35rem;
}

@media (max-width: 480px) {
  .whatsapp-fab__text {
    display: none;
  }

  .whatsapp-fab {
    padding: 0.85rem;
    border-radius: 50%;
  }
}
