/* La revista de la casa: a page-turning book (page strips that really bend, drag to turn).
   Ported from the Look Good Feel Good style book, dressed in Tony Música's paper, red and amber.
   Everything follows the visitor's finger, mouse or arrow keys; nothing moves on its own. */
.rev{position:relative; background:#0A0806; color:#F6F1E7; padding:clamp(56px,9vw,104px) 0; overflow:hidden;}
html[data-theme="light"] .rev{background:#EAE2D2; color:#171310;}
.rev-grid{width:min(1320px,100%); margin:0 auto; padding:0 clamp(14px,4vw,40px); display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:clamp(28px,6vw,88px);}
.rev-head .kick{font-size:12px; font-weight:800; letter-spacing:.14em; color:var(--amber);}
html[data-theme="light"] .rev-head .kick{color:#8A5700;}
.rev-head h2{font-size:clamp(40px,6.4vw,84px); line-height:.95; margin:.2em 0 .4em; color:inherit;}
.rev-head h2 em{font-style:italic; color:var(--accent-t,#E5322D);}
.rev-help{max-width:26rem; margin:0; color:var(--ink-dim); font-size:1.05rem; line-height:1.5;}
.rev .book-stage{display:flex; flex-direction:column; align-items:center;}
.book{position:relative; width:min(88vw,420px); aspect-ratio:3/4.3; perspective:2200px; outline:none; touch-action:pan-y; user-select:none; -webkit-user-select:none;}
@media (min-width:900px){.book{width:min(44vw,560px);}}
.book:focus-visible{box-shadow:0 0 0 3px #F2C063; border-radius:6px;}
.leaf{position:absolute; inset:0; transform-origin:left center; transform-style:preserve-3d; z-index:var(--z); transition:none; opacity:1;}
/* the page that turns is drawn by the strip rig (js/book.js); the leaf itself never animates, it is hidden while turning and gone once turned.
   Without these three rules the leaf rotated on its own as well and the book looked like it skipped two pages. */
.leaf.flipped{display:none; transform:none; opacity:1;}
.leaf.turning{visibility:hidden;}
.leaf.far{display:none;}
.pg{position:absolute; inset:0; backface-visibility:hidden; -webkit-backface-visibility:hidden; border-radius:4px 10px 10px 4px; background:#F4EFE6; color:#171310; overflow:hidden; box-shadow:0 14px 30px rgba(0,0,0,.4),inset 14px 0 18px -14px rgba(0,0,0,.35); display:flex; flex-direction:column; container-type:inline-size;}
.pg.back{transform:rotateY(180deg); border-radius:10px 4px 4px 10px;}
.pg figure{margin:12px 12px 0; flex:1 1 auto; min-height:0; overflow:hidden; border-radius:6px; background:#fff;}
.pg figure img{width:100%; height:100%; object-fit:contain; padding:6px; box-sizing:border-box;}
.pg-txt{padding:clamp(14px,5cqw,28px) clamp(16px,6cqw,30px) clamp(16px,6cqw,28px);}
.pg-no{font:800 clamp(.62rem,2.2cqw,.78rem)/1 Inter,system-ui,sans-serif; letter-spacing:.2em; text-transform:uppercase; color:#7a6b5a;}
.pg-txt h3{font:700 clamp(1.6rem,7.4cqw,2.8rem)/1 'Cormorant Garamond','Cormorant Fallback',Georgia,serif; margin:.25em 0 .2em; letter-spacing:-.01em; color:#171310;}
.pg-txt p{margin:0 0 clamp(12px,3.5cqw,18px); color:#4a4037; font-size:clamp(.9rem,3.5cqw,1.1rem); line-height:1.4;}
.pg .pick{display:flex; align-items:center; justify-content:center; text-align:center; width:100%; box-sizing:border-box; min-height:clamp(44px,11cqw,58px); padding:10px 16px; border-radius:999px; font:800 clamp(.78rem,2.7cqw,.95rem)/1.1 Inter,system-ui,sans-serif; color:#fff; text-decoration:none;}
.pg .pick + .pick{margin-top:10px;}
.cover,.pg.last{background:#1a1411; color:#f3eadb; justify-content:center; align-items:center; text-align:center;}
.cover{background:radial-gradient(120% 80% at 30% 20%,#5a1612,#120d0b); border-left:6px solid #7c1c17;}
.cover-in{display:flex; flex-direction:column; align-items:center; gap:clamp(12px,4cqw,20px); padding:clamp(22px,8cqw,42px);}
.cover-seal{border-radius:50%; width:clamp(44px,14cqw,72px); height:auto;}
.cover-in small{font:800 clamp(.68rem,2.3cqw,.9rem)/1 Inter,system-ui,sans-serif; letter-spacing:.24em; text-transform:uppercase; color:#E8A020;}
.cover-in strong{font:700 clamp(2.8rem,15cqw,5.6rem)/.9 'Cormorant Garamond','Cormorant Fallback',Georgia,serif; letter-spacing:-.02em;}
.cover-in strong em{font-style:italic; color:#FF6A64;}
.cover-in p{margin:0; color:#d2c6b4; font-size:clamp(.95rem,3.4cqw,1.2rem);}
.cover-hint{font:600 clamp(.76rem,2.7cqw,.95rem)/1 Inter,system-ui,sans-serif; color:#a39684; letter-spacing:.06em;}
.endp{background:#efe6d6;}
.book-ctl{display:flex; align-items:center; gap:18px; margin-top:22px;}
.book-count{font:800 .75rem/1 Inter,system-ui,sans-serif; letter-spacing:.18em; text-transform:uppercase; color:var(--ink-dim); min-width:7em; text-align:center;}
.bk-arrow{width:52px; height:52px; border-radius:50%; display:grid; place-items:center; cursor:pointer; color:var(--ink); padding:0; transition:opacity .24s ease,transform .14s ease;}
.bk-arrow svg{width:24px; height:24px;}
.bk-arrow:active{transform:scale(.96);} .bk-arrow:disabled{opacity:.3; pointer-events:none;}
.bk-arrow:focus-visible{outline:2px solid #F2C063; outline-offset:3px;}
/* the turning page: strips (built by js/book.js) */
.rig{position:absolute; inset:0; transform-style:preserve-3d; pointer-events:none; z-index:70;}
.rig-cast{position:absolute; left:0; top:0; bottom:0; width:0; pointer-events:none; z-index:69; opacity:0; border-radius:4px 0 0 4px; background:linear-gradient(90deg,rgba(0,0,0,0) 0%,rgba(0,0,0,.2) 55%,rgba(0,0,0,.5) 100%); filter:blur(5px);}
.rig .st{position:absolute; top:0; height:100%; transform-style:preserve-3d; transform-origin:0 50%; will-change:transform;}
.rig .sf,.rig .sb{position:absolute; inset:0; backface-visibility:hidden; -webkit-backface-visibility:hidden; overflow:hidden;}
.rig .sb{transform:rotateY(180deg); background:#efe6d6;}
.rig .st-first .sf,.rig .st-first .sb{border-radius:4px 0 0 4px;}
.rig .st-last .sf,.rig .st-last .sb{border-radius:0 10px 10px 0;}
.rig .pgc{position:absolute; top:0; height:100%;}
.rig .pgc>.pg{inset:0; backface-visibility:visible; -webkit-backface-visibility:visible; border-radius:0; box-shadow:inset 14px 0 18px -14px rgba(0,0,0,.35);}
.rig .st:not(.st-first) .pgc>.pg{box-shadow:none;}
.rig .sh{position:absolute; inset:0; background:#120d08; opacity:0; pointer-events:none;}
@media (max-width:899px){
  .rev-grid{grid-template-columns:1fr; justify-items:center; gap:26px;}
  .rev-head{text-align:center;} .rev-help{margin-inline:auto;}
}
@media (prefers-reduced-motion:reduce){.leaf{transition:none;}}
