/* ==========================================================================
   Burger Family Farm — self-hosted stylesheet
   Fonts self-hosted (see /fonts). Minimalist black-on-white farm aesthetic.
   ========================================================================== */

/* ---- Self-hosted Poppins ------------------------------------------------- */
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/poppins-400.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/poppins-500.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/poppins-600.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/poppins-700.woff2") format("woff2");
}

/* ---- Tokens -------------------------------------------------------------- */
:root {
  --ink: #0b0b0b;
  --muted: #555;
  --line: #e6e6e6;
  --bg: #ffffff;
  --accent: #2f5d3a;           /* farm green, used sparingly */
  --maxw: 1120px;
  --textw: 760px;
  --font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }

/* ---- Layout helpers ------------------------------------------------------ */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.narrow { max-width: var(--textw); margin-left: auto; margin-right: auto; }
.center { text-align: center; }

/* ---- Header / nav -------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.wordmark {
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  text-decoration: none;
  font-size: 1rem;
  color: var(--ink);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, opacity 0.15s ease;
}
.nav a:hover { opacity: 0.6; }
.nav a[aria-current="page"] { border-bottom-color: var(--ink); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  font-size: 1.6rem;
  line-height: 1;
}

/* ---- Home banner (full logo image, uncropped) --------------------------- */
.hero-banner { width: 100%; background: #12111a; }
.hero-banner img { width: 100%; height: auto; display: block; }

/* ---- Hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
}
.hero--tall { min-height: 78vh; }
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.12), rgba(0,0,0,0.28));
}
.hero__inner { position: relative; z-index: 1; width: 100%; }
.hero__title {
  color: #fff;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  text-shadow: 0 2px 24px rgba(0,0,0,0.35);
}

/* ---- Typographic sections ----------------------------------------------- */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
}
.display {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.2;
}
.lead { font-size: 1.15rem; color: var(--muted); }
.prose p { font-size: 1.1rem; margin: 0 0 1.1em; }
.prose p:last-child { margin-bottom: 0; }

.quote {
  font-size: clamp(1.25rem, 2.6vw, 1.9rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.4;
}

/* ---- Feature image blocks ----------------------------------------------- */
.feature-img {
  width: 100%;
  border-radius: 4px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* ---- Photo row (What We Grow gallery) -------------------------------------- */
.photo-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 36px 0;
}
.photo-row figure { margin: 0; }
.photo-row img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
  background: #f0f0ee;
}
.photo-row figcaption {
  margin-top: 8px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
@media (max-width: 720px) {
  .photo-row { grid-template-columns: 1fr; gap: 24px; }
  .photo-row img { aspect-ratio: 4 / 3; }
}

/* ---- Crop chip list -------------------------------------------------------- */
.crop-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.crop-list li {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 1rem;
  background: #fafaf8;
}

/* ---- What We Grow columns ------------------------------------------------ */
.grow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.grow-col h3 {
  font-size: 1.5rem;
  padding-bottom: 12px;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--ink);
}
.grow-col ul { list-style: none; margin: 0; padding: 0; }
.grow-col li {
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.05rem;
}

/* ---- Newsletter ---------------------------------------------------------- */
.newsletter { background: #f6f6f4; }
.newsletter h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 600; }
.signup {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.signup input[type="email"] {
  flex: 1 1 320px;
  max-width: 420px;
  padding: 14px 16px;
  font: inherit;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
}
.signup input[type="email"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.btn {
  display: inline-block;
  padding: 14px 28px;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.btn:hover { opacity: 0.85; }
.form-msg { margin-top: 16px; min-height: 1.4em; font-weight: 500; }
.form-msg.ok { color: var(--accent); }
.form-msg.err { color: #b3261e; }

/* ---- Blog ---------------------------------------------------------------- */
.post-list { display: grid; gap: 40px; }
.post-card { border-bottom: 1px solid var(--line); padding-bottom: 40px; }
.post-card:last-child { border-bottom: 0; }
.post-meta { color: var(--muted); font-size: 0.9rem; letter-spacing: 0.04em; }
.post-card h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin: 8px 0 14px; }
.post-card h2 a { text-decoration: none; }
.post-card h2 a:hover { text-decoration: underline; }
.read-more {
  display: inline-block;
  margin-top: 6px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 2px;
}

.article { max-width: var(--textw); margin: 0 auto; }
.article h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 12px; }
.article__meta { color: var(--muted); margin-bottom: 32px; }
.article__body p { font-size: 1.15rem; margin: 0 0 1.2em; }
.article__body ul { font-size: 1.15rem; padding-left: 1.2em; }
.article__body li { margin: 0.3em 0; }
.article__img { border-radius: 4px; margin: 28px 0; }
.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-weight: 500;
}
.article-nav a { text-decoration: none; }
.article-nav a:hover { text-decoration: underline; }

/* ---- Footer -------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0;
  text-align: center;
  color: var(--muted);
}
.site-footer .wordmark { display: inline-block; color: var(--ink); margin-bottom: 12px; }
.site-footer address { font-style: normal; line-height: 1.7; }
.footer-links { margin: 18px 0 0; font-size: 0.85rem; }
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
}
.footer-links a:hover { color: var(--ink); }

/* ---- 24/7 Farmstand snapshots -------------------------------------------- */
.live-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 7px;
  vertical-align: 1px;
  animation: live-pulse 2.4s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
}
.stand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 36px;
}
.stand-card { margin: 0; }
.stand-frame {
  position: relative;
  background: #f0f0ee;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.stand-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.stand-fallback[hidden] { display: none; }
.stand-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 0.95rem;
}
.stand-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.stand-label { font-weight: 600; }
.stand-ago { color: var(--muted); font-size: 0.9rem; }

/* ---- Instagram embed (official profile embed iframe) ---------------------- */
.ig-embed {
  max-width: 540px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}
.ig-embed iframe {
  display: block;
  width: 100%;
  height: 640px;
  border: 0;
}
@media (max-width: 720px) {
  .ig-embed iframe { height: 560px; }
}

/* ---- Instagram grid -------------------------------------------------------- */
.ig-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.ig-item {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 4px;
  background: #f0f0ee;
}
.ig-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.ig-item:hover img { transform: scale(1.04); }
@media (max-width: 720px) {
  .ig-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ---- Changelog ----------------------------------------------------------- */
.cl-list { list-style: none; margin: 0; padding: 0; }
.cl-item {
  padding: 22px 0 24px;
  border-bottom: 1px solid var(--line);
}
.cl-item:first-child { padding-top: 0; }
.cl-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cl-version { font-weight: 600; font-size: 1.2rem; }
.cl-sha {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  color: var(--accent);
  background: #f0f2f0;
  padding: 2px 8px;
  border-radius: 4px;
}
.cl-meta { color: var(--muted); font-size: 0.9rem; margin: 4px 0 12px; }
.cl-commits { margin: 0; padding-left: 1.2em; }
.cl-commits li { margin: 4px 0; font-size: 1rem; }
.cl-empty { color: var(--muted); font-style: italic; margin: 0; }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 720px) {
  .section { padding: 52px 0; }
  .grow-grid { grid-template-columns: 1fr; gap: 32px; }

  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"] { border-bottom-color: var(--line); font-weight: 600; }
}
