/* ==========================================
        SABRE DE PLEIADES
        AUTO SCROLL ANIMATION
========================================== */

/* Smooth scrolling */

html {
  scroll-behavior: smooth;
}

/* ==========================
        PAGE LOAD EFFECT
========================== */

body {
  animation: pageFade 1.2s ease;
}

@keyframes pageFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ==========================
        GENERAL SECTIONS
========================== */

section {
  animation: sectionReveal linear;

  animation-timeline: view();

  animation-range: entry 0% cover 25%;
}

@keyframes sectionReveal {
  from {
    opacity: 0;

    transform: translateY(80px);
  }

  to {
    opacity: 1;

    transform: translateY(0);
  }
}

/* ==========================
        HERO ANIMATION
========================== */

.hero,
.book-hero,
.author-hero,
.gallery-hero,
.events-hero,
.contact-hero {
  animation: heroReveal 1.5s ease forwards;
}

@keyframes heroReveal {
  from {
    opacity: 0;

    transform: scale(1.05);
  }

  to {
    opacity: 1;

    transform: scale(1);
  }
}

/* ==========================
        HEADINGS
========================== */

h1 {
  animation: titleReveal 1.2s ease;
}

@keyframes titleReveal {
  from {
    opacity: 0;

    transform: translateY(50px);
  }

  to {
    opacity: 1;

    transform: translateY(0);
  }
}

h2 {
  animation: titleReveal 1s ease;
}

/* ==========================
        CARDS ANIMATION
========================== */

.character-card,
.author-card,
.event-card,
.gallery-item,
.review,
.contact-item,
.contact-box,
.author-box,
.feature-box {
  transition:
    transform 0.5s ease,
    box-shadow 0.5s ease,
    border 0.5s ease;

  animation: cardFloat linear;

  animation-timeline: view();

  animation-range: entry 10% cover 30%;
}

@keyframes cardFloat {
  from {
    opacity: 0;

    transform: translateY(70px);
  }

  to {
    opacity: 1;

    transform: translateY(0);
  }
}

/* ==========================
        CARD HOVER EFFECT
========================== */

.character-card:hover,
.author-card:hover,
.event-card:hover,
.review:hover,
.contact-item:hover {
  transform: translateY(-15px);

  box-shadow: 0 20px 50px rgba(212, 175, 55, 0.25);
}

/* ==========================
        BOOK COVER EFFECT
========================== */

.book-cover {
  animation: bookFloat 5s ease-in-out infinite;
}

@keyframes bookFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

/* ==========================
        IMAGE EFFECT
========================== */

.gallery-item img,
.author-image {
  transition: 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.author-image:hover {
  transform: scale(1.05);
}

/* ==========================
        GOLD GLOW EFFECT
========================== */

.logo,
.navbar-brand img {
  animation: goldGlow 4s infinite;
}

@keyframes goldGlow {
  0%,
  100% {
    filter: drop-shadow(0 0 5px rgba(255, 215, 106, 0.4));
  }

  50% {
    filter: drop-shadow(0 0 25px rgba(255, 215, 106, 0.9));
  }
}

/* ==========================
        BUTTON ANIMATION
========================== */

.btn,
.gold-btn,
.feature-box a,
.contact-box button {
  transition: 0.4s ease;
}

.btn:hover,
.gold-btn:hover,
.feature-box a:hover,
.contact-box button:hover {
  transform: translateY(-5px) scale(1.05);
}

/* ==========================
        NAVBAR SCROLL EFFECT
========================== */

.premium-navbar {
  transition: 0.5s ease;
}

.premium-navbar.scrolled {
  background: rgba(5, 11, 28, 0.95);

  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* ==========================
        STAR PARALLAX
========================== */

.hero::after,
.book-hero::after,
.author-hero::after,
.gallery-hero::after,
.events-hero::after,
.contact-hero::after {
  animation: starMove 60s linear infinite;
}

@keyframes starMove {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 0 -500px;
  }
}

/* ==========================
        MOBILE OPTIMIZATION
========================== */

@media (max-width: 768px) {
  section {
    animation-range: entry 0% cover 20%;
  }

  .book-cover {
    animation-duration: 6s;
  }
}

.hero-book {
  transform-style: preserve-3d;
  will-change: transform;
}

.hero-book img {
  transition: 0.4s ease;
}

.book-card img {
  transition: 0.45s ease;
  transform-style: preserve-3d;
}

.btn {
  transition: 0.3s;
}

section {
  overflow: hidden;
}

body {
  overflow-x: hidden;
}
