:root {
  --color-primary: #1A1A1A;
  --color-secondary: #404040;
  --color-accent: #111111;
}

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

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

/* Button normalization */
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;
}

/* Scroll animations — gated so bots/no-JS/screenshots see full content */
html.js-anim html.js-anim [data-animate] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

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

/* Rotate utility */
.rotate-180 {
  transform: rotate(180deg);
}

/* Decorative backgrounds */
.decor-grid-dots {
  background-image: radial-gradient(circle, rgba(0,0,0,0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}

.decor-grid-lines {
  background-image:
    linear-gradient(rgba(0,0,0,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.05) 1px, transparent 1px);
  background-size: 32px 32px;
}

.decor-diagonal {
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 20px,
    rgba(0,0,0,0.03) 20px,
    rgba(0,0,0,0.03) 21px
  );
}

.decor-mesh {
  background-image:
    radial-gradient(at 40% 20%, rgba(26,26,26,0.06) 0px, transparent 50%),
    radial-gradient(at 80% 0%, rgba(64,64,64,0.04) 0px, transparent 50%),
    radial-gradient(at 0% 50%, rgba(17,17,17,0.05) 0px, transparent 50%);
}

.decor-subtle { opacity: 0.5; }
.decor-moderate { opacity: 0.75; }
.decor-bold { opacity: 1; }

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

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

.decor-corner-tr::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: linear-gradient(225deg, rgba(26,26,26,0.06) 0%, transparent 60%);
  pointer-events: none;
}

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

.decor-glow-element {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(26,26,26,0.07) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* Star rating */
.stars {
  display: inline-flex;
  gap: 2px;
}

.star {
  color: #f59e0b;
  font-size: 0.9rem;
}

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

.form-input:focus {
  border-color: #1A1A1A;
  box-shadow: 0 0 0 3px rgba(26,26,26,0.08);
}

.form-input.error {
  border-color: #ef4444;
}

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

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

/* Order form success state */
.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
}

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

/* Mobile menu transition */
#mobile-menu {
  transition: all 0.2s ease-out;
}

/* Ingredient cards */
.ingredient-card {
  transition: transform 0.2s ease-out;
}

.ingredient-card:hover {
  transform: translateY(-4px);
}

/* FAQ card */
.faq-card {
  transition: transform 0.15s ease-out;
}

/* Testimonial card hover */
.testimonial-card {
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.testimonial-card:hover {
  transform: translateY(-3px);
}

/* Badge pill */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Section utility */
.section-py {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

@media (min-width: 1024px) {
  .section-py {
    padding-top: 7rem;
    padding-bottom: 7rem;
  }
}

/* Smooth image load */
img {
  transition: opacity 0.3s ease-out;
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid #1A1A1A;
  outline-offset: 3px;
}

/* Cookie consent animation */
#cookie-consent {
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Horizontal scroll for mobile ingredient list */
@media (max-width: 640px) {
  .ingredients-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .ingredients-scroll::-webkit-scrollbar {
    display: none;
  }
}

/* Print */
@media print {
  header, footer, #cookie-consent {
    display: none !important;
  }
}