/**
 * Weiyi Design System - Design Tokens
 * Based on hims.com aesthetic: clean, warm, modern
 * Single source of truth for all design values
 */

:root {
  /* ============================================
   * COLOR PALETTE
   * ============================================ */

  /* Primary Brand Colors */
  --color-primary: #cc866c;
  --color-primary-dark: #b8745a;
  --color-primary-light: #daa08a;

  /* Neutral Colors */
  --color-text-primary: #2d2926;
  --color-text-secondary: #5c5552;
  --color-text-muted: #8c8279;
  --color-text-light: #a39e99;

  /* Background Colors */
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #faf7f5;
  --color-bg-tertiary: #f5f2ef;

  /* Border Colors */
  --color-border: #e8e4e1;
  --color-border-light: #f0ece8;
  --color-border-dark: #d4cfc9;

  /* Semantic Colors */
  --color-whatsapp: #25D366;
  --color-whatsapp-dark: #128C7E;
  --color-success: #25D366;
  --color-error: #dc3545;
  --color-warning: #ffc107;

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

  /* Font Family */
  --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Font Sizes */
  --font-size-xs: 12px;
  --font-size-sm: 13px;
  --font-size-base: 14px;
  --font-size-md: 15px;
  --font-size-lg: 16px;
  --font-size-xl: 18px;
  --font-size-2xl: 20px;
  --font-size-3xl: 22px;
  --font-size-4xl: 24px;
  --font-size-5xl: 28px;
  --font-size-6xl: 36px;
  --font-size-7xl: 44px;
  --font-size-8xl: 52px;
  --font-size-9xl: 60px;
  --font-size-hero: 72px;

  /* Font Weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Line Heights */
  --line-height-tight: 1.2;
  --line-height-snug: 1.3;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.6;
  --line-height-loose: 1.7;
  --line-height-spacious: 1.8;

  /* Letter Spacing */
  --letter-spacing-tight: -0.02em;
  --letter-spacing-tighter: -0.5px;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.5px;
  --letter-spacing-wider: 2px;

  /* ============================================
   * SPACING
   * ============================================ */

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-14: 56px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-28: 112px;

  /* Section Spacing */
  --section-padding-lg: 100px;
  --section-padding-md: 80px;
  --section-padding-sm: 60px;

  /* ============================================
   * BORDERS & RADIUS
   * ============================================ */

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* ============================================
   * SHADOWS
   * ============================================ */

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.12);
  --shadow-whatsapp: 0 4px 20px rgba(37, 211, 102, 0.3);
  --shadow-primary: 0 4px 20px rgba(204, 134, 108, 0.3);

  /* ============================================
   * TRANSITIONS
   * ============================================ */

  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.4s ease;
  --transition-slower: 0.5s ease;

  /* ============================================
   * Z-INDEX
   * ============================================ */

  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;

  /* ============================================
   * CONTAINER
   * ============================================ */

  --container-max-width: 1200px;
  --container-padding: 15px;
}

/* ============================================
 * RESPONSIVE ADJUSTMENTS
 * ============================================ */

@media (max-width: 991px) {
  :root {
    --section-padding-lg: 80px;
    --section-padding-md: 60px;
    --section-padding-sm: 50px;

    --font-size-hero: 52px;
    --font-size-9xl: 44px;
    --font-size-8xl: 36px;
    --font-size-7xl: 32px;
    --font-size-6xl: 28px;
  }
}

@media (max-width: 767px) {
  :root {
    --section-padding-lg: 60px;
    --section-padding-md: 50px;
    --section-padding-sm: 40px;

    --font-size-hero: 40px;
    --font-size-9xl: 36px;
    --font-size-8xl: 32px;
    --font-size-7xl: 28px;
    --font-size-6xl: 24px;
  }
}

/* ============================================
 * PREMIUM ANIMATIONS & MICRO-INTERACTIONS
 * ============================================ */

/* WOW.js animations disabled - content shows immediately without FOUC */
/* .wow { visibility: hidden; } - REMOVED */

.animated {
  animation-fill-mode: both;
}

/* Premium Hover Lift Effect */
.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

/* Image Scale on Hover */
.img-hover-zoom {
  overflow: hidden;
}

.img-hover-zoom img {
  transition: transform var(--transition-slower);
}

.img-hover-zoom:hover img {
  transform: scale(1.08);
}

/* Shimmer Effect for Loading */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  background: linear-gradient(
    90deg,
    var(--color-bg-secondary) 0%,
    var(--color-bg-primary) 50%,
    var(--color-bg-secondary) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite linear;
}

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

.floating {
  animation: float 3s ease-in-out infinite;
}

/* Pulse Glow Effect */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(204, 134, 108, 0.4);
  }
  50% {
    box-shadow: 0 0 20px 10px rgba(204, 134, 108, 0.2);
  }
}

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

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

.gradient-animated {
  background-size: 200% 200%;
  animation: gradient-shift 8s ease infinite;
}

/* Button Press Effect */
.btn-press {
  transition: transform 0.1s ease;
}

.btn-press:active {
  transform: scale(0.97);
}

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

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

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

/* Card Tilt on Hover (subtle) */
.card-tilt {
  transition: transform var(--transition-base);
}

.card-tilt:hover {
  transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) translateY(-5px);
}

/* Staggered Children Animation */
.stagger-children > * {
  opacity: 0;
  animation: stagger-fade-in 0.5s ease forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.6s; }

@keyframes stagger-fade-in {
  to {
    opacity: 1;
  }
}

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

/* Focus Ring for Accessibility */
*:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Selection Color */
::selection {
  background: var(--color-primary);
  color: white;
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .wow {
    visibility: visible !important;
  }
}
