/* La pagina link di Shary. Pensata prima per il telefono, niente risorse fuori da qui.
   Colori presi dalla bandiera trans (rosa, bianco, azzurro) su un fondo di notte. */
@font-face {
  font-family: "Playfair";
  src: url("/font/playfair-display-latin-700-italic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --notte: #140b1f;
  --notte-2: #1f1030;
  --rosa: #f5a9b8;
  --rosa-vivo: #ff7fa8;
  --azzurro: #5bcefa;
  --bianco: #fff7fb;
  --tenue: #cbb8d6;
  --vetro: rgba(255, 255, 255, .07);
  --bordo: rgba(255, 255, 255, .16);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--notte);
  color: var(--bianco);
  font-family: var(--sans);
  overflow-x: hidden;
}

/* ── il cielo dietro, solo gradienti, niente immagini ne' video ── */
.cielo { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 0%, var(--notte-2) 0%, var(--notte) 60%); }
.nube { position: absolute; width: 90vmax; height: 90vmax; border-radius: 50%; opacity: .55;
  will-change: transform; }
.nube.rosa { left: -45vmax; top: -40vmax;
  background: radial-gradient(closest-side, rgba(245, 169, 184, .55), rgba(245, 169, 184, 0));
  animation: deriva-a 22s ease-in-out infinite alternate; }
.nube.azzurra { right: -50vmax; top: 10vmax;
  background: radial-gradient(closest-side, rgba(91, 206, 250, .45), rgba(91, 206, 250, 0));
  animation: deriva-b 26s ease-in-out infinite alternate; }
.nube.bianca { left: -20vmax; bottom: -60vmax; opacity: .25;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
  animation: deriva-a 30s ease-in-out infinite alternate-reverse; }
@keyframes deriva-a { to { transform: translate(12vmax, 8vmax) scale(1.08); } }
@keyframes deriva-b { to { transform: translate(-10vmax, 12vmax) scale(.94); } }

.stella { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 6px 2px rgba(255, 255, 255, .7); opacity: 0;
  animation: brilla 3.6s ease-in-out infinite; }
.stella:nth-child(4)  { left: 8%;  top: 12%; animation-delay: 0s; }
.stella:nth-child(5)  { left: 86%; top: 9%;  animation-delay: 1.3s; }
.stella:nth-child(6)  { left: 14%; top: 38%; animation-delay: 2.1s; }
.stella:nth-child(7)  { left: 91%; top: 33%; animation-delay: .7s; }
.stella:nth-child(8)  { left: 6%;  top: 64%; animation-delay: 1.8s; }
.stella:nth-child(9)  { left: 88%; top: 58%; animation-delay: 2.6s; }
.stella:nth-child(10) { left: 20%; top: 86%; animation-delay: .4s; }
.stella:nth-child(11) { left: 78%; top: 82%; animation-delay: 1.1s; }
.stella:nth-child(12) { left: 50%; top: 4%;  animation-delay: 2.9s; }
.stella:nth-child(13) { left: 62%; top: 94%; animation-delay: 1.6s; }
@keyframes brilla { 0%, 100% { opacity: 0; transform: scale(.6); } 50% { opacity: .9; transform: scale(1); } }

/* ── la pagina ── */
.pagina {
  position: relative; z-index: 1;
  max-width: 460px; margin: 0 auto;
  padding: calc(40px + env(safe-area-inset-top)) 20px calc(28px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center;
  min-height: 100vh; min-height: 100dvh;
  transition: filter .5s ease, transform .5s ease;
}

.testa { text-align: center; margin-bottom: 26px; }
.anello { position: relative; width: 140px; height: 140px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center; isolation: isolate; }
.anello::before { content: ""; position: absolute; inset: 0; border-radius: 50%; z-index: -1;
  background: conic-gradient(from 0deg, var(--rosa), var(--bianco), var(--azzurro), var(--bianco), var(--rosa));
  animation: gira 9s linear infinite; }
.anello::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; z-index: -2;
  background: radial-gradient(closest-side, rgba(245, 169, 184, .45), rgba(91, 206, 250, 0));
  animation: respira 3.2s ease-in-out infinite; }
@keyframes gira { to { transform: rotate(1turn); } }
@keyframes respira { 0%, 100% { opacity: .5; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.04); } }
.foto { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; display: block;
  border: 4px solid var(--notte); background: var(--notte-2); }
.foto.vuota { display: grid; place-items: center; font: italic 700 64px/1 "Playfair", Georgia, serif;
  background: radial-gradient(circle at 35% 30%, #3a1f52, var(--notte) 75%);
  color: var(--rosa); }

.nome { margin: 0; padding: 0 .12em .14em; font: italic 700 46px/1.05 "Playfair", Georgia, serif; letter-spacing: .5px;
  background: linear-gradient(100deg, var(--rosa) 0%, var(--bianco) 35%, var(--azzurro) 55%, var(--bianco) 75%, var(--rosa) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: scorre 7s linear infinite; }
@keyframes scorre { to { background-position: -220% 0; } }
.riga { margin: 10px auto 0; max-width: 30ch; color: var(--tenue); font-size: 16px; line-height: 1.45; }

/* ── i pulsanti ── */
.pulsanti { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.pulsante {
  position: relative; display: flex; align-items: center; gap: 14px;
  min-height: 68px; padding: 14px 16px 14px 14px; border-radius: 20px;
  background: var(--vetro); border: 1px solid var(--bordo);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--bianco); text-decoration: none;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.pulsante:hover { background: rgba(255, 255, 255, .11); border-color: rgba(255, 255, 255, .28); }
.pulsante:active { transform: scale(.97); }
.pulsante:focus-visible, .social:focus-visible, .entra:focus-visible, .esci:focus-visible {
  outline: 3px solid var(--azzurro); outline-offset: 3px; }
.etichetta { flex: none; min-width: 52px; padding: 6px 9px; border-radius: 999px; text-align: center;
  font: 800 12px/1 var(--sans); letter-spacing: 1.4px;
  background: rgba(245, 169, 184, .16); color: var(--rosa); border: 1px solid rgba(245, 169, 184, .35); }
#p-cam .etichetta { background: rgba(91, 206, 250, .14); color: var(--azzurro); border-color: rgba(91, 206, 250, .35); }
.parole { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.titolo { font: 700 17px/1.25 var(--sans); }
.sotto { font-size: 14px; line-height: 1.3; color: var(--tenue); }
.freccia { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round; opacity: .7; }

/* il VIP, il principale, piu' grande, pulsa piano e ogni tanto luccica */
.pulsante.principale {
  min-height: 100px; padding: 40px 18px 18px 20px; margin-bottom: 6px; border-radius: 24px;
  border: 0; overflow: hidden; isolation: isolate;
  background: linear-gradient(120deg, var(--rosa-vivo) 0%, var(--rosa) 38%, #e8d3ff 62%, var(--azzurro) 100%);
  color: #2a0f2e;
  animation: pulsa 2.8s ease-in-out infinite;
}
.pulsante.principale:hover { background: linear-gradient(120deg, var(--rosa-vivo) 0%, var(--rosa) 38%, #e8d3ff 62%, var(--azzurro) 100%); }
.pulsante.principale .titolo { font-size: 22px; font-weight: 800; }
.pulsante.principale .sotto { color: rgba(42, 15, 46, .78); font-size: 15px; }
.pulsante.principale .etichetta { position: absolute; top: 13px; left: 20px; min-width: 0;
  background: #2a0f2e; color: var(--bianco); border-color: #2a0f2e; font-size: 11px; padding: 5px 10px; }
.pulsante.principale .freccia { opacity: .9; stroke-width: 2.6; }
.pulsante.principale::after { content: ""; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 45%; z-index: -1;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .75), rgba(255, 255, 255, 0));
  transform: skewX(-20deg); animation: luccica 4.6s ease-in-out infinite 1.4s; }
@keyframes pulsa {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 169, 184, .55), 0 10px 30px -8px rgba(255, 127, 168, .55); }
  50% { box-shadow: 0 0 0 9px rgba(245, 169, 184, 0), 0 14px 38px -6px rgba(91, 206, 250, .55); }
}
@keyframes luccica { 0%, 62% { left: -60%; } 100% { left: 130%; } }

/* ── i social, piccoli in fondo ── */
.socials { display: flex; gap: 16px; justify-content: center; margin: 30px 0 0; }
.social { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center;
  background: var(--vetro); border: 1px solid var(--bordo); color: var(--bianco);
  transition: transform .15s ease, background .2s ease; }
.social:hover { background: rgba(255, 255, 255, .12); }
.social:active { transform: scale(.92); }
.social svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round; }
.piede { margin-top: auto; padding-top: 34px; font-size: 12px; letter-spacing: 1.2px; color: rgba(203, 184, 214, .6);
  text-transform: uppercase; }

/* ── l'entrata, uno dopo l'altro, appena si e' passato il cancello ── */
.testa, .pulsante, .social { opacity: 0; }
html.dentro .testa, html.dentro .pulsante, html.dentro .social,
.pagina:target .testa, .pagina:target .pulsante, .pagina:target .social,
.dentro-sempre .testa, .dentro-sempre .pulsante, .dentro-sempre .social {
  animation-name: entra; animation-duration: .7s; animation-timing-function: cubic-bezier(.2, .8, .2, 1);
  animation-fill-mode: both; }
html.dentro .pulsante.principale, .pagina:target .pulsante.principale, .dentro-sempre .pulsante.principale {
  animation: entra .7s cubic-bezier(.2, .8, .2, 1) both, pulsa 2.8s ease-in-out infinite 1s; }
.pulsante:nth-child(1) { animation-delay: .15s; }
.pulsante:nth-child(2) { animation-delay: .3s; }
.pulsante:nth-child(3) { animation-delay: .45s; }
.pulsante:nth-child(4) { animation-delay: .6s; }
.social:nth-child(1) { animation-delay: .65s; }
.social:nth-child(2) { animation-delay: .75s; }
.social:nth-child(3) { animation-delay: .85s; }
@keyframes entra { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

/* ── il cancello dei 18 anni ── */
html:not(.dentro) body:not(.dentro-sempre) .pagina { filter: blur(14px) saturate(.8); transform: scale(.98); pointer-events: none; user-select: none; }
html:not(.dentro) body .pagina:target { filter: none; transform: none; pointer-events: auto; user-select: auto; }
.cancello { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 22px;
  background: rgba(20, 11, 31, .55); }
html.dentro .cancello, body:has(.pagina:target) .cancello { display: none; }
.cancello-scheda { width: 100%; max-width: 380px; padding: 28px 22px 22px; border-radius: 26px; text-align: center;
  background: rgba(31, 16, 48, .92); border: 1px solid var(--bordo);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(245, 169, 184, .08);
  animation: entra .5s cubic-bezier(.2, .8, .2, 1) both; }
.cancello .diciotto { margin: 0 auto 12px; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  font: 800 20px/1 var(--sans); color: #2a0f2e; padding: 0;
  background: linear-gradient(135deg, var(--rosa), var(--bianco) 50%, var(--azzurro)); }
.cancello h2 { margin: 0 0 10px; font: italic 700 24px/1.2 "Playfair", Georgia, serif; }
.cancello p { margin: 0 0 20px; color: var(--tenue); font-size: 15px; line-height: 1.5; }
.entra { display: block; padding: 16px; border-radius: 16px; text-decoration: none;
  font: 800 17px/1 var(--sans); color: #2a0f2e;
  background: linear-gradient(120deg, var(--rosa-vivo), var(--rosa) 45%, var(--azzurro)); }
.entra:active { transform: scale(.98); }
.esci { display: inline-block; margin-top: 14px; padding: 8px 14px; color: var(--tenue); font-size: 14px; }

/* chi ha chiesto meno movimento lo ottiene, tutto fermo e visibile */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .testa, .pulsante, .social { opacity: 1; }
  .stella { opacity: .6; }
}

/* la pagina che non c'e' */
.perso { justify-content: center; text-align: center; gap: 18px; }
.perso .pulsante { justify-content: center; width: 100%; }
