/* Farm Girl Greens - Main Stylesheet */

/* ===== FONTS ===== */
/* Served from this site (src/fonts/), not from Google, so a visit sends nothing to a
   font company. Both families are open source (SIL Open Font License; the licence
   texts are in src/fonts/). The files are variable fonts: one file covers a range of
   weights. The ranges and character sets below match what the site used to load from
   Google Fonts, so the pages look the same: Fraunces 500 to 700 with its optical-size
   axis, Source Sans 3 upright 400 to 700 and italic 400. The Greek file exists for the
   delta sign on the Lab Results page; browsers fetch it only on a page that needs it.
   If a font is ever updated, give the new file a new name: src/_headers tells browsers
   to keep these files for a year. */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../fonts/fraunces-latin-opsz-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/source-sans-3-greek-wght-normal.woff2") format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

/* ===== CSS VARIABLES (BRAND COLORS) ===== */
:root {
  /* Primary Colors from Logo */
  --color-deep-green: #252f20;
  --color-accent-green: #4a7a2e; /* forest leaf accent (buttons, links) */
  --color-accent-green-dark: #3a6223; /* button hover */
  --color-leaf-light: #bcd39a; /* links and accents on deep green */
  --color-burgundy: #95404a;
  --color-tan: #918669; /* fails AA as text; OK for non-text UI borders (>=3:1 on white/paper) */
  --color-cream: #e6e1d3;
  --color-paper: #f4f1ea; /* light section background */
  --color-text: #231f20;
  --color-text-muted: #6b6249; /* muted text: 4.6:1 on cream, 6.1:1 on white */
  --color-white: #ffffff;
  --color-warning: #ffff00; /* OCM-mandated warning box color */

  /* Typography. Source Sans 3 is Adobe's open-source sibling of Myriad, the logo
     wordmark face. The compliance box uses Arial because OCM limits warning text
     to Times New Roman, Calibri, Arial or Helvetica. */
  --font-primary: 'Source Sans 3', 'Myriad Pro', 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-compliance: Arial, Helvetica, sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;

  /* Layout */
  --max-width: 1200px;
  --border-radius: 6px;
  --shadow-card: 0 2px 10px rgba(37, 47, 32, 0.08);
  --shadow-card-hover: 0 10px 24px rgba(37, 47, 32, 0.14);
}

/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: 1.0625rem;
  color: var(--color-text);
  background-color: var(--color-white);
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-deep-green);
}

h2 {
  font-size: 2rem;
  margin-bottom: var(--spacing-sm);
}

h3 {
  font-size: 1.35rem;
  margin-bottom: var(--spacing-xs);
}

p + p {
  margin-top: var(--spacing-sm);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent-green);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent-green-dark);
  text-decoration: underline;
}

/* Links in running text need a cue besides color */
main p a:not([class]),
.hopeline a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

:focus-visible {
  outline: 3px solid var(--color-accent-green);
  outline-offset: 2px;
}

/* The accent green ring is under 3:1 on deep green; use white there */
.hero :focus-visible,
.section--dark :focus-visible,
footer :focus-visible,
.coa-table th > button:focus-visible {
  outline-color: var(--color-white);
}

.coa-table th > button:focus-visible {
  outline-offset: -5px; /* keep the ring inside the overflow-clipped .coa-table */
}

.skip-link {
  position: absolute;
  left: var(--spacing-sm);
  top: -100px;
  z-index: 2000;
  background: var(--color-deep-green);
  color: var(--color-white);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius);
}

.skip-link:focus {
  top: var(--spacing-sm);
  color: var(--color-white);
}

/* <main> only receives focus from script (the skip link, closing the age gate).
   It is a landmark, not a control, so no ring around the whole page. */
main:focus {
  outline: none;
}

/* ===== AGE VERIFICATION GATE ===== */
.age-gate {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(35, 31, 32, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(10px);
}

.age-gate.hidden {
  display: none;
}

.age-gate-content {
  background: var(--color-white);
  padding: var(--spacing-lg) var(--spacing-md);
  border-radius: var(--border-radius);
  text-align: center;
  max-width: 480px;
  margin: var(--spacing-md);
}

.age-gate-content img {
  max-width: 200px;
  margin: 0 auto var(--spacing-md);
}

.age-gate-content h2 {
  font-size: 1.75rem;
  margin-bottom: var(--spacing-xs);
}

.age-gate-content p {
  margin-bottom: var(--spacing-md);
}

.age-gate-buttons {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
}

/* The gate stays closed without JavaScript, on purpose. The <noscript> message
   says why; these two buttons could do nothing, so don't offer them.
   (The scripting media feature needs Chrome/Edge 120, Firefox 113 or Safari 17.
   Older browsers show the message with the buttons still under it.) */
.age-gate-noscript {
  font-weight: 600;
}

@media (scripting: none) {
  .age-gate-buttons {
    display: none;
  }
}

.btn-age-yes,
.btn-age-no {
  min-height: 48px;
  padding: 0 var(--spacing-md);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  border: 2px solid var(--color-deep-green);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-age-yes {
  background: var(--color-deep-green);
  color: var(--color-white);
}

.btn-age-yes:hover {
  background: var(--color-accent-green);
  border-color: var(--color-accent-green);
}

.btn-age-no {
  background: transparent;
  color: var(--color-deep-green);
}

.btn-age-no:hover {
  background: var(--color-cream);
}

/* ===== HEADER & NAVIGATION ===== */
header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-cream);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-md);
}

.logo {
  height: 48px;
  width: auto;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

nav a {
  color: var(--color-deep-green);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  padding: var(--spacing-xs) 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

nav a:hover,
nav a.active {
  color: var(--color-accent-green);
  border-bottom-color: var(--color-accent-green);
  text-decoration: none;
}

nav a.nav-cta {
  background: var(--color-deep-green);
  color: var(--color-white);
  padding: 0.55rem 1.1rem;
  border-radius: var(--border-radius);
  border-bottom: none;
}

nav a.nav-cta:hover,
nav a.nav-cta.active {
  background: var(--color-accent-green);
  color: var(--color-white);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-deep-green);
  cursor: pointer;
}

/* ===== HERO SECTION ===== */
/* The photo runs at full strength under a deep-green gradient, rather than at
   reduced opacity, so it keeps its color while the headline stays legible. */
.hero {
  position: relative;
  min-height: 600px;
  background: var(--color-deep-green);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(37, 47, 32, 0.55) 0%, rgba(37, 47, 32, 0.75) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--color-white);
  max-width: 800px;
}

.hero h1 {
  color: var(--color-white);
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-md);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.hero p:last-child {
  margin-bottom: 0;
}

/* Home hero: taller, left-aligned headline over a side gradient */
.hero--home {
  min-height: min(80vh, 680px);
}

.hero--home::after {
  background: linear-gradient(90deg, rgba(37, 47, 32, 0.88) 0%, rgba(37, 47, 32, 0.6) 55%, rgba(37, 47, 32, 0.25) 100%);
}

.hero--home .hero-content {
  text-align: left;
  max-width: var(--max-width);
  width: 100%;
}

.hero--home .hero-content > * {
  max-width: 620px;
}

.hero--home h1 {
  font-size: 4rem;
}

/* Interior page heroes */
.hero--page {
  min-height: 340px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-leaf-light);
  margin-bottom: var(--spacing-sm);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

/* ===== BUTTONS ===== */
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1.6rem;
  font-weight: 700;
  border-radius: var(--border-radius);
  border: 2px solid var(--color-accent-green);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background: var(--color-accent-green);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-accent-green-dark);
  border-color: var(--color-accent-green-dark);
  color: var(--color-white);
  text-decoration: none;
}

/* Outline button for dark backgrounds */
.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.8);
  color: var(--color-white);
}

.btn-ghost:hover {
  background: var(--color-white);
  border-color: var(--color-white);
  color: var(--color-deep-green);
  text-decoration: none;
}

/* ===== SECTION STYLES ===== */
section {
  padding: var(--spacing-xl) var(--spacing-md);
}

.section--tight {
  padding-top: var(--spacing-lg);
  padding-bottom: var(--spacing-lg);
}

.section--paper {
  background: var(--color-paper);
}

.section--cream {
  background: var(--color-cream);
}

/* Accent green is 3.9:1 on cream; the darker shade clears 4.5:1 */
.section--cream a:not([class]) {
  color: var(--color-accent-green-dark);
}

/* Deep-green call-to-action bands */
.section--dark {
  background: var(--color-deep-green);
  color: var(--color-white);
  text-align: center;
}

.section--dark h2 {
  color: var(--color-cream);
}

.section--dark p {
  margin-bottom: var(--spacing-md);
}

.section--dark a:not(.btn-primary):not(.btn-ghost) {
  color: var(--color-leaf-light);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.container--narrow {
  max-width: 760px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
}

.section-header p {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 700px;
  margin: 0 auto;
}

.text-center {
  text-align: center;
}

.actions {
  margin-top: var(--spacing-md);
}

.muted {
  color: var(--color-text-muted);
}

.lede {
  font-size: 1.15rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.feature-list {
  margin-top: var(--spacing-sm);
  padding-left: 1.5rem;
}

.feature-list li {
  margin-bottom: var(--spacing-xs);
}

.quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--color-text-muted);
  margin-top: var(--spacing-md);
}

.subtitle {
  font-family: var(--font-primary);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-sm);
}

/* Bordered information panel (instructions, notes, wholesale info) */
.callout {
  margin-top: var(--spacing-md);
  padding: 1.5rem var(--spacing-md);
  background: var(--color-white);
  border-left: 4px solid var(--color-accent-green);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card);
}

.callout .btn-primary {
  margin-top: var(--spacing-sm);
}

/* ===== GRID LAYOUTS ===== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-lg);
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
}

.grid-2 img,
.photo {
  border-radius: var(--border-radius);
}

/* ===== CARD STYLES ===== */
.card {
  background: var(--color-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

/* Only cards that are links lift on hover; a lift on a static card promises a
   click that does nothing. */
.card--link {
  display: block;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card--link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  color: inherit;
  text-decoration: none;
}

.card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.card-content {
  padding: var(--spacing-md);
}

.card-content h3 {
  font-size: 1.5rem;
}

/* ===== PRODUCT CARDS ===== */
/* Fixed-width tracks, centered, so a row of 3 flower cards and a row of 2 vape
   cards both read as deliberate instead of leaving an empty column. */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 320px));
  justify-content: center;
  gap: var(--spacing-md);
}

.product-card {
  display: flex;
  flex-direction: column;
  scroll-margin-top: 100px;
}

.product-card .card-image {
  height: 300px;
  background: var(--color-cream);
}

.product-card .card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Placeholder standing in for product photography we don't have yet. `contain`
   rather than `cover` so the silhouette isn't cropped when the grid collapses to
   one column and the box becomes a wide letterbox. Delete this rule when real
   product photos land. */
.card-image--pending {
  object-fit: contain;
  background: var(--color-cream);
  padding: 1.5rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--color-cream);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--color-deep-green);
}

.chip--format {
  background: var(--color-deep-green);
  border-color: var(--color-deep-green);
  color: var(--color-white);
}

.terpenes {
  font-size: 0.95rem;
}

.terpenes-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.card-link {
  margin-top: auto;
  padding-top: var(--spacing-sm);
  border-top: 1px solid var(--color-cream);
  font-weight: 700;
  font-size: 0.95rem;
}

.product-category {
  scroll-margin-top: 100px;
}

.product-category + .product-category {
  margin-top: var(--spacing-xl);
}

.category-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--spacing-md);
}

.category-header p {
  color: var(--color-text-muted);
}

/* In-page links to each product category */
.jump-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-xs);
  list-style: none;
  margin-top: var(--spacing-md);
}

.jump-nav a {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  border: 2px solid var(--color-deep-green);
  border-radius: 999px;
  color: var(--color-deep-green);
  font-weight: 700;
}

.jump-nav a:hover {
  background: var(--color-deep-green);
  color: var(--color-white);
  text-decoration: none;
}

/* Home page lineup tiles, one per product format. The image box is the full tile
   width by 220px, so it is wide and short, and a product photo is square. `cover`
   would show only a strip through the label (58% of the photo's height on desktop,
   30% at 768px), so the photo is shown whole, as the placeholder drawing is. */
.lineup-tile .card-image {
  height: 220px;
  object-fit: contain;
  background: var(--color-cream);
}

.lineup-tile ul {
  list-style: none;
  margin: var(--spacing-sm) 0;
}

.lineup-tile li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--color-cream);
  font-weight: 600;
}

.lineup-tile .card-link {
  display: block;
  border-top: none;
  padding-top: 0;
}

/* ===== COA TABLE ===== */
.coa-table {
  width: 100%;
  background: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card);
  overflow-x: auto;
}

.coa-table table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.coa-table th {
  background: var(--color-deep-green);
  color: var(--color-white);
  text-align: left;
  font-weight: 700;
  white-space: nowrap;
}

.coa-table th > span,
.coa-table th > button {
  display: block;
  width: 100%;
  padding: var(--spacing-sm);
  font: inherit;
  color: inherit;
  text-align: inherit;
}

.coa-table th > button {
  background: none;
  border: none;
  cursor: pointer;
}

.coa-table th > button:hover {
  background: var(--color-accent-green);
}

/* Each arrow is declared twice: the `/ ""` form keeps it out of the button's
   accessible name (aria-sort already states the order); browsers without that
   syntax fall back to the plain line. */
.coa-table th > button::after {
  content: " ↕";
  content: " ↕" / "";
  opacity: 0.5;
}

.coa-table th[aria-sort="ascending"] > button::after {
  content: " ▲";
  content: " ▲" / "";
  opacity: 1;
}

.coa-table th[aria-sort="descending"] > button::after {
  content: " ▼";
  content: " ▼" / "";
  opacity: 1;
}

.coa-table td {
  padding: var(--spacing-sm);
  border-bottom: 1px solid var(--color-cream);
  vertical-align: top;
}

.coa-table tbody tr:hover {
  background: var(--color-paper);
}

/* Row a product card deep-linked to (coas.html#BATCH) */
.coa-table tbody tr:target {
  background: #fff8d6;
  box-shadow: inset 4px 0 0 var(--color-accent-green);
}

.coa-table tbody tr {
  scroll-margin-top: 120px;
}

.coa-table a {
  font-weight: 700;
}

.cell-sub {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.mono {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.badge-pass {
  display: inline-block;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background: #e3efd8;
  color: #2d5418;
  font-size: 0.85rem;
  font-weight: 700;
}

.coa-table td.table-empty {
  text-align: center;
  color: var(--color-text-muted);
  padding: var(--spacing-md);
}

/* ===== RETAILERS ===== */
.dispensary-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.dispensary-card {
  background: var(--color-white);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card);
  border-left: 4px solid var(--color-accent-green);
}

.dispensary-card p {
  margin: 0 0 0.5rem;
}

/* ===== FAQ ===== */
.faq-category {
  margin-bottom: var(--spacing-lg);
}

.faq-category > h2 {
  padding-bottom: var(--spacing-xs);
  border-bottom: 2px solid var(--color-cream);
  margin-bottom: 1.5rem;
}

.faq-item {
  background: var(--color-white);
  padding: 1.5rem;
  margin-bottom: var(--spacing-sm);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-card);
  border-left: 4px solid var(--color-accent-green);
}

.faq-item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

/* ===== LONG-FORM TEXT (privacy page) ===== */
.prose h2 {
  font-size: 1.5rem;
  margin-top: var(--spacing-md);
}

.prose ul {
  margin: 0 0 var(--spacing-sm) 1.25rem;
}

.prose li + li {
  margin-top: var(--spacing-xs);
}

/* ===== COMPLIANCE BAND ===== */
/* NY OCM Part 129: required warnings in a #FFFF00 box, in an OCM-approved font,
   bordered because pure yellow isn't clearly visible against the light band. */
.compliance {
  background: var(--color-paper);
  border-top: 1px solid var(--color-cream);
  padding: var(--spacing-md);
}

.compliance-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--spacing-md);
  align-items: center;
}

.warning-box {
  background: var(--color-warning);
  color: #000000;
  border: 2px solid #000000;
  padding: var(--spacing-sm) 1.25rem;
  font-family: var(--font-compliance);
  font-size: 0.95rem;
  line-height: 1.45;
}

.warning-box p + p {
  margin-top: 0.4rem;
}

/* Same listed typeface as the warnings (9 NYCRR 129.2(e)); OCM's guidance can be read
   as applying the typeface rule to the HOPEline and licence lines too. */
.hopeline {
  font-family: var(--font-compliance);
  font-size: 0.95rem;
}

.hopeline p + p {
  margin-top: 0.4rem;
}

.license-line {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* ===== FOOTER ===== */
footer {
  background: var(--color-deep-green);
  color: var(--color-white);
  padding: var(--spacing-lg) var(--spacing-md) var(--spacing-md);
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.footer-section h3 {
  margin-bottom: var(--spacing-sm);
  color: var(--color-cream);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: var(--spacing-xs);
}

.footer-section a {
  color: var(--color-white);
}

.footer-section a:hover {
  color: var(--color-leaf-light);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-cream);
}

/* ===== RESPONSIVE DESIGN ===== */
/* The eight nav items need ~1000px; collapse to the menu button below that
   rather than letting labels wrap onto two lines. */
@media (max-width: 1024px) {
  nav ul {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-top: 1px solid var(--color-cream);
    padding: var(--spacing-sm) var(--spacing-md) var(--spacing-md);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    max-height: calc(100vh - 4.5rem);
    max-height: calc(100dvh - 4.5rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  nav ul.active {
    display: flex;
  }

  nav li {
    width: 100%;
    text-align: center;
  }

  nav a {
    display: inline-block;
    padding: 0.75rem 0;
  }

  nav a.nav-cta {
    margin-top: var(--spacing-xs);
  }

  .menu-toggle {
    display: block;
  }

  /* Narrower text column spans the light end of the side gradient; flatten it */
  .hero--home::after {
    background: linear-gradient(90deg, rgba(37, 47, 32, 0.88) 0%, rgba(37, 47, 32, 0.7) 100%);
  }
}

@media (max-width: 768px) {
  section {
    padding: var(--spacing-lg) 1.25rem;
  }

  .header-container {
    padding: 0.75rem 1.25rem;
  }

  .logo {
    height: 40px;
  }

  .hero h1,
  .hero--home h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .hero--page {
    min-height: 260px;
  }

  .grid-2,
  .grid-3,
  .footer-content,
  .compliance-inner {
    grid-template-columns: 1fr;
  }

  .grid-2 {
    gap: var(--spacing-md);
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .section-header {
    margin-bottom: var(--spacing-md);
  }

  .compliance {
    padding: var(--spacing-md) 1.25rem;
  }
}

/* On phones the seven-column COA table becomes one labeled card per batch, so
   the batch number can be matched without side-scrolling. The header row stays in
   the accessibility tree but is visually hidden (sorting is a desktop affordance). */
@media (max-width: 640px) {
  .coa-table table {
    min-width: 0;
  }

  .coa-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  /* Show the sort buttons while one has keyboard focus */
  .coa-table thead:focus-within {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }

  .coa-table thead:focus-within tr {
    display: flex;
    flex-wrap: wrap;
  }

  .coa-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1rem;
    padding: 1.25rem;
    border-bottom: 1px solid var(--color-cream);
  }

  .coa-table td {
    padding: 0;
    border: none;
  }

  .coa-table td.coa-product,
  .coa-table td.coa-batch,
  .coa-table td.coa-pdf,
  .coa-table td.table-empty {
    grid-column: 1 / -1;
  }

  .coa-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
  }

  .coa-table .coa-product strong {
    font-family: var(--font-display);
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .hero--home {
    min-height: 420px;
  }

  .hero h1,
  .hero--home h1 {
    font-size: 2.1rem;
  }

  .age-gate-buttons {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
