/* =============================================================================
   PUROTATTO — home (index.html)
   Aggiunte alla base approvata: «Aggiungi» rapido sulle tessere, I look, Profumi,
   Boutique, Instagram. Stesso sistema: foto a filo, hairline avorio 2px,
   un solo livello di testo sulle foto, niente card, ombre o angoli arrotondati.
   ============================================================================= */

/* Testata di sezione (su avorio, non sulle foto) ----------------------------- */
.home-testa {
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  padding: clamp(64px, 7vw, 112px) var(--gutter) clamp(36px, 3.6vw, 56px); text-align: center;
}
.home-testa .titolo { font-size: clamp(26px, 2.4vw, 36px); line-height: 1; }
.home-testa .link-freccia { color: var(--bruno); }

/* Griglia: tessere con link a tutta superficie + «Aggiungi» rapido ----------- */
.tile-link { position: absolute; inset: 0; z-index: 2; display: block; }
.tile-cap { transition: transform .45s var(--ease); }
.tile-add {
  position: absolute; z-index: 3; left: 50%; bottom: clamp(14px, 6cqi, 24px);
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 12px 18px 11px 20px;
  border: 2px solid currentColor; color: var(--bianco); white-space: nowrap;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; line-height: 1;
  opacity: 0; transform: translate(-50%, 8px); pointer-events: none;
  transition: opacity .35s var(--ease), transform .35s var(--ease), background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.tile.sabbia .tile-add { color: var(--inchiostro); }
/* sulle still life con «Aggiungi» il capo sta un po' più in alto: didascalia e bottone non lo coprono */
.tile--rapida.sabbia > img { top: 7%; height: 68%; }
.tile-add:hover { background: var(--bianco); border-color: var(--bianco); color: var(--inchiostro); }
.tile.sabbia .tile-add:hover { background: var(--inchiostro); border-color: var(--inchiostro); color: var(--avorio); }
/* al passaggio (o col fuoco da tastiera) la didascalia sale e compare il bottone */
.tile--rapida:hover .tile-add, .tile--rapida:focus-within .tile-add { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.tile--rapida:hover .tile-cap, .tile--rapida:focus-within .tile-cap { transform: translateY(calc(-40px - clamp(10px, 3cqi, 14px))); }

/* 1 · I look ------------------------------------------------------------------ */
.home-look { margin-top: 2px; }
.home-look-riga { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-look-tile { aspect-ratio: 4 / 5; }
.home-look-tile::after {
  content: ""; position: absolute; inset: 50% 0 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(22, 17, 14, .52), rgba(22, 17, 14, 0));
}
.home-look-copy {
  position: absolute; z-index: 2; left: 6cqi; right: 6cqi; bottom: 8cqi;
  display: flex; flex-direction: column; align-items: center; color: var(--bianco);
}
.home-look-copy .titolo { font-size: clamp(22px, 7cqi, 38px); line-height: 1.05; transition: transform .45s var(--ease); }
.home-look-copy .btn {
  position: absolute; top: 100%; margin-top: 18px;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .35s var(--ease), transform .35s var(--ease), background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.home-look-tile:hover .home-look-copy .titolo, .home-look-tile:focus-visible .home-look-copy .titolo { transform: translateY(-58px); }
.home-look-tile:hover .home-look-copy .btn, .home-look-tile:focus-visible .home-look-copy .btn { opacity: 1; transform: translateY(-58px); }

/* 2 · Profumi ----------------------------------------------------------------- */
.home-profumi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; margin-top: 2px; background: var(--avorio); }
.hp-video, .hp-foto { position: relative; aspect-ratio: 4 / 5; max-height: 92vh; width: 100%; overflow: hidden; }
.hp-video { background: #8a7a69; }
.hp-video > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 58% 50%; }
.hp-foto {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: clamp(40px, 6vw, 96px) clamp(24px, 5vw, 80px); background: var(--sabbia); isolation: isolate; color: var(--inchiostro);
}
.hp-foto > img {
  width: 100%; max-width: 560px; height: auto; mix-blend-mode: multiply;
  filter: brightness(1.08);                      /* il fondo grigio chiarissimo dello scatto diventa bianco → sparisce nel sabbia */
  transition: transform .9s var(--ease);
}
.hp-foto:hover > img { transform: scale(1.03); }
.hp-copy { display: flex; flex-direction: column; align-items: center; margin-top: clamp(36px, 4.4vw, 64px); }
.hp-copy .titolo { font-size: clamp(30px, 3.4vw, 54px); line-height: 1; margin-bottom: .7em; }
.hp-foto:hover .btn--ink { background: var(--inchiostro); border-color: var(--inchiostro); color: var(--avorio); }
.hp-foto:hover .btn--ink::after { transform: translateX(4px); }

/* 3 · Boutique (riusa .tavole/.tavola della pagina boutique, più bassa) ------- */
.home-boutique { margin-top: 2px; }
.home-boutique .tavola { height: 84vh; height: 84svh; min-height: 520px; }
.home-boutique .tavola > img { transition: transform 1.6s var(--ease); }
.home-boutique .tavola:hover > img { transform: scale(1.015); }
.home-boutique .tavola:hover .btn { background: var(--bianco); border-color: var(--bianco); color: var(--inchiostro); }
.home-boutique .tavola:hover .btn::after { transform: translateX(4px); }
.home-boutique .tavola-copy { display: block; }
.home-boutique .tavola-copy .titolo { display: block; font-size: clamp(28px, 6.2cqi, 64px); }

/* 4 · Instagram --------------------------------------------------------------- */
.home-ig-griglia { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.home-ig-tile { aspect-ratio: 1 / 1; }
.home-ig-tile::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: rgba(22, 17, 14, .28); opacity: 0; transition: opacity .4s var(--ease);
}
.home-ig-cap {
  position: absolute; z-index: 2; left: 8px; right: 8px; bottom: clamp(14px, 8cqi, 24px); text-align: center;
  color: var(--bianco); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; line-height: 1.2;
  opacity: 0; transform: translateY(6px); transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.home-ig-tile:hover::after, .home-ig-tile:focus-visible::after { opacity: 1; }
.home-ig-tile:hover .home-ig-cap, .home-ig-tile:focus-visible .home-ig-cap { opacity: 1; transform: none; }

/* Touch: niente passaggio del mouse → bottoni e didascalie sempre visibili ---- */
@media (hover: none) {
  .tile--rapida .tile-add { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
  .tile--rapida .tile-cap { transform: translateY(calc(-40px - 10px)); }
  .home-look-copy .btn { position: static; margin-top: 16px; opacity: 1; transform: none; pointer-events: auto; }
  .home-look-tile:hover .home-look-copy .titolo, .home-look-tile:hover .home-look-copy .btn { transform: none; }
}

/* Tablet ---------------------------------------------------------------------- */
@media (max-width: 999px) {
  .home-ig-griglia { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Mobile ---------------------------------------------------------------------- */
@media (max-width: 759px) {
  .home-testa { padding: 56px var(--gutter) 30px; gap: 18px; }
  .home-testa .titolo { font-size: clamp(22px, 6.4vw, 30px); }
  .home-testa .link-freccia { font-size: 10.5px; letter-spacing: .12em; gap: 10px; }

  .tile-add { min-height: 34px; padding: 10px 12px 9px 14px; font-size: 10px; letter-spacing: .16em; bottom: 12px; }
  .tile--rapida .tile-cap, .tile--rapida:hover .tile-cap { transform: translateY(-40px); }

  .home-look-riga { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-look-tile:first-child { grid-column: 1 / -1; }
  .home-look-tile:not(:first-child) { aspect-ratio: 2 / 3; }
  .home-look-copy { left: 5cqi; right: 5cqi; bottom: 9cqi; }
  .home-look-copy .titolo { font-size: clamp(16px, 8.4cqi, 30px); }
  .home-look-tile:not(:first-child) .home-look-copy .titolo { font-size: 9.4cqi; }
  .home-look-copy .btn { font-size: 10px; letter-spacing: .16em; padding: 10px 10px 9px 12px; gap: 8px; margin-top: 14px; }
  .home-look-copy .btn::after { width: 17px; }

  .home-profumi { grid-template-columns: 1fr; }
  .hp-video { aspect-ratio: 4 / 5; max-height: none; }
  .hp-foto { aspect-ratio: auto; max-height: none; padding: 56px var(--gutter) 60px; }

  .home-boutique .tavola { height: auto; min-height: 0; aspect-ratio: 4 / 5; }

  .home-ig-cap { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tile-add, .tile-cap, .home-look-copy .titolo, .home-look-copy .btn, .home-ig-cap { transition: none; }
}

/* Nei look il bottone compare a contorno; si riempie solo sotto il puntatore */
.home-look-tile:hover .home-look-copy .btn { background: transparent; border-color: var(--bianco); color: var(--bianco); }
.home-look-tile:hover .home-look-copy .btn::after { transform: none; }
.home-look-tile:hover .home-look-copy .btn:hover { background: var(--bianco); color: var(--inchiostro); }
.home-look-tile:hover .home-look-copy .btn:hover::after { transform: translateX(4px); }
