/* ============================================================
   HOMEPAGE — extra specifici alla home
   I componenti condivisi (hd-btn, hd-sec-head, hd-emg, ecc.)
   vivono in editorial.css. Qui solo: hero-row, hero-stats,
   marquee, quick-search.
   ============================================================ */

/* ───────────────────────────────────────────────
   HERO HEAD — H1 + immagine affiancata (desktop)
   Mobile: immagine nascosta, H1 a larghezza piena
   ─────────────────────────────────────────────── */
.page-home .hd-hero-head {
  display: grid;
  grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  margin-bottom: 8px;
}
.page-home .hd-hero-visual {
  margin: 0;
  position: relative;
  max-width: 280px;
  justify-self: end;
  width: 100%;
}
.page-home .hd-hero-slides {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  background: var(--color-bg-warm, #f4efe6);
}
.page-home .hd-hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}
.page-home .hd-hero-slide.is-active {
  opacity: 1;
}
.page-home .hd-hero-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.page-home .hd-hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transition:
    background 0.3s,
    transform 0.3s;
  display: inline-block;
}
.page-home .hd-hero-dot.is-active {
  background: #fff;
  transform: scale(1.4);
}
@media (prefers-reduced-motion: reduce) {
  .page-home .hd-hero-slide {
    transition: none;
  }
}
@media (max-width: 860px) {
  .page-home .hd-hero-head {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-home .hd-hero-visual {
    display: none;
  }
}

/* ───────────────────────────────────────────────
   HERO ROW — layout 2-col (lead + stats)
   ─────────────────────────────────────────────── */
.hd-hero-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items: end;
  margin-top: 12px;
}
@media (max-width: 860px) {
  .hd-hero-row {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Stats inline hero (variante della griglia statistica condivisa) */
.hd-hero-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--hd-line);
  border-bottom: 1px solid var(--hd-line);
}
.hd-hero-stat {
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 1px solid var(--hd-line);
}
.hd-hero-stat:first-child {
  padding-left: 0;
}
.hd-hero-stat:last-child {
  padding-right: 0;
  border-right: 0;
}
.hd-hero-stat .n {
  font-family: var(--font-heading);
  font-size: 36px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--hd-ink);
}
.hd-hero-stat .n em {
  font-style: italic;
  color: var(--hd-accent);
}
.hd-hero-stat .l {
  font-family: var(--hd-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hd-muted);
}
@media (max-width: 1024px) {
  .hd-hero-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .hd-hero-stat {
    border-right: 1px solid var(--hd-line);
    padding-left: 14px;
  }
  .hd-hero-stat:nth-child(3n) {
    border-right: 0;
  }
  .hd-hero-stat:nth-child(3n + 1) {
    padding-left: 0;
  }
  .hd-hero-stat:nth-child(n + 4) {
    border-top: 1px solid var(--hd-line);
  }
}
@media (max-width: 860px) {
  .hd-hero-stat .n {
    font-size: 30px;
  }
}
@media (max-width: 560px) {
  .hd-hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .hd-hero-stat {
    border-right: 1px solid var(--hd-line);
    padding: 14px 12px;
  }
  .hd-hero-stat:nth-child(2n),
  .hd-hero-stat:last-child {
    border-right: 0;
  }
  .hd-hero-stat:nth-child(2n + 1) {
    padding-left: 0;
  }
  .hd-hero-stat:nth-child(2n) {
    padding-right: 0;
  }
  .hd-hero-stat:nth-child(n + 3) {
    border-top: 1px solid var(--hd-line);
  }
}

/* Hero specifico homepage: titolo più grande */
.page-home .hd-hero h1 {
  font-size: clamp(42px, 7.5vw, 112px);
  line-height: 0.98;
  margin: 28px 0 36px;
}

/* ───────────────────────────────────────────────
   MARQUEE — categorie scorrevoli
   ─────────────────────────────────────────────── */
.hd-marquee {
  border-top: 1px solid var(--hd-line);
  border-bottom: 1px solid var(--hd-line);
  overflow: hidden;
  background: var(--hd-bg-2);
  padding: 14px 0;
  margin-top: 40px;
}
.hd-marquee-track {
  display: flex;
  gap: 44px;
  white-space: nowrap;
  animation: hd-scroll 42s linear infinite;
  font-family: var(--hd-mono);
  font-size: 13px;
  color: var(--hd-ink-soft);
  width: max-content;
}
.hd-marquee-track .star {
  color: var(--hd-accent);
}
@keyframes hd-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ───────────────────────────────────────────────
   QUICK SEARCH — card input + chip
   ─────────────────────────────────────────────── */
.hd-search-section {
  padding: 48px 0 24px;
}
.hd-quick-search {
  background: var(--hd-card);
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-radius-lg);
  padding: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
  box-shadow: var(--hd-shadow-soft);
}
.hd-quick-search svg {
  margin-left: 14px;
  color: var(--hd-muted);
  flex-shrink: 0;
}
.hd-quick-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--hd-ink);
  padding: 12px 0;
  min-width: 0;
}
.hd-quick-search input::placeholder {
  color: var(--hd-muted);
}
.hd-quick-search .hd-search-submit {
  margin-right: 6px;
}
@media (max-width: 640px) {
  .hd-quick-search {
    flex-wrap: wrap;
    padding: 10px;
  }
  .hd-quick-search svg {
    margin-left: 8px;
  }
  .hd-quick-search .hd-search-submit {
    width: 100%;
    justify-content: center;
    margin-right: 0;
  }
}

/* Compat classe legacy */
.reveal-home {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.reveal-home.is-visible {
  opacity: 1;
  transform: translateY(0);
}
