.hero-album-scene {
  position: relative;
  perspective: 1800px;
  perspective-origin: 65% 50%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-album-container {
  position: relative;
  width: min(520px, 55vw);
  height: min(680px, 72vh);
  transform-style: preserve-3d;
  transform: rotateY(-8deg) rotateX(4deg) translateZ(0);
  animation: heroAlbumFloat 8s ease-in-out infinite;
  margin-right: -8%;
}

@keyframes heroAlbumFloat {
  0%, 100% { transform: rotateY(-8deg) rotateX(4deg) translateY(0); }
  50% { transform: rotateY(-6deg) rotateX(3deg) translateY(-8px); }
}

.hero-album-shadow {
  position: absolute;
  bottom: -30px;
  left: 5%;
  width: 90%;
  height: 40px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.35) 0%, transparent 70%);
  filter: blur(12px);
  animation: albumShadow 8s ease-in-out infinite;
}

@keyframes albumShadow {
  0%, 100% { transform: scaleX(1); opacity: 0.8; }
  50% { transform: scaleX(0.92); opacity: 0.5; }
}

.hero-album-cover {
  position: absolute;
  inset: 0;
  border-radius: 4px 20px 20px 4px;
  background: linear-gradient(
    135deg,
    #1a1a2e 0%,
    #16213e 30%,
    #0f3460 60%,
    #1a1a2e 100%
  );
  box-shadow:
    -4px 4px 20px rgba(0,0,0,0.5),
    inset -1px 0 2px rgba(255,255,255,0.05),
    inset 2px 0 3px rgba(0,0,0,0.3);
  transform-style: preserve-3d;
  transform-origin: left center;
  transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
  z-index: 10;
}

.hero-album-cover-inner {
  position: absolute;
  inset: 3px;
  border-radius: 2px 18px 18px 2px;
  background: linear-gradient(135deg, #2d2d44 0%, #1a1a35 50%, #162240 100%);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15%;
  text-align: center;
  overflow: hidden;
}

.hero-album-cover-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 40px,
      rgba(255,255,255,0.015) 40px,
      rgba(255,255,255,0.015) 41px
    );
  pointer-events: none;
}

.hero-album-cover-line {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 24px;
  background: linear-gradient(
    to right,
    rgba(255,255,255,0.02) 0%,
    rgba(255,255,255,0.04) 30%,
    rgba(0,0,0,0.1) 60%,
    rgba(0,0,0,0.15) 100%
  );
  border-right: 1px solid rgba(255,255,255,0.05);
}

.hero-album-cover-text {
  color: rgba(255,255,255,0.85);
  font-family: 'Georgia', serif;
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 0.5em;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-album-cover-sub {
  color: rgba(255,255,255,0.4);
  font-family: 'Georgia', serif;
  font-size: clamp(0.6rem, 1.2vw, 0.85rem);
  letter-spacing: 0.5em;
  text-transform: uppercase;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 0.8em;
}

.hero-album-cover-icon {
  width: 50px;
  height: 50px;
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2em;
}

.hero-album-cover-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: rgba(255,255,255,0.4);
  stroke-width: 1.5;
}

.hero-album-spine {
  position: absolute;
  left: -14px;
  top: 0;
  bottom: 0;
  width: 14px;
  background: linear-gradient(
    to right,
    #0d0d1a 0%,
    #1a1a30 20%,
    #1a1a30 80%,
    #0f0f20 100%
  );
  border-radius: 3px 1px 1px 3px;
  transform-origin: right center;
  transform: rotateY(92deg) translateZ(-1px);
  z-index: 11;
  box-shadow: -2px 0 4px rgba(0,0,0,0.4);
}

.hero-album-spine::after {
  content: '';
  position: absolute;
  inset: 10% 15%;
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 2px;
}

.hero-album-pages-block {
  position: absolute;
  inset: 0;
  left: 2px;
  right: -1px;
  background: linear-gradient(
    to bottom,
    #f5f0e8 0%,
    #f0ebe3 20%,
    #ede8df 50%,
    #f0ebe3 80%,
    #f5f0e8 100%
  );
  border-radius: 2px 18px 18px 2px;
  z-index: 1;
  box-shadow:
    inset 0 0 30px rgba(139, 119, 90, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.6);
}

.hero-album-page-texture {
  position: absolute;
  inset: 0;
  border-radius: 2px 18px 18px 2px;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  opacity: 0.04;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 2;
}

.hero-album-page-shadow {
  position: absolute;
  right: -8px;
  top: 2%;
  bottom: 2%;
  width: 12px;
  background: linear-gradient(to left, rgba(0,0,0,0.08), transparent);
  border-radius: 2px;
  z-index: 1;
  pointer-events: none;
}

.hero-album-page {
  position: absolute;
  inset: 0;
  left: 3px;
  right: -2px;
  border-radius: 2px 18px 18px 2px;
  background: linear-gradient(
    to bottom,
    #f8f4ec 0%,
    #f5f0e8 30%,
    #f2ede4 60%,
    #f5f0e8 100%
  );
  transform-style: preserve-3d;
  transform-origin: left center;
  cursor: pointer;
  z-index: 5;
  box-shadow:
    inset -1px 0 1px rgba(255,255,255,0.8),
    inset 1px 0 1px rgba(0,0,0,0.02);
  transition: transform 0.9s cubic-bezier(0.4, 0.0, 0.2, 1);
  will-change: transform;
  backface-visibility: hidden;
}

.hero-album-page-content {
  position: absolute;
  inset: 6px;
  border-radius: 2px 16px 16px 2px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-album-page-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px 14px 14px 2px;
  transition: transform 0.6s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.hero-album-page.flipping {
  pointer-events: none;
  z-index: 20;
}

.hero-album-page.flipped {
  transform: rotateY(-180deg);
  z-index: 4;
  pointer-events: none;
}

.hero-album-page-grad {
  position: absolute;
  inset: 0;
  border-radius: 2px 18px 18px 2px;
  pointer-events: none;
  z-index: 1;
}

.hero-album-page-edge {
  position: absolute;
  right: -3px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to right, rgba(0,0,0,0.03), rgba(0,0,0,0.01));
  border-radius: 2px;
}

.hero-album-page-back {
  position: absolute;
  inset: 0;
  left: 3px;
  right: -2px;
  border-radius: 18px 2px 2px 18px;
  background: linear-gradient(
    to bottom,
    #f0ebe3 0%,
    #ede8df 30%,
    #e8e3d9 60%,
    #ede8df 100%
  );
  transform: rotateY(180deg);
  backface-visibility: hidden;
  box-shadow:
    inset 1px 0 1px rgba(255,255,255,0.8),
    inset -1px 0 1px rgba(0,0,0,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8%;
}

.hero-album-page-back-content {
  text-align: center;
  color: #8b775a;
  font-family: 'Georgia', serif;
}

.hero-album-page-back-content .page-num {
  font-size: 3rem;
  font-weight: 300;
  color: rgba(139, 119, 90, 0.2);
  font-family: 'Georgia', serif;
  line-height: 1;
}

.hero-album-page-back-content .page-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(139, 119, 90, 0.3);
  margin-top: 0.5em;
}

.hero-album-hand {
  position: absolute;
  right: -5%;
  bottom: 2%;
  width: 35%;
  height: 50%;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.hero-album-hand.visible {
  opacity: 1;
}

.hero-album-hand-inner {
  position: relative;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 8px 25px rgba(0,0,0,0.3));
  animation: handReach 2.2s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
  transform-origin: bottom left;
}

@keyframes handReach {
  0% {
    transform: translateX(40%) translateY(20%) scale(0.7);
    opacity: 0;
  }
  25% {
    transform: translateX(0) translateY(0) scale(1);
    opacity: 1;
  }
  45% {
    transform: translateX(-5%) translateY(-2%) scale(1.02);
  }
  55% {
    transform: translateX(-5%) translateY(-2%) scale(1.02);
  }
  75% {
    transform: translateX(10%) translateY(5%) scale(0.95);
  }
  100% {
    transform: translateX(40%) translateY(20%) scale(0.7);
    opacity: 0;
  }
}

.hero-album-hand-svg {
  width: 100%;
  height: 100%;
}

.hero-album-hand-finger {
  animation: fingerCurl 2.2s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
  transform-origin: 60% 20%;
}

.hero-album-hand-thumb {
  animation: thumbMove 2.2s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
  transform-origin: 10% 60%;
}

@keyframes fingerCurl {
  0% { transform: rotate(0deg); }
  30% { transform: rotate(-3deg); }
  50% { transform: rotate(-5deg); }
  70% { transform: rotate(-2deg); }
  100% { transform: rotate(0deg); }
}

@keyframes thumbMove {
  0% { transform: rotate(0deg); }
  30% { transform: rotate(2deg); }
  50% { transform: rotate(4deg); }
  70% { transform: rotate(1deg); }
  100% { transform: rotate(0deg); }
}

.hero-album-grip {
  position: absolute;
  right: 8%;
  bottom: 8%;
  width: 25%;
  height: 20%;
  z-index: 25;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero-album-grip.active {
  opacity: 1;
}

.hero-album-deco-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.04);
  pointer-events: none;
}

.hero-album-deco-ring-1 {
  width: 120%;
  height: 120%;
  top: -10%;
  left: -10%;
  animation: decoRingPulse 6s ease-in-out infinite;
}

.hero-album-deco-ring-2 {
  width: 140%;
  height: 140%;
  top: -20%;
  left: -20%;
  animation: decoRingPulse 6s ease-in-out infinite 0.8s;
  border-color: rgba(255,255,255,0.025);
}

@keyframes decoRingPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.03); opacity: 0.5; }
}

.hero-album-lighting {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 40;
}

.hero-album-light-top {
  position: absolute;
  top: -20%;
  left: 30%;
  width: 60%;
  height: 60%;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 200, 140, 0.12) 0%,
    rgba(255, 200, 140, 0.04) 40%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-album-light-warm {
  position: absolute;
  bottom: -10%;
  right: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 180, 100, 0.08) 0%,
    transparent 60%
  );
  pointer-events: none;
}

.hero-album-light-spot {
  position: absolute;
  top: 20%;
  right: 10%;
  width: 30%;
  height: 40%;
  background: linear-gradient(
    135deg,
    rgba(255,220,180,0.06) 0%,
    transparent 60%
  );
  pointer-events: none;
  transform: skewX(-15deg);
}

.hero-album-dof-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 45;
  border-radius: 4px 20px 20px 4px;
}

.hero-album-dof-blur {
  position: absolute;
  inset: -20%;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  mask-image: radial-gradient(
    ellipse 70% 60% at 55% 45%,
    transparent 0%,
    transparent 30%,
    black 55%,
    black 65%,
    transparent 80%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 70% 60% at 55% 45%,
    transparent 0%,
    transparent 30%,
    black 55%,
    black 65%,
    transparent 80%
  );
  pointer-events: none;
}

.hero-album-vignette {
  position: absolute;
  inset: 0;
  border-radius: 4px 20px 20px 4px;
  box-shadow:
    inset 0 0 60px rgba(0,0,0,0.15),
    inset 0 0 120px rgba(0,0,0,0.05);
  pointer-events: none;
  z-index: 50;
}

.hero-album-gloss {
  position: absolute;
  inset: 0;
  border-radius: 4px 20px 20px 4px;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.03) 0%,
    transparent 40%,
    transparent 60%,
    rgba(255,255,255,0.02) 100%
  );
  pointer-events: none;
  z-index: 35;
}

.hero-album-grain {
  position: absolute;
  inset: 0;
  border-radius: 4px 20px 20px 4px;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 38;
}

.hero-album-shine {
  position: absolute;
  top: 5%;
  left: 5%;
  width: 30%;
  height: 15%;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.04) 0%,
    transparent 100%
  );
  transform: rotate(-20deg);
  filter: blur(4px);
  pointer-events: none;
  z-index: 36;
}

.hero-album-gold-foil {
  position: absolute;
  inset: 0;
  border-radius: 4px 20px 20px 4px;
  background: linear-gradient(
    135deg,
    rgba(218, 165, 32, 0.02) 0%,
    rgba(255, 215, 0, 0.01) 25%,
    transparent 50%,
    rgba(218, 165, 32, 0.01) 75%,
    rgba(255, 215, 0, 0.02) 100%
  );
  pointer-events: none;
  z-index: 37;
}

/* page turn glow effect */
.hero-album-turn-glow {
  position: absolute;
  inset: 0;
  border-radius: 4px 20px 20px 4px;
  pointer-events: none;
  z-index: 22;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero-album-turn-glow.active {
  opacity: 1;
  background: radial-gradient(
    ellipse at 35% 50%,
    rgba(255, 200, 140, 0.06) 0%,
    transparent 50%
  );
}

.hero-album-thumb-indent {
  position: absolute;
  right: 12px;
  top: 40%;
  width: 28px;
  height: 18px;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.01),
    rgba(0,0,0,0.03),
    rgba(0,0,0,0.01)
  );
  border-radius: 3px;
  z-index: 3;
  pointer-events: none;
}

.hero-album-thumb-indent::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 2px;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.15),
    transparent,
    rgba(255,255,255,0.1)
  );
}

/* scene ambient lighting */
.hero-album-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-album-ambient-orange {
  position: absolute;
  top: 10%;
  right: 5%;
  width: 40%;
  height: 30%;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 150, 50, 0.08) 0%,
    transparent 60%
  );
  filter: blur(30px);
  animation: ambientGlow 6s ease-in-out infinite alternate;
}

@keyframes ambientGlow {
  0% { opacity: 0.5; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.1); }
}

.hero-album-ambient-primary {
  position: absolute;
  bottom: 10%;
  left: 5%;
  width: 35%;
  height: 25%;
  background: radial-gradient(
    ellipse at center,
    rgba(1, 50, 32, 0.04) 0%,
    transparent 60%
  );
  filter: blur(30px);
  animation: ambientGlow 6s ease-in-out infinite alternate 2s;
}

.hero-album-auto-indicator {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 50;
}

.hero-album-auto-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: all 0.5s ease;
}

.hero-album-auto-dot.active {
  background: rgba(255,255,255,0.6);
  width: 16px;
  border-radius: 3px;
}

.hero-album-hint {
  position: absolute;
  bottom: -65px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.15);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  white-space: nowrap;
  z-index: 50;
  font-family: 'Georgia', serif;
  animation: hintPulse 2.5s ease-in-out infinite;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.4; }
}

/* paper curl shadow on flipping page */
.hero-album-curl-shadow {
  position: absolute;
  left: -8px;
  top: 0;
  bottom: 0;
  width: 16px;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.12) 0%,
    rgba(0,0,0,0.03) 40%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 21;
  pointer-events: none;
}

.hero-album-curl-shadow.active {
  opacity: 1;
}

@media (max-width: 1024px) {
  .hero-album-container {
    width: min(400px, 65vw);
    height: min(520px, 60vh);
    margin-right: -5%;
  }
}

@media (max-width: 640px) {
  .hero-album-container {
    width: min(300px, 70vw);
    height: min(400px, 50vh);
    margin-right: 0;
    transform: rotateY(-5deg) rotateX(3deg);
  }
  .hero-album-hand { display: none; }
  .hero-album-hint { display: none; }
  .hero-album-auto-indicator { bottom: -30px; }
}



/* photo color grading overlays */
.hero-album-page-overlay {
  position: absolute;
  inset: 0;
  border-radius: 2px 16px 16px 2px;
  mix-blend-mode: overlay;
  opacity: 0.3;
  pointer-events: none;
  z-index: 2;
}

.hero-album-page-overlay.warm {
  background: linear-gradient(135deg, rgba(218,165,32,0.08), rgba(255,140,0,0.04));
}

.hero-album-page-overlay.cool {
  background: linear-gradient(135deg, rgba(1,50,32,0.06), rgba(26,143,90,0.03));
}

.hero-album-page-overlay.rose {
  background: linear-gradient(135deg, rgba(255,182,193,0.06), rgba(199,21,133,0.03));
}

.hero-album-page-overlay.gold {
  background: linear-gradient(135deg, rgba(255,215,0,0.06), rgba(184,134,11,0.03));
}
