@font-face {
  font-family: "Work Sans";
  src: url("../font/Work_Sans/WorkSans-VariableFont_wght.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  font-family: "Work Sans", sans-serif;
  color: #fff;
  background: #fff;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 650px;
  min-height: max(650px, calc(100svh - 130px));
  overflow: hidden;
  isolation: isolate;
  background: #393c33;
}

.slides,
.slide,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.slides {
  z-index: -2;
}

.slide {
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.slide.is-active {
  opacity: 1;
}

.hero-shade {
  z-index: -1;
  background: linear-gradient(180deg, rgb(0 0 0 / 12%), rgb(0 0 0 / 8%) 45%, rgb(0 0 0 / 45%));
}

.hero-content {
  position: relative;
  width: min(850px, 90%);
  padding: 56px 0;
  text-align: center;
}

/* Velatura scura dietro al claim: garantisce leggibilità su qualsiasi foto */
.hero-content::before {
  content: "";
  position: absolute;
  inset: -8% -14%;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgb(0 0 0 / 55%) 0%, rgb(0 0 0 / 30%) 45%, rgb(0 0 0 / 0%) 72%);
  pointer-events: none;
}

.site-logo {
  display: block;
  width: min(360px, 100%);
  margin: 0 auto 32px;
  padding: clamp(14px, 2vw, 24px);
  border-radius: 3px;
  color: #1e1e1c;
  background: rgb(239 235 226 / 85%);
  text-decoration: none;
  box-shadow: 0 8px 28px rgb(0 0 0 / 22%);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.site-logo:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgb(0 0 0 / 28%);
}

.site-logo__visit {
  display: block;
  margin: 0 6% -4% 0;
  text-align: right;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 200;
  line-height: 1;
  letter-spacing: -0.01em;
}

.site-logo img {
  display: block;
  width: 100%;
  height: auto;
}

/* Claim H1 */
.claim {
  margin: 0 auto 32px;
  color: #f36b2e;
  font-size: clamp(1.5rem, 3.6vw, 2.75rem);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-wrap: balance;
  text-shadow:
    0 1px 2px rgb(0 0 0 / 70%),
    0 3px 18px rgb(0 0 0 / 55%);
}

.claim span {
  display: inline-block;
}

.guide-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.guide-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-width: 215px;
  min-height: 54px;
  padding: 15px 26px;
  border: 1px solid #cc4b14;
  border-radius: 999px;
  color: #fff;
  background: #cc4b14;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 18px rgb(0 0 0 / 18%);
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.guide-link:hover {
  border-color: #a33a10;
  background: #a33a10;
  color: #fff;
  box-shadow: 0 8px 22px rgb(0 0 0 / 24%);
  transform: translateY(-2px);
}

.guide-link:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgb(0 0 0 / 18%);
}

.guide-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgb(255 255 255 / 16%);
  transition: background 180ms ease;
}

.guide-icon svg {
  width: 18px;
  height: 18px;
}

.guide-link:hover .guide-icon {
  background: rgb(255 255 255 / 26%);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid #ffd589;
  outline-offset: 5px;
}

.slider-controls {
  position: absolute;
  bottom: 24px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 32px;
  background: rgb(0 0 0 / 55%);
  transform: translateX(-50%);
}

[hidden] {
  display: none !important;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.icon-button:hover {
  background: rgb(255 255 255 / 18%);
}

.icon-button svg {
  width: 24px;
  height: 24px;
}

.slide-count {
  min-width: 60px;
  text-align: center;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.autoplay-button {
  margin-left: 4px;
}

.play-icon,
.is-paused .pause-icon {
  display: none;
}

.is-paused .play-icon {
  display: block;
}

.footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  min-height: 130px;
  padding: 20px 24px;
  background: #fff;
}

.footer a {
  display: block;
  width: min(1443px, 100%);
}

.footer img {
  display: block;
  width: min(1443px, 100%);
  max-width: 100%;
  min-width: 0;
  height: auto;
  object-fit: contain;
}

.footer__mobile-logos {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 600px) {
  .hero {
    min-height: max(540px, calc(100svh - 90px));
  }

  .hero-content {
    width: 88%;
    padding: 40px 0;
  }

  .site-logo {
    width: min(280px, 100%);
    margin-bottom: 24px;
  }

  .claim {
    margin-bottom: 30px;
  }

  .guide-links {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .guide-link {
    width: min(280px, 100%);
  }

  .footer {
    min-height: 90px;
    padding: 20px 10px;
  }

  .footer > img {
    display: none;
  }

  .footer__mobile-logos {
    display: grid;
    width: 100%;
    gap: 8px;
  }

  .footer__mobile-logo-row {
    display: block;
    width: 100%;
    background-image: url("loghi-rete-completi.png");
    background-repeat: no-repeat;
  }

  .footer__mobile-logo-row--first {
    aspect-ratio: 3050 / 572;
    background-size: 205.38% 100%;
    background-position: left center;
  }

  .footer__mobile-logo-row--second {
    aspect-ratio: 3214 / 572;
    background-size: 194.90% 100%;
    background-position: right center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
