/* ============================================
   BaRi — Familia Baeza Rios
   Global Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600;1,700&family=Inter:wght@300;400;500;600&family=Dancing+Script:wght@400;500;600;700&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  /* Warm Rose-Gold Palette */
  --clr-bg-deep: #0d0a0e;
  --clr-bg: #1a1520;
  --clr-surface: #231e2b;
  --clr-surface-hover: #2e2838;
  --clr-border: rgba(255, 200, 180, 0.08);
  --clr-border-hover: rgba(255, 200, 180, 0.18);

  --clr-rose: #e8a0bf;
  --clr-rose-light: #f0c6d8;
  --clr-rose-dark: #c06090;
  --clr-gold: #d4a574;
  --clr-gold-light: #e8c9a0;
  --clr-cream: #fdf0e8;
  --clr-lavender: #b8a0d8;
  --clr-sage: #a8c8a0;

  --clr-text: #f0e8f0;
  --clr-text-secondary: #b8a8c0;
  --clr-text-muted: #887898;

  /* Gradients */
  --grad-hero: linear-gradient(135deg, #1a1020 0%, #201828 40%, #281830 70%, #1a1020 100%);
  --grad-rose: linear-gradient(135deg, var(--clr-rose-dark), var(--clr-rose), var(--clr-gold));
  --grad-gold: linear-gradient(135deg, var(--clr-gold), var(--clr-gold-light));
  --grad-glass: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));

  /* Typography */
  --ff-display: 'Playfair Display', Georgia, serif;
  --ff-body: 'Inter', -apple-system, sans-serif;
  --ff-script: 'Dancing Script', cursive;

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

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.3);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.4);
  --shadow-glow-rose: 0 0 40px rgba(232,160,191,0.15);
  --shadow-glow-gold: 0 0 40px rgba(212,165,116,0.15);

  /* Transitions */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 200ms;
  --duration-normal: 350ms;
  --duration-slow: 600ms;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--ff-body);
  background: var(--clr-bg-deep);
  color: var(--clr-text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ---------- Utility Classes ---------- */
.glass {
  background: var(--grad-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--clr-border);
}

.glass:hover {
  border-color: var(--clr-border-hover);
}

.text-gradient-rose {
  background: var(--grad-rose);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-gold {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(232,160,191,0.1); }
  50% { box-shadow: 0 0 40px rgba(232,160,191,0.25); }
}

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

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.15); }
  28% { transform: scale(1); }
  42% { transform: scale(1.1); }
  56% { transform: scale(1); }
}

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(180deg); }
}

@keyframes drift {
  0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100vh) translateX(50px) rotate(360deg); opacity: 0; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-60px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes rotateIn {
  from { opacity: 0; transform: rotate(-10deg) scale(0.9); }
  to { opacity: 1; transform: rotate(0) scale(1); }
}

/* Intersection Observer animation triggers */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--duration-slow) var(--ease-smooth),
              transform var(--duration-slow) var(--ease-smooth);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity var(--duration-slow) var(--ease-smooth),
              transform var(--duration-slow) var(--ease-smooth);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity var(--duration-slow) var(--ease-smooth),
              transform var(--duration-slow) var(--ease-smooth);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity var(--duration-slow) var(--ease-smooth),
              transform var(--duration-slow) var(--ease-bounce);
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--clr-bg-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--clr-rose-dark);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--clr-rose);
}

/* ---------- Floating Particles (shared) ---------- */
.particles-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

/* ---------- Page Transition Overlay ---------- */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--clr-bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease-smooth);
}

.page-transition.fade-out {
  opacity: 0;
  pointer-events: none;
}

.page-transition .loader-heart {
  font-size: 3rem;
  animation: heartbeat 1.2s ease-in-out infinite;
}
