/* ============================================================
   DEWORVA 3.0 — supplementary styles (site3.css)
   style.css / main.js / hero3d.js are NEVER modified (C1).
   Everything below extends the existing design system only.
   ============================================================ */

/* ---------- Accessible focus ---------- */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ============================================================
   1. Desktop dropdown navigation (pure CSS — hover + focus-within,
      no JS required, works with the untouched main.js)
   ============================================================ */
.main-nav .nav-group { position: relative; }
.nav-drop-btn {
  background: none; border: 0; cursor: pointer;
  font-family: inherit; font-size: 0.86rem; font-weight: 600;
  letter-spacing: 0.04em; color: var(--ink-soft);
  padding: 0.6rem 0.8rem; position: relative;
  display: inline-flex; align-items: center; gap: 0.3rem;
}
.nav-drop-btn .caret {
  width: 0.55em; height: 0.55em; border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px);
  transition: transform 0.25s;
}
.nav-drop-btn::after {
  content: ""; position: absolute; left: 0.8rem; right: 0.8rem; bottom: 0.35rem;
  height: 2px; background: var(--gold); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s;
}
.nav-group:hover .nav-drop-btn, .nav-group:focus-within .nav-drop-btn { color: var(--pine-deep); }
.nav-group:hover .nav-drop-btn::after, .nav-group:focus-within .nav-drop-btn::after { transform: scaleX(1); }
.nav-group:hover .caret, .nav-group:focus-within .caret { transform: rotate(-135deg) translateY(-1px); }
.nav-drop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  min-width: 16.5rem; margin: 0; padding: 0.5rem; list-style: none;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.22s, transform 0.22s, visibility 0.22s;
}
.nav-group:hover .nav-drop, .nav-group:focus-within .nav-drop {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-drop li { margin: 0; }
.nav-drop a {
  display: block; padding: 0.65rem 0.9rem; border-radius: 10px;
  text-decoration: none; color: var(--ink);
}
.nav-drop a::after { display: none; } /* kill the inherited underline */
.nav-drop a:hover, .nav-drop a:focus-visible { background: var(--cream); color: var(--pine-deep); }
.nav-drop a strong { display: block; font-size: 0.92rem; font-weight: 600; }
.nav-drop a small { display: block; font-size: 0.76rem; color: var(--ink-soft); font-weight: 400; }

/* ---------- Mobile drawer: group headings ---------- */
.drawer-group { margin-top: 0.9rem; }
.drawer-group > span {
  display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-soft); padding: 0.5rem 0 0.2rem;
}
.drawer-group a { display: block; width: 100%; box-sizing: border-box; padding-left: 1rem !important; font-size: 1.18rem !important; }

/* ============================================================
   2. Certification trust band (dark)
   ============================================================ */
.cert-band { background: var(--pine-deep); color: #eef3ea; }
.cert-band .eyebrow { color: var(--gold-soft); }
.cert-band h2 { color: var(--cream); }
.cert-band .lead { color: rgba(238, 243, 234, 0.72); }
.cert-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1rem; margin-top: 2.2rem;
}
.cert-badge {
  border: 1px solid rgba(250, 245, 234, 0.16); border-radius: var(--radius);
  padding: 1.3rem 1.2rem; background: rgba(250, 245, 234, 0.04);
  display: flex; flex-direction: column; gap: 0.45rem;
}
.cert-org {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gold-soft);
}
.cert-badge h3 { font-size: 1.08rem; color: var(--cream); margin: 0; line-height: 1.35; }
.cert-no { font-size: 0.8rem; color: rgba(238, 243, 234, 0.6); }
.cert-scope { font-size: 0.82rem; color: rgba(238, 243, 234, 0.72); }
.cert-note {
  margin-top: 1.6rem; font-size: 0.85rem; color: rgba(238, 243, 234, 0.65);
  max-width: 62rem;
}
.cert-cta { margin-top: 1.4rem; }

/* ============================================================
   3. Ingredient 6-card grid
   ============================================================ */
.ing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 2.4rem; }
.bot-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-soft); transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
}
.bot-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.bot-card .ing-media { border-radius: 0; box-shadow: none; }
.bot-card .ing-media img { aspect-ratio: 16 / 10; transform: none; }
.bot-body { padding: 1.2rem 1.3rem 1.4rem; }
.bot-body h3 { font-size: 1.25rem; margin: 0 0 0.4rem; }
.bot-body p { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }

/* ============================================================
   4. Split feature rows (digestive support / daily additive)
   ============================================================ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split.reverse > :first-child { order: 2; }
.split-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.split-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; display: block; }
/* Numbered steps (routine section) — numbered discs, distinct from check-list ticks */
.steps-list { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: 0.8rem; }
.steps-list li { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 1rem; color: var(--ink-soft); }
.steps-list .step-n {
  flex: 0 0 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--pine); color: var(--cream);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700; margin-top: 0.1rem;
}

/* ============================================================
   5. Audience split (consumers vs business)
   ============================================================ */
.audience-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 2.4rem; }
.audience-card {
  border-radius: var(--radius); padding: clamp(1.6rem, 3vw, 2.4rem);
  border: 1px solid var(--line); background: var(--white); box-shadow: var(--shadow-soft);
}
.audience-card.b2b { background: var(--pine-deep); color: #eef3ea; border-color: transparent; }
.audience-card.b2b h3 { color: var(--cream); }
.audience-card.b2b p { color: rgba(238, 243, 234, 0.75); }
.audience-card .a-kicker {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 0.8rem;
}
.audience-card h3 { font-size: 1.5rem; margin: 0 0 0.7rem; }
.audience-card p { color: var(--ink-soft); margin: 0 0 1.3rem; }

/* ============================================================
   6. B2B band (reuses .wholesale dark band)
   ============================================================ */
.b2b-band { text-align: center; }
.b2b-band .btn-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }
.b2b-facts { display: flex; gap: 2.4rem; justify-content: center; flex-wrap: wrap; list-style: none; margin: 2.4rem 0 0; padding: 0; }
.b2b-facts li { display: flex; flex-direction: column; gap: 0.2rem; }
.b2b-facts .num { font-family: var(--font-display); font-size: 1.6rem; color: var(--gold-soft); }
.b2b-facts .lbl { font-size: 0.82rem; color: rgba(238, 243, 234, 0.65); }

/* ============================================================
   7. Product facts strip
   ============================================================ */
.facts-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  margin-top: 2.2rem;
}
.fact {
  text-align: center; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1rem; background: var(--white);
}
.fact .num { font-family: var(--font-display); font-size: 1.9rem; color: var(--pine-deep); display: block; }
.fact .lbl { font-size: 0.85rem; color: var(--ink-soft); }

/* ============================================================
   8. Section spacing helpers
   ============================================================ */
.section-tight { padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }

/* ============================================================
   9. Responsive
   ============================================================ */
@media (max-width: 1080px) {
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .ing-grid { grid-template-columns: repeat(2, 1fr); }
  .facts-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
  .audience-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cert-grid { grid-template-columns: 1fr; }
  .ing-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1 1 100%; }
  .hero-retail-link { display: block; text-align: center; margin-top: 0.9rem; }
}

/* ============================================================
   10. Wholesale page — page hero, partner grid, inquiry form
   (Command 3. style.css / main.js / hero3d.js untouched.)
   ============================================================ */
.page-hero {
  background: var(--cream);
  padding: clamp(4rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--line);
}
.page-hero-inner {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.page-hero h1 { margin: 0 0 1.1rem; }
.page-hero .lead { margin: 0 0 1.8rem; }
.page-hero .hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.page-hero-note { margin-top: 1.2rem; font-size: 0.95rem; color: var(--ink-soft); }
.page-hero-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1 / 1; display: block; }

/* Partner cards */
.partner-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.1rem; margin-top: 2.4rem;
}
.partner-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.4rem 1.3rem;
  box-shadow: var(--shadow-soft);
}
.partner-card h3 { font-size: 1.12rem; margin: 0 0 0.5rem; color: var(--pine-deep); }
.partner-card p { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }

/* Larger steps for "How wholesale works" */
.steps-large { max-width: 56rem; }
.steps-large li { font-size: 1.06rem; padding: 0.4rem 0; }
.steps-large .step-n { flex-basis: 2.1rem; height: 2.1rem; font-size: 1rem; }

/* ---------- Inquiry form ---------- */
.inquiry-wrap { max-width: 880px; margin-inline: auto; }
.inquiry-form {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-soft);
  padding: clamp(1.5rem, 3.5vw, 2.6rem);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem 1.25rem; }
.field { display: flex; flex-direction: column; gap: 0.42rem; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, .group-label { font-weight: 700; font-size: 0.98rem; color: var(--ink); letter-spacing: 0.01em; }
.req { color: #b3261e; font-weight: 700; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="url"],
.field select,
.field textarea {
  font: inherit; color: var(--ink);
  padding: 0.78rem 0.95rem;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--white); width: 100%; box-sizing: border-box;
}
.field textarea { resize: vertical; min-height: 7rem; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 3px solid var(--gold); outline-offset: 2px; border-color: var(--pine);
}
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #b3261e; }
.field-error { display: block; font-size: 0.85rem; color: #b3261e; margin: 0; }
.field-error[hidden] { display: none; }
.check-row { display: flex; flex-wrap: wrap; gap: 0.55rem 1.3rem; }
.check {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 400 !important; font-size: 0.95rem; cursor: pointer;
}
.check input[type="checkbox"] { width: 1.1rem; height: 1.1rem; accent-color: var(--pine-deep); }
/* Honeypot — off-screen, never display:none (bots must "see" it) */
.hp-field { position: absolute !important; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-actions { margin-top: 1.5rem; display: grid; gap: 0.9rem; justify-items: start; }
.form-privacy { font-size: 0.86rem; color: var(--ink-soft); margin: 0; max-width: 40rem; }
/* Success panel (interim — backend lands in Command 20) */
.form-success {
  margin-top: 1.6rem; border: 1px solid var(--line); border-radius: 12px;
  background: var(--cream); padding: 1.4rem;
}
.form-success[hidden] { display: none; }
.form-success h3 { margin: 0 0 0.6rem; color: var(--pine-deep); }
.form-success p { font-size: 0.95rem; color: var(--ink-soft); margin: 0 0 1rem; }
.copy-box {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 0.88rem;
  padding: 0.9rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--white); color: var(--ink); margin-bottom: 1.1rem;
}
.form-success .btn-row { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (max-width: 900px) {
  .page-hero-inner { grid-template-columns: 1fr; }
  .page-hero-media img { aspect-ratio: 16 / 10; }
}
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .page-hero .hero-cta .btn { flex: 1 1 100%; text-align: center; }
}

/* ============ Command 18: conversion optimization ============ */
.trust-row {
  display: flex; flex-wrap: wrap; gap: 0.35rem 0.6rem; align-items: baseline;
  margin: 1rem 0 0; font-size: 0.82rem; color: var(--ink-soft); max-width: 38rem;
}
.trust-row strong { color: var(--ink); font-weight: 600; }
.trust-row a { color: var(--pine-deep); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.buy-note { font-size: 0.85rem; color: var(--ink-soft); margin: 0.7rem 0 0; text-align: center; }
.sticky-buy {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
  transform: translateY(110%); transition: transform 0.3s ease;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
}
.sticky-buy[hidden] { display: none; }
.sticky-buy.is-visible { transform: none; }
.sticky-buy-inner { max-width: 40rem; margin: 0 auto; display: flex; align-items: center; gap: 0.8rem; justify-content: space-between; }
.sticky-buy-info strong { display: block; font-size: 0.85rem; color: var(--ink); }
.sticky-buy-info span { font-size: 0.75rem; color: var(--ink-soft); }
.sticky-buy .btn { padding: 0.6rem 1.1rem; font-size: 0.9rem; white-space: nowrap; }
body.has-sticky-buy { padding-bottom: 76px; }
@media (min-width: 641px) {
  .sticky-buy { display: none; }
  body.has-sticky-buy { padding-bottom: 0; }
}

/* ============ Command 19: trust elements ============ */
.footer-trust {
  margin: 0.9rem 0 0; padding-top: 0.9rem; border-top: 1px solid var(--line);
  font-size: 0.8rem; color: var(--ink-soft); text-align: center;
}
.footer-trust a { color: var(--pine-deep); text-decoration: underline; text-underline-offset: 2px; }

/* ============ Customer reviews (real Amazon reviews, incl. critical voices) ============ */
.reviews-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem; margin-top: 2rem;
}
.review-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; display: flex; flex-direction: column; gap: 0.7rem;
}
.review-stars { color: #a8761f; font-size: 1.05rem; letter-spacing: 0.1em; margin: 0; }
.review-text { font-size: 0.94rem; color: var(--ink); margin: 0; flex: 1; }
.review-meta { font-size: 0.8rem; color: var(--ink-soft); margin: 0; }
.reviews-note { text-align: center; font-size: 0.85rem; color: var(--ink-soft); margin: 1.8rem auto 0; max-width: 46rem; }
.reviews-note a { color: var(--pine-deep); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 900px) { .reviews-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .reviews-grid { grid-template-columns: 1fr; } }

/* ============ Hero readability scrim (real-device WebGL fix) ============
   On real devices the hero WebGL canvas renders a dark-green 3D scene that
   covers the whole hero. The dark hero text and ghost button lose contrast
   on it, looking faint/washed out. This soft cream veil sits between the
   canvas (z-index 0) and the copy (z-index 1), restoring full readability
   while keeping the cinematic 3D scene visible around the text. The protected
   animation system (main.js / hero3d.js / style.css) is not touched. */
.hero-copy { position: relative; }
.hero-copy::before {
  content: "";
  position: absolute;
  inset: -2.5rem -3.5rem;
  z-index: -1;
  border-radius: 2.5rem;
  background: radial-gradient(115% 100% at 28% 32%,
    rgba(250,245,234,0.97) 0%,
    rgba(250,245,234,0.90) 45%,
    rgba(250,245,234,0.60) 70%,
    rgba(250,245,234,0) 100%);
  pointer-events: none;
}
@media (max-width: 900px) {
  .hero-copy::before { inset: -1.5rem -1.25rem; border-radius: 1.75rem; }
}
