/* Acorn Food Distribution - static storefront styles (Unit 4)
   Design tokens live in :root so a future framework migration can lift them as-is. */

:root {
  --green-900: #173F32;
  --green-800: #1F4D3E;
  --green-600: #2F6A50;
  --sage: #D1E5A5;
  --sage-100: #EAF3D6;
  --offwhite: #F7F7F2;
  --white: #FFFFFF;
  --ink: #26332B;
  --ink-muted: #55635A;
  --line: #E2E6DA;
  --amber: #F3E3B5;
  --amber-ink: #6B4E0A;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(23, 63, 50, .06), 0 8px 24px rgba(23, 63, 50, .07);
  --container: 1160px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.15; color: var(--green-900); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 750; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--green-600); }

:focus-visible { outline: 3px solid var(--green-600); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

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

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--green-900); color: var(--white); padding: 10px 16px; border-radius: var(--radius-sm);
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; line-height: 1.4; white-space: nowrap; vertical-align: middle;
}
.pill-soon { background: var(--amber); color: var(--amber-ink); }
.pill-preview { background: var(--sage); color: var(--green-900); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-size: 1.35rem; font-weight: 800; color: var(--green-900); letter-spacing: -.02em; }
.brand-sub { font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }

.primary-nav { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--ink); text-decoration: none; font-weight: 600;
}
.nav-links a:hover { background: var(--offwhite); color: var(--green-900); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.account-chip, .cart-chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink-muted); font-weight: 600; font-size: .92rem; cursor: not-allowed; background: var(--white);
}
.account-chip svg, .cart-chip svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cart-chip { position: relative; padding: 0 14px; }
.cart-count {
  min-width: 20px; height: 20px; border-radius: 999px; background: var(--offwhite);
  font-size: .75rem; display: inline-grid; place-items: center; color: var(--ink-muted);
}

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--white); cursor: pointer; padding: 0;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  display: block; width: 20px; height: 2px; background: var(--green-900); margin: 0 auto; position: relative; content: "";
}
.nav-toggle-bar::before { position: absolute; top: -6px; }
.nav-toggle-bar::after { position: absolute; top: 6px; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .primary-nav {
    display: none; position: absolute; left: 0; right: 0; top: 72px;
    flex-direction: column; align-items: stretch; gap: 12px;
    background: var(--white); border-bottom: 1px solid var(--line); padding: 12px 16px 20px;
    box-shadow: var(--shadow);
  }
  .primary-nav.is-open { display: flex; }
  .nav-links { flex-direction: column; }
  .nav-links a { padding: 12px; }
  .nav-actions { padding: 0 12px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 700; text-decoration: none; transition: background-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--green-900); color: var(--white); }
.btn-primary:hover { background: var(--green-800); }
.btn-ghost { color: var(--green-900); border: 1.5px solid var(--green-900); }
.btn-ghost:hover { background: var(--green-900); color: var(--white); }

/* ---------- Hero ---------- */
.hero { background: var(--offwhite); padding: 72px 0 80px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow {
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--green-600); margin-bottom: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.eyebrow-light { color: var(--sage); }
.lede { font-size: 1.2rem; color: var(--ink-muted); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 24px; }
.hero-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .92rem; color: var(--ink-muted); margin: 0; }
.hero-art { margin: 0; }
.hero-art img { width: 100%; height: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow); }

@media (max-width: 900px) {
  .hero { padding: 48px 0 56px; }
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
}

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-tint { background: var(--offwhite); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p:last-child { color: var(--ink-muted); font-size: 1.05rem; }
@media (max-width: 600px) { .section { padding: 64px 0; } }

/* ---------- Categories ---------- */
.category-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
@media (max-width: 900px) { .category-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .category-grid { grid-template-columns: 1fr; } }

.category-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; align-items: flex-start;
}
.category-card p { color: var(--ink-muted); flex: 1; }
.category-icon {
  width: 72px; height: 72px; border-radius: var(--radius); display: grid; place-items: center; margin-bottom: 18px;
  background: var(--sage-100);
}
.category-icon svg { width: 44px; height: 44px; }
.category-icon .fill { fill: var(--green-600); }
.category-icon .fill-dark { fill: var(--green-900); }
.category-icon .fill-light { fill: var(--sage); stroke: var(--green-900); stroke-width: 2; }
.category-icon .stroke { fill: none; stroke: var(--green-900); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.category-icon .stroke-bold { fill: none; stroke: var(--green-600); stroke-width: 4; stroke-linecap: round; }

.cat-bakery .category-icon { background: #F6EBDA; }
.cat-bakery .fill { fill: #C08A4E; }
.cat-dairy .category-icon { background: #EEF2F4; }
.cat-dairy .fill { fill: #FFFFFF; stroke: var(--green-900); stroke-width: 2; }
.cat-beverage .category-icon { background: #FBF0D9; }
.cat-beverage .fill { fill: #E9A23B; }
.cat-frozen .category-icon { background: #E6F0F3; }
.cat-frozen .stroke-bold { stroke: #3C7A8C; }
.cat-pantry .category-icon { background: #F3EEDF; }
.cat-pantry .fill { fill: #B4553A; }

/* ---------- Steps ---------- */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: none;
}
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--white); border-radius: var(--radius); padding: 24px; border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: flex-start;
}
.step p { color: var(--ink-muted); flex: 1; }
.step-num {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green-900); color: var(--sage); font-weight: 800; margin-bottom: 16px;
}

/* ---------- About / values ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 8px; } }
.value-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.value {
  display: grid; grid-template-columns: 52px 1fr; gap: 18px; align-items: start;
  padding: 22px; border-radius: var(--radius); background: var(--offwhite);
}
.value p { margin: 0; color: var(--ink-muted); }
.value-icon { width: 52px; height: 52px; border-radius: 12px; background: var(--sage); display: grid; place-items: center; }
.value-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--green-900); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Contact ---------- */
.section-dark { background: var(--green-900); color: #E7EFE2; }
.section-dark h2 { color: var(--white); }
.contact-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .contact-inner { grid-template-columns: 1fr; } }
.contact-card { background: var(--green-800); border: 1px solid rgba(209, 229, 165, .25); border-radius: var(--radius); padding: 28px; }
.contact-card h3 { color: var(--sage); }
.contact-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.contact-card li { display: flex; align-items: center; gap: 12px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--offwhite); border-top: 1px solid var(--line); padding: 40px 0 28px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--green-900); }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--ink); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--green-600); text-decoration: underline; }
.footer-meta {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: .85rem; color: var(--ink-muted);
}
.footer-meta p { margin: 0; }
.build { font-variant-numeric: tabular-nums; }

/* ---------- 404 ---------- */
.not-found { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 80px 0; background: var(--offwhite); }
.not-found p { color: var(--ink-muted); }
.not-found-mark { margin: 0 auto 20px; }
