/* ==========================================================================
   AKATSUKI FIGURES - PREMIUM EXHIBITION STYLESHEET
   Brand Colors: Primary Red (#FF0000), Black (#000000), White (#FFFFFF)
   Typography: Bebas Neue / Impact, Inter, Montserrat
   ========================================================================== */

/* --- CSS Variables & Custom Theme --- */
:root {
  --brand-red: #FF0000;
  --brand-red-dark: #D60000;
  --brand-red-glow: rgba(255, 0, 0, 0.45);
  --brand-black: #000000;
  --brand-surface: #080808;
  --brand-card: #121212;
  --brand-white: #FFFFFF;
}

/* --- Base & Reset --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Lenis Smooth Scrolling Engine Styles --- */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

body {
  width: 100%;
  overflow-x: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--brand-black);
  color: var(--brand-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Single Global Custom Scrollbar */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 8px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: #000000;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  background: #262626;
  border-radius: 4px;
  transition: background 0.2s ease;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
  background: var(--brand-red);
}

.scrollbar-none::-webkit-scrollbar {
  display: none;
}
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* --- Typography Helpers --- */
.font-display {
  font-family: 'Bebas Neue', 'Impact', sans-serif;
  letter-spacing: 0.02em;
}

/* --- Keyframe Animations --- */
@keyframes float-slow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-16px) rotate(2deg);
  }
}

@keyframes float-delayed {
  0%, 100% {
    transform: translateY(-8px) rotate(-1.5deg);
  }
  50% {
    transform: translateY(12px) rotate(1.5deg);
  }
}

@keyframes amaterasu-flame {
  0% {
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 20px rgba(255, 0, 0, 0.29));
  }
  50% {
    filter: drop-shadow(0 18px 35px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 40px rgba(255, 0, 0, 0.55));
  }
  100% {
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 20px rgba(255, 0, 0, 0.29));
  }
}

.animate-float-slow {
  animation: float-slow 5s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float-delayed 6s ease-in-out 1.5s infinite;
}

/* --- Header & Navigation (Frosted Blur Glass Design) --- */
#main-header {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

#main-header.scrolled {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border-bottom: 1px solid rgba(255, 0, 0, 0.32);
  padding-top: 1.05rem;
  padding-bottom: 1.05rem;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.85), 0 0 20px rgba(255, 0, 0, 0.15);
}

/* Mobile Menu Button Animation */
#mobile-menu-toggle {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
}
#mobile-menu-toggle.is-active {
  transform: rotate(90deg) scale(1.08);
  color: var(--brand-red);
}

/* Mobile Dropdown Menu (Frosted Glass & Animated Stagger) */
#mobile-menu {
  background: rgba(8, 8, 8, 0.88);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border-bottom: 1.5px solid rgba(255, 0, 0, 0.4);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.95), 0 0 35px rgba(255, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-14px) scale(0.98);
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.32s;
  pointer-events: none;
}

#mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Staggered Slide & Fade In for Menu Items */
#mobile-menu .mobile-nav-link,
#mobile-menu .mobile-socials-row {
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.2s ease,
              padding-left 0.2s ease;
}

#mobile-menu.is-open .mobile-nav-link:nth-child(1) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.05s;
}
#mobile-menu.is-open .mobile-nav-link:nth-child(2) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.10s;
}
#mobile-menu.is-open .mobile-nav-link:nth-child(3) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.15s;
}
#mobile-menu.is-open .mobile-nav-link:nth-child(4) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.20s;
}
#mobile-menu.is-open .mobile-nav-link:nth-child(5) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.25s;
}
#mobile-menu.is-open .mobile-socials-row {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.30s;
}

.mobile-nav-link:hover {
  padding-left: 0.5rem;
  color: var(--brand-red) !important;
}

.nav-link {
  position: relative;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--brand-red);
  transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* --- Hero Figure 3D Parallax Wrapper --- */
.hero-figure-wrapper {
  perspective: 1000px;
  transform-style: preserve-3d;
}

.hero-character-img {
  animation: amaterasu-flame 4s ease-in-out infinite;
  transform-origin: center bottom;
}

@media (max-width: 640px) {
  .hero-character-img {
    animation: amaterasu-flame-mobile 4s ease-in-out infinite;
  }
  @keyframes amaterasu-flame-mobile {
    0%, 100% {
      filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 12px rgba(255, 0, 0, 0.22));
    }
    50% {
      filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 20px rgba(255, 0, 0, 0.32));
    }
  }
}

/* --- 3D Collection Cards & Carousel Track --- */
#figures-carousel-track {
  user-select: none;
  -webkit-user-select: none;
}

#figures-carousel-track img {
  -webkit-user-drag: none;
  user-select: none;
}

.figure-card {
  perspective: 1000px;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease, border-color 0.4s ease;
  will-change: transform;
}

.figure-card:hover {
  transform: translateY(-8px) scale(1.02);
}

.figure-card-img {
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.4s ease;
}

/* --- Filter Tab Active States --- */
.filter-btn.active {
  background-color: var(--brand-red);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

/* --- Custom Cursor --- */
#custom-cursor {
  mix-blend-mode: difference;
  pointer-events: none;
}

/* --- Hero Headline Gradient (20% Softer Akatsuki Red Transition) --- */
.figures-gradient-text,
.hero-gradient-text {
  background: linear-gradient(90deg, #ffffff 0%, #ffffff 30%, #ff8282 62%, #e63b3b 82%, #cc2424 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* --- Footer Akatsuki Cloud Repeating Pattern Background --- */
.footer-cloud-pattern {
  position: absolute;
  inset: 0;
  background-image: url('Assets/Images/bg-pattern.png');
  background-repeat: repeat;
  background-size: 160px auto;
  background-position: center;
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}

/* --- Akatsuki Preloader Animations --- */
@keyframes mangekyo-pulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 25px rgba(255, 0, 0, 0.6));
  }
  50% {
    transform: scale(1.08);
    filter: drop-shadow(0 0 50px rgba(255, 0, 0, 0.95));
  }
}

.animate-mangekyo-pulse {
  animation: mangekyo-pulse 2s ease-in-out infinite;
}

/* ==========================================================================
   ABOUT THE COLLECTION - EXHIBITION STYLING
   ========================================================================== */
.about-section-bg {
  background: linear-gradient(180deg, #FF0000 0%, #E60000 45%, #BD0000 68%, #7A0000 86%, #400000 100%);
  margin-top: -1px;
}

.about-bottom-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 320px;
  background: linear-gradient(180deg, transparent 0%, rgba(120, 0, 0, 0.35) 40%, rgba(65, 0, 0, 0.8) 75%, rgba(28, 0, 0, 0.98) 100%);
  pointer-events: none;
  z-index: 5;
}

.about-glow-halo {
  background: radial-gradient(circle, rgba(0, 0, 0, 0.55) 0%, rgba(150, 0, 0, 0.25) 55%, transparent 75%);
  filter: blur(45px);
}

.about-bento-card {
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.about-bento-card:hover {
  background: rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-4px);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.45), 0 0 25px rgba(255, 255, 255, 0.1);
}

.about-metric-cell {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}

.about-metric-cell:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.35);
}

/* ==========================================================================
   SMOOTH APPEAR & SCROLL REVEAL ANIMATION SYSTEM
   ========================================================================== */
.reveal-init {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-init.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.92) translateY(24px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-45px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(45px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger transition delay helpers */
.delay-75 { transition-delay: 75ms; }
.delay-100 { transition-delay: 100ms; }
.delay-150 { transition-delay: 150ms; }
.delay-200 { transition-delay: 200ms; }
.delay-250 { transition-delay: 250ms; }
.delay-300 { transition-delay: 300ms; }
.delay-350 { transition-delay: 350ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }
.delay-600 { transition-delay: 600ms; }

/* Accessibility fallback */
@media (prefers-reduced-motion: reduce) {
  .reveal-init,
  .reveal-scale,
  .reveal-left,
  .reveal-right {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   MOBILE VIEWPORT & RESPONSIVE POLISH
   ========================================================================== */
@media (max-width: 640px) {
  /* Prevent touch highlight flash */
  * {
    -webkit-tap-highlight-color: transparent;
  }

  /* Generous breathing room between fixed navbar and hero content (adjusted by +15px) */
  #hero {
    padding-top: max(7.25rem, 116px);
  }

  /* Mobile hero headline: 50% bigger */
  #hero h1 {
    font-size: clamp(5.625rem, 24vw, 8.25rem) !important;
    line-height: 0.78 !important;
  }

  /* Rinnegan Chakra Rings on Mobile (3 white ripple layers at 15% opacity) */
  .hero-chakra-ring {
    position: absolute;
    top: 48%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 9999px;
    border-style: solid;
    border-width: 1.5px;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.06);
    pointer-events: none;
  }
  .hero-chakra-ring-1 {
    width: 300px;
    height: 300px;
  }
  .hero-chakra-ring-2 {
    width: 420px;
    height: 420px;
  }
  .hero-chakra-ring-3 {
    width: 540px;
    height: 540px;
  }

  /* Keep About Section headline crisp and fitting nicely on single line for "ABOUT THE" */
  #about h2 {
    font-size: clamp(2.75rem, 12vw, 4.25rem);
    line-height: 0.88;
  }

  /* Guarantee Itachi takes maximum impact on mobile */
  #about img[alt="Itachi Uchiha Figure"] {
    max-height: 72vh;
    width: 88vw;
    filter: drop-shadow(0 20px 35px rgba(0, 0, 0, 0.75));
  }

  /* Collections section top padding and title clamp on mobile */
  #collections {
    padding-top: clamp(6.5rem, 18vw, 8rem);
  }

  #collections h2 {
    font-size: clamp(2.75rem, 12vw, 4.25rem);
    line-height: 0.88;
    text-align: center;
  }

  /* Center description text and add 10px gap to filter tab on mobile */
  #collections p {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 10px;
  }

  /* Community headline clamp */
  #community h2 {
    font-size: clamp(2.75rem, 12vw, 4.25rem);
    line-height: 0.85;
  }

  /* Mobile footer: hide AKATSUKI FIGURES headline on mobile only */
  #footer .footer-headline-wrapper {
    display: none !important;
  }

  /* Increase Zetsu footer figure size on mobile (366px) and end behind newsletter */
  #footer img[alt="Zetsu Footer Figure"] {
    width: clamp(290px, 92vw, 366px);
  }

  #footer .zetsu-footer-container {
    margin-bottom: -5rem;
    position: relative;
    z-index: 10;
  }

  #footer .footer-newsletter-card {
    position: relative;
    z-index: 20;
    background-color: rgba(0, 0, 0, 0.9);
  }

  /* Horizontal carousel snapping for touch */
  #figures-carousel-track {
    scroll-padding-left: 1rem;
    scroll-padding-right: 1rem;
    -webkit-overflow-scrolling: touch;
  }

  /* Center align and compact collection filter tab bar on mobile */
  #collection-filters {
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
    width: 100%;
    max-width: 310px;
    padding: 3px;
    gap: 3px;
  }

  #collection-filters .filter-btn {
    flex: 1 1 0%;
    text-align: center;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    padding: 5px 6px;
    font-size: 11px;
    letter-spacing: 0.02em;
  }

  /* Make Kisame Community figure bigger on mobile */
  #community img[alt="Kisame Community Figure"] {
    width: 84vw;
    max-width: 360px;
  }
}






