/* Landing del libro «64 piccole morti». Fondo notte, un solo oro, nessun dominio esterno.
   Idea: la pagina si spoglia mentre scendi. Il primo schermo è l'unico ornato, la chiusura è nuda. */
@font-face { font-family: Outfit; src: url(/libro-64/fonts/outfit-latin.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url(/libro-64/fonts/playfair-display-latin.woff2) format("woff2"); font-weight: 400 900; font-display: swap; }

:root {
  --notte: #14100E;
  --superficie: #1F1916;
  --avorio: #E9DFD2;
  --secondario: #B8AB9B;
  --oro: #D9A94F;
  --ottone: #C48A3A;
  --carta: #F3EBDD;
  --inchiostro: #1C1210;
  --inchiostro-sec: #5A4A40;
  --focus: #F0D08A;
  --serif: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --sans: Outfit, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--notte); color: var(--avorio); font: 400 1.0625rem/1.65 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--oro); text-underline-offset: .2em; }
a:hover { color: var(--focus); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: 34rem; margin: 0 auto; padding: 0 20px; }
section { padding: clamp(3rem, 9vw, 5.5rem) 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; margin: 0 0 1.1rem; text-wrap: balance; }
h2 { font-size: clamp(1.7rem, 6.2vw, 2.15rem); line-height: 1.2; }
p { margin: 0 0 1.1rem; text-wrap: pretty; }
.kicker { font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--oro); margin: 0 0 1rem; }
.piccolo { font-size: .875rem; color: var(--secondario); }

/* Pulsante: stessa forma e stessa posizione ovunque */
.btn { display: flex; align-items: center; justify-content: center; width: 100%; max-width: 22rem; min-height: 3.4rem; margin: 1.4rem 0 .9rem;
  padding: .8rem 1.4rem; background: var(--oro); color: var(--notte); font: 600 1.0625rem var(--sans); letter-spacing: .02em;
  text-decoration: none; border-radius: 3px; transition: background-color .2s; }
.btn:hover { background: #E6BC6A; color: var(--notte); }
.fatti { font-size: .875rem; color: var(--secondario); margin: 0 0 .3rem; }

/* 1. Hero: l'unico blocco ornato */
.hero { position: relative; text-align: center; padding: 2.4rem 0 3rem; }
.hero::before { content: ""; position: absolute; inset: 14px; pointer-events: none;
  background:
    linear-gradient(var(--ottone), var(--ottone)) left top / 22px 1px no-repeat,
    linear-gradient(var(--ottone), var(--ottone)) left top / 1px 22px no-repeat,
    linear-gradient(var(--ottone), var(--ottone)) right top / 22px 1px no-repeat,
    linear-gradient(var(--ottone), var(--ottone)) right top / 1px 22px no-repeat,
    linear-gradient(var(--ottone), var(--ottone)) left bottom / 22px 1px no-repeat,
    linear-gradient(var(--ottone), var(--ottone)) left bottom / 1px 22px no-repeat,
    linear-gradient(var(--ottone), var(--ottone)) right bottom / 22px 1px no-repeat,
    linear-gradient(var(--ottone), var(--ottone)) right bottom / 1px 22px no-repeat; }
.copertina { position: relative; width: min(46vw, 15rem); margin: 0 auto 1.4rem; box-shadow: 0 14px 40px rgba(0, 0, 0, .55); }
.copertina img { width: 100%; aspect-ratio: 1201 / 2362; max-height: 34svh; width: auto; margin: 0 auto; }
.copertina::after { content: ""; position: absolute; inset: 0; background: var(--notte); opacity: 0; pointer-events: none;
  animation: velo 1.2s .1s ease-out both; }
@keyframes velo { from { opacity: 1; } to { opacity: 0; } }
.hero h1 { font-size: clamp(2.4rem, 11vw, 3.4rem); line-height: 1.05; margin-bottom: .5rem; }
.sottotitolo { font-family: var(--serif); font-size: 1.15rem; line-height: 1.35; color: var(--oro); margin: 0 0 1rem; }
.prezzo { font-size: 1.5rem; font-weight: 600; margin: 0; }
.hero .btn { margin-left: auto; margin-right: auto; }

/* Sfondi velati: tavole del libro dietro l'apertura e cinque sezioni, sfumate ai bordi, mai sopra il testo */
.con-sfondo { position: relative; isolation: isolate; overflow: hidden; }
.sfondo { position: absolute; left: 50%; top: 50%; z-index: -1; width: min(100%, 52rem); height: 100%; max-width: none;
  transform: translate(-50%, -50%); object-fit: cover; opacity: var(--op, .2); pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse closest-side at 50% 50%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse closest-side at 50% 50%, #000 40%, transparent 100%); }

.hero .sfondo { --op: .34; }
.soglia .sfondo { --op: .32; }
.adesso .sfondo, .frasi .sfondo { --op: .28; }

/* 2. Soglia */
.soglia { text-align: center; padding: clamp(4rem, 14vw, 7rem) 0; }
.soglia::before { content: ""; display: block; width: 36px; height: 1px; background: var(--ottone); margin: 0 auto 2.2rem; }
.soglia p { font-family: var(--serif); font-size: clamp(1.55rem, 6.4vw, 2.1rem); line-height: 1.3; margin: 0; }

/* 3-4 */
.non-e { list-style: none; margin: 1.6rem 0 0; padding: 0; }
.non-e li { padding: 1rem 0; border-top: 1px solid rgba(196, 138, 58, .28); }
.non-e li:last-child { border-bottom: 1px solid rgba(196, 138, 58, .28); }
.non-e strong { display: block; font-weight: 600; }
.non-e em { display: block; font-style: normal; color: var(--secondario); font-size: .95rem; }
.parti { padding-left: 1.2rem; margin: 0 0 1.4rem; }
.parti li { margin-bottom: .5rem; padding-left: .2rem; }
.parti li::marker { color: var(--ottone); }

/* 5. La tappa campione: l'unica zona chiara, come la pagina bianca del libro */
.carta { background: var(--carta); color: var(--inchiostro); }
.carta .kicker { color: #7A4F1E; }
.carta h2 { margin-bottom: .6rem; }
.carta .epigrafe { font-family: var(--serif); font-size: 1.25rem; line-height: 1.35; margin: 0 0 1.4rem; padding-left: 1rem; border-left: 2px solid #7A4F1E; }
.carta .taglio { color: var(--inchiostro-sec); margin: 0 0 1.1rem; }
.carta .domanda { font-family: var(--serif); margin-top: 1.4rem; }
.carta .piccolo { color: var(--inchiostro-sec); }

/* 6. Frasi */
.frasi blockquote { margin: 0 0 2.2rem; padding-left: 1.1rem; border-left: 2px solid var(--ottone); }
.frasi blockquote:last-child { margin-bottom: 0; }
.frasi p { font-family: var(--serif); font-size: clamp(1.25rem, 5vw, 1.5rem); line-height: 1.4; margin: 0 0 .5rem; }
.frasi cite { font-style: normal; font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--secondario); }

/* Carosello: senza JavaScript le frasi restano tutte visibili, una sotto l'altra */
.js .slides { display: grid; }
.js .slide { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transition: opacity .6s, visibility .6s; }
.js .slide.attiva { opacity: 1; visibility: visible; }
.comandi { display: none; align-items: center; gap: 1rem; margin-top: 1.6rem; }
.js .comandi { display: flex; }
.pausa { width: 2.75rem; height: 2.75rem; border: 1px solid var(--ottone); border-radius: 50%; background: transparent; color: var(--oro); font: 600 .8rem var(--sans); cursor: pointer; }
.pausa:hover { background: rgba(217, 169, 79, .15); }
.punti { display: flex; gap: .2rem; }
.punto { position: relative; width: 2.75rem; height: 2.75rem; border: 0; background: transparent; cursor: pointer; padding: 0; }
.punto::after { content: ""; position: absolute; left: 50%; top: 50%; width: .6rem; height: .6rem; margin: -.3rem 0 0 -.3rem; border-radius: 50%; background: var(--secondario); opacity: .55; transition: opacity .3s, background-color .3s; }
.punto:hover::after { opacity: 1; }
.punto.attiva::after { background: var(--oro); opacity: 1; }

/* 7. Per chi è */
.due { display: grid; gap: 2rem; }
.due ul { list-style: none; padding: 0; margin: 0; }
.due li { position: relative; padding-left: 1.4rem; margin-bottom: .8rem; }
.due li::before { content: ""; position: absolute; left: 0; top: .85em; width: .8rem; height: 1px; background: var(--ottone); }

/* 8. Perché adesso */
.adesso .grande { font-family: var(--serif); font-size: clamp(1.4rem, 5.6vw, 1.8rem); line-height: 1.35; margin: 1.8rem 0 0; }

/* 9. Autrice */
.autrice { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1.2rem; align-items: start; }
.autrice img { width: 6.5rem; height: 6.5rem; border-radius: 50%; object-fit: cover; }
.autrice h2 { font-size: 1.5rem; margin-bottom: .6rem; }
.nota { margin-top: 1.6rem; padding-top: 1.1rem; border-top: 1px solid rgba(196, 138, 58, .28); }

/* 10. FAQ */
details { border-top: 1px solid rgba(196, 138, 58, .28); }
details:last-of-type { border-bottom: 1px solid rgba(196, 138, 58, .28); }
summary { cursor: pointer; list-style: none; min-height: 3rem; padding: .9rem 2rem .9rem 0; position: relative; font-weight: 500; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: .2rem; top: .75rem; color: var(--oro); font-size: 1.4rem; line-height: 1; }
details[open] summary::after { content: "\2212"; }
details p { padding-right: 2rem; color: var(--secondario); margin-bottom: 1.1rem; }

/* 11. Chiusura nuda: parole e pulsante su fondo vuoto */
.chiusura { text-align: center; padding: clamp(5rem, 16vw, 8rem) 0 clamp(4rem, 12vw, 6rem); }
.chiusura .frase { font-family: var(--serif); font-size: clamp(1.6rem, 6.6vw, 2.2rem); line-height: 1.3; margin: 0 0 .4rem; }
.chiusura .btn { margin-left: auto; margin-right: auto; }

footer { padding: 2rem 0 3rem; font-size: .85rem; color: var(--secondario); text-align: center; }
footer a { color: var(--secondario); }

@media (min-width: 700px) {
  body { font-size: 1.125rem; }
  .wrap { max-width: 36rem; }
  .copertina img { max-height: 46svh; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .copertina::after { animation-duration: .2s; animation-delay: 0s; }
  .btn { transition: none; }
}
