/* Momntie's Farm — design tokens & base styles */

:root {
  --color-bg: #FAF6EF;
  --color-bg-alt: #F1E7D6;
  --color-surface: #FFFFFF;
  --color-text: #2B2118;
  --color-text-muted: #6B5C4C;
  --color-brand-brown: #5B3A29;
  --color-brand-brown-dark: #402A1D;
  --color-accent-amber: #D98E2C;
  --color-accent-amber-dark: #B8721B;
  --color-accent-green: #3F6B3F;
  --color-border: #E4D9C5;
  --color-overlay-top: rgba(43, 33, 24, 0.15);
  --color-overlay-bottom: rgba(43, 33, 24, 0.75);
  --color-footer-border: rgba(250, 246, 239, 0.15);
  --color-footer-muted: rgba(250, 246, 239, 0.7);

  --font-heading: "Segoe UI Rounded", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-body: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;

  --radius-card: 16px;
  --radius-pill: 999px;
  --max-width: 1120px;
  --shadow-card: 0 8px 24px rgba(43, 33, 24, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: var(--color-brand-brown);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-brand-brown-dark);
  line-height: 1.2;
  margin: 0 0 var(--space-sm);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 var(--space-sm); }

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

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

.section {
  padding: var(--space-xl) 0;
}

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

.section__intro {
  max-width: 640px;
  margin: 0 0 var(--space-lg);
}

/* Buttons */

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--cta {
  background: var(--color-accent-amber);
  color: var(--color-brand-brown-dark);
}

.btn--cta:hover {
  background: var(--color-accent-amber-dark);
  color: var(--color-surface);
}

.btn--outline {
  background: transparent;
  border-color: var(--color-brand-brown);
  color: var(--color-brand-brown);
}

.btn--outline:hover {
  background: var(--color-brand-brown);
  color: var(--color-surface);
}

.btn--block {
  display: block;
  text-align: center;
  width: 100%;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-sm);
  padding-bottom: var(--space-sm);
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-brand-brown-dark);
  text-decoration: none;
}

.brand__mark {
  font-size: 1.5rem;
}

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

.btn--header {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  margin: 0 8px;
  background: var(--color-brand-brown-dark);
}

.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  gap: var(--space-sm);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md);
}

.site-nav.is-open {
  display: flex;
}

.site-nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
}

.site-nav a.is-active {
  color: var(--color-accent-amber-dark);
}

/* Desktop nav row from 1024px — with 8 links it no longer fits at 768px,
   so tablets keep the hamburger menu (see mobile pass at end of file) */
@media (min-width: 1024px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    background: transparent;
    border: none;
    padding: 0;
    width: auto;
    order: 1;
  }

  .site-header__controls {
    order: 2;
  }
}

/* Hero */

.hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: flex-end;
  color: var(--color-surface);
  background-size: cover;
  background-position: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--color-overlay-top) 0%, var(--color-overlay-bottom) 100%);
}

.hero__content {
  position: relative;
  padding: var(--space-xl) 0;
}

.hero__content h1,
.hero__content p {
  color: var(--color-surface);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

/* Card grid */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .card-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  text-decoration: none;
  color: var(--color-text);
  display: block;
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card__body {
  padding: var(--space-md);
}

.trust-point {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  border-top: 4px solid var(--color-accent-green);
  padding: var(--space-md);
  box-shadow: var(--shadow-card);
}

.trust-point__icon {
  font-size: 1.75rem;
  margin-bottom: var(--space-xs);
}

/* Product blocks */

.product-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  align-items: center;
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--color-border);
}

.product-block:last-child {
  border-bottom: none;
}

.product-block img {
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  height: 280px;
  object-fit: cover;
  width: 100%;
}

.product-block--reverse .product-block__media {
  order: -1;
}

@media (min-width: 768px) {
  .product-block {
    grid-template-columns: 1fr 1fr;
  }

  .product-block--reverse .product-block__media {
    order: 1;
  }
}

/* Gallery */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

/* About */

.about-story {
  max-width: 720px;
}

.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

@media (min-width: 640px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.team-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--space-xs);
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-card {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
}

.form-field {
  margin-bottom: var(--space-sm);
}

.form-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--color-surface);
  color: var(--color-text);
}

.form-field textarea {
  min-height: 120px;
  resize: vertical;
}

/* Footer */

.site-footer {
  background: var(--color-brand-brown-dark);
  color: var(--color-bg);
  margin-top: var(--space-xl);
}

.site-footer a {
  color: var(--color-bg);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  padding: var(--space-xl) 0 var(--space-lg);
}

@media (min-width: 768px) {
  .site-footer__inner {
    grid-template-columns: repeat(3, 1fr);
  }
}

.site-footer h3 {
  color: var(--color-bg);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.site-footer__bottom {
  border-top: 1px solid var(--color-footer-border);
  padding: var(--space-sm) 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-footer-muted);
}

/* ---- Strategy rework additions (2026-08-05) ---- */

/* Brand logo */
.brand__logo {
  width: 54px;
  height: auto;
}

/* Highlighted Order link in nav */
.site-nav__order {
  background: var(--color-accent-amber);
  color: var(--color-surface);
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.9rem;
}

/* Home pathway cards */
.pathway-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .pathway-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Stat strip */
.stat-strip {
  display: grid;
  gap: var(--space-sm);
  grid-template-columns: repeat(2, 1fr);
  text-align: center;
}
@media (min-width: 768px) {
  .stat-strip { grid-template-columns: repeat(4, 1fr); }
}
.stat__number {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--color-brand-brown);
  font-weight: 700;
}
.stat__label {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* Closing CTA band */
.cta-band {
  background: var(--color-bg-alt);
  text-align: center;
}

/* About values list */
.values-list {
  display: grid;
  gap: var(--space-sm);
  max-width: 800px;
  margin: 0 auto;
}
.value-row {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-sm) var(--space-md);
}
.value-row h3 {
  margin: 0 0 0.25rem;
  color: var(--color-brand-brown);
}
.value-row p {
  margin: 0;
  color: var(--color-text-muted);
}

/* Stories */
.story {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--space-md);
  max-width: 800px;
  margin: var(--space-md) auto;
}
.story__date {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin: 0 0 0.25rem;
}
.story h2 {
  margin-top: 0;
}
/* Partner one-pager slot */
.doc-slot {
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-card);
  padding: var(--space-sm) var(--space-md);
  color: var(--color-text-muted);
  background: var(--color-bg-alt);
}

/* Beta-testing badge (remove at full launch) */
.beta-note {
  position: fixed;
  bottom: 0.75rem;
  left: 0.75rem;
  z-index: 50;
  margin: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card);
  opacity: 0.85;
  pointer-events: none;
}
@media print { .beta-note { display: none; } }

/* ---- Mobile-friendliness pass (2026-08-05) ---- */

/* Phone-only global font shrink to 70% (rem-based sizes scale with it) */
@media (max-width: 767px) {
  html { font-size: 70%; }
}

/* Phone header fit: 8-link site needs a slimmer brand + CTA below 768px */
@media (max-width: 767px) {
  .brand__name { font-size: 1.05rem; }
  .brand__logo { width: 40px; }
  .btn--header { padding: 0.45rem 0.8rem; font-size: 0.8rem; }
  .site-header__controls { gap: 0.5rem; }
  .site-nav a { padding: 0.35rem 0; } /* comfortable tap targets in the dropdown */
  .section { padding: var(--space-lg) 0; } /* tighter section rhythm on phones */
}

/* Very small phones: logo (which carries the name) stands alone */
@media (max-width: 379px) {
  .brand__name { display: none; }
}

/* Tablets (768-1023px) keep the hamburger: 8 links no longer fit as a row here */
@media (min-width: 1024px) {
  /* the nav's amber Order pill is the single order CTA on desktop —
     the header WhatsApp button would crowd the 8-link row */
  .btn--header { display: none; }
  .site-nav a { font-size: 0.95rem; }
  .site-nav { gap: 1.25rem; }
}
