/* ===========================
   KOODAI COFFEE - TYPOGRAPHY & ANIMATIONS
   Elegant Typography with Smooth Animations
   =========================== */

/* ===========================
   TYPOGRAPHY BASE
   =========================== */

/* Responsive Typography with clamp() - Moved to input.css to avoid conflicts */
/* These are now defined there to ensure consistency */

/* ===========================
   SECTION DIVIDERS
   =========================== */
.section-divider {
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #D4A373, transparent);
  margin: 2rem auto;
  opacity: 0.6;
}

.section-divider-full {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 163, 115, 0.3), transparent);
  margin: 3rem 0;
}

/* ===========================
   SCROLL REVEAL ANIMATIONS
   Border always visible, only fade-in animation
   =========================== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  visibility: hidden;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 0.6s;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 0s;
}

/* Staggered reveal delays - lighter delays for smoother feel */
.scroll-reveal:nth-child(1) { transition-delay: 0.05s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.15s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.25s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.3s; }

/* ===========================
   HOVER UNDERLINE ANIMATION
   =========================== */
.hover-underline {
  position: relative;
  display: inline-block;
}

.hover-underline::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #D4A373, #8B6F47);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-underline:hover::after {
  width: 100%;
}

/* ===========================
   ANIMATED HEADLINE
   =========================== */
.animated-headline {
  background: linear-gradient(
    120deg,
    #1E1E1E 0%,
    #D4A373 50%,
    #1E1E1E 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

body.dark-mode .animated-headline {
  background: linear-gradient(
    120deg,
    #F9F5EF 0%,
    #D4A373 50%,
    #F9F5EF 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes shimmer {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* ===========================
   BADGE ANIMATIONS
   =========================== */
.menu-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 10;
  animation: badge-pulse 2s ease-in-out infinite;
}

.badge-bestseller {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #1E1E1E;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.badge-promo {
  background: linear-gradient(135deg, #FF6B6B, #FF4757);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.badge-new {
  background: linear-gradient(135deg, #4ECDC4, #44A08D);
  color: white;
  box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
}

@keyframes badge-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(212, 163, 115, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(212, 163, 115, 0.6);
  }
}

/* ===========================
   MICRO-INTERACTIONS
   =========================== */
.scale-on-hover {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-on-hover:hover {
  transform: scale(1.02);
}

.lift-on-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lift-on-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(212, 163, 115, 0.2);
}

/* ===========================
   TEXT SCALE ANIMATION
   =========================== */
.text-scale-in {
  animation: textScaleIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes textScaleIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===========================
   GRADIENT TEXT
   =========================== */
.gradient-text {
  background: linear-gradient(135deg, #D4A373 0%, #8B6F47 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===========================
   LOADING SKELETON
   =========================== */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(212, 163, 115, 0.1) 25%,
    rgba(212, 163, 115, 0.2) 50%,
    rgba(212, 163, 115, 0.1) 75%
  );
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===========================
   ATTENTION GRABBER
   =========================== */
.attention-pulse {
  animation: attention-pulse 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes attention-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(212, 163, 115, 0.7);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(212, 163, 115, 0);
  }
}

/* ===========================
   ENHANCED SECTIONS SPACING
   =========================== */
section {
  position: relative;
  overflow: hidden;
}

/* ===========================
   MOBILE RESPONSIVE
   =========================== */
@media (max-width: 768px) {
  .scroll-reveal {
    transform: translateY(20px);
  }

  .section-divider {
    width: 60px;
  }

  .menu-badge {
    font-size: 0.65rem;
    padding: 0.3rem 0.7rem;
  }
}

/* ===========================
   PREMIUM BUTTON STYLES
   =========================== */
.premium-btn {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.premium-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  z-index: -1;
}

.premium-btn:hover::before {
  width: 300px;
  height: 300px;
}

/* ===========================
   CONTENT FADE IN
   =========================== */
.content-fade-in {
  animation: contentFadeIn 1s ease-out;
}

@keyframes contentFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
