/* Landing page fixes */

/* Fix for book animation */
.interactive-book.animate {
  transform: rotateY(-15deg) rotateX(5deg);
}

/* Fix for background image */
.landing-backdrop {
  background: linear-gradient(
      45deg,
      rgba(0, 0, 0, 0.5) 0%,
      rgba(0, 0, 0, 0.3) 50%,
      rgba(0, 0, 0, 0.5) 100%
    ),
    url('images/ABOU7744 (1).jpg');
  background-size: 140% auto;
  background-position: center 40%;
  filter: brightness(1) saturate(1.2);
  z-index: -1;
  animation: slowZoomOut 25s ease-out forwards;
}

/* Additional fixes for responsive behavior */
@media (max-width: 480px) {
  body.landing-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
    padding-bottom: 160px; /* space for button + signature */
  }

  /* Unify backdrop (already one element) ensure it covers fully */
  .landing-backdrop {
    background-size: cover !important;
    background-position: center center !important;
  }

  .imigongo-container {
    display: none;
  }

  .landing-header {
    position: relative;
    top: 0;
    left: 0;
    margin-top: 28px;
  }
  .artist-name {
    font-size: 2.2rem;
    letter-spacing: 2px;
  }

  /* Stack sections */
  .cd-container,
  .book-container {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    margin: 30px auto 0;
  }
  .cd-container {
    order: 1;
  }
  .book-container {
    order: 2;
  }

  .cd {
    width: 190px;
    height: 190px;
    margin: 0 auto;
  }
  .cd-title {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 100%;
    margin: 14px auto 0;
  }
  .cd-title h2 {
    font-size: 1.25rem;
  }
  .cd-title p {
    font-size: 0.75rem;
  }
  .cd-release {
    font-size: 0.75rem;
  }
  .cd-details {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }
  .cd-details span {
    font-size: 0.55rem;
    padding: 3px 6px;
  }

  .interactive-book {
    width: 160px;
    height: 230px;
    margin: 0 auto;
  }
  .book-title {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 100%;
    margin: 14px auto 30px;
    text-align: center;
  }
  .book-title h2 {
    font-size: 1.2rem;
    margin-bottom: 4px;
  }
  .book-title p {
    font-size: 0.7rem;
    margin-bottom: 4px;
  }
  .book-author {
    font-size: 0.65rem;
  }
  .flip-instruction {
    font-size: 0.6rem;
    margin-top: 6px;
    text-align: center;
  }

  /* Button */
  .visit-button-container {
    position: fixed;
    bottom: 70px;
    width: 100%;
    text-align: center;
    left: 0;
  }
  .visit-button {
    padding: 12px 45px;
    font-size: 0.95rem;
  }

  /* Signature */
  .signature {
    position: fixed;
    bottom: 18px;
    width: 100%;
    text-align: center;
    font-size: 0.65rem;
  }
}

/* Slightly larger small phones (481-640) */
@media (min-width: 481px) and (max-width: 640px) {
  .cd {
    width: 220px;
    height: 220px;
  }
  .interactive-book {
    width: 190px;
    height: 270px;
  }
  .visit-button {
    font-size: 1rem;
  }
}

/* Final enforced mobile centering overrides (placed last for cascade priority) */
@media (max-width: 768px) {
  /* Center TONZI name at the very top */
  .landing-page .landing-header {
    position: absolute !important;
    top: 14px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    margin: 0 !important;
    text-align: center !important;
    z-index: 60 !important;
  }
  .landing-page .artist-name {
    margin: 0 !important;
    font-size: clamp(2.2rem, 8vw, 3rem) !important;
    letter-spacing: 4px !important;
    text-align: center !important;
  }

  /* Center signature at bottom */
  .landing-page .signature {
    position: absolute !important; /* absolute relative to landing-page */
    left: 50% !important;
    right: auto !important;
    bottom: 14px !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    padding: 4px 14px !important;
    text-align: center !important;
    z-index: 60 !important;
  }

  /* Lift visit button so it doesn't collide with signature */
  .landing-page .visit-button-container {
    position: absolute !important;
    bottom: 72px !important; /* 14px sig + height spacing */
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 100%;
    text-align: center;
    z-index: 55;
  }
}

@media (max-width: 480px) {
  .landing-page .visit-button-container {
    bottom: 78px !important; /* a bit more room on very small screens */
  }
  .landing-page .signature {
    bottom: 10px !important;
  }
}

/* Responsive centering for Tonzi name and signature on small screens */
@media (max-width: 768px) {
  /* Center the artist name at the top */
  .landing-header {
    position: absolute;
    top: 5%;
    left: 0;
    right: 0;
    text-align: center;
    width: 100%;
  }

  .artist-name {
    text-align: center;
    margin: 0 auto;
  }

  /* Center the signature at the bottom */
  .landing-page .signature {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: auto;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .artist-name {
    font-size: 2.5rem;
  }

  .landing-page .signature {
    bottom: 10px !important;
  }
}
