:root {
  --color-primary: #1F2937;
  --color-secondary: #374151;
  --color-accent: #64748B;
  --font-main: 'Nunito Sans', system-ui, sans-serif;
}

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

body {
  font-family: var(--font-main);
}

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

/* ─── Scroll 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);
}

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; }

/* ─── Utility ─── */
.rotate-180 { transform: rotate(180deg); }

/* ─── Decorative backgrounds ─── */
.decor-grid-dots {
  background-image: radial-gradient(circle, rgba(100,116,139,0.15) 1px, transparent 1px);
  background-size: 24px 24px;
}

.decor-grid-lines {
  background-image:
    linear-gradient(rgba(100,116,139,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100,116,139,0.08) 1px, transparent 1px);
  background-size: 40px 40px;
}

.decor-diagonal {
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(100,116,139,0.05) 10px,
    rgba(100,116,139,0.05) 11px
  );
}

.decor-mesh {
  background: radial-gradient(ellipse at 20% 50%, rgba(100,116,139,0.12) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(31,41,55,0.08) 0%, transparent 50%);
}

/* ─── Intensity modifiers ─── */
.decor-subtle { opacity: 0.5; }
.decor-moderate { opacity: 0.75; }
.decor-bold { opacity: 1; }

/* ─── Decorative accent elements ─── */
.decor-gradient-blur {
  position: relative;
  overflow: hidden;
}

.decor-gradient-blur::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(100,116,139,0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.decor-gradient-blur::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(31,41,55,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.decor-corner-tr::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, rgba(100,116,139,0.12) 0%, transparent 60%);
  pointer-events: none;
}

.decor-corner-bl::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200px;
  height: 200px;
  background: linear-gradient(315deg, rgba(100,116,139,0.12) 0%, transparent 60%);
  pointer-events: none;
}

.decor-glow-element {
  filter: drop-shadow(0 0 40px rgba(100,116,139,0.25));
}

/* ─── Star rating display ─── */
.star-rating {
  color: #f59e0b;
  letter-spacing: 0.05em;
}

/* ─── Form inputs ─── */
.form-input {
  width: 100%;
  border: 1px solid #E5E7EB;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-family: var(--font-main);
  background: #fff;
  color: #111827;
  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(100,116,139,0.12);
}

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

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

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

/* ─── Order form success ─── */
#form-success {
  display: none;
}

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

/* ─── Product badge ─── */
.product-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ─── Testimonial style: minimal ─── */
.testimonial-minimal {
  border-left: 4px solid var(--color-accent);
  padding-left: 1.5rem;
}

/* ─── FAQ two-column ─── */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem 3rem;
}

@media (min-width: 768px) {
  .faq-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ─── Pricing highlight ─── */
.price-main {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.price-old {
  text-decoration: line-through;
  color: #9CA3AF;
  font-size: 1rem;
}

.price-save {
  color: #16A34A;
  font-size: 0.875rem;
  font-weight: 600;
}

/* ─── Header scroll shadow ─── */
header.scrolled {
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

/* ─── Mobile menu transition ─── */
#mobile-menu {
  transition: opacity 0.2s ease;
}

/* ─── Smooth image loading ─── */
img {
  transition: opacity 0.3s ease;
}

img[loading="lazy"] {
  opacity: 0;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* ─── Section divider ─── */
.section-divider {
  width: 3rem;
  height: 3px;
  background: var(--color-accent);
  border-radius: 9999px;
  margin: 0 auto;
}

/* ─── Benefit card ─── */
.benefit-card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.benefit-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

/* ─── Ingredient card ─── */
.ingredient-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.ingredient-card:hover {
  border-color: var(--color-accent);
}

/* ─── Step number ─── */
.step-number {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ─── Spinner for form submit ─── */
.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── Cookie banner transition ─── */
#cookie-consent {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#cookie-consent.hiding {
  transform: translateY(100%);
  opacity: 0;
}