/* ---------------------------------------------------------------------------
   Layout — the page chrome and the band rhythm.

   Pages are a stack of full-bleed colour bands (cream → label paper → deep
   green → cream → soil footer) with the 1200px container inside each. At most
   two dark bands per page. 96px vertical rhythm, 64px for tight bands.
   --------------------------------------------------------------------------- */

/* =========================================================== Skip link === */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 40;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--green-700);
  color: var(--cream-50);
  font: var(--type-small);
  font-family: var(--font-sans);
  font-weight: var(--weight-semibold);
  transition: top var(--duration-base) var(--ease-standard);
}
.skip-link:focus { top: var(--space-3); color: var(--cream-50); }

/* ============================================================== Bands ==== */
.band { padding: var(--section-y) 0; background: var(--surface-page); }
.band--tight { padding: var(--section-y-tight) 0; }
.band--flush-bottom { padding-bottom: 0; }
.band--subtle { background: var(--surface-subtle); }
.band--paper { background: var(--surface-paper); border-bottom: var(--border-1) solid var(--border-paper); }
.band--green { background: var(--surface-inverse); color: var(--text-inverse); }
.band--soil { background: var(--surface-soil); color: var(--cream-100); }

.band--green :is(h1, h2, h3),
.band--soil :is(h1, h2, h3) { color: var(--cream-100); }
.band--green a:not(.ds-btn):not(.ds-tag),
.band--soil a:not(.ds-btn):not(.ds-tag) {
  color: var(--orange-300);
  border-bottom-color: rgba(240, 174, 106, 0.4);
}
.band--green a:not(.ds-btn):hover,
.band--soil a:not(.ds-btn):hover { color: var(--orange-300); border-bottom-color: var(--orange-300); }

/* ============================================================= Header ==== */
/* The only fixed element, and the only place blur is used. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  background: rgba(253, 250, 243, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: var(--border-1) solid var(--border-hairline);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  height: 100%;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.site-nav__link {
  padding-bottom: 2px;
  border-bottom: var(--border-2) solid transparent;
  font: var(--type-body);
  font-family: var(--font-sans);
  font-weight: var(--weight-medium);
  color: var(--green-800);
  white-space: nowrap;
}
.site-nav__link:hover { color: var(--orange-600); border-bottom-color: var(--orange-500); }
.site-nav__link[aria-current="page"] { color: var(--orange-600); border-bottom-color: var(--orange-500); }

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.site-header__menu-btn { display: none; }

/* --- Wordmark: the mark over the two-line name, as on the packaging --- */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-bottom: none;
}
a.wordmark:hover { border-bottom: none; }
.wordmark img { height: 34px; width: auto; }
.wordmark__text { display: flex; flex-direction: column; line-height: 1; }
.wordmark__name {
  font-family: var(--font-display);
  font-weight: var(--weight-black);
  font-size: 17px;
  letter-spacing: 0.02em;
  color: var(--green-800);
}
.wordmark__product {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: 13px;
  color: var(--orange-600);
}
.wordmark--inverse img { filter: invert(1) brightness(1.7); }
.wordmark--inverse .wordmark__name { color: var(--cream-100); }
.wordmark--inverse .wordmark__product { color: var(--orange-300); }

/* --- Mobile drawer --- */
.site-drawer {
  display: none;
  border-bottom: var(--border-1) solid var(--border-hairline);
  background: var(--surface-page);
}
.site-drawer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5) 0 var(--space-6);
}
.site-drawer__link {
  font: var(--type-lead);
  font-family: var(--font-sans);
  font-weight: var(--weight-medium);
  color: var(--green-800);
  border-bottom: none;
}
.site-drawer__link[aria-current="page"] { color: var(--orange-600); }
.site-drawer__foot {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding-top: var(--space-4);
  border-top: var(--border-1) solid var(--border-hairline);
}

/* ============================================================= Footer ==== */
.site-footer {
  padding: var(--space-8) 0 var(--space-6);
  background-color: var(--surface-soil);
  background-image: var(--pattern-ribs-light);
  color: var(--cream-100);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-7);
}
.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: flex-start;
}
.site-footer__tagline {
  margin: 0;
  font: var(--type-lead);
  font-family: var(--font-display);
  color: var(--cream-100);
}
.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.site-footer__heading {
  font: var(--type-label);
  font-family: var(--font-label);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--orange-300);
  margin-bottom: var(--space-1);
}
.site-footer__link,
.site-footer__line {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font: var(--type-small);
  font-family: var(--font-sans);
  color: rgba(246, 238, 221, 0.8);
  border-bottom: none;
}
.site-footer__link:hover { color: var(--orange-300); border-bottom: none; }
.site-footer__line .ds-icon { color: var(--orange-300); }
/* Build credit. Plain text, not a badge — it should sit quietly beside the
   copyright line rather than compete with the brand. */
.site-footer__credit {
  color: rgba(246, 238, 221, 0.6);
  border-bottom: 1px solid rgba(246, 238, 221, 0.25);
  white-space: nowrap;
}
.site-footer__credit:hover {
  color: var(--orange-300);
  border-bottom-color: var(--orange-300);
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-7);
  padding-top: var(--space-4);
  border-top: var(--border-1) solid rgba(246, 238, 221, 0.16);
  font: var(--type-small);
  font-family: var(--font-sans);
  color: rgba(246, 238, 221, 0.6);
}

/* ============================================================== Grids ==== */
.grid { display: grid; gap: var(--gutter); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); }
/* Figures come from the database, so the count is not fixed in the template —
   the row lays itself out for however many there are. */
.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--space-6);
}

.stack { display: flex; flex-direction: column; gap: var(--space-5); }
.stack--tight { gap: var(--space-3); }
.stack--start { align-items: flex-start; }
.row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.prose { max-width: var(--container-narrow); }
.measure { max-width: 62ch; }

/* ============================================================= Motion ==== */
/* Scroll reveal: fade + a 12px rise over 420ms. No parallax, no bounce. */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity var(--duration-slow) var(--ease-standard),
    transform var(--duration-slow) var(--ease-standard);
}
.reveal.is-visible { opacity: 1; transform: none; }
/* Without JS nothing should ever stay invisible. */
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ========================================================= Utilities ===== */
/* Spacing utilities. The CSP allows no inline `style` attribute, so every
   one-off margin needs a named class. */
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-7 { margin-top: var(--space-7); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ======================================================= Breakpoints ===== */
@media (max-width: 1080px) {
  .site-header__inner { gap: var(--space-4); }
  .site-nav { gap: var(--space-4); }
}

@media (max-width: 900px) {
  :root { --section-y: var(--space-8); --section-y-tight: var(--space-7); }

  .site-nav { display: none; }
  .site-header__menu-btn { display: inline-flex; }
  .site-header__actions .ds-btn--cta { display: none; }

  /* The drawer opens on the toggle; with no JavaScript it simply stays open,
     so the navigation is never unreachable. */
  .site-drawer[data-open="true"] { display: block; }
  .no-js .site-drawer { display: block; }
  .no-js .site-header__menu-btn { display: none; }

  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  :root { --section-y: var(--space-7); --section-y-tight: var(--space-6); }

  .ds-container { padding: 0 var(--space-5); }
  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .site-footer__grid { grid-template-columns: minmax(0, 1fr); }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
  .ds-section-heading__title { font-size: var(--text-xl); }
}

@media (max-width: 480px) {
  .wordmark img { height: 28px; }
  .wordmark__name { font-size: 15px; }
  .wordmark__product { font-size: 12px; }
  .ds-btn--lg { padding: 14px 22px; font-size: var(--text-base); }
}
