@tailwind base;
@tailwind components;
@tailwind utilities;

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
  max-width: 100vw;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-display {
  font-family: "Lora", "Playfair Display", Georgia, serif;
}

@layer base {
  :root {
    --background: 30 100% 98%;
    --foreground: 280 10% 15%;
    --primary: 340 60% 35%;
    --primary-foreground: 30 100% 98%;
    --secondary: 353 76% 50%;
    --secondary-foreground: 30 100% 98%;
    --accent: 45 100% 50%;
    --accent-foreground: 280 10% 15%;
    --card: 280 15% 20%;
    --card-foreground: 30 100% 98%;
    --popover: 30 100% 98%;
    --popover-foreground: 280 10% 15%;
    --muted: 280 8% 40%;
    --muted-foreground: 30 20% 90%;
    --border: 45 100% 60%;
    --input: 280 8% 40%;
    --ring: 340 60% 35%;
    --radius: 1rem;
    --destructive: 0 84% 60%;
    --destructive-foreground: 0 0% 98%;
    --wine-dark: 294 26% 14%;
    --rose-deep: 333 61% 34%;
    --rose-muted: 331 30% 32%;
    --cream-light: 30 50% 95%;
    --gold-soft: 31 52% 64%;
  }
  
  .dark {
    --background: 280 15% 15%;
    --foreground: 30 100% 98%;
    --card: 280 15% 20%;
    --card-foreground: 30 100% 98%;
    --popover: 280 15% 15%;
    --popover-foreground: 30 100% 98%;
    --primary: 340 60% 45%;
    --primary-foreground: 30 100% 98%;
    --secondary: 353 76% 60%;
    --secondary-foreground: 30 100% 98%;
    --muted: 280 8% 30%;
    --muted-foreground: 30 20% 80%;
    --accent: 45 100% 60%;
    --accent-foreground: 280 10% 15%;
    --border: 45 100% 60%;
    --input: 280 8% 30%;
    --ring: 340 60% 45%;
  }

  h1, h2, h3, h4 {
    font-family: "Lora", "Playfair Display", Georgia, serif;
    font-weight: 600;
    letter-spacing: -0.02em;
  }

  @font-face {
    font-display: swap;
  }
}

@layer components {
  .btn-cta-green {
    @apply bg-[#22C55E] hover:bg-[#16a34a] text-white font-bold rounded-full shadow-[0_0_20px_rgba(34,197,94,0.4)] hover:shadow-[0_0_30px_rgba(34,197,94,0.6)] transition-all duration-300 hover:-translate-y-1 active:scale-95;
    animation: buttonGlow 2.5s ease-in-out infinite;
  }

  button[class*='green'],
  [role='button'][class*='green'] {
    animation: buttonGlow 2.5s ease-in-out infinite;
  }

  .dark-wine-card {
    @apply bg-[hsl(var(--card))] text-[hsl(var(--card-foreground))] border border-[hsl(var(--border))] rounded-2xl shadow-[0_10px_30px_rgba(0,0,0,0.3)] hover:shadow-[0_15px_40px_rgba(201,168,76,0.2)] transition-all duration-500 hover:-translate-y-2 relative overflow-hidden;
    contain: layout paint;
  }

  .gold-text {
    background: linear-gradient(135deg, #FFE58F, #C9A84C, #FFE58F);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(201,168,76,0.3);
  }

  .profile-image-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #FFC107;
    object-fit: cover;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    aspect-ratio: 1 / 1;
  }
}

@layer utilities {
  .bg-hero-gradient {
    background: linear-gradient(135deg, hsl(var(--rose-deep)) 0%, hsl(var(--cream-light)) 100%);
  }
  
  .bg-section-dark {
    background: linear-gradient(to bottom, hsl(var(--wine-dark)), hsl(var(--rose-muted)));
  }

  .bg-section-rose {
    background: linear-gradient(to bottom, hsl(var(--rose-deep)), hsl(var(--wine-dark)));
  }

  .bokeh-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    contain: strict;
  }

  .bokeh-particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
    animation: float-bokeh 10s infinite ease-in-out alternate;
    opacity: 0.4;
    will-change: transform, opacity;
  }

  .wave-divider {
    position: absolute;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    contain: layout paint;
  }

  .wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
  }

  .hero-product-backdrop {
    position: relative;
    border: 1.5px solid hsl(45, 93%, 56%, 0.4);
    border-radius: 2.5rem;
    background: linear-gradient(145deg, rgba(45, 27, 46, 0.4) 0%, rgba(15, 8, 16, 0.6) 100%);
    box-shadow: 0 35px 40px 15px rgba(0, 0, 0, 0.5), 0 0 60px 20px rgba(201, 168, 76, 0.2);
    backdrop-filter: blur(12px);
    z-index: 10;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    width: 100%;
    contain: layout paint;
  }

  .hero-product-backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    z-index: 20;
    transition: box-shadow 0.7s ease;
  }

  .group:hover .hero-product-backdrop::after {
    box-shadow: inset 0 0 45px rgba(0, 0, 0, 0.8);
  }

  @media (max-width: 768px) {
    .product-showcase-wrapper {
      transform: scale(0.95);
      max-width: 95%;
      margin: 0 auto;
    }
  }

  @media (max-width: 639px) {
    .hero-product-backdrop {
      border-radius: 1.5rem;
      box-shadow: 0 15px 25px 5px rgba(0, 0, 0, 0.4), 0 0 30px 10px rgba(201, 168, 76, 0.2);
    }
    .hero-product-backdrop::after {
      box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
    }
    .group:hover .hero-product-backdrop::after {
      box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.7);
    }
  }
}

@keyframes buttonGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.4), 0 0 10px rgba(34, 197, 94, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(74, 222, 128, 0.8), 0 0 20px rgba(34, 197, 94, 0.6);
  }
}

@keyframes float-bokeh {
  0% { transform: translate(0, 0) scale(1); opacity: 0.2; }
  50% { transform: translate(20px, -30px) scale(1.2); opacity: 0.5; }
  100% { transform: translate(-10px, -50px) scale(0.8); opacity: 0.2; }
}