/* ══════════ stile.css — preset «calma» · La Mia Migliore Amica Sono Io ══════════
   Una rivista lenta: carta latte, inchiostro prugna, un solo rosso melograno.
   Foto a filo (niente angoli tondi), filetti sottili, numeri di sezione, serif editoriale.
   Si muove poco: tendine, dissolvenze, un nastro che scorre. */

:root {
  --fondo: #F6EFE6; --carta: #EDE2D5; --cipria: #E9CDBF; --cipria-chiara: #F1DED3;
  --testo: #26191F; --tenue: #6B5960; --accento: #B23A2A; --ris: #B23A2A; --salvia: #5F6B57; --sera: #26191F;
  --filetto: rgba(38, 25, 31, .18);
  --evid: #F2B9A3;
  --mano-colore: #B23A2A;
  --mano: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'%3E%3Cpath d='M2 7 C 40 2, 80 9, 120 5 S 180 3, 198 6' fill='none' stroke='%23B23A2A' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
  --corpo: 18.5px; --riga: 1.55;
  --font-titolo: "Newsreader", Georgia, serif; --font-corpo: "Hanken Grotesk", system-ui, sans-serif;
  --gutter: 22px; --misura: 38rem;
  --bottone-fondo: #B23A2A; --bottone-testo: #FFF8F1; --raggio: 3px;
  --lento: cubic-bezier(.22,.7,.2,1);
}
body { hyphens: none; }
main > section { padding: 88px var(--gutter); position: relative; background: var(--fondo); }
main > section > * { max-width: var(--misura); margin-left: auto; margin-right: auto; }

/* tipografia */
h1, h2, h3, .gigante, summary { font-family: var(--font-titolo); font-optical-sizing: auto; }
h1 em, h2 em, .gigante em { font-style: italic; color: var(--accento); font-weight: 500; }
.numero-sezione { font: 500 .95rem/1 var(--font-corpo); letter-spacing: .2em; color: var(--accento); padding-top: 14px; border-top: 1px solid var(--testo); margin-bottom: 26px !important; }
.numero-sezione.chiaro { color: var(--cipria); border-color: rgba(246, 239, 230, .5); }
.titolo-sezione { font-size: clamp(2.3rem, 10.2vw, 4.2rem); font-weight: 600; line-height: 1.02; letter-spacing: -.025em; }
.testo-sezione { margin-top: 20px; font-size: 1.14rem; line-height: 1.55; }
.gigante { font-weight: 560; font-size: clamp(2.7rem, 12.4vw, 6rem); line-height: .98; letter-spacing: -.03em; }
mark { background: linear-gradient(var(--evid), var(--evid)) no-repeat 0 0 / 0% 100%; padding: .02em .12em; border-radius: 2px; }
mark.in-vista { background-size: 100% 100%; }
.nota { font-size: 1.7em; }

/* il bottone: rettangolo pieno, con la freccia */
.bottone { border-radius: var(--raggio); letter-spacing: .01em; font-size: 1.1rem; transition: background .3s, transform .3s var(--lento); }
.bottone::after { content: "→"; font-weight: 400; transition: transform .3s var(--lento); }
.bottone:hover { background: #8F2D20; }
.bottone:hover::after { transform: translateX(4px); }
.bottone.grande { width: 100%; min-height: 64px; font-size: 1.15rem; }
.rischio { color: var(--tenue); font-size: 1.04rem; }
.rischio b { color: var(--testo); }

/* segnaposto delle foto (anteprima a costo zero) */
.segnaposto { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 78% 18%, #FFF4E2 0%, rgba(255,244,226,0) 55%), linear-gradient(160deg, #E8C6AE 0%, #D49E86 48%, #A9705F 100%); }
.segnaposto::after { content: ""; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E"); mix-blend-mode: multiply; }
.sp-nota { position: absolute; z-index: 2; left: 12px; bottom: 12px; background: rgba(246, 239, 230, .92); color: var(--tenue); font-size: .78rem; letter-spacing: .04em; padding: 6px 10px; border-radius: 2px; }
.sp-notte { background: radial-gradient(50% 40% at 62% 38%, #6E7BA6 0%, transparent 70%), linear-gradient(170deg, #2C3150, #17151F); }
.sp-amica { background: radial-gradient(60% 50% at 30% 40%, #FFD9B0, transparent 65%), radial-gradient(60% 50% at 72% 45%, #F9C3A6, transparent 65%), linear-gradient(160deg, #C98670, #8E4E44 60%, #4E2A2E); }
.sp-specchio { background: radial-gradient(90% 70% at 70% 15%, #FFF6EA, transparent 60%), linear-gradient(160deg, #DCCBBE, #B9A193 55%, #8A7166); }
.sp-letto { background: radial-gradient(100% 80% at 80% 10%, #FFF3DE, transparent 55%), linear-gradient(170deg, #EADBC8, #CDB59C 55%, #9C8570); }
.sp-coppia { background: radial-gradient(110% 80% at 20% 15%, #FFF1DF 0%, transparent 55%), linear-gradient(150deg, #E6C2A8, #C98F7B 60%, #9F6A60); }
.sp-divano { background: radial-gradient(90% 70% at 85% 25%, #FBE9D6, transparent 60%), linear-gradient(160deg, #D8C3B3, #B79B8D 55%, #8C7468); }
.sp-porta { background: radial-gradient(90% 90% at 15% 30%, #FFF4E4, transparent 55%), linear-gradient(150deg, #CFD3C3, #A7AE98 55%, #7E8771); }
.sp-parco { background: radial-gradient(100% 80% at 70% 10%, #FFF6D8, transparent 55%), linear-gradient(170deg, #C9D2B3, #9AAA82 50%, #5F6B57); }
.sp-panchina { background: radial-gradient(120% 90% at 80% 10%, #FFF3D9, transparent 55%), linear-gradient(160deg, #E4D2B8, #C7AE8C 50%, #8E8A6E); }

/* 1 · APERTURA — foto a filo con la testata, testo a sinistra */
#apertura { padding: 0 0 36px; }
#apertura > * { max-width: none; }
.foto-apertura { position: relative; width: 100%; height: 27dvh; min-height: 205px; overflow: hidden; }
.foto-apertura .foto-dentro { width: 100%; height: 100%; animation: respiro 24s ease-in-out infinite alternate; transform-origin: 60% 40%; }
@keyframes respiro { from { transform: scale(1); } to { transform: scale(1.08) translateY(-1.5%); } }
.testata { position: absolute; z-index: 2; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; gap: 10px; padding: 12px var(--gutter); background: rgba(246, 239, 230, .9); font: 600 .74rem/1.2 var(--font-corpo); letter-spacing: .16em; text-transform: uppercase; }
.apertura-testo { padding: 22px var(--gutter) 0; max-width: 40rem !important; margin: 0 auto; }
.pre { font-size: 1.08rem; font-weight: 600; color: var(--accento); }
.titolo-apertura { margin-top: 8px; font-size: clamp(2.55rem, 11.4vw, 4.8rem); font-weight: 600; line-height: .98; letter-spacing: -.03em; }
.sub-apertura { margin-top: 14px; font-size: 1.1rem; line-height: 1.45; color: var(--tenue); }
.tre-promesse { display: block; margin: 8px 0 6px; border-top: 1px solid var(--filetto); }
.promessa { display: block; padding: 7px 0 6px; border-bottom: 1px solid var(--filetto); font-family: var(--font-titolo); font-size: 1.52rem; line-height: 1.12; font-weight: 600; color: var(--testo); clip-path: inset(0 100% 0 0); animation: tendina 1s var(--lento) forwards; }
.promessa::before { content: "✦"; color: var(--accento); font-size: .6em; margin-right: .5em; vertical-align: .25em; }
.promessa:nth-child(2) { animation-delay: .18s; } .promessa:nth-child(3) { animation-delay: .36s; }
@keyframes tendina { to { clip-path: inset(0 0 0 0); } }
.apertura-testo .bottone { margin-top: 18px; width: 100%; min-height: 60px; }
.apertura-testo .rischio { margin-top: 10px; }

/* il nastro che scorre */
.nastro { overflow: hidden; background: var(--testo); color: var(--fondo); padding: 13px 0; }
.nastro-scorre { display: flex; gap: 22px; width: max-content; animation: nastro 26s linear infinite; font: 600 .98rem/1 var(--font-corpo); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.nastro i { font-style: normal; color: var(--cipria); }
@keyframes nastro { to { transform: translateX(-50%); } }

/* 2 · CHE COS'È — le pagine a ventaglio */
.ventaglio { position: relative; height: 350px; margin-top: 30px !important; }
.pagina { position: absolute; left: 50%; top: 14px; width: 200px; height: 284px; margin-left: -100px; background: #FFFCF7; border-radius: 1px; padding: 20px 18px; box-shadow: 0 1px 0 rgba(38,25,31,.08), 0 26px 40px -26px rgba(38,25,31,.5); display: flex; flex-direction: column; gap: 10px; transition: transform 1.6s var(--lento); transform-origin: 50% 120%; }
.pag-cap { font: 600 .72rem/1 var(--font-corpo); text-transform: uppercase; letter-spacing: .18em; color: var(--accento); }
.pag-titolo { font-family: var(--font-titolo); font-size: 1.36rem; line-height: 1.08; font-weight: 600; }
.pag-righe { display: grid; gap: 9px; margin-top: 8px; }
.pag-righe i { display: block; height: 5px; background: var(--carta); }
.pag-righe i:nth-child(2n) { width: 84%; } .pag-righe i:last-child { width: 52%; }
.pag-n { margin-top: auto; align-self: center; font: 500 .8rem var(--font-titolo); color: var(--tenue); }
.p1 { background: var(--cipria-chiara); } .p3 { background: #EFE8DA; }
.ventaglio.aperto .p1 { transform: rotate(-12deg) translateX(-42px); }
.ventaglio.aperto .p3 { transform: rotate(12deg) translateX(42px); }
.ventaglio.aperto .p2 { transform: translateY(-6px); }
.ventaglio-nota { text-align: center; transform: rotate(-2deg); margin-top: -6px !important; }

/* 3 · PROBLEMA — i tre momenti a filetto */
#problema { background: var(--cipria-chiara); }
.momenti { list-style: none; padding: 0; margin-top: 34px !important; border-top: 1px solid var(--testo); }
.momento { display: grid; grid-template-columns: 46px 1fr; column-gap: 8px; padding: 20px 0 22px; border-bottom: 1px solid var(--filetto); }
.momento-n { grid-row: span 2; font: italic 500 1.9rem/1 var(--font-titolo); color: var(--accento); }
.momento-quando { font: 600 .8rem/1.4 var(--font-corpo); text-transform: uppercase; letter-spacing: .18em; color: var(--tenue); }
.momento p { margin-top: 4px; font-family: var(--font-titolo); font-size: 1.5rem; line-height: 1.24; font-weight: 500; }
.foto-larga { margin: 40px calc(-1 * var(--gutter)) 0 !important; max-width: none !important; height: 300px; overflow: hidden; }
.foto-larga .foto-dentro { width: 100%; height: 100%; }
.voce { position: relative; z-index: 2; margin-top: -60px !important; margin-right: 0 !important; margin-left: 18px !important; background: var(--fondo); padding: 24px 22px 26px; border-top: 3px solid var(--accento); }
.voce p { font-size: 1.12rem; line-height: 1.55; }

/* 4 · LA MIGLIORE AMICA — il pezzo forte, su inchiostro */
#bigidea { background: var(--sera); color: var(--fondo); }
#bigidea .gigante em { color: #F2A48C; }
.foto-amica { margin: 34px calc(-1 * var(--gutter)) 0 !important; max-width: none !important; height: 62dvh; min-height: 420px; max-height: 720px; overflow: hidden; clip-path: inset(0 0 0 0); }
.foto-amica .foto-dentro { width: 100%; height: 100%; }
.foto-amica.da-aprire { clip-path: inset(0 50% 0 50%); }
.foto-amica.aperta { clip-path: inset(0 0 0 0); transition: clip-path 1.8s var(--lento); }
.amica-testo { position: relative; z-index: 2; margin-top: -90px !important; background: #F6EFE6; color: var(--testo); padding: 26px 22px 24px; }
.amica-testo > p:first-child { font-family: var(--font-titolo); font-size: 1.36rem; line-height: 1.32; font-weight: 450; }
.amica-segreto { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--filetto); font-size: 1.1rem; }
.amica-segreto .ris { font-weight: 700; }
.lucchetto { margin-top: 18px; display: flex; align-items: flex-start; gap: 10px; font-weight: 600; font-size: 1.04rem; color: var(--accento); }
.lucchetto svg { flex: none; width: 22px; height: 22px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

/* 5 · BENEFICI — galleria a frecce, foto a filo */
#benefici { padding-left: 0; padding-right: 0; }
#benefici > .numero-sezione, #benefici > .titolo-sezione, #benefici > .testo-sezione { margin-left: var(--gutter); margin-right: var(--gutter); }
@media (min-width: 860px) { #benefici > .numero-sezione, #benefici > .titolo-sezione, #benefici > .testo-sezione { margin-left: auto; margin-right: auto; } }
.galleria { max-width: 76rem !important; margin-top: 34px !important; }
.galleria-binario { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--gutter) 6px; scroll-padding: 0 var(--gutter); scrollbar-width: none; overscroll-behavior-x: contain; }
.galleria-binario::-webkit-scrollbar { display: none; }
.vetrino { flex: 0 0 82%; max-width: 380px; scroll-snap-align: start; background: #FFFCF7; }
.vetrino-foto { aspect-ratio: 4 / 3.6; }
.vetrino-testo { padding: 18px 18px 22px; }
.vetrino-n { font: 600 .78rem/1 var(--font-corpo); letter-spacing: .18em; color: var(--accento); }
.vetrino h3 { margin-top: 10px; font-size: 1.5rem; font-weight: 600; line-height: 1.1; letter-spacing: -.01em; }
.vetrino .emoji { font-size: .85em; }
.vetrino p { margin-top: 10px; font-size: 1.04rem; line-height: 1.5; }
.frecce { display: flex; align-items: center; gap: 10px; padding: 20px var(--gutter) 0; }
.avanzamento { flex: 1; height: 2px; background: var(--filetto); position: relative; overflow: hidden; }
.avanzamento i { position: absolute; inset: 0 auto 0 0; width: 16.7%; background: var(--testo); transition: transform .5s var(--lento); }
.freccia { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--testo); background: transparent; display: grid; place-items: center; cursor: pointer; transition: background .3s, opacity .4s; }
.freccia svg { width: 22px; height: 22px; fill: none; stroke: var(--testo); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.freccia:hover { background: var(--carta); }
.freccia:disabled { opacity: .25; cursor: default; }

/* 6 · BONUS — copertine grandi, righe a filetto */
#bonus { background: var(--carta); }
.regali { margin-top: 30px !important; border-top: 1px solid var(--testo); }
.regalo { display: grid; grid-template-columns: 116px 1fr; gap: 18px; align-items: start; padding: 22px 0; border-bottom: 1px solid var(--filetto); }
.copertina { aspect-ratio: 3 / 4.3; padding: 12px 10px; display: flex; flex-direction: column; color: #FBF3EA; box-shadow: inset 5px 0 0 rgba(0,0,0,.14), 0 16px 26px -14px rgba(38,25,31,.6); }
.cop-bonus { font: 600 .6rem/1 var(--font-corpo); text-transform: uppercase; letter-spacing: .16em; opacity: .85; }
.cop-titolo { margin-top: 10px; font: italic 600 1.18rem/1.02 var(--font-titolo); }
.cop-marchio { margin-top: auto; font: 600 .5rem/1.2 var(--font-corpo); letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.c-ansia { background: linear-gradient(165deg, #5F6B57, #3D4638); }
.c-vestiti { background: linear-gradient(165deg, #C2614C, #8F2D20); }
.c-rottura { background: linear-gradient(165deg, #4A3540, #26191F); }
.regalo h3 { font-size: 1.42rem; font-weight: 600; line-height: 1.08; }
.regalo-testo p { margin-top: 6px; font-size: 1.04rem; line-height: 1.45; }
.regalo-prezzo { margin-top: 10px !important; display: flex; align-items: center; gap: 12px; }
.regalo-prezzo s { color: var(--tenue); font-size: 1.08rem; }
.regalo-prezzo b { color: var(--accento); font-size: .95rem; letter-spacing: .16em; border: 1.5px solid var(--accento); padding: 4px 9px; border-radius: 2px; }

/* 7 · TESTIMONIANZE — citazioni da rivista, l'etichetta del problema sopra */
.voci { margin-top: 30px !important; border-top: 1px solid var(--testo); }
@media (min-width: 900px) { .voci { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 36px; max-width: 76rem !important; } }
.voci blockquote { padding: 24px 0 22px; border-bottom: 1px solid var(--filetto); display: flex; flex-direction: column; gap: 12px; }
.etichetta { font: 700 .8rem/1 var(--font-corpo); text-transform: uppercase; letter-spacing: .18em; color: var(--accento); }
.voci blockquote p { font-family: var(--font-titolo); font-size: 1.24rem; line-height: 1.38; font-weight: 450; }
.voci blockquote p::before { content: "«"; color: var(--accento); } .voci blockquote p::after { content: "»"; color: var(--accento); }
.voci footer { display: flex; align-items: center; gap: 12px; font-size: 1rem; color: var(--tenue); }
.voci footer b { color: var(--testo); }
.faccia { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; font: italic 600 1.2rem var(--font-titolo); color: #fff; background: linear-gradient(140deg, #D49E86, #A9705F); }
.f2, .f6 { background: linear-gradient(140deg, #A7AE98, #5F6B57); } .f3, .f8 { background: linear-gradient(140deg, #C2614C, #8F2D20); } .f5, .f9 { background: linear-gradient(140deg, #7B6470, #4A3540); }

/* 8 · PREZZO — su inchiostro, lo scontrino chiaro */
#offerta { background: var(--sera); color: var(--fondo); }
#offerta .testo-sezione strong { color: #F2A48C; }
.conto { margin-top: 30px !important; background: #FFFCF7; color: var(--testo); padding: 26px 22px 24px; }
.conto-righe { list-style: none; padding: 0; display: grid; }
.conto-righe li { display: flex; justify-content: space-between; gap: 12px; font-size: 1.04rem; padding: 10px 0; border-bottom: 1px dashed var(--filetto); }
.conto-righe s { color: var(--tenue); white-space: nowrap; }
.conto-totale { display: flex; justify-content: space-between; margin-top: 12px; font-weight: 700; }
.conto-totale s { color: var(--tenue); }
.prezzo-oggi { margin-top: 14px; text-align: center; color: var(--accento); font-size: clamp(5rem, 26vw, 8rem); font-weight: 600; }
.prezzo-oggi small { display: block; font: 600 .9rem/1.6 var(--font-corpo); color: var(--tenue); letter-spacing: .2em; text-transform: uppercase; }
.conto-confronto { margin-top: 10px; text-align: center; font-size: 1.06rem; }
.conto .bottone { margin-top: 20px; }
.scarsita { margin-top: 16px; font-size: 1.06rem; text-align: center; }
.pallino { display: inline-block; margin-right: 8px; vertical-align: .05em; width: 10px; height: 10px; border-radius: 50%; background: var(--accento); animation: pulsa 2.4s ease-in-out infinite; }
@keyframes pulsa { 50% { opacity: .35; transform: scale(.8); } }
.pagamenti { margin-top: 10px; text-align: center; font-size: 1.04rem; color: var(--tenue); }

/* 9 · GARANZIA — il sigillo che gira piano */
#garanzia { text-align: center; }
.sigillo { position: relative; width: 170px; height: 170px; margin: 0 auto 26px !important; animation: gira 60s linear infinite; }
.sigillo svg { width: 100%; height: 100%; fill: none; stroke: var(--accento); stroke-width: 1.1; }
.sigillo text { fill: var(--accento); stroke: none; font: 600 9.2px var(--font-corpo); letter-spacing: 2.2px; }
.sigillo-n { position: absolute; inset: 0; display: grid; place-content: center; animation: gira 60s linear infinite reverse; }
.sigillo-n b { font-family: var(--font-titolo); font-size: 3rem; line-height: .9; color: var(--testo); font-weight: 600; }
.sigillo-n small { font-size: .9rem; font-weight: 600; color: var(--tenue); }
@keyframes gira { to { transform: rotate(360deg); } }

/* 10 · DOMANDE */
#domande { background: var(--carta); }
.elenco-domande { margin-top: 26px !important; border-top: 1px solid var(--testo); }
details { border-bottom: 1px solid var(--filetto); }
summary { font-weight: 550; font-size: 1.3rem; line-height: 1.25; }
details > p { font-size: 1.06rem; }

/* 11 · CONGEDO — foto piena con pannello sopra */
#congedo { padding: 0 0 60px; }
.congedo-foto { height: 72dvh; min-height: 480px; max-width: none !important; overflow: hidden; }
.congedo-foto .foto-dentro { width: 100%; height: 100%; }
.pannello-crema { position: relative; z-index: 2; margin: -140px var(--gutter) 0 !important; padding: 28px 22px 26px; background: rgba(246, 239, 230, .96); border-top: 3px solid var(--accento); }
@media (min-width: 760px) { .pannello-crema { margin: -220px auto 0 !important; max-width: 40rem !important; } }
.pannello-crema .gigante { font-size: clamp(2.4rem, 11vw, 4.6rem); }
.congedo-riga { margin-top: 14px; font-size: 1.15rem; }
.pannello-crema .bottone { margin-top: 22px; width: 100%; }
.piede { max-width: 40rem; margin: 60px auto 0; padding: 0 var(--gutter) 30px; text-align: center; color: var(--tenue); }
.piede p { font-size: 16.5px; }
.piede .disclaimer { margin-top: 12px; line-height: 1.5; }

/* la barra d'acquisto */
[data-barra-acquisto] { background: var(--testo); color: var(--fondo); border-radius: 4px; }
.barra-prezzo s { opacity: .6; } .barra-prezzo b { font-size: 1.2rem; }

@media (min-width: 760px) {
  main > section { padding-top: 130px; padding-bottom: 130px; }
  #apertura { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; min-height: 100dvh; padding: 0; }
  .foto-apertura { height: 100%; min-height: 100dvh; }
  .apertura-testo { padding: 40px 56px; }
  .foto-larga, .foto-amica { margin-left: auto !important; margin-right: auto !important; max-width: 64rem !important; }
  .voce { max-width: 34rem !important; margin-left: auto !important; margin-right: 12% !important; }
  .amica-testo { max-width: 38rem !important; }
}
@media (prefers-reduced-motion: reduce) {
  .promessa { clip-path: none; } .foto-amica.da-aprire { clip-path: none; } .nastro-scorre { animation: none; }
}

/* ══ 3b · IL CUORE — si rompe, si ricompone, le crepe diventano oro ══ */
#cuore { height: 520dvh; padding: 0; background: var(--sera); color: var(--fondo); }
#cuore > * { max-width: none; }
.cuore-palco { position: sticky; top: 0; height: 100dvh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 0 var(--gutter); background: radial-gradient(80% 60% at 50% 40%, #3A2630 0%, var(--sera) 70%); }
.cuore { width: min(96vw, 520px); height: auto; overflow: visible; }
.scheggia { transform-box: view-box; }
.cuore-alone { opacity: .35; transform-origin: 100px 96px; transform-box: view-box; }
.crepe { stroke-dasharray: 1; stroke-dashoffset: 1; }
.oro { stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 4px rgba(247, 220, 154, .8)); }
.cuore-tutto { transform-origin: 100px 96px; transform-box: view-box; }
.cuore-tutto.batte { animation: battito 1.6s ease-in-out infinite; }
@keyframes battito { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.06); } 24% { transform: scale(1); } 36% { transform: scale(1.04); } }
.didascalie { position: relative; width: 100%; max-width: 30rem; min-height: 7.6em; display: grid; }
.didascalia { grid-area: 1 / 1; align-self: start; text-align: center; font-family: var(--font-titolo); font-size: clamp(1.75rem, 7.6vw, 2.6rem); line-height: 1.12; font-weight: 500; letter-spacing: -.015em; opacity: 0; transform: translateY(18px); }
.didascalia em { color: #F2A48C; }
.oro-testo em { color: #EBC36E; }
.didascalia:first-child { opacity: 1; transform: none; }
.scorri { position: absolute; bottom: 22px; font: 600 .78rem/1 var(--font-corpo); letter-spacing: .24em; text-transform: uppercase; opacity: .55; animation: scorri 2s ease-in-out infinite; }
@keyframes scorri { 50% { transform: translateY(6px); opacity: .25; } }
.senza-gsap #cuore, .meno-moto #cuore { height: auto; }
.senza-gsap .cuore-palco, .meno-moto .cuore-palco { position: relative; height: auto; padding: 80px var(--gutter); }
.senza-gsap .didascalia, .meno-moto .didascalia { grid-area: auto; opacity: 1; transform: none; margin-bottom: 10px; }
.senza-gsap .oro, .meno-moto .oro { stroke-dashoffset: 0; }

/* ══ più movimento nel resto della pagina ══ */
.vetrino-foto { transition: transform 1.2s var(--lento); }
.vetrino:hover .vetrino-foto { transform: scale(1.03); }
.cuoricino { display: inline-block; width: 30px; height: 28px; vertical-align: -6px; margin-left: 6px; }
.cuoricino path { fill: none; stroke: var(--accento); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 120; stroke-dashoffset: 120; transition: stroke-dashoffset 1.6s var(--lento) .4s; }
.cuoricino.disegnato path { stroke-dashoffset: 0; }
.foto-apertura::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(30% 22% at 70% 30%, rgba(255, 236, 210, .55), transparent 70%); animation: luce 9s ease-in-out infinite alternate; }
@keyframes luce { from { transform: translate(-8%, 4%); opacity: .5; } to { transform: translate(6%, -4%); opacity: 1; } }
.amica-testo { transition: transform 1.2s var(--lento); }
@media (prefers-reduced-motion: reduce) { .cuore-tutto.batte, .foto-apertura::after, .scorri { animation: none; } }

/* ══ i codici del tema: filo rosso, cuori, oro, polaroid ══ */
body::before { content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .5; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .4  0 0 0 0 .3  0 0 0 0 .3  0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* il numero di sezione: il filetto diventa un filo rosso che si stende */
.numero-sezione { position: relative; border-top: 0; padding-top: 22px; }
.numero-sezione::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 12' preserveAspectRatio='none'%3E%3Cpath d='M0 6 C 40 1, 70 11, 110 6 S 180 1, 220 7 S 300 11, 340 5 S 385 3, 400 6' fill='none' stroke='%23B23A2A' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%; clip-path: inset(0 100% 0 0); transition: clip-path 1.6s var(--lento); }
.numero-sezione.chiaro::before { filter: brightness(1.9) saturate(.7); }
.numero-sezione.in-vista::before { clip-path: inset(0 0 0 0); }

/* apertura: il filo che si annoda a cuore, i bagliori d'oro */
.filo-apertura { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.filo-apertura path { fill: none; stroke: #B23A2A; stroke-width: 2.4; stroke-linecap: round; filter: drop-shadow(0 1px 1px rgba(38,25,31,.35)); stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: filo 3.2s cubic-bezier(.45,.05,.3,1) .4s forwards; }
@keyframes filo { to { stroke-dashoffset: 0; } }
.bagliori { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.bagliori i { position: absolute; width: 10px; height: 10px; background: radial-gradient(circle, #FFF3CF 0 20%, #E7B95A 35%, transparent 70%); clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); animation: brilla 3.4s ease-in-out infinite; opacity: 0; }
@keyframes brilla { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 50% { opacity: 1; transform: scale(1.15) rotate(45deg); } }
.promessa::before { content: ""; display: inline-block; width: .62em; height: .58em; margin-right: .45em; vertical-align: .02em; background: var(--accento); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 28'%3E%3Cpath d='M15 27C6 19 1 14 1 8.5 1 4.4 4.4 1 8.5 1c2.8 0 5 1.4 6.5 3.8C16.5 2.4 18.7 1 21.5 1 25.6 1 29 4.4 29 8.5 29 14 24 19 15 27z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 28'%3E%3Cpath d='M15 27C6 19 1 14 1 8.5 1 4.4 4.4 1 8.5 1c2.8 0 5 1.4 6.5 3.8C16.5 2.4 18.7 1 21.5 1 25.6 1 29 4.4 29 8.5 29 14 24 19 15 27z'/%3E%3C/svg%3E") center / contain no-repeat; }
.titolo-apertura em { background: linear-gradient(#EBC36E, #EBC36E) no-repeat 0 92% / 0% 2px; animation: sottolinea 1.4s var(--lento) 1.2s forwards; }
@keyframes sottolinea { to { background-size: 100% 2px; } }

/* che cos'è: le pagine respirano */
.ventaglio.aperto .p2 { animation: galleggia 6s ease-in-out 1.6s infinite; }
@keyframes galleggia { 0%, 100% { transform: translateY(-6px); } 50% { transform: translateY(-14px); } }

/* problema: il filo che scende lungo i momenti */
.momenti { position: relative; }
.filo-momenti { position: absolute; left: -18px; top: 0; width: 14px; height: 100%; overflow: visible; }
.filo-momenti path { fill: none; stroke: var(--accento); stroke-width: 1.6; stroke-linecap: round; vector-effect: non-scaling-stroke; }

/* migliore amica: due cuori legati */
.due-cuori { display: block; width: 150px; height: 40px; margin: -6px 0 14px; overflow: visible; }
.due-cuori path { fill: none; stroke: var(--accento); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 160; stroke-dashoffset: 160; transition: stroke-dashoffset 1.8s var(--lento); }
.due-cuori .dc-filo { transition-delay: .5s; }
.due-cuori .dc-cuore:last-child { transition-delay: 1.1s; }
.due-cuori.disegnato path { stroke-dashoffset: 0; }
.due-cuori.disegnato .dc-cuore { fill: rgba(178, 58, 42, .14); transition: stroke-dashoffset 1.8s var(--lento), fill 1s 1.6s; }

/* benefici: polaroid da migliori amiche */
.galleria-binario { padding-top: 14px; padding-bottom: 18px; }
.vetrino { background: #FFFEFB; padding: 10px 10px 0; box-shadow: 0 2px 4px rgba(38,25,31,.08), 0 22px 40px -26px rgba(38,25,31,.55); transform: rotate(-1.4deg); transition: transform .8s var(--lento); }
.vetrino:nth-child(2n) { transform: rotate(1.2deg); }
.vetrino:hover { transform: rotate(0) translateY(-4px); }
.vetrino::before { content: ""; position: absolute; left: 50%; top: -9px; width: 74px; height: 20px; margin-left: -37px; background: rgba(233, 205, 191, .78); transform: rotate(-3deg); z-index: 2; }
.vetrino { position: relative; overflow: visible; }
.vetrino-n { font: 600 1.35rem/1 var(--font-mano); letter-spacing: 0; color: var(--accento); }

/* bonus: il cuore d'oro in copertina, le copertine si inclinano entrando */
.cop-cuore { width: 30px; height: 28px; margin-top: auto; align-self: flex-start; }
.cop-cuore path { fill: none; stroke: #EBC36E; stroke-width: 1.6; }
.cop-marchio { margin-top: 8px; }
.regalo .copertina { transition: transform 1s var(--lento); transform: rotate(-3deg); }
.regalo:nth-child(2n) .copertina { transform: rotate(2.5deg); }

/* prezzo: il cuore kintsugi d'oro */
.cuore-oro { display: block; width: 52px; height: 48px; margin: 18px auto -4px; }
.cuore-oro path { fill: none; stroke: #D9A441; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 120; stroke-dashoffset: 120; transition: stroke-dashoffset 1.8s var(--lento); }
.cuore-oro .cuore-oro-crepa { transition-delay: 1.2s; }
.cuore-oro.disegnato path { stroke-dashoffset: 0; }
.conto .bottone.grande { animation: respira 3s ease-in-out infinite; }
@keyframes respira { 50% { box-shadow: 0 0 0 8px rgba(178, 58, 42, .14); } }

/* congedo: i cuori che salgono */
.congedo-foto { position: relative; }
.cuori-salgono { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.cuori-salgono i { position: absolute; bottom: -30px; width: 18px; height: 17px; background: rgba(255, 244, 236, .85); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 28'%3E%3Cpath d='M15 27C6 19 1 14 1 8.5 1 4.4 4.4 1 8.5 1c2.8 0 5 1.4 6.5 3.8C16.5 2.4 18.7 1 21.5 1 25.6 1 29 4.4 29 8.5 29 14 24 19 15 27z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 28'%3E%3Cpath d='M15 27C6 19 1 14 1 8.5 1 4.4 4.4 1 8.5 1c2.8 0 5 1.4 6.5 3.8C16.5 2.4 18.7 1 21.5 1 25.6 1 29 4.4 29 8.5 29 14 24 19 15 27z'/%3E%3C/svg%3E") center / contain no-repeat; animation: sale linear infinite; }
@keyframes sale { 0% { transform: translateY(0) translateX(0) rotate(-8deg); opacity: 0; } 12% { opacity: 1; } 100% { transform: translateY(-80vh) translateX(24px) rotate(10deg); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .filo-apertura path { stroke-dashoffset: 0; } .bagliori, .cuori-salgono { display: none; }
  .numero-sezione::before { clip-path: none; } .titolo-apertura em { background-size: 100% 2px; }
}
@media (min-width: 760px) { .filo-apertura { inset: auto 0 10% 0; height: 52%; } }

/* foto vere (build degli asset) */
img.foto, .foto-apertura picture img { display: block; width: 100%; height: 100%; object-fit: cover; }
.foto-apertura picture { display: block; }
.foto-apertura img { object-position: 62% 35%; }
.foto-amica img.foto { object-position: 50% 30%; }
.congedo-foto img.foto { object-position: 50% 40%; }
img.faccia { object-fit: cover; padding: 0; }

/* apertura: foto e cuore nello stesso riquadro, la faccia sta sempre dentro il cuore */
.foto-apertura { display: flex; flex-direction: column; height: auto; min-height: 0; overflow: visible; }
.foto-apertura::after { display: none; }
.foto-apertura .testata { position: static; order: -1; }
.finestra-apertura { position: relative; overflow: hidden; height: 31dvh; min-height: 240px; container-type: size; }
.finestra-apertura::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(30% 22% at 70% 30%, rgba(255, 236, 210, .45), transparent 70%); animation: luce 9s ease-in-out infinite alternate; }
.scena-apertura {
  --W: max(100cqw, 176.84cqh); --H: calc(var(--W) * .5655);
  position: absolute; width: var(--W); height: var(--H);
  left: clamp(calc(100cqw - var(--W)), calc(60cqw - .669 * var(--W)), 0px);
  top: clamp(calc(100cqh - var(--H)), calc(50cqh - .256 * var(--H)), 0px);
  transform-origin: 66.9% 25.6%; animation: respiro-cuore 24s ease-in-out infinite alternate;
}
@keyframes respiro-cuore { from { transform: scale(1); } to { transform: scale(1.06); } }
.scena-apertura img { display: block; width: 100%; height: 100%; }
.scena-apertura .filo-apertura { inset: 0; height: 100%; }
.filo-apertura path { vector-effect: non-scaling-stroke; }
@media (min-width: 760px) {
  .foto-apertura { display: block; position: relative; height: 100dvh; min-height: 640px; }
  .finestra-apertura { position: absolute; inset: 0; height: auto; min-height: 0; }
  .foto-apertura .testata { position: absolute; order: 0; top: auto; bottom: 0; }
  .filo-apertura path { stroke-width: 3; }
}
@media (prefers-reduced-motion: reduce) { .scena-apertura, .finestra-apertura::after { animation: none; } }
@media (min-width: 760px) {
  #congedo { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; padding: 0 0 60px; }
  #congedo > * { grid-column: 1 / -1; }
  #congedo > .congedo-foto { grid-column: 1; grid-row: 1; height: 92dvh; min-height: 560px; width: 100%; margin: 0 !important; }
  #congedo > .pannello-crema { grid-column: 2; grid-row: 1; margin: 0 auto !important; max-width: 34rem !important; }
  .congedo-foto img.foto { object-position: 50% 30%; }
}
