/* Pura Organical styles */

:root {
  --sage: #eef1e6;
  --paper: #ffffff;
  --loam: #2b2118;
  --loam-soft: #5a4d40;
  --field: #2f5d3a;
  --field-deep: #1f4029;
  --barley: #e3b23c;
  --beet: #8c2f4b;
  --line: #cfd6c2;
  --radius: 6px;
  --wrap: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  background: var(--sage);
  color: var(--loam);
  font-family: "Public Sans", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

h1, h2, h3 {
  font-family: "Bricolage Grotesque", "Public Sans", sans-serif;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

a { color: var(--field); }
a:hover { color: var(--field-deep); }

:focus-visible {
  outline: 3px solid var(--barley);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 16px; top: 16px;
  background: var(--paper);
  padding: 8px 12px;
  z-index: 10;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 16px 0;
  background: var(--sage);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 16px rgba(43, 33, 24, 0.06);
}
/* Stop the sticky bar covering section headings when a menu link is clicked */
section[id] { scroll-margin-top: 84px; }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--loam);
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
}
.brand svg { width: 30px; height: 30px; flex: none; }
.nav {
  display: flex;
  gap: 22px;
  list-style: none;
  flex-wrap: wrap;
}
.nav a {
  color: var(--loam);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.nav a:hover { color: var(--field); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Hero ---------- */
.hero {
  overflow: hidden;
  padding: 64px 0 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: end;
}
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  font-weight: 700;
  max-width: 12ch;
  color: var(--field-deep);
}
.hero p {
  margin-top: 24px;
  max-width: 50ch;
  font-size: 1.2rem;
  color: var(--loam-soft);
}
.hero-actions {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 2px solid var(--field);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
.btn-primary { background: var(--field); color: #fff; }
.btn-primary:hover { background: var(--field-deep); border-color: var(--field-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--field); }
.btn-ghost:hover { background: var(--paper); }

/* In season now: the page's signature panel */
.season {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px 28px;
}
.season h2 {
  font-size: 1.5rem;
  color: var(--field-deep);
}
.season-month {
  color: var(--loam-soft);
  margin-top: 2px;
}
.season ul {
  list-style: none;
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.season li {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--sage);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--field-deep);
}
.season-note {
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--loam-soft);
}

.furrows {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 64px;
}
.furrows path { fill: none; stroke-linecap: round; }
.furrows .row { stroke: var(--field); }
.furrows .row.alt { stroke: var(--barley); }
.furrows .row.beet { stroke: var(--beet); }
@media (prefers-reduced-motion: no-preference) {
  .furrows .row {
    stroke-dasharray: 1600;
    stroke-dashoffset: 1600;
    animation: plough 1.6s cubic-bezier(.4,.1,.2,1) forwards;
  }
  .furrows .row:nth-child(2) { animation-delay: .08s; }
  .furrows .row:nth-child(3) { animation-delay: .16s; }
  .furrows .row:nth-child(4) { animation-delay: .24s; }
  .furrows .row:nth-child(5) { animation-delay: .32s; }
  .furrows .row:nth-child(6) { animation-delay: .40s; }
  .furrows .row:nth-child(7) { animation-delay: .48s; }
}
@keyframes plough { to { stroke-dashoffset: 0; } }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
.section-head { max-width: 60ch; margin-bottom: 44px; }
.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  color: var(--field-deep);
}
.section-head p { margin-top: 14px; color: var(--loam-soft); }

/* Produce */
.produce { background: var(--paper); }
.produce-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}
.produce-head .section-head { margin-bottom: 0; }
.carousel-controls { display: flex; gap: 10px; flex: none; }
.carousel-btn {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--field);
  background: var(--paper);
  color: var(--field);
  cursor: pointer;
}
.carousel-btn svg { width: 22px; height: 22px; }
.carousel-btn:hover:not(:disabled) { background: var(--field); color: #fff; }
.carousel-btn:disabled { opacity: 0.35; cursor: default; }

/* Horizontal scrolling row of products */
.produce-list {
  list-style: none;
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 4px;
  padding: 4px 4px 20px;
  margin: 0 -4px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.produce-list::-webkit-scrollbar { height: 8px; }
.produce-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.produce-list li {
  flex: 0 0 260px;
  scroll-snap-align: start;
  background: var(--sage);
  border-radius: var(--radius);
  overflow: hidden;
}
.produce-list img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--sage);
}
.produce-list li > div { padding: 18px 20px 22px; }
.produce-list h3 { font-size: 1.3rem; margin-bottom: 6px; }
.produce-list p { color: var(--loam-soft); font-size: 0.98rem; }

/* Produce search */
.produce-search { max-width: 420px; margin-bottom: 24px; }
.produce-search label { margin-bottom: 8px; }
.produce-search input {
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7' fill='none' stroke='%235a4d40' stroke-width='2'/%3E%3Cpath d='M20 20l-4-4' stroke='%235a4d40' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 14px center / 18px;
  padding-left: 42px;
}
.produce-search-status { margin-top: 6px; font-size: 0.9rem; color: var(--loam-soft); min-height: 1.4em; }
.produce-empty {
  padding: 28px;
  background: var(--sage);
  border-radius: var(--radius);
  color: var(--loam-soft);
}
.produce-list li[hidden], .produce-list[hidden], .produce-empty[hidden] { display: none; }

/* Search suggestions dropdown */
.search-box { position: relative; }
.search-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 5;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(43, 33, 24, 0.12);
  max-height: 300px;
  overflow-y: auto;
  padding: 6px;
}
.search-suggestions li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}
.search-suggestions li:hover,
.search-suggestions li[aria-selected="true"] { background: var(--sage); }
.search-suggestions img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  flex: none;
}
.search-suggestions[hidden] { display: none; }

/* Clickable product cards */
.produce-list li { position: relative; }
.card-open {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius);
}
.card-open:focus-visible { outline: 3px solid var(--barley); outline-offset: -3px; }
.produce-list li:hover { box-shadow: 0 0 0 2px var(--field); }

/* Product detail dialog */
.product-dialog {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--loam);
  overflow: auto;
}
.product-dialog::backdrop { background: rgba(31, 64, 41, 0.55); }
.product-dialog img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--sage);
}
.dialog-body { padding: 24px 28px 28px; }
.dialog-body h2 { font-size: 1.9rem; color: var(--field-deep); margin-bottom: 8px; }
.dialog-body p { color: var(--loam-soft); margin-bottom: 22px; }
.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--loam);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(43, 33, 24, 0.18);
}
.dialog-close svg { width: 20px; height: 20px; }

/* Who we supply */
.customers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.customer h3 {
  font-size: 1.3rem;
  padding-top: 18px;
  border-top: 3px solid var(--field);
  margin-bottom: 10px;
}
.customer p { color: var(--loam-soft); }

/* How ordering works: a real sequence, so it is numbered */
.ordering {
  background: var(--field-deep);
  color: #e9efe2;
}
.ordering .section-head h2 { color: #fff; }
.ordering .section-head p { color: #c3d1bb; }
.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: block;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: 3rem;
  line-height: 1;
  color: var(--barley);
  margin-bottom: 14px;
}
.steps h3 { font-size: 1.3rem; color: #fff; margin-bottom: 8px; }
.steps p { color: #c3d1bb; }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: start;
}
.about-grid h2 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  color: var(--field-deep);
}
.about-grid p + p { margin-top: 16px; }

/* Contact */
.contact { background: var(--paper); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: start;
}
.contact-details dt { font-weight: 600; margin-top: 18px; }
.contact-details dt:first-child { margin-top: 0; }
.contact-details dd { color: var(--loam-soft); }

form {
  background: var(--sage);
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.field { margin-bottom: 18px; }
label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95rem;
}
input, textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--loam);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
input:focus, textarea:focus { border-color: var(--field); }
textarea { min-height: 140px; resize: vertical; }
.optional { font-weight: 400; color: var(--loam-soft); }
.form-note { margin-top: 14px; font-size: 0.875rem; color: var(--loam-soft); }
.form-error { margin-top: 10px; font-size: 0.9rem; color: #9b2c1f; min-height: 1.2em; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 44px;
  font-size: 0.9rem;
  color: var(--loam-soft);
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.site-footer p + p { margin-top: 4px; }

/* Responsive */
@media (max-width: 860px) {
  .hero-grid,
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .customers-grid,
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .produce-list li { flex-basis: 220px; }
  section { padding: 64px 0; }
}
@media (max-width: 560px) {
  .site-header { padding: 10px 0; }
  .site-header .wrap { gap: 6px; }
  section[id] { scroll-margin-top: 96px; }
  .produce-head { flex-direction: column; align-items: flex-start; }
  .produce-list li { flex-basis: 78%; }
  .wrap { padding: 0 16px; }
  .nav { gap: 16px; }
  .hero { padding-top: 32px; }
  form, .season { padding: 22px; }
}
