/* Testudosardinia, versione 2: notte sarda + luce mediterranea + natura in movimento */
@font-face { font-family: "Krona One"; src: url("../fonts/kronaone.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/dmsans.woff") format("woff"); font-weight: 300 800; font-display: swap; }

:root {
  --notte: #0d2418; --bosco: #173f2a; --oro: #e3b14f; --oro-chiaro: #f4d58d;
  --foglia: #7cc46a; --mare: #3fa7d6; --carta: #f4f6f1; --testo: #18261e; --grigio: #56645b;
  --latte: #f1efe6; --nebbia: rgba(241,239,230,.72);
  --titoli: "Krona One", "DM Sans", system-ui, sans-serif; --corpo: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --curva: cubic-bezier(.2,.8,.2,1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--carta); color: var(--testo); font: 400 1.04rem/1.7 var(--corpo); overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--bosco); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--oro); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--titoli); font-weight: 800; line-height: 1.04; letter-spacing: -.04em; margin: 0 0 .45em; color: var(--bosco); }
h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
h2 { font-size: clamp(2.2rem, 5vw, 4.2rem); }
h3 { font-size: clamp(1.2rem, 1.8vw, 1.45rem); letter-spacing: -.02em; }
p { margin: 0 0 1em; max-width: 62ch; }
.contenitore { width: min(1240px, 100% - 2 * clamp(20px, 5vw, 56px)); margin: 0 auto; }
.sezione { position: relative; padding: clamp(84px, 11vw, 150px) 0; }
.intro { font-size: clamp(1.08rem, 1.5vw, 1.22rem); color: var(--grigio); max-width: 58ch; }
.salta { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; z-index: 100; }
.salta:focus { left: 8px; }

/* Fondo scuro con luce dorata che si muove (Notte sarda) */
.buio { position: relative; isolation: isolate; overflow: hidden; background: var(--notte); color: var(--latte); }
.buio h1, .buio h2, .buio h3 { color: var(--latte); }
.buio .intro, .buio p { color: var(--nebbia); }
.luce { position: absolute; inset: -20%; z-index: -1; pointer-events: none; filter: blur(70px); opacity: .5; }
.luce i { position: absolute; border-radius: 50%; background: radial-gradient(circle, var(--oro) 0%, transparent 65%); }
.luce i:nth-child(1) { width: 60%; aspect-ratio: 1; left: 0; top: 0; animation: vaga1 24s ease-in-out infinite alternate; }
.luce i:nth-child(2) { width: 50%; aspect-ratio: 1; right: 0; top: 30%; background: radial-gradient(circle, #2f7a4e 0%, transparent 65%); animation: vaga2 30s ease-in-out infinite alternate; }
.luce i:nth-child(3) { width: 40%; aspect-ratio: 1; left: 35%; bottom: 0; opacity: .6; animation: vaga1 36s ease-in-out infinite alternate-reverse; }
@keyframes vaga1 { to { transform: translate(25%, 18%) scale(1.2); } }
@keyframes vaga2 { to { transform: translate(-30%, -15%) scale(.85); } }

/* Macchie di colore che fluttuano (Luce mediterranea) */
.macchie { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.macchie i { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .45; }
.macchie i:nth-child(1) { width: 480px; height: 480px; background: var(--oro); top: -140px; left: -120px; animation: fluttua 20s ease-in-out infinite alternate; }
.macchie i:nth-child(2) { width: 420px; height: 420px; background: #8fd19e; top: 30%; right: -140px; animation: fluttua 24s ease-in-out infinite alternate-reverse; }
.macchie i:nth-child(3) { width: 380px; height: 380px; background: var(--mare); bottom: -180px; left: 40%; opacity: .28; animation: fluttua 28s ease-in-out infinite alternate; }
@keyframes fluttua { 50% { transform: translate(60px, 40px) scale(1.1); } 100% { transform: translate(-40px, 70px) scale(.92); } }
.chiaro { position: relative; isolation: isolate; overflow: hidden; }

/* Disegno del carapace che scorre (Natura in movimento) */
.carapace::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='146' viewBox='0 0 84 146'%3E%3Cg fill='none' stroke='%23173f2a' stroke-opacity='.09' stroke-width='2'%3E%3Cpath d='M21 0h42l21 36.5L63 73H21L0 36.5z'/%3E%3Cpath d='M21 73h42l21 36.5L63 146H21L0 109.5z'/%3E%3C/g%3E%3C/svg%3E"); background-size: 84px 146px; animation: deriva 70s linear infinite; }
.buio.carapace::before { filter: invert(1); opacity: .6; }
@keyframes deriva { to { background-position: 84px 292px; } }

/* Pulsanti */
.pulsante { display: inline-flex; align-items: center; gap: .6em; padding: 15px 28px; border-radius: 999px; font-family: var(--titoli); font-weight: 700; letter-spacing: -.01em; text-decoration: none; position: relative; overflow: hidden; border: 0; transition: transform .25s, box-shadow .25s, background-color .25s; }
.pulsante::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.5) 50%, transparent 70%); transform: translateX(-100%); transition: transform .7s; }
.pulsante:hover { transform: translateY(-2px); }
.pulsante:hover::before { transform: translateX(100%); }
.pulsante--oro { background: var(--oro); color: var(--notte); }
.pulsante--oro:hover { box-shadow: 0 12px 30px rgba(227,177,79,.4); color: var(--notte); }
.pulsante--verde { background: var(--bosco); color: #fff; }
.pulsante--verde:hover { box-shadow: 0 12px 30px rgba(23,63,42,.3); color: #fff; }
.pulsante--vuoto { background: transparent; color: var(--latte); box-shadow: inset 0 0 0 2px rgba(241,239,230,.55); }
.pulsante--vuoto:hover { box-shadow: inset 0 0 0 2px var(--oro); color: var(--latte); }
.pulsante[aria-disabled="true"] { cursor: default; }
.pulsanti { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* Testata */
.testata { position: sticky; top: 0; z-index: 50; background: rgba(13,36,24,.92); backdrop-filter: blur(14px); color: #fff; transition: background .35s, box-shadow .35s; }
.testata--sopra { position: fixed; left: 0; right: 0; background: transparent; backdrop-filter: none; }
.testata--sopra.scorsa, .testata.aperta { background: rgba(13,36,24,.9); backdrop-filter: blur(14px); box-shadow: 0 6px 24px rgba(0,0,0,.2); }
.testata__riga { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.marchio { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-family: var(--titoli); font-weight: 800; font-size: 1.22rem; letter-spacing: -.03em; }
.marchio img { width: 46px; height: 46px; border-radius: 50%; background: #fff; padding: 2px; }
.menu { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.menu a { position: relative; display: block; padding: 10px 14px; color: #fff; text-decoration: none; font-weight: 600; }
.menu a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--oro); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.menu a:hover::after, .menu a[aria-current="page"]::after { transform: scaleX(1); }
.menu a[aria-current="page"] { color: var(--oro-chiaro); }
.apri-menu { display: none; background: none; border: 0; color: #fff; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; }
.apri-menu svg { width: 28px; height: 28px; }
@media (max-width: 940px) {
  .testata__riga { flex-wrap: wrap; height: auto; padding-top: 12px; }
  .testata__riga nav { width: 100%; }
  .menu { flex-wrap: wrap; padding: 8px 0 12px; gap: 6px; }
  .menu::-webkit-scrollbar { display: none; }
  .menu a { white-space: nowrap; padding: 6px 13px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: .92rem; }
  .menu a::after { display: none; }
  .menu a[aria-current="page"] { background: var(--oro); color: var(--notte); }
  .marchio img { width: 40px; height: 40px; }
}

/* Apertura: presentazione a dissolvenza con luce dorata */
.apertura { position: relative; height: 100svh; min-height: 640px; overflow: hidden; background: var(--notte); color: #fff; isolation: isolate; }
.apertura figure { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.6s ease; }
.apertura figure.attiva { opacity: 1; }
.apertura figure img { width: 100%; height: 100%; object-fit: cover; }
.apertura figure.attiva img { animation: kenburns 9s ease-out forwards; }
.apertura figure:nth-of-type(even).attiva img { animation-name: kenburns2; }
@keyframes kenburns { from { transform: scale(1.18) translate(2%, 1%); } to { transform: scale(1.02); } }
@keyframes kenburns2 { from { transform: scale(1.02); } to { transform: scale(1.18) translate(-2%, -1%); } }
.apertura::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(13,36,24,.86) 0%, rgba(13,36,24,.35) 55%, rgba(13,36,24,.05) 100%), linear-gradient(0deg, rgba(13,36,24,.75), transparent 45%); }
.apertura .luce { z-index: 2; mix-blend-mode: screen; opacity: .35; }
.apertura__testo { position: absolute; z-index: 3; left: 0; right: 0; bottom: clamp(70px, 11vh, 120px); }
.apertura h1 { color: #fff; font-weight: 900; font-size: clamp(3rem, 8.4vw, 7.4rem); line-height: .98; letter-spacing: -.05em; max-width: 12ch; }
.apertura h1 .r { display: block; overflow: hidden; padding-bottom: .04em; }
.apertura h1 .r span { display: inline-block; transform: translateY(110%); animation: su 1.1s var(--curva) forwards; }
.apertura h1 .r:nth-child(2) span { animation-delay: .12s; }
.apertura h1 .r:nth-child(3) span { animation-delay: .24s; color: var(--oro); }
@keyframes su { to { transform: none; } }
.apertura p { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: rgba(255,255,255,.88); max-width: 48ch; opacity: 0; animation: compari 1s .7s forwards; }
.apertura .pulsanti { opacity: 0; animation: compari 1s .9s forwards; }
@keyframes compari { to { opacity: 1; } }
.punti { position: absolute; z-index: 3; right: clamp(20px, 5vw, 56px); bottom: 34px; display: flex; gap: 8px; }
.punti button { width: 36px; height: 4px; border: 0; padding: 0; border-radius: 2px; background: rgba(255,255,255,.35); cursor: pointer; position: relative; overflow: hidden; }
.punti button.attivo::after { content: ""; position: absolute; inset: 0; background: var(--oro); transform-origin: left; animation: carica 6s linear forwards; }
@keyframes carica { from { transform: scaleX(0); } }

/* Nastro che scorre (Luce mediterranea) */
.nastro { background: var(--oro); color: var(--notte); overflow: hidden; padding: 18px 0; transform: rotate(-1.6deg); margin: -26px -20px 0; position: relative; z-index: 5; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.nastro div { display: flex; width: max-content; animation: scorre 32s linear infinite; }
.nastro span { font-family: var(--titoli); font-weight: 800; font-size: clamp(1.3rem, 2.8vw, 2rem); letter-spacing: -.03em; padding: 0 26px; white-space: nowrap; display: inline-flex; align-items: center; gap: 26px; }
.nastro span::after { content: ""; width: 18px; height: 16px; background: var(--bosco); clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
@keyframes scorre { to { transform: translateX(-50%); } }

/* Specie che scorrono di lato, con bagliore dorato */
.testa { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.frecce { display: flex; gap: 10px; }
.frecce button { width: 54px; height: 54px; border-radius: 50%; border: 2px solid rgba(241,239,230,.5); background: transparent; color: var(--latte); font-size: 1.35rem; cursor: pointer; transition: background .25s, color .25s, border-color .25s; }
.frecce button:hover { background: var(--oro); border-color: var(--oro); color: var(--notte); }
.binario { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 44px max(20px, calc((100vw - 1240px) / 2)) 20px; scrollbar-width: none; list-style: none; margin: 0; }
.binario::-webkit-scrollbar { display: none; }
.binario li { flex: 0 0 min(370px, 78vw); scroll-snap-align: start; }
.vagone { position: relative; display: block; height: 500px; border-radius: 26px; overflow: hidden; text-decoration: none; color: #fff; background: var(--bosco); isolation: isolate; }
.vagone img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--curva), filter .6s; filter: saturate(.9) brightness(.9); }
.vagone::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 38%, rgba(13,36,24,.94)); }
.vagone::before { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(241,239,230,.15); transition: box-shadow .4s; pointer-events: none; }
.vagone .info { position: absolute; z-index: 1; left: 26px; right: 26px; bottom: 26px; }
.vagone h3 { color: #fff; font-size: 1.85rem; margin: 0 0 4px; }
.vagone small { color: var(--oro-chiaro); font-weight: 600; font-size: .95rem; }
.vagone .vai { position: absolute; z-index: 1; top: 22px; right: 22px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.18); backdrop-filter: blur(6px); display: grid; place-items: center; font-size: 1.3rem; transition: background .3s, transform .3s, color .3s; }
.vagone:hover img, .vagone:focus-visible img { transform: scale(1.1); filter: saturate(1.1) brightness(1); }
.vagone:hover::before { box-shadow: inset 0 0 0 2px var(--oro), 0 0 60px rgba(227,177,79,.35); }
.vagone:hover .vai { background: var(--oro); color: var(--notte); transform: rotate(-45deg); }
.vagone:hover { color: #fff; }

/* Blocchi testo + foto */
.coppia { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(34px, 6vw, 90px); align-items: center; }
.coppia--inversa > :first-child { order: 2; }
@media (max-width: 880px) { .coppia { grid-template-columns: 1fr; } .coppia--inversa > :first-child { order: 0; } }
.goccia { position: relative; aspect-ratio: 1; border-radius: 58% 42% 38% 62% / 45% 55% 45% 55%; overflow: hidden; box-shadow: 0 40px 80px rgba(13,36,24,.28); animation: forma 14s ease-in-out infinite; }
.goccia img { width: 100%; height: 100%; object-fit: cover; animation: zoom 18s ease-in-out infinite alternate; }
@keyframes forma { 33% { border-radius: 40% 60% 62% 38% / 55% 40% 60% 45%; } 66% { border-radius: 62% 38% 46% 54% / 38% 62% 38% 62%; } }
@keyframes zoom { to { transform: scale(1.15); } }
.collage { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; }
.collage > :first-child { grid-row: span 2; }
.tendina { border-radius: 24px; overflow: hidden; clip-path: inset(0 100% 0 0 round 24px); transition: clip-path 1.4s cubic-bezier(.7,0,.2,1); }
.visto .tendina { clip-path: inset(0 0 0 0 round 24px); }
.visto .tendina:nth-child(2) { transition-delay: .2s; } .visto .tendina:nth-child(3) { transition-delay: .4s; }
.tendina img { width: 100%; height: 100%; min-height: 200px; object-fit: cover; transform: scale(1.3); transition: transform 2s var(--curva); }
.visto .tendina img { transform: scale(1); }
.etichetta { position: absolute; left: -18px; bottom: 10%; background: #fff; border-radius: 18px; padding: 14px 18px; box-shadow: 0 18px 40px rgba(13,36,24,.2); font-size: .9rem; color: var(--grigio); animation: galleggia 5s ease-in-out infinite; }
.etichetta strong { display: block; font-family: var(--titoli); font-size: 1.4rem; color: var(--bosco); letter-spacing: -.03em; line-height: 1.1; }
@keyframes galleggia { 50% { transform: translateY(-12px); } }
@media (max-width: 880px) { .etichetta { left: 8px; } }

/* Dall'uovo alla schiusa: la linea d'oro si disegna */
.ciclo { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin-top: 60px; list-style: none; padding: 0; counter-reset: c; }
.ciclo::before { content: ""; position: absolute; top: 105px; left: 16%; right: 16%; height: 3px; border-radius: 2px; background: rgba(23,63,42,.12); }
.ciclo::after { content: ""; position: absolute; top: 105px; left: 16%; height: 3px; width: 0; border-radius: 2px; background: linear-gradient(90deg, var(--foglia), var(--oro)); box-shadow: 0 0 16px rgba(227,177,79,.6); transition: width 2.2s cubic-bezier(.3,.7,.2,1); }
.ciclo.visto::after { width: 68%; }
.ciclo li { position: relative; z-index: 1; text-align: center; counter-increment: c; }
.ciclo img { width: 210px; height: 210px; margin: 0 auto 24px; border-radius: 50%; object-fit: cover; border: 5px solid var(--carta); box-shadow: 0 0 0 3px var(--oro), 0 20px 40px rgba(13,36,24,.18); transition: transform .5s var(--curva); }
.ciclo li:hover img { transform: scale(1.06) rotate(-3deg); }
.ciclo .tempo { display: block; font-family: var(--titoli); font-weight: 800; color: #b9821c; font-size: .95rem; margin-bottom: 4px; }
.ciclo h3::before { content: counter(c) "  "; color: var(--oro); }
.ciclo p { color: var(--grigio); margin: 0 auto; max-width: 32ch; }
@media (max-width: 880px) { .ciclo { grid-template-columns: 1fr; } .ciclo::before, .ciclo::after { display: none; } }

/* Libro in 3D con riflesso */
.scena { perspective: 1200px; display: grid; place-items: center; }
.volume { position: relative; width: min(320px, 72vw); aspect-ratio: 6 / 9; transform-style: preserve-3d; transform: rotateY(-20deg) rotateX(6deg); transition: transform .25s ease-out; border-radius: 4px 12px 12px 4px; overflow: hidden; box-shadow: 30px 40px 80px rgba(0,0,0,.55), inset 8px 0 14px rgba(0,0,0,.3); }
.volume img { width: 100%; height: 100%; object-fit: cover; }
.volume::after { content: ""; position: absolute; inset: -50%; background: linear-gradient(115deg, transparent 45%, rgba(255,255,255,.55) 50%, transparent 55%); animation: riflesso 5s ease-in-out infinite; pointer-events: none; }
@keyframes riflesso { 0%, 60% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }
.volume--attesa { display: flex; flex-direction: column; justify-content: space-between; padding: 32px 26px; background: linear-gradient(150deg, #1f6b43, #0f3d26); color: #fff; }
.volume--attesa strong { font-family: var(--titoli); font-weight: 900; font-size: 2.05rem; line-height: 1; letter-spacing: -.04em; }
.volume--attesa span { font-size: .9rem; color: var(--oro-chiaro); }
.sottotitolo { color: var(--oro-chiaro) !important; font-size: clamp(1.08rem, 1.5vw, 1.25rem); font-weight: 600; }

/* Documenti */
.documenti { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; }
.documenti > div { padding: 32px; border-radius: 24px; background: #fff; border-top: 5px solid var(--foglia); box-shadow: 0 10px 30px rgba(13,36,24,.06); transition: transform .3s, box-shadow .3s; }
.documenti > div:nth-child(2) { border-color: var(--oro); } .documenti > div:nth-child(3) { border-color: var(--mare); }
.documenti > div:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(13,36,24,.14); }
.documenti p { color: var(--grigio); margin: 0; }
@media (max-width: 880px) { .documenti { grid-template-columns: 1fr; } }

/* Chiusura con foto che respira */
.chiusura { text-align: center; }
.chiusura .sfondo { position: absolute; inset: -10%; z-index: -2; background: url("../../files/slide1.jpg") center / cover; animation: kenburns 22s ease-in-out infinite alternate; }
.chiusura::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(13,36,24,.8); }
.chiusura h2 { max-width: 16ch; margin-left: auto; margin-right: auto; }
.chiusura p { margin-left: auto; margin-right: auto; }
.chiusura .pulsanti { justify-content: center; }

/* Intestazione delle pagine interne */
.capo { padding: clamp(60px, 9vw, 110px) 0 clamp(56px, 8vw, 96px); }
.capo__riga { display: grid; grid-template-columns: 1.35fr 1fr; gap: 48px; align-items: center; }
.capo h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
.capo .scientifico { font-style: italic; color: var(--oro-chiaro) !important; font-size: 1.1rem; margin-bottom: .5em; }
.capo .goccia { width: min(360px, 80vw); justify-self: center; }
@media (max-width: 880px) { .capo__riga { grid-template-columns: 1fr; } .capo .goccia { width: min(280px, 72vw); justify-self: start; } }
.briciole { font-size: .9rem; margin-bottom: 18px; }
.briciole a { color: var(--nebbia); }

/* Scheda e testi */
.scheda { display: grid; grid-template-columns: 1fr 330px; gap: clamp(32px, 5vw, 72px); align-items: start; }
.dati { background: #fff; border-radius: 24px; padding: 28px 28px 12px; position: sticky; top: 100px; box-shadow: 0 16px 40px rgba(13,36,24,.08); border-top: 5px solid var(--oro); }
.dati h2 { font-size: 1.35rem; }
.dati dl { margin: 0; }
.dati dt { font-size: .85rem; color: var(--grigio); }
.dati dd { margin: 0 0 16px; font-weight: 600; }
.testo h2 { margin-top: 1.5em; font-size: clamp(1.6rem, 2.8vw, 2.3rem); }
.testo h2:first-child { margin-top: 0; }
.testo > ul { padding-left: 1.2em; max-width: 64ch; }
.testo li { margin-bottom: .4em; }
@media (max-width: 940px) { .scheda { grid-template-columns: 1fr; } .dati { position: static; } }
.nota { background: #fff; border-left: 5px solid var(--oro); padding: 20px 24px; border-radius: 0 18px 18px 0; max-width: 64ch; margin: 1.5em 0; box-shadow: 0 10px 26px rgba(13,36,24,.06); }
.nota p:last-child { margin-bottom: 0; }
.indirizzo { display: inline-block; background: #fff; border-radius: 18px; padding: 18px 22px; box-shadow: 0 10px 26px rgba(13,36,24,.08); }
.indirizzo strong { font-family: var(--titoli); font-size: 1.1rem; color: var(--bosco); }

/* Specie allevate in passato: i primati in ordine */
.primati { list-style: none; padding: 0; margin: 28px 0 32px; border-top: 1px solid rgba(23,63,42,.15); max-width: 64ch; }
.primati li { display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: start; padding: 22px 0; border-bottom: 1px solid rgba(23,63,42,.15); }
.posto { font-family: var(--titoli); font-weight: 800; font-size: 3.4rem; line-height: .9; letter-spacing: -.05em; color: var(--oro); }
.primati strong { display: block; font-style: italic; font-size: 1.15rem; color: var(--bosco); }
.primati .comune { display: block; color: var(--grigio); font-size: .95rem; }
.primati p { margin: 6px 0 0; }
.passate { list-style: none; padding: 0; margin: 0; max-width: 64ch; }
.passate li { padding: 10px 0; border-bottom: 1px dashed rgba(23,63,42,.2); color: var(--grigio); }
.passate strong { font-style: italic; color: var(--bosco); margin-right: 8px; }
@media (max-width: 520px) { .primati li { grid-template-columns: 64px 1fr; } .posto { font-size: 2.6rem; } }

/* Galleria */
.galleria { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 28px 0 0; list-style: none; padding: 0; }
.galleria a { display: block; overflow: hidden; border-radius: 14px; background: #e3e9df; }
.galleria img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .5s var(--curva); }
.galleria a:hover img, .galleria a:focus-visible img { transform: scale(1.08); }
@media (max-width: 520px) { .galleria { grid-template-columns: repeat(3, 1fr); gap: 4px; } .galleria a { border-radius: 8px; } }

/* Visore delle foto */
.visore { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.visore::backdrop { background: rgba(8, 20, 13, .95); }
.visore figure { margin: 0; height: 100%; display: grid; place-items: center; padding: 64px 12px; }
.visore img { max-height: calc(100vh - 128px); max-width: min(1000px, 100%); width: auto; border-radius: 10px; }
.visore button { position: fixed; background: rgba(0,0,0,.55); box-shadow: 0 0 0 1px rgba(255,255,255,.35); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.visore button:hover { background: var(--oro); color: var(--notte); }
.visore .chiudi { top: 14px; right: 14px; }
.visore .prec { left: 14px; top: 50%; translate: 0 -50%; }
.visore .succ { right: 14px; top: 50%; translate: 0 -50%; }
.visore .conta { position: fixed; bottom: 18px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.7); font-size: .9rem; }

/* Altre specie, contatti */
.altre { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
.altre a { display: block; text-decoration: none; color: var(--bosco); font-family: var(--titoli); font-weight: 800; letter-spacing: -.02em; }
.altre span { display: block; overflow: hidden; border-radius: 20px; margin-bottom: 10px; }
.altre img { aspect-ratio: 1; object-fit: cover; width: 100%; transition: transform .6s var(--curva); }
.altre a:hover img { transform: scale(1.08); }
@media (max-width: 700px) { .altre { grid-template-columns: repeat(2, 1fr); } }
.contatti { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 36px; }
.contatto { background: #fff; border-radius: 24px; padding: 28px; box-shadow: 0 12px 30px rgba(13,36,24,.08); transition: transform .3s; }
.contatto:hover { transform: translateY(-4px); }
.contatto a { font-weight: 600; word-break: break-word; }
.contatto p { color: var(--grigio); margin: 6px 0 0; }

/* Piede */
.piede { background: var(--notte); color: var(--nebbia); padding: 64px 0 30px; font-size: .95rem; }
.piede a { color: var(--latte); }
.piede a:hover { color: var(--oro); }
.piede__riga { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.piede h2 { font-size: 1.05rem; color: var(--latte); letter-spacing: -.01em; }
.piede ul { list-style: none; padding: 0; margin: 0; }
.piede li { margin-bottom: 6px; }
.piede__fondo { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 20px; font-size: .85rem; }
@media (max-width: 760px) { .piede__riga { grid-template-columns: 1fr; } }

/* Comparsa allo scorrimento */
.entra { opacity: 0; transform: translateY(50px); transition: opacity 1s ease, transform 1s var(--curva); }
.entra.visto { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .entra { opacity: 1; transform: none; } .tendina { clip-path: none; } .tendina img { transform: none; }
  .apertura h1 .r span { transform: none; } .apertura p, .apertura .pulsanti { opacity: 1; }
}
.carapace { isolation: isolate; }

.testo > ul.galleria, .testo > ul.passate, .testo > ol.primati { padding-left: 0; }
.testo > ul.galleria { max-width: none; }

/* ===== Caratteri: DM Serif Display per i titoli, DM Sans per il resto ===== */
h1, h2, h3 { font-weight: 400; letter-spacing: -.012em; line-height: 1.06; }
.apertura h1 { font-weight: 400; letter-spacing: -.02em; line-height: 1; }
.marchio { font-weight: 400; font-size: 1.35rem; letter-spacing: 0; }
.nastro span, .posto, .volume--attesa strong, .indirizzo strong, .vagone h3 { font-weight: 400; letter-spacing: -.01em; }
.altre a { font-weight: 400; font-size: 1.15rem; }
.pulsante, .ciclo .tempo, .menu a, .piede h2 { font-family: var(--corpo); }
.pulsante { font-weight: 600; letter-spacing: 0; }
.piede h2 { font-weight: 700; }
.dati h2 { font-size: 1.5rem; }

/* ===== Titoli che salgono in 3D ===== */
.apertura h1 .r { perspective: 600px; }
.apertura h1 .r span { transform: translateY(100%) rotateX(-75deg); transform-origin: 50% 100%; opacity: 0; animation: su3d 1.2s var(--curva) forwards; }
.apertura h1 .r:nth-child(2) span { animation-delay: .15s; } .apertura h1 .r:nth-child(3) span { animation-delay: .3s; }
@keyframes su3d { to { transform: none; opacity: 1; } }
.parola { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .06em; margin-bottom: -.06em; }
.parola > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--curva); }
.visto .parola > span, .parola.visto > span { transform: none; }
h2.diviso { opacity: 1 !important; transform: none !important; }

/* ===== Apertura che segue il mouse ===== */
.strato { position: absolute; inset: -3%; transition: transform .6s cubic-bezier(.2,.7,.2,1); will-change: transform; }
.apertura__testo { transition: transform .6s cubic-bezier(.2,.7,.2,1); }

/* ===== Schede delle specie in 3D con riflesso ===== */
.binario li { perspective: 1000px; }
.vagone { transform-style: preserve-3d; transition: transform .5s var(--curva); }
.vagone .riflesso { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.35), transparent 55%); mix-blend-mode: soft-light; }
.vagone:hover .riflesso { opacity: 1; }

/* ===== Racconto a scorrimento: dall'uovo alla schiusa ===== */
.racconto { position: relative; height: 320vh; }
.racconto__fisso { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; overflow: hidden; }
.racconto__griglia { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 90px); align-items: center; }
.racconto__foto { position: relative; aspect-ratio: 1; max-height: 72vh; width: 100%; max-width: 560px; justify-self: center; border-radius: 50%; box-shadow: 0 0 0 4px var(--carta), 0 0 0 7px var(--oro), 0 40px 80px rgba(13,36,24,.25); overflow: hidden; }
.racconto__foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.25) rotate(4deg); transition: opacity .9s ease, transform 1.4s var(--curva); }
.racconto__foto img.attiva { opacity: 1; transform: none; }
.racconto__numero { position: absolute; right: 8%; bottom: 6%; width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; background: var(--oro); color: var(--notte); font-family: var(--titoli); font-size: 3rem; line-height: 1; box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: transform .5s var(--curva); }
.racconto__numero.salta-n { transform: scale(1.25) rotate(-12deg); }
.racconto__tappe { list-style: none; margin: 26px 0 0; padding: 0; }
.racconto__tappe li { padding: 16px 0 16px 22px; border-left: 3px solid rgba(23,63,42,.15); opacity: .38; transform: translateX(0); transition: opacity .5s, transform .6s var(--curva), border-color .5s; }
.racconto__tappe li.attiva { opacity: 1; transform: translateX(12px); border-color: var(--oro); }
.racconto__tappe .tempo { display: block; font-weight: 700; color: #b9821c; font-size: .9rem; }
.racconto__tappe h3 { margin: 2px 0 4px; }
.racconto__tappe p { margin: 0; color: var(--grigio); }
.racconto__barra { height: 4px; border-radius: 2px; background: rgba(23,63,42,.12); margin-top: 24px; overflow: hidden; }
.racconto__barra i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--foglia), var(--oro)); }
@media (max-width: 880px) {
  .racconto { height: 300vh; }
  .racconto__griglia { grid-template-columns: 1fr; gap: 18px; }
  .racconto__foto { max-width: min(300px, 70vw); max-height: none; }
  .racconto__numero { width: 60px; height: 60px; font-size: 2.1rem; }
  .racconto__tappe { margin-top: 10px; }
  .racconto__tappe li { display: none; border: 0; padding: 0; transform: none; }
  .racconto__tappe li.attiva { display: block; animation: compari .6s; }
  .racconto h2 { font-size: 2rem; }
}

/* ===== La tartaruga che cammina con lo scorrimento ===== */
.cammino { position: fixed; left: 0; right: 0; bottom: 0; height: 4px; z-index: 60; pointer-events: none; background: rgba(13,36,24,.12); }
.cammino .fatto { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--foglia), var(--oro)); }
.tarta { position: absolute; bottom: 2px; left: calc(var(--p, 0) * (100% - 58px)); width: 58px; height: 33px; filter: drop-shadow(0 3px 4px rgba(0,0,0,.3)); }
.tarta .guscio { fill: var(--oro); stroke: #8a5f14; stroke-width: 1.5; }
.tarta .scudi { fill: none; stroke: #8a5f14; stroke-width: 1.3; stroke-linejoin: round; }
.tarta .bordo { fill: #8a5f14; }
.tarta .testa, .tarta .coda, .tarta rect:not(.bordo) { fill: #6f8f4e; }
.tarta .dietro rect { fill: #57733c; }
.tarta .occhio { fill: #0d2418; }
.tarta g rect { transform-box: fill-box; transform-origin: 50% 0; }
.cammina .tarta .z1, .cammina .tarta .z4 { animation: passo .32s ease-in-out infinite alternate; }
.cammina .tarta .z2, .cammina .tarta .z3 { animation: passo .32s ease-in-out infinite alternate-reverse; }
.cammina .tarta .testa { animation: annuisci .64s ease-in-out infinite; transform-box: fill-box; transform-origin: 0 50%; }
@keyframes passo { from { transform: rotate(-22deg); } to { transform: rotate(22deg); } }
@keyframes annuisci { 50% { transform: translateY(1.5px) rotate(4deg); } }

@media (prefers-reduced-motion: reduce) {
  .apertura h1 .r span { opacity: 1; transform: none; }
  .parola > span { transform: none; }
  .racconto { height: auto; } .racconto__fisso { position: static; height: auto; padding: 90px 0; }
  .racconto__tappe li { display: block !important; opacity: 1; }
  .racconto__foto img:not(.attiva) { display: none; }
}

.racconto__foto { overflow: visible; }
.racconto__foto img { border-radius: 50%; }
.racconto__numero { right: 2%; bottom: 2%; z-index: 2; }

/* ===== Correzioni per schermi bassi: niente scritte tagliate ===== */
/* L'apertura cresce se il testo non ci sta, invece di tagliarlo */
.apertura { height: auto; min-height: 100svh; display: flex; align-items: flex-end; padding-top: calc(var(--testata, 78px) + 24px); }
.apertura__testo { position: relative; bottom: auto; padding-bottom: clamp(64px, 9vh, 110px); }
.apertura h1 { font-size: clamp(2.6rem, min(7.2vw, 10.5vh), 6.6rem); max-width: 17ch; }
.apertura p { margin-bottom: 0; }
@media (max-height: 620px) { .apertura p { font-size: 1rem; } .apertura .pulsanti { margin-top: 20px; } }

/* Il racconto resta sotto il menu e si adatta all'altezza dello schermo */
.racconto__fisso { top: var(--testata, 78px); height: calc(100svh - var(--testata, 78px)); }
.racconto h2 { font-size: clamp(1.7rem, min(4vw, 6.5vh), 3.2rem); margin-bottom: .2em; }
.racconto__foto { width: min(100%, 520px, calc(100svh - var(--testata, 78px) - 90px)); max-height: none; }
.racconto__tappe { margin-top: 10px; }
.racconto__tappe li { padding: 10px 0 10px 20px; }
@media (max-height: 780px) {
  .racconto__tappe li { display: none; }
  .racconto__tappe li.attiva { display: block; animation: compari .6s; }
  .racconto__tappe li.attiva { transform: none; }
}
@media (max-width: 880px) {
  .racconto__foto { width: min(300px, 70vw, calc(100svh - var(--testata, 130px) - 300px)); min-width: 160px; }
  .racconto__griglia { gap: 12px; }
  .racconto__fisso { align-items: center; }
}
/* Titoli delle pagine interne: mai sotto il menu */
.capo { scroll-margin-top: var(--testata, 78px); }
.capo h1 { font-size: clamp(2.3rem, min(5.5vw, 9vh), 4.4rem); }
h1, h2 { overflow-wrap: break-word; }

/* ===== Logo e carattere Krona One ===== */
h1, h2, h3 { letter-spacing: -.02em; line-height: 1.12; }
h1 { font-size: clamp(2rem, 4.6vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.8rem); }
h3 { font-size: clamp(1.02rem, 1.4vw, 1.2rem); line-height: 1.25; }
.apertura h1 { font-size: clamp(2rem, min(5.4vw, 8.2vh), 4.9rem); line-height: 1.08; letter-spacing: -.035em; max-width: 15ch; }
.capo h1 { font-size: clamp(1.9rem, min(4.4vw, 7.5vh), 3.5rem); }
.racconto h2 { font-size: clamp(1.4rem, min(3vw, 5.4vh), 2.5rem); }
.vagone h3 { font-size: 1.35rem; }
.nastro span { font-size: clamp(1.05rem, 2.2vw, 1.6rem); letter-spacing: -.02em; }
.posto { font-size: 2.7rem; letter-spacing: -.04em; }
.volume--attesa strong { font-size: 1.45rem; line-height: 1.15; }
.altre a { font-size: .98rem; }
.dati h2 { font-size: 1.2rem; }
.testo h2 { font-size: clamp(1.35rem, 2.3vw, 1.9rem); }
.sottotitolo { font-weight: 600; }

/* marchio nel menu: logo grande e leggibile */
.testata__riga { height: 92px; }
.marchio { gap: 14px; font-size: 1.02rem; letter-spacing: -.01em; }
.marchio img { width: 64px; height: 64px; background: none; padding: 0; border-radius: 50%; box-shadow: 0 4px 14px rgba(0,0,0,.25); transition: transform .5s var(--curva); }
.marchio:hover img { transform: rotate(-12deg) scale(1.06); }
.marchio--piede img { width: 128px; height: 128px; box-shadow: none; }
@media (max-width: 940px) { .testata__riga { height: auto; } .marchio img { width: 52px; height: 52px; } .marchio span { font-size: .92rem; } }

/* il timbro grande nell'apertura: entra come un timbro e poi galleggia */
.timbro { position: absolute; z-index: 3; right: clamp(24px, 7vw, 120px); top: 50%; width: clamp(150px, min(22vw, 34vh), 290px); height: auto; border-radius: 50%; filter: drop-shadow(0 18px 40px rgba(0,0,0,.45)); animation: timbra 1.1s .4s cubic-bezier(.2,1.4,.4,1) both, galleggia-t 7s 1.6s ease-in-out infinite; transform: translateY(-50%); }
@keyframes timbra { from { opacity: 0; transform: translateY(-50%) scale(2.2) rotate(-35deg); } 60% { opacity: 1; } to { opacity: 1; transform: translateY(-50%) scale(1) rotate(0); } }
@keyframes galleggia-t { 0%, 100% { transform: translateY(-50%) rotate(0); } 50% { transform: translateY(calc(-50% - 12px)) rotate(4deg); } }
@media (max-width: 880px) { .timbro { top: calc(var(--testata, 130px) + 18px); right: 18px; width: clamp(96px, 26vw, 140px); transform: none; animation: timbra-m 1.1s .4s cubic-bezier(.2,1.4,.4,1) both; } }
@keyframes timbra-m { from { opacity: 0; transform: scale(2.2) rotate(-35deg); } to { opacity: 1; transform: none; } }

/* il sigillo nella sezione dei documenti */
.sigillo { width: 120px; height: 120px; margin-bottom: 18px; filter: drop-shadow(0 10px 22px rgba(13,36,24,.25)); }
.sigillo.visto { animation: timbra-m .9s cubic-bezier(.2,1.4,.4,1) both; }

@media (prefers-reduced-motion: reduce) { .timbro { animation: none; opacity: 1; } }

/* gallerie delle specie allevate in passato */
.primati .galleria, .passate .galleria { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin-top: 14px; }
.primati .galleria a, .passate .galleria a { border-radius: 10px; }
.passate li { padding: 14px 0; }
.primati .galleria li, .passate .galleria li { display: block; padding: 0; border: 0; grid-template-columns: none; }
@media (max-width: 520px) { .primati .galleria, .passate .galleria { grid-template-columns: repeat(3, 1fr); gap: 4px; } }

/* ===== Pagina albini: legenda e schema di Punnett ===== */
.pallino { display: inline-block; width: 18px; height: 18px; border-radius: 50%; vertical-align: -3px; margin-right: 10px; border: 2px solid rgba(23,63,42,.25); }
.pallino.g-AA { background: #4a3a22; }
.pallino.g-Aa { background: linear-gradient(90deg, #4a3a22 50%, #f3e6c4 50%); }
.pallino.g-aa { background: #f3e6c4; }
.testo > ul.legenda { list-style: none; padding-left: 0; }
.legenda li { margin-bottom: .55em; }
@keyframes gira { from { transform: rotateY(90deg) scale(.8); opacity: .3; } to { transform: none; opacity: 1; } }
.tabella { overflow-x: auto; margin: 16px 0 24px; }
.incroci { border-collapse: collapse; min-width: 480px; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 10px 26px rgba(13,36,24,.06); }
.incroci th, .incroci td { padding: 12px 16px; text-align: center; border-bottom: 1px solid rgba(23,63,42,.1); }
.incroci thead th { background: var(--bosco); color: #fff; font-size: .9rem; }
.incroci tbody th { text-align: left; font-family: var(--titoli); font-weight: 400; color: var(--bosco); }
.incroci small { font-family: var(--corpo); color: var(--grigio); }
.incroci td { font-weight: 700; font-size: 1.05rem; }
.scheda > .testo { min-width: 0; }
@media (max-width: 520px) {
}

/* Libro: specie allevate dall'autore */
.allevate { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: clamp(24px, 4vw, 56px); margin-top: clamp(28px, 4vw, 44px); }
.allevate h3 { font-family: var(--titoli); font-size: clamp(1rem, 1.6vw, 1.2rem); color: var(--oro); margin: 0 0 14px; }
.allevate ul { list-style: none; margin: 0; padding: 0; }
.allevate li { position: relative; padding: 10px 0 10px 26px; border-top: 1px solid rgba(241,239,230,.14); line-height: 1.5; }
.allevate li::before { content: ""; position: absolute; left: 0; top: 1.05em; width: 10px; height: 10px; border-radius: 3px; background: var(--oro); transform: rotate(45deg); opacity: .85; }
.allevate i { font-style: italic; color: var(--latte); }
.dopo-allevate { margin-top: 34px; }
.foto-sulcata { object-position: 50% 50%; }
@media (max-aspect-ratio: 1/1) { .foto-sulcata { object-position: 30% 50%; } }
.tendina > a { display: block; width: 100%; height: 100%; cursor: pointer; }
.tendina > a:hover img { transform: scale(1.04); }
.tendina > a:focus-visible { outline: 3px solid var(--oro); outline-offset: -3px; }
.marchio--piede img { filter: drop-shadow(0 10px 24px rgba(0,0,0,.35)); }
.indirizzi { display: flex; flex-wrap: wrap; gap: 18px; align-items: stretch; margin: 8px 0 12px; }
.indirizzi .indirizzo { margin: 0; flex: 1 1 280px; max-width: 420px; }
.incroci caption { caption-side: top; text-align: left; padding: 14px 16px 10px; font-size: .92rem; color: var(--grigio); background: #fff; }
.incroci--uova { min-width: 0; width: 100%; max-width: 560px; }
.incroci--uova td { text-align: left; }
.incroci--uova thead th { text-align: left; }
/* Dall'uovo alla schiusa: foto cliccabili e animate */
.racconto__cerchio > a { position: absolute; inset: 0; display: block; pointer-events: none; cursor: pointer; animation: respira 9s ease-in-out infinite alternate; }
.racconto__cerchio > a:has(img.attiva) { pointer-events: auto; z-index: 1; }
.racconto__cerchio > a:nth-of-type(2) { animation-delay: -3s; } .racconto__cerchio > a:nth-of-type(3) { animation-delay: -6s; }
.racconto__cerchio > a img { transition: opacity .9s ease, transform 1.4s var(--curva), filter .4s; }
.racconto__foto:hover > a { animation-play-state: paused; }
.racconto__foto:hover img.attiva { filter: saturate(1.15) brightness(1.05); }
.racconto__cerchio > a:focus-visible { outline: 4px solid var(--oro); outline-offset: -8px; border-radius: 50%; }
.racconto__numero { z-index: 2; }
@keyframes respira { from { transform: scale(1) rotate(0deg); } to { transform: scale(1.08) rotate(-1.5deg); } }
@media (prefers-reduced-motion: reduce) { .racconto__cerchio > a { animation: none; } }
.racconto__foto { overflow: visible; }
.racconto__cerchio { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; isolation: isolate; -webkit-mask-image: -webkit-radial-gradient(white, black); mask-image: radial-gradient(white, black); }
.visore.unica .prec, .visore.unica .succ, .visore.unica .conta { display: none; }
/* Logo in testata più grande */
.testata .marchio img, header .marchio:not(.marchio--piede) img { width: 84px; height: 84px; }
@media (max-width: 940px) { header .marchio:not(.marchio--piede) img { width: 62px; height: 62px; } }
@media (min-width: 941px) { .testata__riga { height: 108px; } }
.marchio span { font-size: 1.12rem; }
@media (max-width: 940px) { .marchio span { font-size: 1rem; } }
.dati { top: calc(var(--testata, 108px) + 20px); }
html { scroll-padding-top: calc(var(--testata, 108px) + 12px); }
/* Schiusa: al passaggio il cerchio si solleva e l'anello dorato pulsa, per far capire che si può cliccare */
.racconto__foto { transition: transform .45s var(--curva), box-shadow .45s; }
.racconto__foto:hover { transform: translateY(-6px) scale(1.03); box-shadow: 0 0 0 4px var(--carta), 0 0 0 9px var(--oro), 0 50px 90px rgba(13,36,24,.32); animation: anello 1.6s ease-in-out infinite; }
.racconto__foto:hover img.attiva { transform: scale(1.06); }
.racconto__foto:active { transform: translateY(-2px) scale(.99); }
@keyframes anello {
  0%, 100% { box-shadow: 0 0 0 4px var(--carta), 0 0 0 9px var(--oro), 0 0 0 9px rgba(227,177,79,.45), 0 50px 90px rgba(13,36,24,.32); }
  50% { box-shadow: 0 0 0 4px var(--carta), 0 0 0 9px var(--oro), 0 0 0 26px rgba(227,177,79,0), 0 50px 90px rgba(13,36,24,.32); }
}
@media (prefers-reduced-motion: reduce) { .racconto__foto:hover { animation: none; transform: none; } }

/* ===== Animazioni più marcate (solo transform e opacità, leggere per il telefono) ===== */
.entra { transform: translateY(70px) scale(.97); transition: opacity 1.1s ease, transform 1.2s var(--curva); }
.entra.visto { transform: none; }
.parola > span { transform: translateY(110%) rotate(7deg); transform-origin: 0 100%; transition: transform 1.1s var(--curva); }
.nastro div { animation-duration: 24s; }
.vagone:hover img, .vagone:focus-visible img { transform: scale(1.16); }
.vagone:hover .vai { transform: rotate(-45deg) scale(1.15); }
.ciclo li:hover img { transform: scale(1.1) rotate(-5deg); }
.pulsante { transition: transform .35s var(--curva), box-shadow .3s, background-color .25s; }
.pulsante:hover { transform: translateY(-3px) scale(1.04); }
.frecce button { transition: background .25s, color .25s, border-color .25s, transform .3s var(--curva); }
.frecce button:hover { transform: scale(1.12); }
.menu a { transition: color .25s, transform .3s var(--curva); }
.menu a:hover { transform: translateY(-2px); }
.marchio img { transition: transform .6s var(--curva); }
.marchio:hover img { transform: rotate(-16deg) scale(1.1); }
/* gallerie: le miniature entrano una dopo l'altra e si sollevano al passaggio */
.anima .galleria > li { opacity: 0; transform: translateY(34px) scale(.9) rotate(-2deg); transition: opacity .7s ease, transform .8s var(--curva); transition-delay: calc(var(--i, 0) * 45ms); }
.anima .galleria.visto > li { opacity: 1; transform: none; }
.galleria a { transition: transform .4s var(--curva), box-shadow .4s; }
.galleria a:hover, .galleria a:focus-visible { transform: translateY(-5px); box-shadow: 0 16px 30px rgba(13,36,24,.22); }
.galleria a:hover img, .galleria a:focus-visible img { transform: scale(1.14) rotate(1.5deg); }
.tendina > a:hover img { transform: scale(1.07); }
.indirizzo { transition: transform .35s var(--curva), box-shadow .35s; }
.indirizzo:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(13,36,24,.14); }
.visore[open] img { animation: apri-foto .45s var(--curva); }
@keyframes apri-foto { from { opacity: 0; transform: scale(.88); } }

/* ===== Pulsante dei suoni ===== */
.tasto-suoni { position: fixed; z-index: 60; right: 18px; bottom: 34px; width: 48px; height: 48px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center; background: rgba(13,36,24,.88); box-shadow: 0 0 0 2px rgba(227,177,79,.6), 0 10px 24px rgba(0,0,0,.25); backdrop-filter: blur(8px); transition: transform .3s var(--curva), box-shadow .3s, background .3s; }
.tasto-suoni:hover { transform: scale(1.1); box-shadow: 0 0 0 2px var(--oro), 0 12px 28px rgba(0,0,0,.3); }
.tasto-suoni:focus-visible { outline: 3px solid var(--oro); outline-offset: 3px; }
.tasto-suoni svg { width: 24px; height: 24px; fill: none; stroke: var(--oro); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tasto-suoni .cassa { fill: var(--oro); }
.tasto-suoni .onde { display: none; }
.tasto-suoni.acceso .onde { display: inline; animation: onde 1.4s ease-in-out infinite; }
.tasto-suoni.acceso .muto { display: none; }
.tasto-suoni.acceso { background: var(--bosco); box-shadow: 0 0 0 2px var(--oro), 0 0 22px rgba(227,177,79,.45); }
@keyframes onde { 50% { opacity: .35; } }
@media (max-width: 600px) { .tasto-suoni { width: 42px; height: 42px; right: 12px; bottom: 30px; } }
.visore[open] ~ .tasto-suoni { display: none; }

@media (prefers-reduced-motion: reduce) {
  .anima .galleria > li { opacity: 1; transform: none; }
  .parola > span { transform: none; }
}
/* Pannello email */
.posta { position: fixed; z-index: 70; left: 50%; bottom: 24px; width: min(440px, calc(100vw - 28px)); background: #fff; color: var(--notte); border-radius: 20px; padding: 20px 22px 18px; box-shadow: 0 24px 60px rgba(0,0,0,.3); border-top: 5px solid var(--oro); transform: translate(-50%, 140%); opacity: 0; transition: transform .5s var(--curva), opacity .4s; }
.posta.aperto { transform: translate(-50%, 0); opacity: 1; }
.posta p { margin: 0 28px 14px 0; font-size: .95rem; color: var(--grigio); }
.posta strong { display: block; font-family: var(--titoli); font-weight: 400; color: var(--bosco); font-size: 1.05rem; margin-bottom: 4px; word-break: break-all; }
.posta__vie { display: flex; gap: 10px; flex-wrap: wrap; }
.posta__vie a { padding: 9px 18px; border-radius: 999px; background: var(--bosco); color: #fff; text-decoration: none; font-weight: 600; font-size: .92rem; transition: background .25s, transform .3s var(--curva); }
.posta__vie a:hover { background: var(--oro); color: var(--notte); transform: translateY(-2px); }
.posta__chiudi { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(23,63,42,.08); color: var(--bosco); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.posta__chiudi:hover { background: var(--oro); }
/* Logo-sigillo nella home: torna alla home, gira al passaggio */
.sigillo-link { display: inline-block; margin-bottom: 18px; border-radius: 50%; cursor: pointer; }
.sigillo-link .sigillo { display: block; margin: 0; transition: transform .6s var(--curva), filter .4s; }
.sigillo-link.visto { animation: timbra-m .9s cubic-bezier(.2,1.4,.4,1) both; }
.sigillo-link:hover .sigillo, .sigillo-link:focus-visible .sigillo { transform: rotate(-16deg) scale(1.1); filter: drop-shadow(0 16px 30px rgba(13,36,24,.35)); }
.sigillo-link:focus-visible { outline: 3px solid var(--oro); outline-offset: 4px; }
.posta__ind { display: block; font-weight: 700; color: var(--notte); font-size: 1rem; margin-bottom: 8px; overflow-wrap: anywhere; }
.posta strong { word-break: normal; font-size: .95rem; }

/* ===== Schema di Punnett interattivo: il laboratorio delle covate ===== */
.punnett { position: relative; isolation: isolate; overflow: hidden; margin: 34px 0; padding: clamp(22px, 4vw, 40px); border-radius: 30px; color: var(--latte); max-width: 760px;
  background: radial-gradient(120% 80% at 100% 0%, rgba(227,177,79,.22), transparent 55%), radial-gradient(90% 70% at 0% 100%, rgba(120,180,110,.18), transparent 60%), linear-gradient(160deg, #1c4a31, #0d2418);
  box-shadow: 0 30px 70px rgba(13,36,24,.35), inset 0 0 0 1px rgba(241,239,230,.08); }
.punnett::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .07; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0 56 16v32L28 64 0 48V16zM28 64v33' fill='none' stroke='%23f1efe6' stroke-width='1.5'/%3E%3C/svg%3E"); animation: deriva 60s linear infinite; }
.pn-testa h3 { color: #fff; margin: 0 0 6px; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.pn-testa p { margin: 0 0 22px; color: rgba(241,239,230,.75); max-width: 52ch; }
/* tartaruga disegnata: colori per tipo */
.pn-mini, .pn-grande, .punnett__griglia td svg { overflow: visible; }
.g-AA { --guscio: #3d2f18; --scudi: #e3b14f; --pelle: #9a855c; --occhio: #1b1b1b; }
.g-Aa { --guscio: url(#tarta-mezzo); --scudi: #e3b14f; --pelle: #9a855c; --occhio: #1b1b1b; }
.g-aa { --guscio: #f6e4b0; --scudi: #e6b95c; --pelle: #f2d8a2; --occhio: #e0414f; }
.punnett .t-guscio { fill: var(--guscio); stroke: rgba(0,0,0,.35); stroke-width: 2.5; transition: fill .5s; }
.punnett .t-scudi { fill: none; stroke: var(--scudi); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; opacity: .85; }
.punnett .t-pelle { fill: var(--pelle); }
.punnett .t-occhio { fill: var(--occhio); }
/* genitori */
.pn-genitori { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; }
.pn-genitore { margin: 0; min-width: 0; border: 0; padding: 18px 16px 16px; border-radius: 22px; background: rgba(241,239,230,.06); box-shadow: inset 0 0 0 1px rgba(241,239,230,.12); display: grid; justify-items: center; gap: 10px; }
.pn-genitore legend { float: left; width: 100%; padding: 0; margin: 0 0 2px; text-align: center; font-family: var(--titoli); font-size: 1.05rem; color: var(--oro); }
.pn-sesso { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; margin-right: 8px; background: rgba(227,177,79,.16); font-family: var(--corpo); font-size: 1.05rem; vertical-align: 1px; }
.pn-grande { width: 110px; height: 110px; filter: drop-shadow(0 12px 18px rgba(0,0,0,.45)); animation: cammina 3.2s ease-in-out infinite; }
.pn-genitore[data-genitore="2"] .pn-grande { animation-delay: -1.6s; }
.pn-grande.cambia { animation: salta .6s var(--curva), cammina 3.2s .6s ease-in-out infinite; }
@keyframes cammina { 50% { transform: translateY(-5px) rotate(3deg); } }
@keyframes salta { 0% { transform: scale(.6) rotate(-20deg); opacity: .2; } 70% { transform: scale(1.12) rotate(4deg); opacity: 1; } 100% { transform: none; } }
.pn-alleli { display: flex; gap: 8px; }
.pn-alleli i, .punnett__griglia th i { font-style: normal; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font-family: var(--titoli); font-size: 1.15rem; line-height: 1; transition: background .4s, color .4s, transform .4s var(--curva); }
.al-A { background: #3d2f18; color: var(--oro); box-shadow: inset 0 0 0 2px var(--oro); }
.al-a { background: #f6e4b0; color: #0d2418; box-shadow: inset 0 0 0 2px #e0414f; }
.pn-scelte { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; width: 100%; }
.pn-opz { position: relative; cursor: pointer; flex: 1 1 0; min-width: 84px; }
.pn-opz input { position: absolute; opacity: 0; pointer-events: none; }
.pn-opz span { display: grid; justify-items: center; gap: 2px; padding: 8px 6px 7px; border-radius: 14px; font-weight: 600; font-size: .86rem; color: rgba(241,239,230,.8); background: rgba(0,0,0,.18); box-shadow: inset 0 0 0 1px rgba(241,239,230,.12); transition: background .25s, color .25s, transform .3s var(--curva), box-shadow .25s; }
.pn-opz small { font-family: var(--titoli); font-size: .78rem; opacity: .75; }
.pn-opz .pn-mini { width: 30px; height: 30px; }
.pn-opz:hover span { transform: translateY(-2px); background: rgba(241,239,230,.1); }
.pn-opz input:checked + span { background: var(--oro); color: var(--notte); box-shadow: 0 8px 20px rgba(227,177,79,.35); transform: translateY(-2px); }
.pn-opz input:focus-visible + span { outline: 3px solid #fff; outline-offset: 2px; }
.pn-per { align-self: center; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--oro); color: var(--notte); font-size: 1.6rem; font-weight: 700; box-shadow: 0 0 0 6px rgba(227,177,79,.18); animation: battito 2.4s ease-in-out infinite; }
@keyframes battito { 50% { box-shadow: 0 0 0 14px rgba(227,177,79,0); } }
/* schema e risultati */
.pn-schema { display: grid; grid-template-columns: auto 1fr; gap: clamp(18px, 3vw, 34px); align-items: center; margin-top: 26px; }
.punnett__griglia { border-collapse: separate; border-spacing: 8px; margin: -8px; }
.punnett__griglia caption { caption-side: bottom; text-align: left; font-size: .8rem; color: rgba(241,239,230,.55); padding: 4px 8px 0; }
.punnett__griglia th { padding: 0; text-align: center; vertical-align: middle; font-weight: 400; }
.pn-angolo { display: inline-block; font-size: .8rem; line-height: 1.1; color: rgba(241,239,230,.55); }
.punnett__griglia td { width: 112px; height: 112px; padding: 8px 6px; border-radius: 20px; text-align: center; vertical-align: middle; background: rgba(241,239,230,.07); box-shadow: inset 0 0 0 1px rgba(241,239,230,.12); transition: background .4s; }
.punnett__griglia td svg { display: block; width: 48px; height: 48px; margin: 0 auto 4px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.4)); }
.punnett__griglia td b { display: block; font-family: var(--titoli); font-weight: 400; font-size: 1.15rem; color: #fff; line-height: 1.1; }
.punnett__griglia td span { display: block; font-size: .78rem; font-weight: 600; color: rgba(241,239,230,.7); }
.punnett__griglia td.g-aa { background: rgba(246,228,176,.16); box-shadow: inset 0 0 0 2px rgba(224,65,79,.55); }
.punnett__griglia td.g-Aa { background: linear-gradient(90deg, rgba(61,47,24,.5) 50%, rgba(246,228,176,.12) 50%); }
.punnett__griglia td.g-AA { background: rgba(61,47,24,.55); }
.punnett__griglia td.gira { animation: gira .6s var(--curva) both; }
.punnett__esito { display: grid; gap: 10px; }
.pn-esito { position: relative; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 4px 10px; padding: 10px 14px 16px; border-radius: 16px; background: rgba(0,0,0,.2); }
.pn-esito .pn-mini { width: 38px; height: 38px; }
.pn-esito span { font-weight: 600; }
.pn-esito b { font-family: var(--titoli); font-weight: 400; font-size: 1.6rem; color: #fff; font-variant-numeric: tabular-nums; }
.pn-esito i { position: absolute; left: 14px; right: 14px; bottom: 8px; height: 5px; border-radius: 3px; background: rgba(241,239,230,.1); overflow: hidden; }
.pn-esito i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--v); border-radius: inherit; background: linear-gradient(90deg, var(--foglia), var(--oro)); transition: width .8s var(--curva); }
.pn-esito.zero { opacity: .45; }
.punnett__nota { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid rgba(241,239,230,.12); font-size: .9rem; color: rgba(241,239,230,.7); }
@media (max-width: 700px) {
  .pn-genitori { grid-template-columns: 1fr; }
  .pn-per { justify-self: center; margin: -4px 0; }
  .pn-schema { grid-template-columns: 1fr; justify-items: center; }
  .punnett__esito { width: 100%; }
}
@media (max-width: 420px) { .punnett__griglia td { width: 96px; height: 100px; } .pn-opz { min-width: 0; } .pn-opz span { font-size: .8rem; padding: 7px 3px; } }
@media (prefers-reduced-motion: reduce) { .pn-grande, .pn-per, .punnett::before { animation: none; } }
/* Speratura: foto tonda che "si accende" */
.speratura { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: clamp(20px, 4vw, 40px); align-items: center; margin: 10px 0 6px; }
.speratura__foto a { display: block; aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 4px var(--carta), 0 0 0 7px var(--oro), 0 20px 50px rgba(224,110,40,.35); animation: brace 3.5s ease-in-out infinite; transition: transform .45s var(--curva); }
.speratura__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--curva); }
.speratura__foto a:hover { transform: translateY(-5px) scale(1.03); }
.speratura__foto a:hover img { transform: scale(1.08); }
@keyframes brace { 50% { box-shadow: 0 0 0 4px var(--carta), 0 0 0 7px var(--oro), 0 20px 70px rgba(240,120,40,.6); } }
@media (max-width: 640px) { .speratura { grid-template-columns: 1fr; justify-items: center; } .speratura__foto { width: min(240px, 70vw); } }
@media (prefers-reduced-motion: reduce) { .speratura__foto a { animation: none; } }
.galleria + h3, .galleria + h2 { margin-top: 44px; } h2 + h3#nidi { margin-top: 6px; }
