:root {
  --color-primary: #2E2440;
  --color-secondary: #453660;
  --color-accent: #A78BFA;
  --color-bg-light: #FAF5FF;
  --color-bg-alt: #F3E8FF;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  font-family: 'Urbanist', system-ui, sans-serif;
}

/* =====================
   BUTTON FIXES
   ===================== */
button,
.btn,
[class*="btn-"],
a[href="#order_form"] {
  white-space: nowrap;
  min-width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

form button[type="submit"] {
  white-space: normal;
  width: 100%;
  display: flex;
}

/* =====================
   ANIMATIONS
   ===================== */
html.js-anim html.js-anim [data-animate] {
  opacity: 0;
  transform: translateX(2rem);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

html.js-anim html.js-anim [data-animate].is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger delays */
html.js-anim [data-animate][data-delay="100"] { transition-delay: 0.1s; }
html.js-anim [data-animate][data-delay="200"] { transition-delay: 0.2s; }
html.js-anim [data-animate][data-delay="300"] { transition-delay: 0.3s; }
html.js-anim [data-animate][data-delay="400"] { transition-delay: 0.4s; }
html.js-anim [data-animate][data-delay="500"] { transition-delay: 0.5s; }
html.js-anim [data-animate][data-delay="600"] { transition-delay: 0.6s; }

.rotate-180 { transform: rotate(180deg); }

/* =====================
   DECORATIVE PATTERNS
   ===================== */
.decor-grid-dots {
  background-image: radial-gradient(circle, var(--color-accent) 1px, transparent 1px);
  background-size: 28px 28px;
}

.decor-grid-lines {
  background-image:
    linear-gradient(var(--color-accent) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-accent) 1px, transparent 1px);
  background-size: 40px 40px;
}

.decor-diagonal {
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 8px,
    var(--color-accent) 8px,
    var(--color-accent) 9px
  );
}

.decor-mesh {
  background: radial-gradient(ellipse at 20% 50%, var(--color-accent) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, var(--color-secondary) 0%, transparent 50%);
}

/* Intensity modifiers */
.decor-subtle { opacity: 0.05; }
.decor-moderate { opacity: 0.10; }
.decor-bold { opacity: 0.20; }

/* Gradient blur blobs */
.decor-gradient-blur::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
  opacity: 0.12;
  border-radius: 50%;
  top: -100px;
  right: -100px;
  pointer-events: none;
}

.decor-gradient-blur::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--color-secondary) 0%, transparent 70%);
  opacity: 0.1;
  border-radius: 50%;
  bottom: -80px;
  left: -80px;
  pointer-events: none;
}

/* Corner accents */
.decor-corner-tr::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: linear-gradient(225deg, var(--color-accent) 0%, transparent 60%);
  opacity: 0.15;
  pointer-events: none;
}

.decor-corner-bl::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200px;
  height: 200px;
  background: linear-gradient(45deg, var(--color-primary) 0%, transparent 60%);
  opacity: 0.15;
  pointer-events: none;
}

/* Glow element */
.decor-glow-element {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--color-accent) 0%, transparent 65%);
  opacity: 0.08;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* =====================
   FORM STYLES
   ===================== */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 0.5rem;
  font-family: 'Urbanist', system-ui, sans-serif;
  font-size: 0.95rem;
  color: #111827;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15);
}

.form-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-error {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 0.25rem;
  display: none;
}

.form-error.visible {
  display: block;
}

/* =====================
   STARS RATING
   ===================== */
.stars {
  display: inline-flex;
  gap: 2px;
  color: #f59e0b;
}

.star-full::before { content: '★'; }
.star-half::before { content: '½'; }
.star-empty::before { content: '☆'; }

/* =====================
   HERO SECTION
   ===================== */
.hero-bg {
  background: linear-gradient(135deg, #2E2440 0%, #453660 60%, #3d2d5a 100%);
}

/* =====================
   CARD STYLES
   ===================== */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(46, 36, 64, 0.15);
}

/* =====================
   FAQ ACCORDION
   ===================== */
.faq-answer {
  display: none;
  overflow: hidden;
}

.faq-answer.open {
  display: block;
}

.faq-icon {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

/* =====================
   ORDER FORM
   ===================== */
#order_form {
  scroll-margin-top: 5rem;
}

.order-form-wrapper {
  background: linear-gradient(135deg, var(--color-bg-light) 0%, var(--color-bg-alt) 100%);
}

/* =====================
   MOBILE MENU
   ===================== */
#mobile-menu {
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

/* =====================
   HEADER SCROLL EFFECT
   ===================== */
.header-scrolled {
  box-shadow: 0 2px 20px rgba(46, 36, 64, 0.1);
}

/* =====================
   TESTIMONIAL STYLES
   ===================== */
.testimonial-card {
  border-left: 4px solid var(--color-accent);
  padding-left: 1.5rem;
}

/* =====================
   GRADIENT TEXT
   ===================== */
.gradient-text {
  background: linear-gradient(135deg, var(--color-accent) 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =====================
   BADGE
   ===================== */
.badge-accent {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  background: rgba(167, 139, 250, 0.15);
  color: var(--color-accent);
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(167, 139, 250, 0.3);
}

/* =====================
   INGREDIENT CARD
   ===================== */
.ingredient-card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.ingredient-card:hover {
  box-shadow: 0 8px 25px rgba(46, 36, 64, 0.12);
  transform: translateY(-3px);
}

/* =====================
   SECTION BG VARIANTS
   ===================== */
.bg-light { background-color: var(--color-bg-light); }
.bg-alt { background-color: var(--color-bg-alt); }

/* =====================
   LOADING SPINNER
   ===================== */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* =====================
   PULSE ANIMATION
   ===================== */
@keyframes pulse-accent {
  0%, 100% { box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(167, 139, 250, 0); }
}

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

/* =====================
   RESPONSIVE UTILITIES
   ===================== */
@media (max-width: 768px) {
  .hero-bg { padding-top: 3rem; padding-bottom: 3rem; }
}