/* ==========================================================================
   sponsor.css — Sezione Sponsor (#sponsor) di index.php — "Scrivania sulla lavagna"
   Origine: variante 6 di prova_sponsor.php (stili .s6-*). JS: layout/js/sponsor.js
   Font: Caveat (intestazione, firme, post-it) + Patrick Hand (testo delle lettere, più leggibile)
   ========================================================================== */

#sponsor { padding: var(--section-pad); background: var(--color-light); overflow: hidden; }
.sponsor-testa { text-align: center; margin-bottom: 36px; }
.sponsor-noscript { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: center; font-weight: 600; }

/* elementi comuni */
.sp-wordmark { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  font: 900 1.05rem/1.05 var(--font-heading); letter-spacing: .04em; text-transform: uppercase; color: #1d2a4a; }
.sp-wordmark small { display: block; font: 600 .55rem/1.2 var(--font-body); letter-spacing: .12em; opacity: .7; margin-top: 3px; }
#sponsor .sp-sito { display: inline-block; text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: 3px; }
#sponsor .w { display: inline-block; opacity: 0; filter: blur(4px); transform: translateY(3px); transition: opacity .2s, filter .25s, transform .2s; }
#sponsor .w.on { opacity: 1; filter: none; transform: none; }

/* ==========================================================================
   6 — SCRIVANIA sulla LAVAGNA (struttura della 1, aspetto della 4)
   ========================================================================== */
.s6-cornice { position: relative; padding: 18px; border-radius: 10px; background: linear-gradient(135deg, #9a6a3f, #6e4524 50%, #8a5d35); box-shadow: 0 40px 70px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,255,255,.2); }
.s6-lavagna.solo-minori { display: block; }
.s6-lavagna {
  position: relative; overflow: hidden; border-radius: 4px; padding: 34px;
  display: grid; grid-template-columns: 230px 1fr; gap: 34px; align-items: start;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(255,255,255,.07), transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(255,255,255,.05), transparent 45%),
    linear-gradient(160deg, #26352c, #1b2720 60%, #17221c);
  box-shadow: inset 0 0 60px rgba(0,0,0,.6);
  color: rgba(245,245,235,.93);
}
.s6-schema { /* campo di pallavolo disegnato col gesso, quasi cancellato */
  position: absolute; left: 4%; bottom: 90px; width: 260px; height: 130px; opacity: .06; pointer-events: none;
  border: 2px dashed #fff; transform: rotate(-5deg);
}
.s6-schema::before { content: ''; position: absolute; left: 50%; top: -8px; bottom: -8px; border-left: 3px solid #fff; }

/* buste attaccate alla lavagna con le calamite */
.s6-buste { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 30px; padding-top: 6px; }
.s6-busta {
  position: relative; height: 130px; border: 0; border-radius: 4px; cursor: pointer; padding: 10px 12px;
  background: linear-gradient(#f3ead6, #e9dcc0); box-shadow: 0 10px 20px rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  transform: rotate(-2deg); transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s;
}
.s6-busta:nth-child(even) { transform: rotate(2deg); }
.s6-busta:hover { transform: translateX(8px) rotate(0); }
.s6-busta::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top right, transparent 49.5%, rgba(0,0,0,.06) 50%, transparent 51%),
              linear-gradient(to top left, transparent 49.5%, rgba(0,0,0,.06) 50%, transparent 51%);
}
.s6-magnete {
  position: absolute; right: 14px; top: -10px; z-index: 4; width: 24px; height: 24px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 45%, #fff), var(--c) 60%, color-mix(in srgb, var(--c) 60%, #000));
  box-shadow: 0 4px 6px rgba(0,0,0,.5);
}
.s6-aletta {
  position: absolute; left: 0; right: 0; top: 0; height: 60px; transform-origin: top; z-index: 2;
  background: linear-gradient(#e6d7b7, #dac9a4); clip-path: polygon(0 0, 100% 0, 50% 100%);
  transition: transform .35s cubic-bezier(.3,.7,.3,1);
}
/* logo sulla busta: il più grande possibile, sopra l'aletta (il bianco dei jpg si fonde con la carta) */
.s6-mini { position: relative; z-index: 3; display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.s6-mini.sp-wordmark { display: flex; font-size: 1rem; mix-blend-mode: normal; }
.s6-mini small { display: none; }
.s6-busta.aperta { transform: translateX(14px) rotate(0); box-shadow: 0 16px 30px rgba(0,0,0,.6); }
.s6-busta.aperta .s6-aletta { transform: rotateX(180deg) scaleY(.45); }

/* il foglio di gesso */
.s6-zona { position: relative; z-index: 2; perspective: 1400px; min-height: 500px; }
.s6-foglio {
  position: relative; display: block; padding: 30px 250px 26px 34px;
  border: 2px solid rgba(245,245,235,.45); border-radius: 3px; background: rgba(255,255,255,.025);
  transform-origin: top center; opacity: 0; transform: translate(-140px, 60px) rotate(-8deg) scale(.4);
  transition: transform .4s cubic-bezier(.2,.8,.2,1), opacity .25s, filter .3s;
}
.s6-foglio::before { /* bordo "di gesso" irregolare */
  content: ''; position: absolute; inset: 5px; border: 1px dashed rgba(245,245,235,.18); pointer-events: none; filter: url(#gesso6);
}
.s6-foglio.fuori { opacity: 1; transform: rotate(-.6deg) scaleY(.33) scaleX(.94); }
.s6-foglio.spiegato { transform: rotate(-.6deg) scale(1); transition-duration: .42s; }
.s6-foglio.cancellato { opacity: 0; transform: translateX(50px) skewX(-8deg); filter: blur(8px); transition-duration: .3s; }
.s6-testo { transition: opacity .25s .12s; }
.s6-foglio:not(.spiegato) .s6-testo { opacity: 0; transition-delay: 0s; }
.s6-piega { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed rgba(245,245,235,.2); pointer-events: none; transition: opacity .8s .4s; }
.s6-piega.a { top: 33.3%; } .s6-piega.b { top: 66.6%; }
.s6-foglio.firmato .s6-piega { opacity: .35; }

.s6-intest { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; margin-bottom: 12px; font-family: 'Caveat', cursive; filter: url(#gesso6); }
.s6-a { font-size: 1.1rem; color: #9fd0ff; }
.s6-data { font-size: 1.1rem; opacity: .6; }
.s6-corpo { font: 400 1.38rem/1.5 'Patrick Hand', 'Kalam', cursive; letter-spacing: .015em; color: #f4f3ea; text-shadow: 0 0 1px rgba(255,255,255,.45), 0 0 8px rgba(255,255,255,.08); }
.s6-corpo p { margin: 0 0 10px; }
.s6-corpo .sal { display: inline-block; font-size: 1.7rem; border-bottom: 2px solid rgba(245,245,235,.55); padding-bottom: 2px; }
.s6-corpo .w { filter: none; }
.s6-corpo .w:not(.on) { transform: scale(1.3); }
.s6-fondo { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 8px; }
.s6-firme { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; font-family: 'Caveat', cursive; filter: url(#gesso6); transition: opacity .4s, transform .4s; }
.s6-foglio:not(.firmato) .s6-firme, .s6-foglio:not(.firmato) .s6-fondo .sp-sito { opacity: 0; transform: translateY(8px); }
.s6-firme .con { width: 100%; font-size: 1.15rem; opacity: .7; }
.s6-firma { font-size: 1.6rem; font-weight: 700; color: var(--fc); transform: rotate(var(--r)); }
.s6-firme .club { width: 100%; font: 800 .65rem/1 var(--font-heading); letter-spacing: .2em; text-transform: uppercase; opacity: .45; margin-top: 4px; filter: none; }
.s6-fondo .sp-sito { color: #9fd0ff; font-family: 'Caveat', cursive; font-size: 1.25rem; letter-spacing: 0; text-transform: none; border-bottom-style: dashed; transition: opacity .4s; }

/* polaroid del logo con la calamita: arriva PER PRIMA, poi esce il foglio (sta sopra al foglio) */
.s6-polaroid {
  position: absolute; z-index: 4; top: 30px; right: 30px; width: 190px;
  opacity: 0; transform: translateY(-90px) rotate(16deg) scale(1.3); pointer-events: none;
  transition: transform .42s cubic-bezier(.3,1.7,.45,1), opacity .18s;
}
.s6-polaroid.attaccato { opacity: 1; transform: rotate(5deg); }
.s6-polaroid.via { opacity: 0; transform: translate(80px, -50px) rotate(35deg) scale(.8); transition: transform .3s ease-in, opacity .3s; }
.s6-foto { background: #fff; padding: 14px 14px 44px; min-height: 180px; display: flex; align-items: center; justify-content: center; box-shadow: 0 16px 30px rgba(0,0,0,.55); }
.s6-foto img, .s6-foto .sp-wordmark { max-width: 100%; max-height: 120px; object-fit: contain; }
.s6-foto .sp-wordmark { color: var(--c); font-size: 1.1rem; }
.s6-calamita { position: absolute; left: 50%; top: -12px; z-index: 3; width: 32px; height: 32px; margin-left: -16px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff6b7d, var(--color-accent) 55%, #8c0819); box-shadow: 0 4px 8px rgba(0,0,0,.5); }

/* sponsor minori: post-it attaccati in basso, più piccoli */
.s6-minori { grid-column: 1 / -1; position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 16px; border-top: 2px dashed rgba(245,245,235,.14); }
.s6-minori-tit { font: 700 1.3rem/1 'Caveat', cursive; color: #ffe38a; margin-right: 8px; filter: url(#gesso6); }
.s6-nota {
  text-decoration: none;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  width: 84px; height: 62px; padding: 5px; background: #f6eb8a; color: #4a4410; box-shadow: 0 6px 10px rgba(0,0,0,.45);
  font: 700 .9rem/1 'Caveat', cursive; text-align: center; transform: rotate(-3deg); opacity: .9; transition: transform .3s, opacity .3s;
}
.s6-nota:nth-child(3n) { background: #f7c9d8; transform: rotate(2deg); }
.s6-nota:nth-child(4n) { background: #c4ecd8; transform: rotate(-1deg); }
.s6-nota:hover { transform: rotate(0) scale(1.1); opacity: 1; }
.s6-nota img { max-width: 64px; max-height: 26px; object-fit: contain; }

/* cancellino e vaschetta */
.s6-cancellino {
  position: absolute; z-index: 5; top: 40%; left: -200px; width: 170px; height: 60px; border-radius: 8px; pointer-events: none;
  background: linear-gradient(#b8894f 0 55%, #4a4a4a 55%); box-shadow: 0 10px 18px rgba(0,0,0,.5);
}
.s6-cancellino.passa { animation: s6-cancella .6s ease-in-out; }
@keyframes s6-cancella {
  0% { left: -200px; top: 20%; } 25% { left: 35%; top: 45%; } 50% { left: 55%; top: 18%; } 75% { left: 75%; top: 55%; } 100% { left: 110%; top: 35%; }
}
.s6-vaschetta { position: relative; height: 16px; margin: 10px -18px -18px; border-radius: 0 0 10px 10px; background: linear-gradient(#7a4f2c, #5a381d); }
.s6-gesso { position: absolute; top: -6px; left: 62%; width: 50px; height: 10px; border-radius: 3px; background: #f5f3ea; box-shadow: 0 2px 3px rgba(0,0,0,.4); }
.s6-gesso.b { left: 68%; width: 34px; background: #ffe38a; transform: rotate(4deg); }
.s6-gesso.c { left: 73%; width: 28px; background: #ffb3c7; transform: rotate(-3deg); }

@media (max-width: 900px) {
  .s6-lavagna { grid-template-columns: 1fr; padding: 22px 16px; gap: 22px; }
  .s6-buste { display: grid; grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 20px 14px; padding: 12px 2px 4px; }
  .s6-busta { height: 100px; padding: 8px 10px; }
  .s6-busta:hover, .s6-busta.aperta { transform: translateY(-4px) rotate(0); }
  .s6-zona { min-height: 0; }
  .s6-foglio { padding: 22px 18px; }
  .s6-polaroid { position: relative; top: auto; right: auto; width: 180px; margin: 12px auto 22px; }
  .s6-foto { min-height: 120px; padding-bottom: 30px; }
  .s6-corpo { font-size: 1.22rem; }
  .s6-corpo .sal { font-size: 1.45rem; }
}
@media (prefers-reduced-motion: reduce) {
  .s6-cancellino.passa { animation: none; }
}

