/* YJ Farms Ltd - yellowjaw.com
   Palette from the mockup: sun-yellow header, cream page, jungle green and hibiscus red from the logos. */

:root {
  --sun: #f2c512;
  --cream: #fef9e6;
  --jungle: #1f3d1e;
  --ink: #2a3225;
  --hibiscus: #b3202a;
  --hibiscus-dark: #8f1a22;
  --moss: #e8edcf;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --gap: clamp(2.5rem, 6vw, 5rem);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.1;
  color: var(--jungle);
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.25rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; max-width: 62ch; }

a { color: var(--hibiscus); text-underline-offset: 0.2em; }
a:hover { color: var(--hibiscus-dark); }

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

.container { width: min(1100px, 100% - 2.5rem); margin-inline: auto; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--jungle);
  color: var(--cream);
  padding: 0.6rem 1rem;
  z-index: 20;
}
.skip:focus { top: 0.75rem; color: var(--cream); }

/* ---------- Header ---------- */
.site-header { background: var(--sun); color: var(--jungle); }
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.5rem;
}
.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--jungle);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--jungle); }

.nav-links {
  display: flex;
  gap: 0.25rem 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: 0.4rem 0;
  color: var(--jungle);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.nav-links a:hover { border-bottom-color: var(--jungle); color: var(--jungle); }
.nav-links a[aria-current="page"] { border-bottom-color: var(--hibiscus); font-weight: 600; }

.nav-toggle {
  display: none;
  background: transparent;
  color: var(--jungle);
  border: 2px solid var(--jungle);
  border-radius: 6px;
  padding: 0.4rem 0.9rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 760px) {
  .site-header .bar { flex-wrap: wrap; padding-block: 0.75rem; }
  .js .nav-toggle { display: inline-block; }
  .js .nav-links { display: none; width: 100%; flex-direction: column; padding-bottom: 0.75rem; }
  .js .nav-links.open { display: flex; }
  .nav-links { width: 100%; flex-wrap: wrap; padding-bottom: 0.5rem; }
}

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

.btn {
  display: inline-block;
  background: var(--hibiscus);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: 0.8rem 1.4rem;
  border-radius: 8px;
  border: 2px solid var(--hibiscus);
}
.btn:hover { background: var(--hibiscus-dark); border-color: var(--hibiscus-dark); color: #fff; }

.btn.btn-outline { background: transparent; color: var(--jungle); border-color: var(--jungle); }
.btn.btn-outline:hover { background: var(--jungle); color: var(--cream); }

.on-dark .btn.btn-outline { color: var(--cream); border-color: var(--cream); }
.on-dark .btn.btn-outline:hover { background: var(--cream); color: var(--jungle); }

/* ---------- Layout blocks ---------- */
.section { padding-block: var(--gap); }
.section.on-dark { background: var(--jungle); color: var(--cream); }
.section.on-dark h1, .section.on-dark h2, .section.on-dark h3 { color: var(--cream); }
.section.on-dark a:not(.btn) { color: var(--sun); }
.section.on-moss { background: var(--moss); }

.split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}
.split.flip { grid-template-columns: 0.85fr 1.15fr; }
.split.top { align-items: start; }

@media (max-width: 820px) {
  .split, .split.flip { grid-template-columns: 1fr; }
  .split.flip .split-media { order: -1; }
}

.photo { border-radius: 12px; box-shadow: 0 10px 30px rgba(31, 61, 30, 0.22); }
.photo.round { border-radius: 50%; }

.page-head { padding-block: clamp(2rem, 5vw, 3.5rem) 0; }
.lead { font-size: 1.25rem; max-width: 52ch; }

/* Home hero */
.hero { padding-block: clamp(2rem, 5vw, 4rem) var(--gap); }
.hero h1 { max-width: 14ch; }
.hero .hero-logo { max-height: 34rem; width: auto; margin-inline: auto; }

/* Opening band on the home page */
.opening { text-align: center; }
.opening h2 {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  max-width: 16ch;
  margin-inline: auto;
}
.opening p { margin-inline: auto; }
.opening .banner { margin: 2rem auto 0; width: 100%; max-width: 960px; border-radius: 12px; }
.opening .actions { justify-content: center; }

/* Facts list */
.facts { margin: 0; }
.facts dt { font-weight: 600; color: var(--jungle); margin-top: 1.25rem; }
.facts dd { margin: 0.15rem 0 0; }

address { font-style: normal; }

/* Map */
.map-wrap { margin-top: 1.5rem; }
.map-wrap img { width: 100%; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }

.place-list {
  columns: 2 18rem;
  column-gap: 2.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}
.place-list li { break-inside: avoid; padding: 0.35rem 0; }

/* Products */
.poster-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
}
@media (max-width: 640px) { .poster-pair { grid-template-columns: 1fr; max-width: 28rem; margin-inline: auto; } }

.varieties {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem clamp(1.5rem, 4vw, 3rem);
  margin-top: 1.5rem;
}
@media (max-width: 700px) { .varieties { grid-template-columns: 1fr; } }
.varieties h3 { margin-bottom: 0.3em; }
.varieties p { margin: 0; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-photos { display: grid; gap: 1.25rem; }
.contact-photos img { width: 100%; }

/* ---------- Footer ---------- */
.site-footer { background: var(--jungle); color: var(--cream); padding-block: 2.5rem; font-size: 0.975rem; }
.site-footer a { color: var(--sun); }
.site-footer .foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}
.site-footer p { margin: 0 0 0.35em; }
.site-footer .foot-name { font-family: var(--display); font-weight: 700; font-size: 1.3rem; }

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