/**
 * Xi Meow Complete Animation & Design System
 * Kawaii Cat-Themed CSS Framework
 */

/* ===========================
   1. CSS Variables & Design Tokens
   =========================== */
:root {
  /* Primary Colors - Exact from React */
  --primary: #99734C;
  --primary-dark: #7A5A3D;
  --primary-light: #B8916B;
  
  /* Secondary Colors */
  --secondary: #FFB6C1;
  --secondary-dark: #FF9FAC;
  --secondary-light: #FFCDD5;
  
  /* Accent Colors */
  --accent: #FFDAB9;
  --accent-dark: #FFC7A0;
  --accent-light: #FFE7D2;
  
  /* Background Colors */
  --background: #FFF8F3;
  --background-light: #FFFFFF;
  --background-cream: #FFF0E6;
  
  /* CTA Colors */
  --cta-primary: #F4A6C3;
  --cta-hover: #F091B4;
  
  /* Brown Shades */
  --brown-dark: #964B00;
  --brown-medium: #A0522D;
  --brown-light: #8B4513;
  
  /* Text Colors */
  --text-primary: #2D2926;
  --text-secondary: #6B7280;
  --text-light: #9CA3AF;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);
  --shadow-kawaii: 0 10px 30px rgba(255,182,193,0.3);
  
  /* Fonts */
  --font-fredoka: 'Fredoka', cursive;
  --font-quicksand: 'Quicksand', sans-serif;
  --font-caveat: 'Caveat', cursive;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
  --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ===========================
   2. Font Imports
   =========================== */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300;400;500;600;700&family=Quicksand:wght@300;400;500;600;700&family=Caveat:wght@400;500;600;700&display=swap');

/* ===========================
   3. Base Styles & Resets
   =========================== */
body {
  font-family: var(--font-quicksand);
  color: var(--text-primary);
  background: var(--background);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-fredoka);
  font-weight: 600;
}

.font-fredoka { font-family: var(--font-fredoka) !important; }
.font-quicksand { font-family: var(--font-quicksand) !important; }
.font-caveat { font-family: var(--font-caveat) !important; }

/* ===========================
   4. Keyframe Animations
   =========================== */

/* Wiggle Animation */
@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-5deg); }
  40% { transform: rotate(5deg); }
  60% { transform: rotate(-3deg); }
  80% { transform: rotate(3deg); }
}

/* Float Animation */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

/* Purr Animation */
@keyframes purr {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.02) rotate(0.5deg); }
  50% { transform: scale(1) rotate(-0.5deg); }
  75% { transform: scale(1.02) rotate(0.5deg); }
}

/* Heart Pop Animation */
@keyframes heartPop {
  0% { transform: scale(0) rotate(-45deg); opacity: 0; }
  50% { transform: scale(1.2) rotate(-45deg); opacity: 1; }
  100% { transform: scale(1) rotate(-45deg); opacity: 1; }
}

/* Bounce Animation */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-10px); }
  50% { transform: translateY(0); }
  75% { transform: translateY(-5px); }
}

/* Paw Print Trail */
@keyframes pawTrail {
  0% { opacity: 0; transform: scale(0) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(180deg); }
  100% { opacity: 0; transform: scale(0) rotate(360deg); }
}

/* Slide In Scale */
@keyframes slideInScale {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Fade In Up */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Gradient Animation */
@keyframes gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Sparkle Animation */
@keyframes sparkle {
  0% { opacity: 0; transform: scale(0) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(180deg); }
  100% { opacity: 0; transform: scale(0) rotate(360deg); }
}

/* Cat Ear Wiggle */
@keyframes earWiggle {
  0%, 100% { transform: rotate(-15deg); }
  50% { transform: rotate(-5deg); }
}

/* Breathing Animation */
@keyframes breathing {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Slide Right */
@keyframes slideRight {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Slide Left */
@keyframes slideLeft {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Pulse Slow */
@keyframes pulseSlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

/* ===========================
   5. Animation Classes
   =========================== */

.animate-wiggle { animation: wiggle 0.8s ease-in-out infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-purr { animation: purr 2s ease-in-out infinite; }
.animate-heartPop { animation: heartPop 0.5s ease-out; }
.animate-bounce { animation: bounce 1s ease-in-out infinite; }
.animate-pawTrail { animation: pawTrail 2s ease-out infinite; }
.animate-slideInScale { animation: slideInScale 0.5s ease-out; }
.animate-fadeInUp { animation: fadeInUp 0.8s ease-out; }
.animate-gradient { 
  background-size: 300% 300%;
  animation: gradient 3s ease infinite; 
}
.animate-sparkle { animation: sparkle 1.5s ease-in-out infinite; }
.animate-earWiggle { animation: earWiggle 0.5s ease-in-out; }
.animate-breathing { animation: breathing 3s ease-in-out infinite; }
.animate-slideRight { animation: slideRight 0.5s ease-out; }
.animate-slideLeft { animation: slideLeft 0.5s ease-out; }
.animate-pulseSlow { animation: pulseSlow 3s ease-in-out infinite; }

/* Animation Delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-500 { animation-delay: 500ms; }
.delay-1000 { animation-delay: 1000ms; }

/* ===========================
   6. Hero Section Specific Styles
   =========================== */

/* Hero Image Grid Hover Effects */
.hero-image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.hero-image-item {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  cursor: pointer;
  transition: transform var(--transition-base);
}

.hero-image-item:hover {
  transform: scale(1.05) rotate(1deg);
  box-shadow: var(--shadow-xl);
}

.hero-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.hero-image-item:hover img {
  transform: scale(1.1);
}

/* Cat Name Overlay */
.hero-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.hero-image-item:hover .hero-image-overlay {
  opacity: 1;
}

.hero-image-name {
  color: white;
  font-family: var(--font-fredoka);
  font-size: 1.25rem;
  font-weight: 600;
  transform: translateY(20px);
  transition: transform var(--transition-base);
}

.hero-image-item:hover .hero-image-name {
  transform: translateY(0);
}

/* ===========================
   7. Feature Cards Kawaii Styles
   =========================== */

.feature-card-kawaii {
  position: relative;
  background: white;
  border-radius: 1.5rem;
  padding: 2rem;
  border: 3px solid;
  transition: all var(--transition-base);
  overflow: visible;
}

.feature-card-kawaii::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background: inherit;
  border: inherit;
  border-radius: 50%;
  z-index: -1;
}

.feature-card-kawaii:hover {
  transform: translateY(-5px) rotate(-1deg);
  box-shadow: var(--shadow-kawaii);
}

/* Feature Color Schemes */
.feature-amber {
  background: #FFF8E1;
  border-color: #FFC107;
  color: #F57C00;
}

.feature-pink {
  background: #FCE4EC;
  border-color: #F06292;
  color: #C2185B;
}

.feature-rose {
  background: #FFE4E1;
  border-color: #FF8A95;
  color: #C62828;
}

.feature-emerald {
  background: #E8F5E9;
  border-color: #66BB6A;
  color: #2E7D32;
}

.feature-purple {
  background: #F3E5F5;
  border-color: #BA68C8;
  color: #7B1FA2;
}

.feature-sky {
  background: #E1F5FE;
  border-color: #4FC3F7;
  color: #0277BD;
}

/* Feature Emoji Badge */
.feature-emoji-badge {
  position: absolute;
  top: -1rem;
  right: -1rem;
  width: 3.5rem;
  height: 3.5rem;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: var(--shadow-md);
  border: 3px solid;
  border-color: inherit;
  animation: bounce 2s ease-in-out infinite;
}

/* ===========================
   8. Gallery Styles
   =========================== */

/* Filter Buttons */
.filter-button {
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.filter-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}

.filter-button:hover::before {
  width: 100%;
  height: 100%;
}

.filter-button.active {
  background: var(--brown-dark);
  color: white;
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

/* Kitten Cards */
.kitten-card-container {
  position: relative;
  background: white;
  border-radius: 1.5rem;
  overflow: hidden;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
}

.kitten-card-container:hover {
  transform: translateY(-10px) rotate(1deg);
  box-shadow: var(--shadow-xl);
}

/* Cat Ears on Cards */
.cat-ears-decoration {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.cat-ear-left,
.cat-ear-right {
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
}

.cat-ear-left {
  border-width: 0 20px 25px 20px;
  border-color: transparent transparent var(--secondary) transparent;
  left: -45px;
  transform: rotate(-20deg);
}

.cat-ear-right {
  border-width: 0 20px 25px 20px;
  border-color: transparent transparent var(--secondary) transparent;
  right: -45px;
  transform: rotate(20deg);
}

/* Learn My Story Button */
.story-button {
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
  color: white;
  font-weight: 600;
  border-radius: 9999px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.story-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  transform: translate(-50%, -50%) scale(0);
  transition: transform var(--transition-base);
}

.story-button:hover::after {
  transform: translate(-50%, -50%) scale(1);
}

.story-button:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

/* ===========================
   9. Video Showcase Styles
   =========================== */

.video-frame-vintage {
  position: relative;
  padding: 1.5rem;
  background: linear-gradient(135deg, #FFE4E1 0%, #FFF0F5 100%);
  border-radius: 2rem;
  box-shadow: var(--shadow-xl);
}

.video-curtain-left,
.video-curtain-right {
  position: absolute;
  top: -15px;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
  border-radius: 50%;
  opacity: 0.4;
}

.video-curtain-left {
  left: -30px;
  animation: float 4s ease-in-out infinite;
}

.video-curtain-right {
  right: -30px;
  animation: float 4s ease-in-out infinite;
  animation-delay: 2s;
}

/* Gallery Slider */
.gallery-slider-container {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
}

.gallery-slide-track {
  display: flex;
  transition: transform var(--transition-slow);
}

.gallery-slide-item {
  flex: 0 0 25%;
  padding: 0 0.5rem;
}

.gallery-slide-image {
  width: 100%;
  height: 12rem;
  object-fit: cover;
  border-radius: 0.75rem;
  transition: transform var(--transition-base);
}

.gallery-slide-item:hover .gallery-slide-image {
  transform: scale(1.1);
}

/* Gallery Navigation */
.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  z-index: 10;
}

.gallery-nav-btn:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-50%) scale(1.1);
}

.gallery-nav-prev { left: -1rem; }
.gallery-nav-next { right: -1rem; }

/* ===========================
   10. Testimonial Styles
   =========================== */

.testimonial-card {
  background: white;
  border-radius: 1.5rem;
  padding: 2rem;
  position: relative;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 20px;
  font-size: 4rem;
  color: var(--secondary);
  font-family: var(--font-caveat);
  opacity: 0.3;
}

.testimonial-card:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-xl);
}

/* Star Rating */
.star-rating {
  display: flex;
  gap: 0.25rem;
  color: #FFD700;
}

.star-filled {
  fill: currentColor;
}

/* ===========================
   11. Booking Form Styles
   =========================== */

.booking-step-card {
  position: relative;
  background: white;
  border-radius: 1.5rem;
  padding: 2rem;
  border: 3px solid var(--secondary);
  transition: all var(--transition-base);
}

.booking-step-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-kawaii);
  border-color: var(--secondary-dark);
}

/* Progress Indicator */
.booking-progress-bar {
  position: relative;
  height: 4px;
  background: #E5E7EB;
  border-radius: 2px;
  overflow: hidden;
}

.booking-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--secondary) 0%, var(--cta-primary) 100%);
  transition: width var(--transition-slow);
}

/* ===========================
   12. Footer Styles
   =========================== */

.footer-cat-card {
  position: relative;
  background: white;
  border-radius: 1.5rem;
  padding: 2rem;
  border: 3px solid var(--secondary);
  overflow: visible;
}

.footer-cat-card::before,
.footer-cat-card::after {
  content: '';
  position: absolute;
  top: -12px;
  width: 0;
  height: 0;
  border-style: solid;
}

.footer-cat-card::before {
  left: 30px;
  border-width: 0 15px 20px 15px;
  border-color: transparent transparent white transparent;
  z-index: 2;
}

.footer-cat-card::after {
  left: 27px;
  border-width: 0 18px 24px 18px;
  border-color: transparent transparent var(--secondary) transparent;
  z-index: 1;
}

/* ===========================
   13. WhatsApp FAB
   =========================== */

.whatsapp-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 4rem;
  height: 4rem;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
  z-index: 999;
}

.whatsapp-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.5);
}

.whatsapp-fab::after {
  content: '🐾';
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--secondary);
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  animation: bounce 2s ease-in-out infinite;
}

/* ===========================
   14. Utility Classes
   =========================== */

/* Gradients */
.gradient-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

.gradient-secondary {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
}

.gradient-kawaii {
  background: linear-gradient(135deg, #FFE4E1 0%, #FFF0F5 50%, #FFE4E1 100%);
}

/* Text Gradients */
.text-gradient-primary {
  background: linear-gradient(90deg, var(--brown-light) 0%, var(--brown-medium) 50%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Shadows */
.shadow-kawaii {
  box-shadow: 0 10px 30px rgba(255,182,193,0.3);
}

.shadow-cat {
  box-shadow: 
    0 10px 20px rgba(255,182,193,0.2),
    0 6px 6px rgba(255,182,193,0.15);
}

/* Paw Print Decorations */
.paw-print {
  position: relative;
  display: inline-block;
}

.paw-print::after {
  content: '🐾';
  position: absolute;
  opacity: 0.1;
  font-size: 2rem;
  animation: pawTrail 3s ease-in-out infinite;
}

/* Responsive Helpers */
@media (max-width: 768px) {
  .hero-image-grid {
    grid-template-columns: 1fr;
  }
  
  .gallery-slide-item {
    flex: 0 0 50%;
  }
  
  .feature-card-kawaii {
    margin-bottom: 2rem;
  }
}

/* ===========================
   15. Loading & Transitions
   =========================== */

.page-transition-enter {
  opacity: 0;
  transform: translateY(20px);
}

.page-transition-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.5s ease-out;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Section Transitions */
.section-visible {
  animation: fadeInUp 0.8s ease-out;
}

/* Hover Link Underline */
.link-underline {
  position: relative;
  text-decoration: none;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width var(--transition-base);
}

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