/* ==========================================================================
   TIFOSO INFINITO — Home V1: rifiniture a mano (integrazione con il sito esistente)
   Il foglio principale (home-v1.css) e' GENERATO dal CSS del Market e vale solo dentro .ti-home.
   Qui si tiene soltanto cio' che serve per far convivere la Home V1 con le funzioni del sito:
   header sticky, griglie dinamiche del Museo e dell'Archivio (js/museo.js, js/archivio-preview.js).
   Si carica DOPO museo.css e archivio.css.
   ========================================================================== */

/* Header sticky del sito esistente (72px): le ancore (#market, #museo-del-calcio, ...) non devono finire sotto. */
.ti-home section[id],
.ti-home [id="porte"] {
  scroll-margin-top: 88px;
}

/* Classi proprie della Home trapiantata (il CSS generato contiene solo le utility usate nel Market). */
.ti-home .ti-span-all {
  grid-column: 1 / -1;
}

.ti-home .ti-note {
  margin-top: 1.5rem;
  max-width: 36rem;
  font-size: 1.125rem;
  line-height: 1.625;
  color: color-mix(in srgb, var(--color-paper) 80%, transparent);
}

.ti-home .ti-host-note {
  margin-top: 1rem;
  font-size: 0.875rem;
  line-height: 1.625;
  color: color-mix(in srgb, var(--color-paper) 75%, transparent);
}

.ti-home .ti-host-note span {
  font-weight: 600;
  color: var(--color-paper);
}

/* Hero: il testo e' leggibile SUBITO. Nel CSS del Market l'entrata del testo parte da opacity 0 e dipende dall'animazione: con connessione lenta,
   scheda in background o animazioni non eseguite resterebbe invisibile. Qui l'opacita' non scende mai sotto 1; si anima solo un leggero
   spostamento verticale (e nulla con "riduci movimento"). */
@keyframes ti-rise {
  from {
    transform: translateY(14px);
  }
  to {
    transform: translateY(0);
  }
}

.ti-home .hero-rise {
  opacity: 1;
  animation: ti-rise 0.6s var(--ease-out-expo, ease-out) var(--hero-delay, 0s) both;
}

@media (prefers-reduced-motion: reduce) {
  .ti-home .hero-rise {
    animation: none;
  }
}

/* ==========================================================================
   Banner KITS TIME (sezione Market): nero, bianco, rosso, tipografia V1.
   Desktop: orizzontale (foto | testo | pulsante). Smartphone: a colonna, pulsante a tutta larghezza.
   ========================================================================== */
.ti-home .ti-kits {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem 2rem;
  margin-top: 3rem;
  padding: 1.25rem 1.5rem 1.25rem 1.75rem;
  overflow: hidden;
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--color-brand) 16%, transparent) 0%, transparent 46%),
    var(--color-ink-0);
  border: 1px solid color-mix(in srgb, var(--color-paper) 16%, transparent);
  border-left: 4px solid var(--color-brand);
}

.ti-home .ti-kits__photos {
  display: flex;
  padding-left: 0.25rem;
}

.ti-home .ti-kits__photos img {
  width: 5.5rem;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  margin-left: -1.5rem;
  border: 1px solid color-mix(in srgb, var(--color-paper) 30%, transparent);
  background: var(--color-ink-2);
  box-shadow: 0 0.5rem 1.25rem rgb(0 0 0 / 0.55);
}

.ti-home .ti-kits__photos img:first-child {
  margin-left: 0;
  transform: rotate(-3deg);
}

.ti-home .ti-kits__photos img:nth-child(2) {
  transform: translateY(-0.35rem);
  position: relative;
  z-index: 1;
}

.ti-home .ti-kits__photos img:nth-child(3) {
  transform: rotate(3deg);
}

.ti-home .ti-kits__body {
  min-width: 0;
}

.ti-home .ti-kits__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-label);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-mute);
}

.ti-home .ti-kits__eyebrow::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  background: var(--color-brand);
}

.ti-home .ti-kits__title {
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.5vw, 4rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--color-paper);
}

.ti-home .ti-kits__title span {
  color: var(--color-brand-bright);
}

.ti-home .ti-kits__text {
  margin-top: 0.6rem;
  max-width: 34rem;
  font-size: 1rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--color-paper) 78%, transparent);
}

.ti-home .ti-kits__note {
  white-space: nowrap;
  font-size: 0.8rem;
  color: var(--color-mute);
}

.ti-home .ti-kits__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0 1.5rem;
  background: var(--color-brand);
  color: var(--color-paper);
  font-family: var(--font-label);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease-out;
}

.ti-home .ti-kits__cta:hover {
  background: var(--color-brand-bright);
}

.ti-home .ti-kits__cta:focus-visible {
  outline: 2px solid var(--color-paper);
  outline-offset: 3px;
}

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

@media (max-width: 1023px) {
  .ti-home .ti-kits {
    grid-template-columns: minmax(0, 1fr);
    padding: 1.25rem 1.25rem 1.5rem;
  }

  .ti-home .ti-kits__photos {
    padding-left: 0;
  }

  .ti-home .ti-kits__photos img {
    width: min(5.5rem, 26vw);
  }

  .ti-home .ti-kits__cta {
    width: 100%;
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 479px) {
  .ti-home .ti-kits__note {
    display: block;
    margin-top: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ti-home .ti-kits__cta {
    transition: none;
  }
}
