/* =====================================================================
   Northern Alliance Farms — site.css
   Shared styles for the whole static site. You normally won't need to
   touch this file. To change PRICES or FARM DETAILS, edit products.js.
   ===================================================================== */

:root {
  --gold: #c8902a; --gold-deep: #a9761b; --gold-soft: #f3e2bd;
  --clay: #9a5233; --clay-soft: #e8cdbd;
  --sage: #6c7a55; --sage-soft: #dde2cf;
  --ink: #2e2419; --ink-soft: #6a5f4f; --ink-faint: #9c9183;
  --cream: #f7f0e2; --cream-deep: #efe5d1; --surface: #fffdf7;
  --line: #e3d8c2; --line-strong: #d2c4a6;
  --good: #4f7a4d; --good-soft: #dceadb;
  --warn: #b9762a; --warn-soft: #f6e3c8;
  --danger: #a8442f; --danger-soft: #f2d6cd;
  --radius: 14px; --radius-sm: 9px; --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(46,36,25,.06), 0 1px 3px rgba(46,36,25,.05);
  --shadow-md: 0 6px 16px rgba(46,36,25,.08), 0 2px 6px rgba(46,36,25,.06);
  --shadow-lg: 0 18px 44px rgba(46,36,25,.14), 0 6px 16px rgba(46,36,25,.08);
  --font-head: 'Bitter', Georgia, serif;
  --font-body: 'Hanken Grotesk', system-ui, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;
  --maxw: 1200px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body); color: var(--ink); background: var(--cream);
  -webkit-font-smoothing: antialiased; line-height: 1.5;
  display: flex; flex-direction: column; min-height: 100vh;
}
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.1; margin: 0; color: var(--ink); letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
::selection { background: var(--gold-soft); }

main { flex: 1 0 auto; }

.mono { font-family: var(--font-mono); }
.eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-deep); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.hairline { height: 1px; background: var(--line); border: 0; margin: 0; }
.center { text-align: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: 15px; padding: 12px 22px;
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease, border-color .15s, color .15s;
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--cream); }
.btn-primary:hover { background: #43341f; color: var(--cream); }
.btn-gold { background: var(--gold); color: #3a2a08; box-shadow: var(--shadow-sm); }
.btn-gold:hover { background: var(--gold-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--cream-deep); border-color: var(--ink-faint); }
.btn-light { background: rgba(247,240,226,.16); color: var(--cream); border-color: rgba(247,240,226,.4); }
.btn-light:hover { background: rgba(247,240,226,.26); color: var(--cream); }
.btn-sm { padding: 8px 15px; font-size: 13.5px; }
.btn-lg { padding: 15px 30px; font-size: 16.5px; }
.btn-block { width: 100%; }

/* ---------- pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 999px; text-transform: uppercase;
}
.pill-good { background: var(--good-soft); color: #34572f; }
.pill-warn { background: var(--warn-soft); color: #8a5414; }
.pill-out  { background: var(--danger-soft); color: #8a3320; }
.pill-sage { background: var(--sage-soft); color: #485239; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: currentColor; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* ---------- fields ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.input, .select, .textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); background: #fff; color: var(--ink);
  font-size: 15px; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,144,42,.18); }
.textarea { resize: vertical; min-height: 84px; }

/* ---------- photo slot (drops in real images by filename) ---------- */
.photo {
  position: relative; overflow: hidden; border-radius: var(--radius-sm);
  background-color: var(--cream-deep);
  background-image: repeating-linear-gradient(135deg, rgba(154,82,51,.10) 0 2px, transparent 2px 11px);
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--line-strong); color: var(--clay); min-height: 120px;
}
.photo.loaded { border-style: solid; border-color: var(--line); }
.photo .photo-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em;
  background: rgba(255,253,247,.86); padding: 6px 11px; border-radius: 6px;
  text-align: center; max-width: 88%; line-height: 1.5;
}
.photo.loaded .photo-label { display: none; }
.photo .photo-label b { display: block; color: var(--ink); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.photo .photo-label code { color: var(--clay); }

/* ---------- header / nav ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247,240,226,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); border: none; background: none; padding: 0; }
.brand-mark { position: relative; width: 34px; height: 34px; flex: 0 0 auto; }
.brand-mark .a { position: absolute; inset: 0; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--gold); }
.brand-mark .b { position: absolute; inset: 9px 11px; border-radius: 50%; background: var(--cream); }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 18.5px; letter-spacing: -0.01em; line-height: 1.05; text-align: left; white-space: nowrap; }
@media (max-width: 460px) { .brand-name { font-size: 16px; white-space: normal; } }
.nav-links { display: flex; gap: 2px; align-items: center; }
.nav-links a { border: none; background: none; cursor: pointer; padding: 8px 13px; border-radius: 999px; font-size: 14.5px; font-weight: 600; color: var(--ink-soft); text-decoration: none; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { background: var(--cream-deep); color: var(--ink); }
.header-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; align-items: center; justify-content: center; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ''; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink); }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }

/* ---------- generic page hero ---------- */
.page-hero { background: linear-gradient(180deg, var(--cream-deep), var(--cream)); border-bottom: 1px solid var(--line); padding: 54px 0 48px; }
.page-hero.dark { background: var(--ink); }
.page-hero.dark h1, .page-hero.dark .eyebrow { color: var(--cream); }
.page-hero.dark .eyebrow { color: var(--gold-soft); }
.page-hero h1 { font-size: clamp(30px, 4.6vw, 48px); margin-top: 12px; max-width: 760px; }
.page-hero .sub { font-size: 17.5px; margin-top: 14px; max-width: 620px; color: var(--ink-soft); }
.page-hero.dark .sub { color: rgba(247,240,226,.78); }

/* ---------- grids ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }

.section { padding: 56px 0; }
.section-head { max-width: 600px; }
.section-head.center { margin: 0 auto; }

/* ---------- product card ---------- */
.product-card { overflow: hidden; display: flex; flex-direction: column; }
.product-card .photo { height: 230px; border-radius: 0; border-left: none; border-right: none; border-top: none; }
.product-card .pc-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.product-card h3 { font-size: 24px; margin-top: 7px; }
.product-card .blurb { color: var(--ink-soft); font-size: 14.5px; margin-top: 9px; line-height: 1.55; flex: 1; }
.size-list { display: flex; flex-direction: column; gap: 7px; margin-top: 16px; }
.size-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.size-row .sz { font-weight: 600; font-size: 14.5px; }
.size-row .pr { font-family: var(--font-head); font-weight: 800; font-size: 18px; }
.size-row.out { opacity: .5; }
.sr-right { display: flex; align-items: center; gap: 12px; }

/* ---------- quantity stepper ---------- */
.qty-stepper { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; background: #fff; }
.qty-btn { width: 26px; height: 26px; border: none; border-radius: 50%; background: var(--cream-deep); color: var(--ink); font-size: 16px; font-weight: 700; line-height: 1; display: grid; place-items: center; transition: background .12s; }
.qty-btn:hover { background: var(--gold-soft); }
.qty-count { min-width: 20px; text-align: center; font-family: var(--font-mono); font-weight: 700; font-size: 14px; }

/* ---------- reserve panel ---------- */
.reserve-panel { background: var(--ink); color: var(--cream); border-radius: var(--radius-lg); padding: clamp(26px, 4vw, 44px); }
.reserve-panel h2 { color: var(--cream); }
.reserve-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 26px; }
.reserve-step .n { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: #3a2a08; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: 16px; }
.reserve-step h4 { color: var(--cream); font-size: 16.5px; margin-top: 13px; }
.reserve-step p { color: rgba(247,240,226,.72); font-size: 14px; margin-top: 6px; line-height: 1.55; }

/* ---------- value strip ---------- */
.value-card { padding: 22px 22px; }
.value-card .ic { font-size: 26px; color: var(--gold-deep); }
.value-card h3 { font-size: 18px; margin-top: 12px; }
.value-card p { color: var(--ink-soft); font-size: 14.5px; margin-top: 7px; line-height: 1.55; }

/* ---------- gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery-grid figure { margin: 0; }
.gallery-grid .photo { width: 100%; height: 230px; }
.gallery-grid figcaption { margin-top: 12px; }
.gallery-grid figcaption .cap { display: block; font-family: var(--font-head); font-weight: 700; font-size: 16px; }
.gallery-grid figcaption .desc { display: block; color: var(--ink-soft); font-size: 14px; margin-top: 4px; line-height: 1.5; }

/* ---------- food safety ---------- */
.safety-grid { display: grid; grid-template-columns: 232px 1fr; gap: 36px; align-items: start; }
.safety-nav { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 18px; }
.safety-nav .grp .eyebrow { margin-bottom: 8px; padding-left: 4px; display: block; }
.safety-nav .grp .links { display: flex; flex-direction: column; gap: 4px; }
.safety-nav button { text-align: left; border: none; border-radius: var(--radius-sm); cursor: pointer; padding: 11px 13px; display: flex; gap: 11px; align-items: center; background: transparent; color: var(--ink-soft); font-weight: 500; font-size: 14.5px; transition: background .12s; }
.safety-nav button .gi { font-size: 17px; opacity: .85; }
.safety-nav button.active { background: var(--gold-soft); color: #5e4408; font-weight: 700; }
.safety-article { padding: clamp(24px, 3.4vw, 42px); }
.safety-article h2 { font-size: clamp(24px, 3.2vw, 34px); margin-top: 10px; }
.safety-article .summary { color: var(--ink-soft); font-size: 17px; margin-top: 10px; max-width: 640px; }
.safety-body { display: flex; flex-direction: column; gap: 22px; max-width: 660px; }
.safety-body h3 { font-size: 18.5px; margin-bottom: 6px; }
.safety-body p { color: var(--ink-soft); font-size: 15.5px; line-height: 1.6; }
.callout { display: flex; gap: 12px; align-items: flex-start; border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 22px; }
.callout .ci { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.callout span.txt { font-weight: 600; font-size: 14.5px; line-height: 1.45; }
.callout.good { background: var(--good-soft); border: 1px solid #bcd4ba; } .callout.good .ci { background: var(--good); } .callout.good .txt { color: #34572f; }
.callout.warn { background: var(--warn-soft); border: 1px solid #e8c592; } .callout.warn .ci { background: var(--warn); } .callout.warn .txt { color: #8a5414; }
.callout.danger { background: var(--danger-soft); border: 1px solid #e3b3a6; } .callout.danger .ci { background: var(--danger); } .callout.danger .txt { color: #8a3320; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: rgba(247,240,226,.7); margin-top: auto; }
.site-footer .ftop { padding: 44px 28px; display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.site-footer .fbrand { max-width: 300px; }
.site-footer .fbrand .fname { font-family: var(--font-head); font-weight: 800; font-size: 20px; color: var(--cream); }
.site-footer .fbrand p { font-size: 13.5px; margin-top: 10px; line-height: 1.6; }
.site-footer .fcols { display: flex; gap: clamp(28px, 5vw, 56px); flex-wrap: wrap; }
.site-footer .fcol .eyebrow { color: var(--gold-soft); margin-bottom: 10px; display: block; }
.site-footer .fcol a { display: block; color: inherit; text-decoration: none; font-size: 14px; padding: 4px 0; }
.site-footer .fcol a:hover { color: var(--cream); }
.site-footer .socials { display: flex; gap: 10px; margin-top: 16px; }
.site-footer .socials a, .site-footer .socials span { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(247,240,226,.28); color: var(--cream); text-decoration: none; transition: all .15s; }
.site-footer .socials a:hover { background: var(--gold); color: #3a2a08; border-color: var(--gold); }
.site-footer .socials span { opacity: .4; }
.site-footer .fbottom { padding: 14px 28px; border-top: 1px solid rgba(247,240,226,.12); }
.site-footer .fbottom .copy { font-family: var(--font-mono); font-size: 11.5px; }

.note-mono { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-faint); }

/* ---------- reservation bar ---------- */
.reservation-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: var(--ink); color: var(--cream); box-shadow: var(--shadow-lg);
  padding: 14px 20px; display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
}
.reservation-bar.hidden { display: none; }
.reservation-bar .rb-info { font-size: 14.5px; }
.reservation-bar .rb-info b { font-family: var(--font-head); font-size: 17px; }

/* ---------- modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(46,36,25,.5);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-card {
  background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  max-width: 520px; width: 100%; max-height: 88vh; overflow-y: auto;
  padding: clamp(20px,4vw,32px); position: relative;
}
.modal-close {
  position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border: none;
  border-radius: 50%; background: var(--cream-deep); color: var(--ink); font-size: 18px;
  line-height: 1; display: grid; place-items: center; transition: background .12s;
}
.modal-close:hover { background: var(--gold-soft); }
.cart-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart-line .cl-name { font-weight: 600; font-size: 14.5px; }
.cart-line .cl-size { color: var(--ink-soft); font-size: 13px; }
.cart-line .cl-right { display: flex; align-items: center; gap: 12px; }
.cart-line .cl-total { font-family: var(--font-head); font-weight: 800; font-size: 15.5px; min-width: 58px; text-align: right; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 0; margin-top: 4px; font-family: var(--font-head); font-weight: 800; font-size: 19px; }
.field-error { color: var(--danger); font-size: 12.5px; margin-top: 2px; }
.input.invalid { border-color: var(--danger); }
.modal-msg { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; margin-top: 14px; }
.modal-msg.good { background: var(--good-soft); color: #34572f; }
.modal-msg.bad { background: var(--danger-soft); color: #8a3320; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .nav-links, .header-cta .reserve-btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-header.open .nav-links { display: flex; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; gap: 2px; background: var(--cream); border-bottom: 1px solid var(--line); padding: 12px 28px 18px; box-shadow: var(--shadow-md); }
  .site-header.open .nav-links a { padding: 12px 10px; font-size: 16px; border-radius: var(--radius-sm); }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .reserve-steps { grid-template-columns: 1fr; }
  .safety-grid { grid-template-columns: 1fr; }
  .safety-nav { position: static; }
  .safety-nav .grp .links { flex-direction: row; flex-wrap: wrap; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .wrap { padding: 0 18px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .reserve-steps { grid-template-columns: 1fr; }
  .site-footer .ftop { gap: 24px; }
  .reservation-bar { flex-direction: column; align-items: stretch; text-align: center; }
  .reservation-bar .btn { width: 100%; }
}
