/* ============================================
   MORO MAGAZINE — книжная полка и флипбук
   ============================================ */

.nav__links a.is-current { color: var(--oro); opacity: 1; }

.scaffale-page {
  min-height: 72vh;
  padding: 150px 24px 40px;
}

.scaffale-hero {
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}

.rivista-desc {
  margin-top: 26px;
  font-size: 22.5px;
  line-height: 1.75;
  color: var(--grigio);
}

.rivista-rubriche {
  margin-top: 22px;
  font-family: var(--font-label);
  font-weight: 300;
  font-size: 14px;
  letter-spacing: 0.14em;
  line-height: 2.1;
  text-transform: uppercase;
  color: rgba(247,244,239,0.55);
}

.rivista-citazione {
  margin-top: 30px;
  font-style: italic;
  font-size: 24px;
  color: var(--bianco);
}

.rivista-citazione span {
  display: block;
  margin-top: 10px;
  font-size: 15px;
  font-style: normal;
  font-family: var(--font-label);
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--oro);
}

.rivista-azioni {
  margin-top: 38px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.rivista-btn {
  display: inline-block;
  font-family: var(--font-label);
  font-weight: 300;
  font-size: 14px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--nero);
  background: var(--oro);
  border: 1px solid var(--oro);
  text-decoration: none;
  padding: 15px 30px;
  transition: background 0.35s, color 0.35s;
}

.rivista-btn:hover { background: transparent; color: var(--oro); }

.rivista-btn--ghost {
  background: transparent;
  color: var(--bianco);
  border-color: rgba(247,244,239,0.4);
}

.rivista-btn--ghost:hover { border-color: var(--oro); color: var(--oro); background: transparent; }

.scaffale-intro {
  text-align: center;
  margin-top: 84px;
}

.scaffale-intro .section-label { margin-bottom: 14px; }

.scaffale-hero__title {
  font-weight: 300;
  font-size: clamp(40px, 6vw, 72px);
  letter-spacing: 0.01em;
}

.scaffale-hero__sub {
  margin-top: 18px;
  color: var(--grigio);
  font-size: 21px;
  font-style: italic;
}

/* ---------- Полка ---------- */

.scaffale {
  max-width: 900px;
  margin: 48px auto 0;
  padding: 0 12px;
}

.scaffale__row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 90px;
  padding-bottom: 2px;
}

.scaffale__plank {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(201,164,92,0.75) 18%, rgba(201,164,92,0.75) 82%, transparent);
  box-shadow: 0 6px 30px rgba(201,164,92,0.12);
}

.volume {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  text-align: center;
  padding: 0;
}

.volume--ghost { cursor: default; }

.volume__book {
  position: relative;
  display: block;
  width: 190px;
  aspect-ratio: 596 / 842;
  transform-style: preserve-3d;
  transform: perspective(1200px) rotateY(-12deg);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 22px 30px 60px rgba(0,0,0,0.7);
}

.volume:hover .volume__book {
  transform: perspective(1200px) rotateY(-4deg) translateY(-10px);
  box-shadow: 16px 38px 70px rgba(0,0,0,0.75), 0 0 44px rgba(201,164,92,0.14);
}

.volume__book img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* корешок страниц сбоку */
.volume__pages {
  position: absolute;
  top: 1.5%;
  right: -7px;
  width: 7px;
  height: 97%;
  background: repeating-linear-gradient(to right, #e8e2d6 0 1px, #b8b2a6 1px 2px);
  transform: rotateY(38deg);
  transform-origin: left;
}

.volume__book--ghost {
  background: #131110;
  border: 1px solid rgba(201,164,92,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.55;
}

.volume__ghostlabel {
  font-family: var(--font-label);
  font-weight: 200;
  letter-spacing: 0.4em;
  font-size: 23.5px;
  color: rgba(201,164,92,0.6);
  line-height: 2;
}

.volume__caption {
  display: block;
  margin-top: 30px;
}

.volume__caption em {
  display: block;
  font-style: italic;
  font-size: 21px;
  color: var(--bianco);
}

.volume--ghost .volume__caption em { color: var(--grigio); }

.volume__caption span {
  display: block;
  margin-top: 8px;
  font-family: var(--font-label);
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--oro);
}

.volume--ghost .volume__caption span { color: var(--grigio); }

.footer--compact { padding-top: 60px; }

/* ---------- Читальный зал ---------- */

.lettore {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #070605;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s;
}

.lettore.is-open {
  opacity: 1;
  visibility: visible;
}

.lettore__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
}

.lettore__counter {
  font-family: var(--font-label);
  font-weight: 300;
  font-size: 14px;
  letter-spacing: 0.25em;
  color: var(--grigio);
}

.lettore__tools { display: flex; gap: 12px; }

.lettore__tool {
  background: none;
  border: 1px solid rgba(247,244,239,0.25);
  color: var(--bianco);
  font-family: var(--font-label);
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 9px 16px;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s;
}

.lettore__tool:hover { border-color: var(--oro); color: var(--oro); }

.lettore__tool.is-off { opacity: 0.45; }

/* главная кнопка «Увеличить» — золотая, чтобы её сразу видели */
.lettore__tool--oro { border-color: var(--oro); color: var(--oro); }
.lettore__tool--oro:hover { background: var(--oro); color: var(--nero); }

/* ---------- Лупа ---------- */

.lente {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: #070605;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
}

.lente.is-open { opacity: 1; visibility: visible; }

.lente .lettore__tool { min-width: 46px; font-size: 15px; }
.lente .lettore__tools { align-items: center; }
.lente .lettore__tool:disabled { opacity: 0.3; cursor: default; border-color: rgba(247,244,239,0.25); color: var(--bianco); }

.lente__pct {
  min-width: 58px;
  text-align: center;
  font-family: var(--font-label);
  font-weight: 300;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--oro);
}

.lente__scroll {
  flex: 1;
  overflow: auto;
  padding: 0 70px 40px;
  text-align: center;
  -webkit-overflow-scrolling: touch;
}

.lente__img {
  display: inline-block;
  max-width: none;
  height: auto;
  box-shadow: 0 30px 60px rgba(0,0,0,0.6);
  background: #f4f1ea;
}

.lente__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 96;
}

.lente__nav:hover { transform: translateY(-50%) scale(1.12); }
.lente__nav--prev { left: 6px; }
.lente__nav--next { right: 6px; }

@media (max-width: 760px) {
  .lente__scroll { padding: 0 10px 30px; }
  .lente__nav { font-size: 40px; padding: 10px 4px; background: rgba(7,6,5,0.6); }
  .lettore__toolbar { padding: 14px 14px; gap: 10px; }
  .lettore__tools { gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
  .lettore__tool { padding: 8px 10px; letter-spacing: 0.12em; }
}

.lettore__stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  padding: 10px 24px 20px;
  min-height: 0;
}

.lettore__arrow {
  background: none;
  border: none;
  color: rgba(247,244,239,0.55);
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  padding: 20px 10px;
  transition: color 0.3s, transform 0.3s;
  user-select: none;
}

.lettore__arrow:hover { color: var(--oro); transform: scale(1.12); }

.lettore__hint {
  text-align: center;
  padding: 0 24px 26px;
  font-style: italic;
  font-size: 17.5px;
  color: var(--grigio);
}

/* ---------- Книга ---------- */

.libro-wrap {
  perspective: 2600px;
  transition: transform 1.1s cubic-bezier(0.4, 0, 0.2, 1);
  /* тень здесь: filter на самой книге сплющил бы 3D-слои листов */
  filter: drop-shadow(0 46px 60px rgba(0,0,0,0.75));
}

.libro {
  position: relative;
  transform-style: preserve-3d;
  /* размеры задаёт JS: ширина = 2 страницы */
}

/* подложка левой стороны разворота */
.libro::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 50%;
  height: 100%;
  background: #0e0d0c;
}

.foglio {
  position: absolute;
  left: 50%;
  top: 0;
  width: 50%;
  height: 100%;
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: transform 1.25s cubic-bezier(0.645, 0.045, 0.355, 1);
  will-change: transform;
}

.foglio__front,
.foglio__back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  background: #f4f1ea;
}

.foglio__back { transform: rotateY(180deg); }

.foglio__front img,
.foglio__back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* мягкая тень у корешка — объём разворота */
.foglio__front::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(20,15,10,0.32), rgba(20,15,10,0) 14%);
  pointer-events: none;
  transition: opacity 1.25s ease;
}

.foglio__back::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to left, rgba(20,15,10,0.32), rgba(20,15,10,0) 14%);
  pointer-events: none;
  transition: opacity 1.25s ease;
}

/* усиленный «шлейф тени» во время переворота */
.foglio.is-turning .foglio__front::after,
.foglio.is-turning .foglio__back::after {
  background: linear-gradient(to right, rgba(20,15,10,0.5), rgba(20,15,10,0.06) 55%, rgba(20,15,10,0.28));
}

/* задняя обложка-финал */
.foglio__fine {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  height: 100%;
  background: var(--nero);
  border: 1px solid rgba(201,164,92,0.25);
}

.foglio__fine img { width: 45%; height: auto; object-fit: contain; }

.foglio__fine p {
  font-style: italic;
  color: var(--grigio);
  font-size: 16.5px;
  padding: 0 18px;
  text-align: center;
}

@media (max-width: 760px) {
  .scaffale__row { gap: 44px; }
  .volume__book { width: 140px; }
  .lettore__arrow { font-size: 44px; padding: 12px 6px; }
  .lettore__stage { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .foglio { transition: none; }
  .volume__book { transition: none; }
}
