/* =========================================================
   Pagina Associazione (caricato solo da associazione.html)
   Intestazione con la box fotografata, quota a forma di tessera,
   tre vantaggi (box interattiva, gadget, sconti), passi
   dell'iscrizione. Animazioni leggere: comparsa allo scroll
   (classe .reveal di styles.css), piccoli sollevamenti al
   passaggio del mouse, cambio delle bottiglie nella box.
   Con "riduci movimento" restano solo i cambi di stato.
   ========================================================= */

/* ---------- Intestazione ---------- */
.assoc-hero-inner { display: grid; gap: 28px; align-items: center; }
.assoc-hero-sub { max-width: 52ch; margin: 14px 0 0; font-size: 0.98rem; }
.assoc-hero-sub strong { color: var(--gold-200); font-weight: 600; }
.assoc-hero .stats { max-width: 520px; }
/* La box regalo interattiva (js/giftbox.js) al posto della foto */
.assoc-hero-box { position: relative; justify-self: center; width: min(86vw, 360px); isolation: isolate; animation: assoc-in 1s var(--ease) both .15s; }
.assoc-hero-box::before { /* alone caldo dietro la box */
  content: ""; position: absolute; inset: 0 -6% 18%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(217, 191, 146, .26), transparent 72%);
  filter: blur(8px);
}
.assoc-hero-box .giftbox { max-width: none; }
@keyframes assoc-in { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@media (min-width: 960px) {
  .assoc-hero-inner { grid-template-columns: 1.1fr .9fr; gap: 48px; }
  .assoc-hero-box { width: min(100%, 420px); justify-self: end; margin-block: -12px -8px; }
}
@media (max-width: 959px) {
  .assoc-hero-box { order: -1; width: min(78vw, 320px); margin-bottom: 4px; }
}

/* Benefit 01: le tre bottiglie "misteriose" (la box vera è in cima alla pagina) */
.gb-mistero { display: flex; justify-content: center; align-items: flex-end; gap: 4%; padding: 8% 6% 4%; }
.gb-m { position: relative; width: 22%; max-width: 92px; transition: transform .5s var(--ease); }
.gb-m:nth-child(2) { transform: translateY(-8%); }
.gb-m img { display: block; width: 100%; height: auto; filter: brightness(0) saturate(0) drop-shadow(0 0 1px rgba(217, 191, 146, .55)); opacity: .9; }
.gb-m b { position: absolute; left: 50%; top: 58%; translate: -50% -50%; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 1rem + 2vw, 2.6rem); color: var(--gold-300); text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.benefit--box:hover .gb-m { transform: translateY(-6px); }
.benefit--box:hover .gb-m:nth-child(2) { transform: translateY(-14%); }

/* ---------- Tessera della quota ---------- */
.assoc-benefits { overflow: hidden; }
.tessera {
  position: relative; isolation: isolate; overflow: hidden; display: grid; gap: 18px; align-items: center;
  max-width: 920px; margin: 0 auto clamp(40px, 6vw, 72px); padding: clamp(24px, 4vw, 40px);
  border-radius: var(--r-lg); color: var(--on-wine);
  background: radial-gradient(110% 140% at 0% 0%, var(--wine-600), var(--wine-800) 55%, var(--wine-950));
  border: 1px solid var(--wine-800); outline: 1px solid var(--line-on-wine); outline-offset: -10px;
  box-shadow: var(--shadow-3);
}
.tessera::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--grain); opacity: .07; mix-blend-mode: overlay; pointer-events: none; }
.tessera-mark { position: absolute; z-index: -1; right: -36px; top: -40px; width: 220px; height: auto; opacity: .09; transform: rotate(-8deg); }
.tessera-label { margin: 0 0 6px; font-size: 0.72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-300); }
.tessera-amount { display: flex; align-items: baseline; gap: 10px; margin: 0; color: var(--on-wine); }
.tessera-amount strong { font-family: var(--font-display); font-size: clamp(3.2rem, 2.4rem + 4vw, 4.8rem); font-weight: 600; line-height: .9; letter-spacing: -.02em; color: var(--gold-200); }
.tessera-amount span { font-size: 1rem; color: var(--on-wine-2); }
.tessera-text p { color: var(--on-wine-2); margin: 0 0 16px; font-size: 0.98rem; max-width: 52ch; }
.tessera-text a:not(.btn) { color: var(--gold-300); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 760px) {
  .tessera { grid-template-columns: auto 1fr; gap: 40px; }
  .tessera-price { padding-right: 40px; border-right: 1px solid var(--line-on-wine); }
}

/* ---------- Vantaggi ---------- */
.benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(20px, 3vw, 28px); }
.benefit { position: relative; border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-1); overflow: hidden; transition: box-shadow .35s var(--ease), border-color .35s var(--ease); }
.benefit:hover { box-shadow: var(--shadow-2); border-color: var(--line-gold); }
.benefit-copy { position: relative; padding: 22px 22px 26px; }
.benefit-num { position: absolute; right: 20px; top: 14px; font-family: var(--font-display); font-style: italic; font-size: 2.6rem; line-height: 1; color: var(--gold-500); }
.benefit-kicker { margin: 0 0 8px; font-size: 0.72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-700); }
.benefit h3 { margin: 0 0 10px; padding-right: 48px; font-size: clamp(1.3rem, 1.15rem + .7vw, 1.75rem); }
.benefit p { margin: 0; font-size: 0.97rem; }
.benefit-note { margin-top: 12px !important; font-size: 0.8rem !important; color: var(--ink-3); }
.benefits-extra { margin: clamp(24px, 3vw, 36px) auto 0; text-align: center; font-size: 1rem; color: var(--ink-2); max-width: 60ch; }
.benefits-extra a { color: var(--wine-700); font-weight: 600; text-decoration: underline; text-decoration-color: var(--gold-400); text-underline-offset: 4px; }
.benefits-extra a:hover { text-decoration-color: var(--wine-700); }

/* Comparsa a cascata dei vantaggi */
.benefits .reveal:nth-child(2) { transition-delay: .08s; }
.benefits .reveal:nth-child(3) { transition-delay: .16s; }

/* Vantaggio 01: box (visual scuro + testo) */
.benefit--box { display: grid; }
.benefit--box .benefit-visual {
  position: relative; isolation: isolate; padding: 28px 16px 18px;
  background: radial-gradient(70% 60% at 50% 40%, var(--wine-600), var(--wine-800) 60%, var(--wine-950));
}
.benefit--box .benefit-visual::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--grain); opacity: .08; mix-blend-mode: overlay; pointer-events: none; }
@media (min-width: 900px) {
  .benefit--box { grid-template-columns: 1.05fr 1fr; align-items: center; }
  .benefit--box .benefit-visual { padding: 40px 28px 26px; height: 100%; display: grid; align-content: center; }
  .benefit--box .benefit-copy { padding: 40px 44px; }
}

/* Vantaggi 02 e 03: card con immagine sopra */
.benefit--card { display: grid; grid-template-rows: auto 1fr; }
.benefit-photo { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: #2a1408; }
.benefit-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; transition: transform .8s var(--ease); }
.benefit--card:hover .benefit-photo img { transform: scale(1.035); }
@media (min-width: 700px) {
  .benefits { grid-template-columns: 1fr 1fr; }
  .benefit--box { grid-column: 1 / -1; }
}
@media (max-width: 699px) { .benefit-ticket { aspect-ratio: 4 / 3; } }

/* Biglietto "Prezzo socio" (illustrazione del vantaggio 03) */
.benefit-ticket {
  aspect-ratio: 1 / 1; display: grid; place-items: center; padding: 24px; overflow: hidden;
  background: radial-gradient(80% 80% at 50% 30%, var(--paper), var(--paper-3));
}
.ticket {
  --notch: 14px;
  position: relative; display: grid; gap: 8px; width: min(100%, 360px); padding: 26px 100px 24px 26px;
  color: var(--wine-800); background: var(--white);
  border-radius: 10px; box-shadow: var(--shadow-2);
  /* tacche laterali del biglietto */
  -webkit-mask: radial-gradient(circle var(--notch) at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--notch) at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle var(--notch) at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--notch) at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
  transform: rotate(-3deg); transition: transform .5s var(--ease);
}
.ticket::before { /* linea tratteggiata dello strappo */
  content: ""; position: absolute; right: 78px; top: 12px; bottom: 12px; border-left: 2px dashed var(--line-strong);
}
.benefit--card:hover .ticket { transform: rotate(0deg) translateY(-3px); }
.ticket-kicker { font-size: 0.6rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-700); }
.ticket-title { font-family: var(--font-display); font-size: clamp(1.55rem, 1.3rem + 1vw, 1.9rem); line-height: 1.05; font-weight: 600; color: var(--wine-700); }
.ticket-title em { color: var(--gold-600); }
.ticket-foot { font-size: 0.72rem; color: var(--ink-3); }
.ticket-stamp {
  position: absolute; right: 12px; top: 50%; width: 56px; height: 56px; margin-top: -28px;
  display: grid; place-items: center; text-align: center; border-radius: 50%;
  border: 2px solid var(--wine-600); color: var(--wine-600);
  font-size: 0.6rem; font-weight: 800; letter-spacing: .08em; line-height: 1.15; text-transform: uppercase;
  transform: rotate(12deg);
}

/* ---------- Box regalo interattiva ----------
   Proporzioni in % della scena (4:5): coperchio aperto in alto,
   fondo con la paglia, tre bottiglie, paglia davanti, fronte. */
.giftbox { --leather: #3d1411; --leather-2: #220908; --leather-3: #571e19; width: 100%; max-width: 420px; margin-inline: auto; }
.giftbox-scene { position: relative; aspect-ratio: 4 / 5; isolation: isolate; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.giftbox-scene::after { /* ombra a terra */
  content: ""; position: absolute; left: 4%; right: 4%; bottom: -3%; height: 7%; z-index: -2;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent); filter: blur(2px);
}
.gb-lid, .gb-back, .gb-front { position: absolute; background-image: var(--grain), linear-gradient(180deg, var(--leather-3), var(--leather) 45%, var(--leather-2)); background-blend-mode: overlay, normal; }
.gb-lid {
  left: 6%; right: 6%; top: 0; height: 44%; z-index: -1;
  clip-path: polygon(5% 0, 95% 0, 100% 100%, 0 100%);
  display: grid; justify-items: center; align-content: start; padding-top: 5%;
  background-image: var(--grain), radial-gradient(90% 80% at 50% 30%, var(--leather-3), var(--leather) 55%, var(--leather-2));
  box-shadow: inset 0 -18px 30px -12px rgba(0, 0, 0, .6);
}
.gb-lid img { width: 44%; height: auto; opacity: .88; filter: drop-shadow(0 1px 0 rgba(0,0,0,.35)); }
.gb-back {
  left: 3%; right: 3%; top: 43%; height: 39%; z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .6), transparent 14%, transparent 86%, rgba(0, 0, 0, .6)),
    linear-gradient(180deg, #120403, #200807 45%, #2c0d0a);
  border-top: 2px solid rgba(255, 220, 190, .1);
  border-radius: 2px 2px 0 0;
  box-shadow: inset 0 14px 18px -6px rgba(0, 0, 0, .75);
}
.gb-back::after { /* paglia sul fondo, più fitta in basso */
  content: ""; position: absolute; inset: 22% 0 0;
  background: url("../assets/associazione/paglia-fondo.svg") 0 0 / 46% auto repeat;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 45%);
  mask-image: linear-gradient(180deg, transparent, #000 45%);
  opacity: .9;
}
.gb-slots { position: absolute; left: 8%; right: 8%; top: 33%; height: 51%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3%; }
.gb-slot {
  position: relative; display: block; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; height: 100%;
  -webkit-tap-highlight-color: transparent; border-radius: 12px;
}
.gb-slot img {
  position: absolute; left: 50%; bottom: 0; height: 100%; width: auto; max-width: none;
  transform: translateX(-50%); transform-origin: 50% 100%;
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .55));
  transition: transform .45s var(--ease), opacity .3s var(--ease), filter .3s var(--ease);
}
.gb-slot:hover img { transform: translateX(-50%) translateY(-4%); filter: drop-shadow(0 18px 14px rgba(0, 0, 0, .55)) brightness(1.06); }
.gb-slot:focus-visible { outline: 2px solid var(--gold-300); outline-offset: 4px; }
/* uscita verso l'alto, ingresso dall'alto con un piccolo assestamento */
.gb-slot.is-out img { transform: translateX(-50%) translateY(-22%); opacity: 0; transition-duration: .23s; transition-timing-function: cubic-bezier(.5, 0, .75, 0); }
.gb-slot.is-drop img { transform: translateX(-50%) translateY(-26%); opacity: 0; transition: none; }
.gb-slot.is-in img { animation: gb-settle .55s cubic-bezier(.2, .9, .3, 1.25) both; }
@keyframes gb-settle { 0% { transform: translateX(-50%) translateY(-26%); opacity: 0; } 55% { opacity: 1; } 100% { transform: translateX(-50%) translateY(0); opacity: 1; } }
.gb-straw {
  position: absolute; left: 3%; right: 3%; top: 73%; height: 10%; pointer-events: none;
  background: url("../assets/associazione/paglia-fronte.svg") 0 50% / 60% auto repeat-x;
  filter: drop-shadow(0 -2px 2px rgba(0, 0, 0, .35));
}
.gb-front {
  left: 1%; right: 1%; top: 80%; bottom: 0;
  clip-path: polygon(0 0, 100% 0, 97% 100%, 3% 100%);
  display: grid; place-items: center; align-content: center; gap: 2px;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .08);
}
.gb-front::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6%; background: linear-gradient(180deg, rgba(255,230,200,.18), transparent); }
.gb-front-name { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: clamp(1.25rem, .9rem + 1.8vw, 1.8rem); line-height: 1; color: #d9c39a; text-shadow: 0 1px 0 rgba(0, 0, 0, .5); }
.gb-front-note { font-size: clamp(.55rem, .5rem + .25vw, .68rem); letter-spacing: .12em; color: rgba(217, 195, 154, .75); }

.giftbox-controls { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 22px; }
.gb-names { margin: 0; flex: 0 1 auto; min-width: 0; text-align: center; font-size: 0.92rem; color: var(--on-wine-2); }
.gb-names a { color: var(--on-wine); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(217, 191, 146, .45); text-underline-offset: 4px; transition: text-decoration-color .2s; }
.gb-names a:hover { text-decoration-color: var(--gold-300); }
.gb-btn {
  flex: none; width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line-on-wine); background: rgba(255, 255, 255, .04); color: var(--on-wine);
  transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.gb-btn:hover { border-color: var(--gold-300); background: rgba(255, 255, 255, .08); }
.gb-btn:active { transform: scale(.94); }
.gb-btn:focus-visible { outline: 2px solid var(--gold-300); outline-offset: 2px; }
.gb-btn svg { width: 20px; height: 20px; }
.gb-play svg { width: 16px; height: 16px; }
.gb-play .i-play, .gb-play[aria-pressed="true"] .i-pause { display: none; }
.gb-play[aria-pressed="true"] .i-play { display: block; }
.gb-play { margin-left: 4px; }
@media (max-width: 400px) {
  .giftbox-controls { flex-wrap: wrap; }
  .gb-names { order: -1; flex-basis: 100%; }
}

/* ---------- Passi dell'iscrizione ---------- */
.join-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; counter-reset: none; }
.join-steps li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); background: var(--white); border: 1px solid var(--line); transition: border-color .25s, transform .3s var(--ease); }
.join-steps li:hover { border-color: var(--line-gold); transform: translateX(3px); }
.join-steps b { flex: none; width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--wine-700); color: var(--on-wine); font-family: var(--font-display); font-weight: 600; font-size: 1rem; }
.join-steps span { font-size: 0.9rem; color: var(--ink-2); line-height: 1.5; }
.join-steps strong { display: block; color: var(--ink); font-size: 1rem; margin-bottom: 2px; }
.join-steps a { color: var(--wine-700); text-decoration: underline; text-underline-offset: 3px; }
#adesione .join-note { background: var(--paper-3); color: var(--ink-2); }

/* Attività: leggero sollevamento delle voci */
.pillars--lift .pillar { transition: transform .35s var(--ease); }
.pillars--lift .pillar:hover { transform: translateX(4px); }

/* ---------- Riduci movimento ---------- */
@media (prefers-reduced-motion: reduce) {
  .assoc-hero-box { animation: none; }
  .gb-m { transition: none; }
  .benefit-photo img, .ticket, .gb-slot img, .join-steps li, .pillars--lift .pillar { transition: none; }
  .benefit--card:hover .benefit-photo img, .benefit--card:hover .ticket, .join-steps li:hover, .pillars--lift .pillar:hover { transform: none; }
  .ticket { transform: rotate(-3deg); }
  .gb-slot:hover img { transform: translateX(-50%); }
  .gb-slot.is-in img { animation: none; }
}
.assoc-hero .hero-watermark { display: none; }
