/* Reset + Custom Properties + Typography + Animations */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500&family=Playfair+Display:wght@700;900&display=swap');

:root {
  /* Palette */
  --color-base: #1a2a1f;
  --color-base-light: #243028;
  --color-accent: #d4b896;
  --color-accent-hover: #c4a882;
  --color-bg: #ffffff;
  --color-bg-tonal: #f8faf8;
  --color-text: #1a1a1a;
  --color-text-light: #ffffff;
  --color-text-muted: rgba(255, 255, 255, 0.6);
  --color-border: rgba(212, 184, 150, 0.25);
  --color-border-strong: #d4b896;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', sans-serif;

  /* Text sizes (mobile-first) */
  --text-xs: 0.6875rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-4xl: 2.625rem;
  --text-metric: 2.375rem;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Borders */
  --radius-sm: 2px;
  --radius-md: 4px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lift: 0 8px 30px rgba(0,0,0,0.12);

  /* Glow */
  --glow-accent: 0 0 20px rgba(212, 184, 150, 0.3), 0 0 40px rgba(212, 184, 150, 0.1);
  --glow-text: 0 0 30px rgba(212, 184, 150, 0.4), 0 0 60px rgba(212, 184, 150, 0.15);

  /* Max width */
  --max-width: 1080px;
}

@media (min-width: 769px) {
  :root {
    --text-2xl: 2.625rem;
    --text-metric: 4rem;
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

p { margin-block-end: var(--space-md); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ========================================
   Keyframe Animations
   ======================================== */

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

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

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 15px rgba(212, 184, 150, 0.2), 0 0 30px rgba(212, 184, 150, 0.1); }
  50% { box-shadow: 0 0 25px rgba(212, 184, 150, 0.4), 0 0 50px rgba(212, 184, 150, 0.2); }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes draw-line {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes particle-float {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0;
  }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% {
    transform: translate(var(--tx, 80px), var(--ty, -120px)) scale(0);
    opacity: 0;
  }
}

@keyframes rotate-border {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

@keyframes text-glow-pulse {
  0%, 100% { text-shadow: 0 0 20px rgba(212, 184, 150, 0.3), 0 0 40px rgba(212, 184, 150, 0.1); }
  50% { text-shadow: 0 0 30px rgba(212, 184, 150, 0.5), 0 0 60px rgba(212, 184, 150, 0.2); }
}

/* ========================================
   Animation Utility Classes
   ======================================== */

.animate-fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.animate-fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-stagger {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.animate-stagger.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-stagger:nth-child(1) { transition-delay: 0.05s; }
.animate-stagger:nth-child(2) { transition-delay: 0.1s; }
.animate-stagger:nth-child(3) { transition-delay: 0.15s; }
.animate-stagger:nth-child(4) { transition-delay: 0.2s; }
.animate-stagger:nth-child(5) { transition-delay: 0.25s; }
.animate-stagger:nth-child(6) { transition-delay: 0.3s; }

/* Reduced motion */
@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; }
  .animate-fade-in,
  .animate-stagger {
    opacity: 1 !important;
    transform: none !important;
  }
}
