/* =========================
   BURGER MENU + MOBILE NAV
========================= */

.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.burger-btn span {
  display: block;
  width: 28px;
  height: 3px;
  background: #000;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}

/* open state */
.burger-btn.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.burger-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger-btn.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  pointer-events: none;
}

.mobile-nav.open { pointer-events: all; }

.mobile-nav-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.22);
  opacity: 0;
  transition: opacity 0.25s;
}
.mobile-nav.open .mobile-nav-backdrop { opacity: 1; }

.mobile-nav-panel {
  position: absolute;
  top: 0; right: 0;
  width: min(300px, 85vw);
  height: 100%;
  background: #fff;
  border-left: 2.5px solid #000;
  box-shadow: -5px 0 0 #000;
  transform: translateX(110%);
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
  display: flex;
  flex-direction: column;
  padding: 70px 32px 40px;
  overflow-y: auto;
  overflow-x: hidden;
}
.mobile-nav.open .mobile-nav-panel { transform: translateX(0); }

.mobile-nav-close {
  position: absolute;
  top: 18px; right: 18px;
  background: none;
  border: 2px solid #000;
  border-radius: 8px;
  width: 36px; height: 36px;
  font-size: 18px;
  cursor: pointer;
  font-family: 'Indie Flower', cursive;
  line-height: 1;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-label {
  font-family: 'Indie Flower', cursive;
  font-size: 12px;
  color: #bbb;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 28px;
}

.mobile-nav-link {
  text-decoration: none;
  font-family: 'Indie Flower', cursive;
  font-size: 28px;
  line-height: 1.35;
  color: #000;
  padding: 10px 0;
  border-bottom: 1.5px dashed #e8e8e8;
  transition: opacity 0.15s;
  display: block;
}
.mobile-nav-link:last-child { border-bottom: none; }
.mobile-nav-link:hover { opacity: 0.6; }
.mobile-nav-link.gradient-text {
  background: linear-gradient(90deg, #000000 0%, #BA76BB 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mobile-nav-divider {
  border: none;
  border-top: 1.5px dashed #ddd;
  margin: 8px 0 20px;
}

.mobile-nav-auth {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mobile-nav-auth-link {
  text-decoration: none;
  font-family: 'Indie Flower', cursive;
  font-size: 22px;
  color: #555;
  transition: opacity 0.15s;
}
.mobile-nav-auth-link:hover { opacity: 0.6; }

/* nav site name shown on tablet/mobile */
.nav-site-name {
  font-family: 'Indie Flower', cursive;
  font-size: 22px;
  color: #444;
  white-space: nowrap;
  display: none;
}

/* =========================
   TABLET — 1024px
========================= */

@media (max-width: 1024px) {
  /* show burger, hide desktop links */
  .burger-btn  { display: flex; }
  .mobile-nav  { display: block; }
  .nav-links   { display: none !important; }
  .nav-right   { display: none !important; }
  .nav-site-name { display: block; }

  /* navbar */
  .site-navbar {
    height: 90px;
    margin: 10px auto 6px;
  }
  .navbar-content {
    padding: 0 28px 0 40px;
    align-items: center;
    height: 100%;
  }
  .nav-left { gap: 14px; }
  .logo { width: 52px; height: 47px; top: 0; }

  /* ── HERO: switch to flex column ── */
  .frame-1 { min-height: 0; }
  .frame-1 .frame-inner { min-height: 0; padding: 0 0 32px; }

  .hero {
    position: relative;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 32px 16px;
    gap: 24px;
  }

  /* image: centered, capped size */
  .hero-image-block {
    position: relative;
    width: 340px;
    height: 340px;
    right: auto; top: auto;
    order: -1;
    flex-shrink: 0;
  }

  /* text block: full width, no absolute */
  .hero-text-block {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: auto;
    left: auto; top: auto;
  }

  .rect-4, .rect-5, .rect-6 {
    position: static;
    display: none;
  }

  .hero-title {
    position: relative;
    left: auto; top: auto;
    width: 100%;
    font-size: 42px;
    line-height: 62px;
    text-align: center;
    background: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    display: inline-block;
  }

  /* CTA: centered below text */
  .cta-block {
    position: relative;
    left: auto; top: auto;
    width: 320px;
    height: 136px;
    margin: 0 auto;
    flex-shrink: 0;
  }
  .cta-text { font-size: 50px; left: 28px; top: 28px; }

  /* top rated section */
  .top-rated-title-block {
    position: relative;
    left: auto; top: auto;
    margin: 32px auto 0;
    text-align: center;
    width: fit-content;
  }
  .tr-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    padding: 24px 32px 60px;
  }
  .tr-title { font-size: 28px; }
  .tr-artist { font-size: 18px; }
  .tr-score { font-size: 32px; }
  .tr-count { font-size: 17px; }
  .tr-cover-wrap { width: 140px; }

  /* footer */
  .footer-inner { padding: 36px 40px 28px; }
}

/* =========================
   MOBILE — 480px
========================= */

@media (max-width: 480px) {
  /* navbar */
  .site-navbar {
    height: auto;
    min-height: 68px;
    margin: 8px auto 4px;
  }
  .navbar-bg { display: none; }
  .site-navbar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #fff;
    border: 2px solid #000;
    border-radius: 18px;
    box-shadow: 3px 3px 0 #000;
    z-index: 0;
  }
  .navbar-content { padding: 12px 16px; }
  .logo { width: 40px; height: 36px; top: 0; }
  .nav-site-name { font-size: 18px; }

  /* hero */
  .frame-1 { min-height: 0; }
  .frame-1 .frame-inner { min-height: 0; padding-bottom: 16px; }
  .hero { padding: 16px 16px 12px; gap: 16px; }
  .hero-image-block { width: 240px; height: 240px; }
  .hero-title { font-size: 26px; line-height: 40px; padding: 6px 10px; }
  .cta-block { width: 220px; height: 96px; }
  .cta-text { font-size: 36px; left: 18px; top: 18px; }

  /* top rated */
  .top-rated-title-block {
    position: relative;
    left: auto; top: auto;
    margin: 24px auto 0;
    text-align: center;
    width: fit-content;
  }
  .tr-grid {
    grid-template-columns: 1fr;
    padding: 16px 16px 40px;
    gap: 22px;
  }
  .tr-title { font-size: 22px; }
  .tr-artist { font-size: 16px; }
  .tr-score { font-size: 26px; }
  .tr-count { font-size: 14px; white-space: normal; }
  .tr-cover-wrap { width: 110px; }
  .tr-rating-row { padding: 0 10px 0 6px; }

  /* footer */
  .footer-inner { padding: 24px 18px 18px; }
  .footer-content { flex-direction: column; align-items: flex-start; gap: 20px; }
  .footer-link { font-size: 20px; }
  .footer-bottom-row { flex-direction: column; gap: 10px; align-items: flex-start; }
  .footer-social { justify-content: flex-start; }
}
