* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: #081a3a;
  color: white;
}

/* INTRO */
.intro-body {
  overflow: hidden;
}

#intro {
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle, #1a3c7a, #07162f);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  animation: introFade 3.5s ease forwards;
}

.intro-logo {
  width: min(70vw, 380px);
  animation: logoIntro 1.5s ease forwards;
}

#intro h1 {
  font-size: clamp(1.5rem, 4vw, 3rem);
  margin: 20px 0 8px;
}

#intro p {
  letter-spacing: 2px;
  opacity: 0.85;
}

@keyframes logoIntro {
  from {
    opacity: 0;
    transform: scale(0.7);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes introFade {
  0%, 75% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

/* CATÁLOGO */
.catalogo-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #07162f, #183d7a);
}

.catalogo-header {
  text-align: center;
  padding: 30px 20px 10px;
}

.catalogo-header img {
  height: 90px;
}

.catalogo-header h1 {
  margin: 10px 0 5px;
}

.catalogo-grid {
  width: min(1200px, 94vw);
  margin: 30px auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.revista-card {
  background: rgba(255, 255, 255, 0.08);
  padding: 14px;
  border-radius: 18px;
  cursor: pointer;
  text-align: center;
  transition: transform 0.25s ease, background 0.25s ease;
}

.revista-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.14);
}

.revista-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.revista-card h2 {
  font-size: 1rem;
  margin: 12px 0 0;
}


/* VISOR */
.visor-body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  background: #071633;
  color: white;
  font-family: 'Segoe UI', sans-serif;
}

.visor-header {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.visor-header h1 {
  font-size: 1.3rem;
  margin: 0;
}

.volver {
  position: absolute;
  left: 18px;
  color: white;
  text-decoration: none;
  font-weight: bold;
}

.visor-main {
  height: calc(100vh - 70px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.revista-viewer {
  width: 96vw;
  height: calc(100vh - 150px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#book {
  width: 100%;
  height: 100%;
}

.page {
  background: white;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
}

.page img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-cover {
  background: white;
}

.controles {
  height: 70px;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
}

.controles button {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  border: 2px solid white;
  background: rgba(255, 255, 255, 0.16);
  color: white;
  font-size: 22px;
  cursor: pointer;
}

.controles button:hover {
  background: rgba(255, 255, 255, 0.3);
}
/* Hoja temporal animada */
.revista-viewer {
  width: 96vw;
  height: calc(100vh - 150px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  perspective: 2200px;
}

#book {
  width: 100%;
  height: 100%;
}

.page {
  background: transparent;
  overflow: hidden;
  border-radius: 4px;
}

.page-content {
  width: 100%;
  height: 100%;
  background: transparent;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  user-select: none;
  pointer-events: none;
  display: block;
}
.page-cover {
  background: white;
  transform-origin: left center;
}

.page-cover .page-content {
  border-radius: 6px;
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.35),
    inset -18px 0 28px rgba(0, 0, 0, 0.08);
}

.stf__item.--left,
.stf__item.--right {
  will-change: transform;
}

.stf__block {
  border-radius: 6px;
  overflow: hidden;
}

.is-flipping .stf__item {
  transition-timing-function: cubic-bezier(0.45, 0.05, 0.25, 1);
}

.stf__item {
  background: transparent !important;
}

.stf__parent {
  background: transparent !important;
}

#cover-screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  transition: transform 1s ease, opacity 1s ease;
}

.page-blank {
  background: transparent !important;
  box-shadow: none !important;
}

.page-blank .page-content,
.blank-content {
  background: transparent !important;
  box-shadow: none !important;
}

.page-cover-soft,
.page-back-cover-soft {
  background: transparent !important;
}

.page-cover-soft .page-content,
.page-back-cover-soft .page-content {
  background: transparent;
  box-shadow: none;
}

.stf__item {
  background: transparent !important;
}

.stf__parent {
  background: transparent !important;
}

#audio-timeline {
  width: min(280px, 32vw);
  cursor: pointer;
}

#audio-time {
  font-size: 0.85rem;
  color: #ffffff;
  min-width: 90px;
  text-align: center;
}

#play-pause-btn {
  font-size: 18px;
}