@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/eb-garamond-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/eb-garamond-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'EB Garamond'; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/eb-garamond-latin-400-italic.woff2) format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/playfair-display-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: italic; font-weight: 700; font-display: swap; src: url(fonts/playfair-display-latin-700-italic.woff2) format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/playfair-display-latin-400-italic.woff2) format('woff2'); }
@font-face { font-family: 'Cinzel'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/cinzel-latin-600-normal.woff2) format('woff2'); }

:root { --ink: #0b0907; --ink2: #15100c; --ink3: #1e1812; --paper: #d9ceb7; --paper2: #f0e7d3; --muted: #a39982; --line: #3b3127; --brass: #b99a62; --stamp: #c4452f; --stamp2: #dd5a42; --ok: #cdbf86; --red: #b0301f; --red2: #c63a28; --cream: #fbf1dc;
  --disp: 'Playfair Display', Georgia, 'Times New Roman', serif; --lab: 'Cinzel', 'Trajan Pro', Georgia, serif; --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;  }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--ink); color: var(--paper); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { position: relative; margin: 0; min-height: 100vh; min-height: 100dvh; font-family: var(--serif); font-size: 1.25rem; line-height: 1.5; overflow-x: hidden; background: var(--ink); }
h1, h2, h3 { font-weight: 700; margin: 0; line-height: 1.12; }
p { margin: 0 0 .9rem; }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--ok); outline-offset: 3px; }
.defs { position: absolute; width: 0; height: 0; }

/* grana di pellicola su tutta la pagina */
.grain { position: fixed; inset: -60px; z-index: 90; pointer-events: none; opacity: .1; 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 type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@media (prefers-reduced-motion: no-preference) { .grain { animation: grain .8s steps(6) infinite; } }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-30px, 18px); } 40% { transform: translate(22px, -26px); } 60% { transform: translate(-14px, -30px); } 80% { transform: translate(28px, 24px); } 100% { transform: translate(0, 0); } }

/* ---------- La stanza: muro, scena e indizi (si vedono solo dove arriva la torcia) ---------- */
.world { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.wall { position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,0) 14%, rgba(0,0,0,0) 86%, rgba(0,0,0,.55)),
  repeating-linear-gradient(90deg, rgba(255,226,180,.05) 0 1px, rgba(0,0,0,0) 1px 86px),
  repeating-linear-gradient(0deg, rgba(0,0,0,.0) 0 640px, rgba(0,0,0,.35) 640px 644px, rgba(255,226,180,.07) 644px 646px, rgba(0,0,0,0) 646px 1100px),
  linear-gradient(180deg, #33241a 0%, #20160f 40%, #2a1d14 100%); }
.dark { position: fixed; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.hero, main, footer { position: relative; z-index: 2; }
.scene { position: absolute; left: 0; top: 0; width: 100%; height: 100vh; --d: 300px; }
.print { position: absolute; left: 50%; top: 50%; width: var(--d); height: var(--d); transform: translate(-50%, -50%); }
.print svg { display: block; width: 100%; height: 100%; overflow: visible; }
.print .ridge { fill: none; stroke: #e2d6bb; stroke-width: 1.35; stroke-linecap: round; opacity: .78; }
.print .oval { fill: rgba(255, 238, 205, .035); stroke: none; }
.print .ret { fill: none; stroke: var(--brass); stroke-width: .8; opacity: .8; }
.print .retx { stroke: var(--brass); stroke-width: 1.2; }
.print .mk { fill: none; stroke: var(--stamp2); stroke-width: 1.6; }
.print .ln { stroke: var(--stamp2); stroke-width: .7; opacity: .8; }
.print text { font-family: var(--lab); fill: var(--brass); font-size: 7.4px; letter-spacing: 1.8px; }
.print text.red { fill: var(--stamp2); }
@media (prefers-reduced-motion: no-preference) { .print .spin { animation: spin 120s linear infinite; } .print .spin2 { animation: spin 70s linear infinite reverse; } }
@keyframes spin { to { transform: rotate(360deg); } }
.pin { position: absolute; top: -.4rem; left: 50%; width: .95rem; height: .95rem; margin-left: -.475rem; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #ffb199 0, #e0523a 28%, #a82a18 62%, #55120a 100%); box-shadow: 0 4px 6px rgba(0,0,0,.65), inset 0 -2px 3px rgba(0,0,0,.35); }
.pin::after { content: ''; position: absolute; left: 24%; top: 18%; width: 28%; height: 22%; border-radius: 50%; background: rgba(255,255,255,.75); transform: rotate(-30deg); }
.pin.core { top: 50%; margin-top: -.75rem; width: 1.5rem; height: 1.5rem; margin-left: -.75rem; }
.etag { position: absolute; left: var(--x); top: var(--y); width: var(--tw, 7.6rem); transform: translate(-50%, -50%) rotate(var(--r)); padding: .95rem .7rem .7rem; color: #2b1d12; background: linear-gradient(162deg, #e0cfa6 0%, #cdb78a 60%, #bfa97b 100%); border-radius: 3px 3px 5px 5px; box-shadow: 0 12px 22px rgba(0,0,0,.7); text-align: left; }
.etag::before { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(60,40,20,.28); border-radius: 2px; pointer-events: none; }
.etag .c { display: block; font: 600 .56rem/1 var(--lab); letter-spacing: .24em; color: #7a2617; text-transform: uppercase; margin-bottom: .35rem; }
.etag b { display: block; font: italic 700 1.04rem/1.08 var(--disp); }
.etag .s { display: block; margin-top: .3rem; font: italic 400 .8rem/1.15 var(--serif); color: #4b3a29; }
.e1 { --x: 17%; --y: 13%; --r: -6deg; } .e2 { --x: 80%; --y: 30%; --r: 5deg; } .e3 { --x: 19%; --y: 91%; --r: -3deg; }
.thread { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.thread path, .fthread path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ba { stroke: #b0301f; stroke-width: 3.2; stroke-dasharray: 1; stroke-dashoffset: 0; filter: drop-shadow(0 4px 3px rgba(0,0,0,.7)); }
.gl { stroke: rgba(226, 80, 56, .3); stroke-width: 11; stroke-dasharray: 1; stroke-dashoffset: 0; filter: blur(5px); }
.tw { stroke: #f4937a; stroke-width: 1.3; stroke-dasharray: 2 6; opacity: .8; }
html.js .ba, html.js .gl { stroke-dashoffset: 1; } html.js .tw { opacity: 0; }
html.js .go .ba, html.js .go .gl { stroke-dashoffset: 0; transition: stroke-dashoffset 2.8s cubic-bezier(.4, .1, .2, 1) .6s; }
html.js .go .tw { opacity: .8; transition: opacity 1s ease 3s; }
.secrets { position: absolute; inset: 0; }
.si { position: absolute; left: 0; top: 0; color: var(--paper); transform-origin: 50% 50%; }
.si .fx { display: block; transform-origin: 50% 50%; }
.si svg { display: block; overflow: visible; }
.si.note { width: 13.2rem; padding: .55rem .8rem .6rem; border: 1px solid rgba(217,206,183,.5); border-left: 3px solid var(--stamp2); background: rgba(31,24,17,.55); font: italic 400 1.08rem/1.3 var(--disp); color: #eadfc6; }
.si.note .nh { display: block; margin-bottom: .3rem; font: 600 .5rem/1 var(--lab); letter-spacing: .26em; text-transform: uppercase; color: var(--stamp2); }
.si.note .cx { display: block; font: 600 .78rem/1.5 var(--lab); letter-spacing: .24em; color: var(--paper2); }
.si.note .nk { display: block; margin-top: .4rem; font-size: .86rem; color: #b9ae96; }
.si[hidden] { display: none; }
/* gli indizi si animano solo mentre la torcia li illumina (classe .on, messa da app.js) */
@media (prefers-reduced-motion: no-preference) {
  .si.on .fx { animation: drift 5.5s ease-in-out infinite alternate; }
  .si.note .tx { display: block; clip-path: inset(0 100% 0 0); }
  .si.note.on .tx { animation: typed 2.2s steps(22, end) .15s forwards; }
  .si.rubber.on .fx { animation: thud .55s cubic-bezier(.2, 1.5, .35, 1) both; }
  .si .dw { stroke-dasharray: 1; stroke-dashoffset: 0; }
  .si.on .dw { animation: draw 2.4s cubic-bezier(.5, 0, .2, 1) both; }
  .si.on .dw2 { animation: draw 1.6s cubic-bezier(.5, 0, .2, 1) 1.4s both; }
  .si .halfL, .si .halfR, .si .leaf, .si .hl { transform-box: fill-box; transition: transform 1.1s cubic-bezier(.3, .8, .2, 1); }
  .si.on .halfL { transform: translate(-7px, 1px) rotate(-3deg); } .si.on .halfR { transform: translate(7px, -1px) rotate(2.5deg); }
  .si .leaf { transform-origin: 0 50%; } .si.on .leaf { transform: scaleX(.28); }
  .si.swing.on .fx { transform-origin: 14% 24%; animation: swing 2.6s ease-in-out infinite alternate; }
  .si.sweep.on .fx { animation: sweep 3.4s ease-in-out infinite alternate; }
  .si.note.on .fx { animation: none; }
  .si .hand { transform-box: view-box; transform-origin: 42px 42px; }
  .si.on .hand { animation: stopat 2.4s cubic-bezier(.12, .7, .2, 1) both; }
  .si.on .hand.h { --a: -360deg; } .si.on .hand.m { --a: -1800deg; animation-duration: 2.8s; }
  .si .scan { transform: translateY(0); } .si.on .scan { animation: scan 2.4s ease-in-out infinite alternate; }
  .si .q { transform-box: fill-box; transform-origin: 50% 60%; } .si.on .q { animation: pulse 1.5s ease-in-out infinite alternate; }
  .si .glow { opacity: 0; transition: opacity 1.2s ease .2s; } .si.on .glow { opacity: 1; }
}
@keyframes stopat { from { transform: rotate(var(--a, -360deg)); } to { transform: none; } }
@keyframes swing { from { transform: rotate(-9deg); } to { transform: rotate(8deg); } }
@keyframes sweep { from { transform: translate(-16px, -2px) rotate(-6deg); } to { transform: translate(20px, 6px) rotate(5deg); } }
@keyframes scan { from { transform: translateY(0); } to { transform: translateY(75px); } }
@keyframes pulse { from { transform: scale(.9); opacity: .65; } to { transform: scale(1.16); opacity: 1; } }
@keyframes drift { from { transform: translateY(-2px) rotate(-1.2deg); } to { transform: translateY(3px) rotate(1.2deg); } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes typed { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes thud { 0% { transform: scale(1.7) rotate(-9deg); opacity: 0; } 55% { opacity: 1; } 100% { transform: none; opacity: 1; } }

/* ---------- Scena iniziale ---------- */
.hero { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; overflow: hidden; padding: 0 1.2rem 7.8rem; }
.slot { flex: 1 1 auto; min-height: 17rem; }
.hero-in { position: relative; max-width: 62rem; width: 100%; margin: 0 auto; }
h1 { font: 600 clamp(1.9rem, 9.2vw, 5rem)/1 var(--lab); letter-spacing: .2em; margin: 0 -.2em .7rem 0; white-space: nowrap; color: var(--paper2); text-shadow: 0 0 34px rgba(0,0,0,.9), 0 2px 0 rgba(0,0,0,.5); }
.ch { position: relative; display: inline-block; }
.ch.dot::before { content: ''; position: absolute; left: 50%; top: -.17em; width: .105em; height: .105em; margin-left: -.0525em; border-radius: 50%; background: var(--stamp); box-shadow: 0 0 .45em var(--stamp); }
@media (prefers-reduced-motion: no-preference) {
  html.js .ch { opacity: 0; filter: blur(9px); animation: rise .9s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: calc(.35s + var(--i, 0) * .09s); }
  html.js .ch.dot::before { animation: dotp 2.6s ease-in-out 1.6s infinite; }
}
@keyframes rise { from { opacity: 0; transform: translateY(.35em); filter: blur(9px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes dotp { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.kicker { font: 700 clamp(1.2rem, 4.9vw, 1.8rem)/1.25 var(--disp); letter-spacing: .005em; color: var(--stamp2); margin: 0 0 1.05rem; text-shadow: 0 2px 12px rgba(0,0,0,.95); }
.hook { max-width: 34rem; margin: 0 0 .7rem; font: italic 700 clamp(1.6rem, 6.4vw, 2.5rem)/1.1 var(--disp); color: var(--cream); text-shadow: 0 2px 16px rgba(0,0,0,.98); }
.hook .redact { position: relative; white-space: nowrap; }
.hook .redact::after { inset: .1em -.14em .0; background: #000; box-shadow: 0 0 0 1px rgba(0,0,0,.6); }
@media (prefers-reduced-motion: no-preference) { html.js .hook { opacity: 0; animation: rise 1s cubic-bezier(.2, .8, .2, 1) 1.5s forwards; } }
.lead { max-width: 31rem; font-size: clamp(1.1rem, 4.2vw, 1.34rem); line-height: 1.42; color: var(--paper2); text-shadow: 0 2px 14px rgba(0,0,0,.98); margin-bottom: 1.1rem; }
.hint { font: 600 .62rem/1.3 var(--lab); letter-spacing: .22em; color: var(--brass); text-transform: uppercase; margin: 0 0 1rem; }
.hint .t { display: none; } @media (hover: none) { .hint .t { display: inline; } .hint .m { display: none; } }
.cta { display: inline-flex; align-items: center; justify-content: center; gap: .8rem; min-height: 3.5rem; max-width: 100%; padding: .85rem 1.4rem; font: 600 .9rem/1.25 var(--lab); letter-spacing: .13em; text-transform: uppercase; text-align: center; color: var(--cream); background: var(--red); border-radius: 2px; text-decoration: none; box-shadow: 0 10px 26px rgba(0,0,0,.55), 0 0 28px rgba(176,48,31,.35), inset 0 0 0 3px var(--red), inset 0 0 0 4px rgba(251,241,220,.4); transition: transform .15s, background .15s; }
.cta:hover { background: var(--red2); transform: translateY(-2px); } .cta:active { transform: translateY(0); }
.cta i { font-style: normal; display: inline-block; }
@media (prefers-reduced-motion: no-preference) { .cta i { animation: nudge 1.6s ease-in-out infinite; } }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
.cta2 { display: inline-block; margin-top: .95rem; padding: .5rem 0; font: italic 400 1.1rem/1.2 var(--serif); color: var(--paper); text-decoration: none; border-bottom: 1px solid var(--brass); text-shadow: 0 2px 10px rgba(0,0,0,.95); }
.cta2:hover { color: #fff; border-color: var(--stamp2); }
.tape { position: absolute; z-index: 4; left: -6%; right: -6%; bottom: 2.1rem; transform: rotate(-2.4deg); background: var(--stamp); color: #1c0904; overflow: hidden; white-space: nowrap; font: 600 .82rem/1 var(--lab); letter-spacing: .3em; padding: .62rem 0; box-shadow: 0 8px 26px rgba(0,0,0,.7); text-transform: uppercase; }
.tape .track { display: inline-flex; }
.tape span { padding-right: 1.4rem; flex: none; }
@media (prefers-reduced-motion: no-preference) { .tape .track { animation: tape 34s linear infinite; } }
@keyframes tape { to { transform: translateX(-50%); } }

@media (min-width: 52rem) and (min-aspect-ratio: 5/4) {
  .hero { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr); align-items: center; column-gap: 1.5rem; padding: 0 max(3rem, calc((100% - 80rem) / 2)) 8.4rem; }
  .hero-in { grid-column: 1; grid-row: 1; margin: 0; max-width: 40rem; }
  .slot { grid-column: 2; grid-row: 1; align-self: stretch; min-height: 30rem; }
  h1 { font-size: clamp(2.6rem, 4.4vw, 4.6rem); }
  .etag { --tw: 10.4rem; } .etag b { font-size: 1.2rem; } .e3 { --tw: 12.6rem; }
}
@media (max-width: 51.99rem), (max-aspect-ratio: 5/4) { .etag { --tw: 6.7rem; padding: .85rem .55rem .55rem; } .etag b { font-size: .92rem; } .etag .s { font-size: .72rem; } .e3 { --tw: 8rem; } .e1 { --x: 21%; --y: 27%; } .e2 { --x: 80%; --y: 30%; } .e3 { --x: 27%; --y: 73%; } }

/* ---------- Fascicoli ---------- */
.sec { position: relative; max-width: 62rem; margin: 0 auto; padding: 4.8rem 1.2rem 2rem; }
.sec h2 { font: 700 clamp(2rem, 7.4vw, 3.1rem)/1.05 var(--disp); color: var(--paper2); margin-bottom: .4rem; }
.sec h2::after { content: ''; display: block; width: 6.5rem; height: 1px; background: linear-gradient(90deg, var(--brass), rgba(185,154,98,0)); margin-top: .8rem; }
.sec-sub { margin: .9rem 0 0; max-width: 32rem; font: italic 400 1.2rem/1.4 var(--serif); color: var(--muted); }
.files { position: relative; display: grid; gap: 5.2rem; grid-template-columns: 1fr; margin-top: 3.6rem; }
@media (min-width: 56rem) { .files { grid-template-columns: repeat(3, 1fr); gap: 1.8rem; align-items: stretch; margin-top: 4rem; } }

/* il filo che lega i tre fascicoli: una corda tesa tra le linguette, con una didascalia */
.fthread { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 5; }
.fthread path { fill: none; stroke-linecap: round; }
.fthread .ba { stroke: #c23a27; stroke-width: 3; filter: drop-shadow(0 3px 3px rgba(0,0,0,.7)); }
.fthread .gl { stroke: rgba(226, 80, 56, .34); stroke-width: 9; filter: blur(4px); }
.fthread .tw { stroke: #ffc3ae; stroke-width: 1.6; stroke-dasharray: 2 14; }
.fthread .kn { fill: #d24a33; stroke: #f1d9b0; stroke-width: 1.4; filter: drop-shadow(0 2px 2px rgba(0,0,0,.7)); }
html.js .fthread .kn { opacity: 0; transition: opacity .5s ease 2.6s; } html.js .fthread.go .kn { opacity: 1; }
@media (prefers-reduced-motion: no-preference) { html.js .fthread.go .tw { animation: flow 2.6s linear infinite; } }
@keyframes flow { to { stroke-dashoffset: -32; } }
.rlab { position: absolute; left: 0; top: 0; z-index: 6; pointer-events: none; white-space: nowrap; font: 600 .62rem/1 var(--lab); letter-spacing: .2em; text-transform: uppercase; color: #d8bd84; text-shadow: 0 2px 8px #000, 0 0 3px #000; }
.rlab.h { translate: -50% calc(-100% - .6rem); } .rlab.v { translate: .95rem -50%; }
html.js .rlab { opacity: 0; transition: opacity .8s ease 2.2s; } html.js .files:has(.fthread.go) .rlab { opacity: 1; }

.fasc { position: relative; z-index: 1; background: linear-gradient(180deg, #221b14, #15100c); border: 1px solid var(--line); border-radius: 3px 10px 4px 4px; padding: 1.7rem 1.15rem 1.15rem; box-shadow: 0 24px 46px rgba(0,0,0,.65), inset 0 0 0 5px rgba(255,235,200,.015), inset 0 0 0 6px rgba(185,154,98,.1); display: flex; flex-direction: column; overflow: visible; }
.fasc .tab { position: absolute; z-index: 7; top: -1.7rem; left: 1rem; background: var(--red); color: var(--cream); font: 600 .72rem/1 var(--lab); letter-spacing: .22em; padding: .62rem .95rem .52rem; border-radius: 5px 5px 0 0; text-transform: uppercase; box-shadow: 0 -2px 14px rgba(176,48,31,.35); }
html.js .reveal { opacity: 0; transform: translateY(46px); }
html.js .reveal.in { opacity: 1; transform: none; transition: opacity .8s ease, transform 1s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--d, 0s); }
@media (hover: hover) { .fasc.in { transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s; } .fasc.in:hover { transform: translateY(-6px); box-shadow: 0 34px 60px rgba(0,0,0,.7); } }

/* il libro: un brossurato vero, sottile, con dorso, taglio delle pagine, piega della copertina e riflesso */
.stage { position: relative; perspective: 1200px; display: flex; justify-content: center; align-items: flex-end; height: 20rem; padding: 1.2rem 0 1.7rem; margin-bottom: .6rem; }
.stage::before { content: ''; position: absolute; inset: 4% 4% 10%; background: radial-gradient(closest-side, rgba(255, 205, 140, .2), rgba(255, 205, 140, 0)); pointer-events: none; }
.stage::after { content: ''; position: absolute; left: 20%; right: 8%; bottom: .75rem; height: 1.05rem; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.85), rgba(0,0,0,0)); pointer-events: none; }
.sway { position: relative; z-index: 1; transform-style: preserve-3d; width: min(var(--bw, 10.6rem), 68%); }
@media (prefers-reduced-motion: no-preference) { .sway { animation: bob 6.5s ease-in-out infinite alternate; } .f2 .sway { animation-delay: -2.2s; } .f3 .sway { animation-delay: -4.4s; } }
@keyframes bob { from { transform: translateY(0) rotateY(-3.5deg); } to { transform: translateY(-7px) rotateY(3.5deg); } }
.book { --D: .85rem; position: relative; width: 100%; aspect-ratio: 2 / 3; transform-style: preserve-3d; transform: rotateX(var(--rx, -8deg)) rotateY(var(--ry, 27deg)); transition: transform .3s ease-out; }
.f1 .book { --spine: #1f140e; } .f2 .book { --spine: #1a1410; } .f3 .book { --spine: #1d140c; }
.book .front, .book .back, .book .spine, .book .pages, .book .top { position: absolute; backface-visibility: visible; }
.book .front { inset: 0; transform: translateZ(calc(var(--D) / 2)); background: #120d09; overflow: hidden; border-radius: 1px 3px 3px 1px; }
.front img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.gloss { position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(90deg, rgba(0,0,0,.55) 0, rgba(0,0,0,0) 1.6%, rgba(255,255,255,.2) 2.9%, rgba(0,0,0,.34) 4.3%, rgba(0,0,0,0) 8.5%),
    linear-gradient(110deg, rgba(255,255,255,0) 32%, rgba(255,255,255,.2) 43%, rgba(255,255,255,0) 54%),
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(0,0,0,.14));
  background-size: 100% 100%, 280% 100%, 100% 100%; background-repeat: no-repeat; background-position: 0 0, 130% 0, 0 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.07), inset -7px 0 14px rgba(0,0,0,.2); }
@media (prefers-reduced-motion: no-preference) { .gloss { animation: glint 9s ease-in-out infinite; } .f2 .gloss { animation-delay: -3s; } .f3 .gloss { animation-delay: -6s; } }
@keyframes glint { 0%, 58% { background-position: 0 0, 130% 0, 0 0; } 92%, 100% { background-position: 0 0, -30% 0, 0 0; } }
.book .back { inset: 0; transform: translateZ(calc(var(--D) / -2)); background: #0a0806; }
.book .spine { top: 0; bottom: 0; left: calc(var(--D) / -2); width: var(--D); transform: rotateY(-90deg); display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(255,255,255,.12) 42%, rgba(0,0,0,.42)), var(--spine, #1a130d); }
.book .spine span { writing-mode: vertical-rl; transform: rotate(180deg); font: 600 .42rem/1 var(--lab); letter-spacing: .2em; color: var(--paper2); opacity: .8; text-transform: uppercase; white-space: nowrap; }
.book .pages { top: 1.5px; bottom: 1.5px; right: calc(var(--D) / -2); width: calc(var(--D) - 2px); transform: rotateY(90deg); background: repeating-linear-gradient(0deg, #f0e7d2 0 1.1px, #d3c7ac 1.1px 2.2px); box-shadow: inset 0 0 7px rgba(0,0,0,.4); }
.book .top { left: 1px; right: 1px; top: calc(var(--D) / -2); height: calc(var(--D) - 2px); transform: rotateX(90deg); background: repeating-linear-gradient(90deg, #f0e7d2 0 1.1px, #d3c7ac 1.1px 2.2px); box-shadow: inset 0 0 7px rgba(0,0,0,.35); }
.ph svg { display: block; width: 100%; height: 100%; }
.ph text { font-family: var(--lab); font-weight: 600; }

.stamp { position: absolute; z-index: 4; left: 50%; bottom: 2.6rem; margin: 0; translate: -50% 0; transform: rotate(-6deg); white-space: nowrap; font: 600 .72rem/1 var(--lab); letter-spacing: .22em; text-transform: uppercase; color: var(--stamp2); border: 3px double var(--stamp2); padding: .5rem .75rem .45rem; background: rgba(11,9,7,.6); text-shadow: 0 0 1px var(--stamp2); filter: url(#rough); }
.fasc h3 { font: 700 1.62rem/1.12 var(--disp); color: var(--paper2); margin-bottom: .4rem; }
.fasc .sub { font: 600 .66rem/1.5 var(--lab); letter-spacing: .17em; color: var(--brass); text-transform: uppercase; margin: 0 0 .7rem; }
.tag { display: table; margin: .55rem 0 0; padding: .22rem .55rem .18rem; border: 1px solid var(--stamp2); color: var(--stamp2); border-radius: 2px; font: 600 .58rem/1.2 var(--lab); letter-spacing: .2em; }
.fasc p.storia { margin: .15rem 0 .75rem; padding: .1rem 0 .1rem .85rem; border-left: 2px solid var(--stamp); font: italic 400 1.08rem/1.42 var(--disp); color: var(--paper2); }
.fasc p.riga { min-height: 1.4rem; margin: 0 0 .5rem; font-size: 1rem; line-height: 1.4; color: var(--muted); }
.actions { margin-top: auto; padding-top: .6rem; }
.btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 3.3rem; margin: 0 0 .6rem; padding: calc(.7rem + 2.5px) 1rem .7rem calc(1rem + .15em); font: 600 .8rem/1.2 var(--lab); letter-spacing: .15em; text-transform: uppercase; text-align: center; color: var(--paper); background: var(--ink3); border: 1px solid var(--line); border-radius: 2px; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
.btn:hover { background: #2b2219; border-color: var(--brass); } .btn:active { background: #2e261f; }
.btn.main { background: var(--red); color: var(--cream); border-color: var(--red); box-shadow: inset 0 0 0 2px var(--red), inset 0 0 0 3px rgba(251,241,220,.4); } .btn.main:hover { background: var(--red2); border-color: var(--red2); box-shadow: inset 0 0 0 2px var(--red2), inset 0 0 0 3px rgba(251,241,220,.5); } .btn.main:active { background: #8f2518; border-color: #8f2518; }
.btn[aria-disabled=true] { opacity: .45; cursor: default; } .btn[aria-disabled=true]:hover { background: var(--ink3); border-color: var(--line); }
.door { margin: .2rem 0 .8rem; padding-top: .8rem; border-top: 1px dashed var(--line); animation: fade .3s ease-out; }
.door[hidden] { display: none; }
@keyframes fade { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
label { display: block; font: 600 .66rem/1.4 var(--lab); letter-spacing: .2em; text-transform: uppercase; color: var(--brass); margin: 0 0 .4rem; }
input { width: 100%; min-height: 3.3rem; font: 600 1.15rem var(--lab); letter-spacing: .2em; text-transform: uppercase; text-align: center; color: var(--paper2); background: var(--ink); border: 1px solid var(--line); border-radius: 2px; padding: .4rem .8rem; margin-bottom: .6rem; }
.err { color: var(--stamp2); font: italic 400 1.05rem/1.3 var(--serif); min-height: 1.4rem; margin: 0 0 .4rem; }

/* ---------- Come si entra ---------- */
.steps { list-style: none; margin: 2.6rem 0 0; padding: 0; display: grid; gap: 2rem; counter-reset: s; }
@media (min-width: 52rem) { .steps { grid-template-columns: repeat(3, 1fr); gap: 2.2rem; } }
.steps li { position: relative; padding-left: 4.6rem; counter-increment: s; }
.steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: -.35rem; font: italic 700 3.5rem/1 var(--disp); color: transparent; -webkit-text-stroke: 1.2px var(--stamp2); }
.steps h3 { font: 700 1.28rem/1.2 var(--disp); color: var(--paper2); margin-bottom: .25rem; }
.steps p { color: var(--muted); font-size: 1.12rem; margin: 0; }
.redact { position: relative; }
.redact::after { content: ''; position: absolute; inset: .12em -.12em .02em; background: #000; transform-origin: right center; transition: transform .8s cubic-bezier(.6, 0, .2, 1) .25s; }
.redact.in::after { transform: scaleX(0); }
html:not(.js) .redact::after { display: none; }
footer { max-width: 62rem; margin: 3.5rem auto 0; padding: 1.2rem 1.2rem max(1.6rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 1rem; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; justify-content: space-between; }
footer a { text-decoration: none; border-bottom: 1px solid var(--line); }
noscript p { color: var(--muted); }
html:not(.js) .world, html:not(.js) .dark { display: none; }
html:not(.js) .rlab, html:not(.js) .fthread { display: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } html.js .ba, html.js .gl { stroke-dashoffset: 0 !important; transition: none !important; } html.js .tw { opacity: .8; transition: none !important; } html.js .reveal { opacity: 1; transform: none; } .hook { opacity: 1; } html.js .fthread .kn, html.js .rlab { opacity: 1; transition: none; } }


/* proporzioni delle copertine (generato da build.mjs) */
.fasc[data-ar="0.64"] .book { aspect-ratio: 0.64; }
.fasc[data-ar="0.64"] .sway { --bw: 10.45rem; }
.fasc[data-ar="1"] .book { aspect-ratio: 1; }
.fasc[data-ar="1"] .sway { --bw: 12.22rem; }
