/* Ms. Addams | Atmosfera cinematográfica da biblioteca.
   Sem dependências, sem alteração do conteúdo ou do Supabase. */
body.addams-cinematic .hero{
  isolation:isolate;
  --addams-light-x:50%;
  --addams-light-y:39%;
  --addams-parallax-x:0px;
  --addams-parallax-y:0px;
}
body.addams-cinematic .hero .hero-arch{z-index:1;transform:translate(calc(-50% + var(--addams-parallax-x)),calc(-50% + var(--addams-parallax-y)));transition:transform .65s cubic-bezier(.2,.7,.25,1)}
body.addams-cinematic .hero .arch-inner{animation:addams-breathe 9s ease-in-out infinite}
@keyframes addams-breathe{0%,100%{box-shadow:inset 0 0 35px #d8a0b60a;opacity:.85}50%{box-shadow:inset 0 0 70px #d8a0b628,0 0 24px #dcafad12;opacity:1}}
body.addams-cinematic .hero .hero-content{z-index:4}
body.addams-cinematic .hero .hero-glow{position:absolute;inset:-20%;z-index:0;pointer-events:none;background:radial-gradient(ellipse 34% 28% at var(--addams-light-x) var(--addams-light-y),#bf80913a 0%,#8c62731c 49%,transparent 100%);filter:blur(28px);animation:addams-glow 12s ease-in-out infinite alternate}
@keyframes addams-glow{from{opacity:.52;scale:1}to{opacity:.95;scale:1.06}}
body.addams-cinematic .hero .addams-dust{position:absolute;inset:0;z-index:2;pointer-events:none;overflow:hidden}
body.addams-cinematic .hero .addams-mote{position:absolute;left:var(--dust-x);top:var(--dust-y);height:var(--dust-size);width:var(--dust-size);border-radius:50%;background:#f3d6cf;opacity:.21;box-shadow:0 0 12px 3px #e6abb742;animation:addams-drift var(--dust-duration) ease-in-out var(--dust-delay) infinite alternate;will-change:transform,opacity}
@keyframes addams-drift{0%{transform:translate3d(-5px,9px,0);opacity:.08}55%{opacity:.36}100%{transform:translate3d(13px,-18px,0);opacity:.12}}
body.addams-cinematic .hero .kicker{animation:addams-enter .95s .1s both}
body.addams-cinematic .hero .filigree{animation:addams-enter 1s .3s both}
body.addams-cinematic .hero h1{animation:addams-title-in 1.25s .42s both}
body.addams-cinematic .hero .hero-subhead{animation:addams-enter 1.05s .8s both}
body.addams-cinematic .hero .hero-quote{animation:addams-enter 1.05s 1.04s both}
body.addams-cinematic .hero .btn-light{animation:addams-enter .9s 1.22s both}
@keyframes addams-enter{from{opacity:0;translate:0 16px;filter:blur(3px)}to{opacity:1;translate:0 0;filter:blur(0)}}
@keyframes addams-title-in{from{opacity:0;translate:0 18px;letter-spacing:.065em;filter:blur(7px)}to{opacity:1;translate:0 0;letter-spacing:.015em;filter:blur(0)}}
body.addams-cinematic .hero .hero-content .addams-seal-trigger{
  position:relative;display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap;
  width:fit-content;max-width:100%;margin:22px auto 0;padding:3px 14px 3px 6px;
  border:1px solid transparent;background:transparent;color:#e9d4d5;cursor:pointer;
  animation:addams-enter .9s 1.5s both;transition:color .25s,border-color .25s;
}
body.addams-cinematic .hero .hero-content .addams-seal-trigger:hover,
body.addams-cinematic .hero .hero-content .addams-seal-trigger:focus-visible{
  color:#fff5ec;border-color:#916c7a;background:#50354240;
}
body.addams-cinematic .addams-seal-trigger:focus-visible{outline:2px solid #dbbac2;outline-offset:4px}
body.addams-cinematic .addams-seal-stamp{
  width:49px;height:49px;display:grid;place-items:center;flex:none;border-radius:46% 52% 48% 53%;
  border:2px solid #d5a6a6;background:radial-gradient(circle at 32% 24%,#b86d7e,#6e344a 66%,#422132);
  box-shadow:inset 0 1px 4px #fbd4cd5c,0 4px 14px #09040b88,0 0 0 4px #9c5d7030;
  color:#f1d3c9;font:24px/1 Georgia,serif;transition:transform .5s cubic-bezier(.2,.6,.3,1),box-shadow .5s;
}
body.addams-cinematic .addams-seal-trigger:hover .addams-seal-stamp{transform:rotate(-15deg) scale(1.09);box-shadow:inset 0 1px 4px #fbd4cd5c,0 4px 18px #09040b99,0 0 0 8px #9c5d7025}
body.addams-cinematic .addams-seal-label{display:flex;flex-direction:column;gap:3px;text-align:left}
body.addams-cinematic .addams-seal-label strong{font:500 11px/1.5 'Cinzel',Georgia,serif;letter-spacing:.16em}
body.addams-cinematic .addams-seal-label span{font:italic 18px/1.1 'Cormorant Garamond',Georgia,serif;color:#d9b6bd;letter-spacing:0}
body.addams-cinematic .addams-scroll-cue{position:absolute;z-index:3;left:50%;bottom:22px;translate:-50% 0;display:flex;flex-direction:column;align-items:center;gap:8px;pointer-events:none;color:#c8a7b0;font:500 9px/1.4 'DM Sans',sans-serif;letter-spacing:.2em;text-transform:uppercase;opacity:.72}
body.addams-cinematic .addams-scroll-cue:after{content:'';display:block;height:29px;width:1px;background:linear-gradient(#d4b6ba,transparent);animation:addams-cue 2.6s ease-in-out infinite}
@keyframes addams-cue{0%,100%{transform:scaleY(.65);opacity:.45;transform-origin:top}55%{transform:scaleY(1);opacity:1;transform-origin:top}}
/* Revelação apenas quando o elemento está próximo ao viewport. Acessível sem JS. */
body.addams-cinematic .addams-reveal{opacity:0;translate:0 23px;transition:opacity .85s ease,translate .85s cubic-bezier(.2,.8,.2,1);transition-delay:var(--addams-reveal-delay,0ms)}
body.addams-cinematic .addams-reveal.addams-visible{opacity:1;translate:0 0}
body.addams-cinematic .chapter-card{transform-style:preserve-3d;transition:transform .4s cubic-bezier(.2,.8,.2,1),border-color .4s ease,box-shadow .4s ease}
@media(hover:hover) and (pointer:fine){
 body.addams-cinematic .chapter-card:hover{transform:perspective(950px) rotateX(var(--addams-tilt-x,0deg)) rotateY(var(--addams-tilt-y,0deg)) translateY(-5px);border-color:#be99aa;box-shadow:0 19px 40px #09050db3,0 0 0 1px #ddb8ba20}
 body.addams-cinematic .chapter-card .addams-card-light{position:absolute;inset:0;pointer-events:none;z-index:5;background:radial-gradient(circle at var(--addams-card-x,50%) var(--addams-card-y,40%),#d4a4b91e,transparent 58%);opacity:0;transition:opacity .35s ease}
 body.addams-cinematic .chapter-card:hover .addams-card-light{opacity:1}
}
/* Indicador fino e sem texto: não interfere nos botões nem nas cartas. */
body.addams-cinematic .addams-page-progress{position:fixed;top:0;left:0;height:2px;width:100%;z-index:1000;pointer-events:none;transform:scaleX(var(--addams-page-progress,0));transform-origin:left center;background:linear-gradient(90deg,#815067,#d8adba 70%,#f7e3ce);box-shadow:0 0 9px #ca88a67a}
/* Carta de papel envelhecido, aberta sob demanda */
.addams-letter-dialog{position:fixed;inset:0;margin:auto;width:min(510px,calc(100% - 28px));max-height:min(88dvh,780px);padding:0;border:1px solid #b99b97;border-radius:2px;background:#f0e4d5;color:#3b2a34;box-shadow:0 30px 110px #050308d9;overflow:auto}
.addams-letter-dialog::backdrop{background:#0d0815d9;backdrop-filter:blur(5px)}
.addams-letter-dialog[open]{animation:addams-open-paper .7s cubic-bezier(.15,.8,.25,1) both}
@keyframes addams-open-paper{from{opacity:0;transform:perspective(850px) rotateX(-9deg) translateY(26px) scale(.94);filter:blur(3px)}to{opacity:1;transform:perspective(850px) rotateX(0deg) translateY(0) scale(1);filter:blur(0)}}
.addams-letter-inner{position:relative;margin:12px;min-height:390px;padding:clamp(30px,6vw,51px) clamp(20px,6vw,44px);border:1px solid #c2a59d;background:
  radial-gradient(circle at 12% 6%,#fff9eb6e,transparent 48%),
  linear-gradient(140deg,#f5ecdf,#e9d9c8 78%,#efdfcf);
  text-align:center}
.addams-letter-inner:before,.addams-letter-inner:after{content:'✧';position:absolute;left:16px;top:15px;font:23px Georgia,serif;color:#a87b87;opacity:.67}
.addams-letter-inner:after{left:auto;top:auto;right:16px;bottom:15px}
.addams-letter-close{position:absolute;right:16px;top:13px;background:transparent;border:1px solid #b59599;width:38px;height:38px;display:grid;place-items:center;cursor:pointer;font:27px Georgia,serif;color:#603d4e}
.addams-letter-close:hover{background:#e7d0cb}
.addams-letter-close:focus-visible,.addams-letter-link:focus-visible{outline:2px solid #6d3e52;outline-offset:3px}
.addams-letter-eyebrow{display:block;color:#92646f;font:600 10px/1.5 'DM Sans',sans-serif;letter-spacing:.22em;margin:17px 0}
.addams-letter-inner h2{font:400 clamp(28px,5vw,38px)/1.28 'Cinzel',Georgia,serif;color:#503240;margin:18px 0}
.addams-letter-inner .addams-letter-copy{font:italic clamp(21px,3vw,27px)/1.4 'Cormorant Garamond',Georgia,serif;color:#6d515c;margin:18px auto}
.addams-letter-inner .addams-letter-chapter{font:400 21px/1.35 'Cinzel',Georgia,serif;color:#4b3540;margin:23px auto 9px}
.addams-letter-inner .addams-letter-excerpt{font:italic 21px/1.45 'Cormorant Garamond',Georgia,serif;color:#684d58;margin:9px auto 23px}
.addams-letter-link{display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:13px 20px;border:1px solid #6e4056;background:#6d4257;color:#fff0e7;font:600 11px/1.4 'DM Sans',sans-serif;letter-spacing:.11em;text-transform:uppercase;text-decoration:none;transition:background .2s}
.addams-letter-link:hover{background:#4f3042;color:#fff}
@media(max-width:760px){
 body.addams-cinematic .hero{min-height:650px}
 body.addams-cinematic .hero .hero-arch{height:75%}
 body.addams-cinematic .hero .addams-scroll-cue{display:none}
 body.addams-cinematic .hero .hero-content{padding-bottom:75px}
 body.addams-cinematic .hero .hero-edge{display:none}
}
@media(max-width:480px){
 body.addams-cinematic .hero .hero-content .addams-seal-trigger{margin-top:16px;padding:0 4px}
 body.addams-cinematic .addams-seal-stamp{height:43px;width:43px;font-size:22px}
 body.addams-cinematic .addams-seal-label span{font-size:16px}
 .addams-letter-inner{margin:8px;padding:35px 17px}
}
/* Movimento assistivo: mostrar tudo imediatamente e não animar o livro extra. */
@media(prefers-reduced-motion:reduce){
 body.addams-cinematic .hero .arch-inner,
 body.addams-cinematic .hero .hero-glow,
 body.addams-cinematic .hero .addams-mote,
 body.addams-cinematic .hero .kicker,
 body.addams-cinematic .hero .filigree,
 body.addams-cinematic .hero h1,
 body.addams-cinematic .hero .hero-subhead,
 body.addams-cinematic .hero .hero-quote,
 body.addams-cinematic .hero .btn-light,
 body.addams-cinematic .hero .addams-seal-trigger,
 body.addams-cinematic .addams-scroll-cue:after,
 .addams-letter-dialog[open]{animation:none!important}
 body.addams-cinematic .addams-reveal{opacity:1!important;translate:0 0!important;transition:none!important}
 body.addams-cinematic .chapter-card,body.addams-cinematic .hero .hero-arch,
 body.addams-cinematic .addams-seal-stamp,body.addams-cinematic .addams-page-progress{transition:none!important}
 body.addams-cinematic .chapter-card:hover{transform:none}
}
