/* Home — stile da specs, ottimizzato */

.home .wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 1.75rem;
  padding-right: 1.75rem;
}

/* Hero full-bleed */
.home-hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #000;
  margin-top: -1px;
}

.home-hero__bg {
  position: absolute;
  inset: 0;
}

.home-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.home-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    /* sfuma dall'alto nel nero della barra header */
    linear-gradient(
      180deg,
      #000 0%,
      rgba(0, 0, 0, 0.92) 6%,
      rgba(0, 0, 0, 0.55) 16%,
      rgba(0, 0, 0, 0.18) 28%,
      rgba(18, 38, 27, 0.12) 42%,
      rgba(18, 38, 27, 0.55) 72%,
      rgba(18, 38, 27, 0.88) 100%
    ),
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.72) 0%,
      rgba(18, 38, 27, 0.35) 48%,
      rgba(18, 38, 27, 0.12) 100%
    );
}

.home-hero__content {
  position: relative;
  z-index: 2;
  padding: clamp(2.5rem, 6vh, 4rem) 1.75rem clamp(2.75rem, 7vh, 4.25rem);
  width: 100%;
}

.home-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.35rem);
  line-height: 1.08;
  font-weight: 600;
  color: var(--paper);
  max-width: 18ch;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.home-hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.8vw, 1.75rem);
  font-weight: 400;
  font-style: italic;
  color: var(--gold-soft);
  margin: 0 0 0.85rem;
  max-width: 28rem;
  line-height: 1.25;
}

.home-hero__sub {
  font-family: var(--font-ui);
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(251, 248, 241, 0.9);
  max-width: 34rem;
  font-weight: 400;
  margin: 0 0 1.5rem;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* Home buttons */
.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.25rem;
  border-radius: 2px;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid var(--gold-soft);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  font-variant-numeric: tabular-nums lining-nums;
}

.home-btn--primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--green-deep);
}

.home-btn--primary:hover,
.home-btn--primary:focus-visible {
  background: #b8922a;
  border-color: #b8922a;
  color: var(--green-deep);
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

.home-btn--secondary {
  background: rgba(251, 248, 241, 0.12);
  color: var(--paper);
  border-color: rgba(251, 248, 241, 0.55);
}

.home-btn--secondary:hover,
.home-btn--secondary:focus-visible {
  background: rgba(251, 248, 241, 0.22);
  color: #fff;
  outline: 2px solid var(--gold-soft);
  outline-offset: 2px;
}

.home-btn--ghost {
  background: transparent;
  color: rgba(251, 248, 241, 0.92);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  font-weight: 500;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.home-btn--ghost:hover,
.home-btn--ghost:focus-visible {
  color: #fff;
  background: transparent;
  outline: 2px solid var(--gold-soft);
  outline-offset: 2px;
}

/* Sections */
.home-section {
  padding: 3.75rem 0;
  background: var(--cream);
}

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

.home-section__head {
  display: flex;
  align-items: baseline;
  gap: 1.15rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.home-kicker {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
  margin: 0 0 0.4rem;
}

.home-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  line-height: 0.95;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--green-deep);
}

.home-title i {
  font-weight: 400;
  font-style: italic;
  color: var(--ink-soft);
}

.home-rule {
  flex: 1 1 auto;
  height: 1px;
  background: var(--rule);
  min-width: 3.5rem;
  align-self: center;
}

.home-lead {
  max-width: 40rem;
  margin: -0.5rem 0 1.75rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-soft);
  font-weight: 300;
}

/* Grids */
.home-grid {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: 1fr;
}

@media (min-width: 760px) {
  .home-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .home-grid--2x2,
  .home-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .home-grid--2x2 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Frame cards */
.home-frame {
  background: var(--paper);
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 2px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
  display: block;
}

.home-frame:hover {
  border-color: var(--gold);
  color: inherit;
}

.home-frame:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.home-section--cream .home-frame {
  background: var(--cream);
}

.home-card {
  padding: 1.65rem 1.65rem 1.4rem;
}

.home-card h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1.08;
  margin: 0 0 0.65rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--green-deep);
}

.home-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink-soft);
  font-weight: 300;
}

.home-card__phones {
  margin-top: 0.85rem !important;
  color: var(--ink) !important;
  font-family: var(--font-ui) !important;
  font-weight: 600 !important;
  font-size: 0.98rem !important;
  line-height: 1.55 !important;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0.015em;
}

.home-card__foot {
  margin-top: 1.15rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--green);
  font-weight: 600;
}

.home-card__foot::after {
  content: "";
  width: 1.35rem;
  height: 1px;
  background: var(--rule);
  display: inline-block;
}

.home-card--call {
  background:
    linear-gradient(165deg, var(--green) 0%, var(--green-deep) 100%);
  border-color: var(--green);
  color: var(--paper);
}

.home-card--call h3 {
  color: var(--paper);
}

.home-card--call p {
  color: rgba(251, 248, 241, 0.82);
}

.home-card--call .home-card__phones {
  color: var(--gold-soft) !important;
}

.home-card--call .home-card__foot {
  color: var(--gold-soft);
}

.home-card--call .home-card__foot::after {
  background: rgba(217, 195, 147, 0.45);
}

.home-card--call:hover {
  border-color: var(--gold);
}

/* Feature catalogo */
.home-feature {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
}

@media (min-width: 800px) {
  .home-feature {
    grid-template-columns: 1.1fr 1fr;
    align-items: stretch;
  }
}

.home-feature__media {
  background: var(--cream);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-feature__media img {
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.45s ease;
}

@media (min-width: 800px) {
  .home-feature__media {
    min-height: 100%;
  }

  .home-feature__media img {
    height: 100%;
    width: 100%;
    object-fit: contain;
  }
}

.home-feature:hover .home-feature__media img {
  transform: scale(1.04);
}

.home-feature__body {
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home-feature__body h3 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0 0 0.75rem;
  color: var(--green-deep);
  font-weight: 600;
}

.home-feature__body p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.7;
  font-weight: 300;
}

/* About */
.home-about {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.home-about__img {
  height: 280px;
  overflow: hidden;
  border-bottom: 1px solid var(--gold-soft);
  background: var(--cream);
}

@media (min-width: 760px) {
  .home-about__img {
    height: 320px;
  }
}

.home-about__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.45s ease;
}

.home-about__img--storia img {
  object-fit: cover;
  object-position: center center;
}

.home-about:hover .home-about__img img {
  transform: scale(1.05);
}

.home-about:hover .home-about__img--storia img {
  transform: scale(1.03);
}

/* Sedi */
.home-sede {
  background: var(--paper);
  border: 1px solid rgba(177, 138, 62, 0.28);
  border-radius: 2px;
  overflow: hidden;
  box-shadow:
    0 10px 32px rgba(42, 36, 28, 0.08),
    0 1px 0 rgba(177, 138, 62, 0.14) inset;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.home-sede:hover {
  box-shadow:
    0 14px 40px rgba(42, 36, 28, 0.12),
    0 1px 0 rgba(177, 138, 62, 0.18) inset;
  transform: translateY(-2px);
}

.home-sede__img {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--cream);
}

.home-sede__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-sede__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 38, 27, 0) 40%, rgba(18, 38, 27, 0.16) 100%);
  pointer-events: none;
}

.home-sede__body {
  padding: 1.15rem 1.25rem 1.25rem;
  flex: 1;
}

.home-sede__body h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  margin: 0 0 0.55rem;
  color: var(--green-deep);
  font-weight: 600;
}

.home-sede__body p {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-soft);
  font-weight: 300;
}

.home-sede__map {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2px;
  font-weight: 500;
}

.home-sede__map:hover {
  color: var(--gold);
  border-color: var(--gold);
}

/* Closing — continua nel footer senza banda crema */
.home-closing {
  background: var(--green);
  color: var(--cream);
  padding: 3.25rem 0 2.5rem;
  margin: 0;
  border-bottom: 1px solid rgba(217, 195, 147, 0.28);
}

.home-closing__quote {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  line-height: 1.3;
  font-style: italic;
  font-weight: 400;
  color: var(--paper);
  max-width: 38rem;
  margin: 0 0 1.75rem;
}

.home-closing__quote::before {
  content: "—";
  margin-right: 0.5rem;
  color: var(--gold-soft);
}

.home-closing__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.home-closing__actions .home-btn--primary {
  color: var(--green-deep);
}

@media (max-width: 759px) {
  .home-hero__content {
    padding-top: 2.5rem;
    padding-bottom: 2.75rem;
  }

  .home-btn--primary,
  .home-btn--secondary {
    width: 100%;
  }

  .home-btn--ghost {
    width: auto;
  }

  .home-closing__actions .home-btn {
    width: 100%;
  }

  .home-hero__bg img {
    object-position: center 28%;
  }
}

/* Soft entrance */
@media (prefers-reduced-motion: no-preference) {
  .home-hero__content {
    animation: homeFadeUp 0.7s ease both;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero__content,
  .home-frame,
  .home-sede {
    animation: none !important;
  }
}

@keyframes homeFadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
