/* Bee Creek Farm — palette + typography per brand guidelines (Feb 2024)
   Brand fonts: Gin (headings) + Oswald (eyebrows/buttons) + Noto Sans (body) + Humble Craftsman (script accent) */

/* ---------- @font-face: brand fonts shipped from /fonts/ ---------- */
@font-face {
  font-family: "Gin";
  src: url("fonts/Gin-Regular.woff2") format("woff2"),
       url("fonts/Gin-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Humble Craftsman";
  src: url("fonts/HumbleCraftsman-Script.woff2") format("woff2"),
       url("fonts/HumbleCraftsman-Script.woff") format("woff");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ---------- Palette ---------- */
:root {
  --bone: #f9f6ee;
  --bone-soft: #f1ebdd;
  --yolk: #e1c519;
  --blue: #1b3f92;
  --blue-deep: #142e6a;
  --reddy: #d44039;
  --ink: #1a1b18;
  --line: rgba(27, 63, 146, 0.18);

  --max: 1400px;
  --gutter: clamp(1.5rem, 5vw, 4rem);
  --section-y: clamp(5rem, 12vw, 10rem);

  --font-display: "Gin", "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --font-eyebrow: "Oswald", "Bebas Neue", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-script: "Humble Craftsman", "Caveat", "Brush Script MT", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* offset anchor jumps so the fixed header doesn't cover section headings */
section[id] { scroll-margin-top: 96px; }
body {
  margin: 0;
  background: var(--bone);
  color: var(--blue);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.55vw + 0.9rem, 1.125rem);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* ---------- Type system ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 1.05;
  margin: 0 0 0.5em;
  color: var(--blue);
}
.h-display {
  font-size: clamp(3.4rem, 10vw, 8rem);
  line-height: 0.98;
  letter-spacing: -0.005em;
}
h1 { font-size: clamp(2.8rem, 7vw, 5.5rem); }
h2 { font-size: clamp(2.4rem, 5.5vw, 4.5rem); }
h3 {
  font-family: var(--font-eyebrow);
  font-size: clamp(1.05rem, 1.2vw, 1.2rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 0.6em;
}
p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--font-eyebrow);
  font-size: clamp(0.78rem, 0.85vw, 0.9rem);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-weight: 400;
  margin: 0 0 1.2rem;
  opacity: 0.85;
}
.script {
  font-family: var(--font-script);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
}
.lede {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1.25rem, 1.8vw, 1.65rem);
  line-height: 1.45;
  max-width: 36ch;
  margin: 0 auto;
}
.body-large {
  font-family: var(--font-body);
  font-size: clamp(1.08rem, 1.2vw, 1.25rem);
  line-height: 1.6;
}

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 880px; }
.centered { text-align: center; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-scrolled {
  background: rgba(249, 246, 238, 0.96);
  backdrop-filter: saturate(140%) blur(10px);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 88px;
}
.site-logo img {
  height: 52px; width: auto;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.25));
  transition: filter 0.25s ease;
}
.is-scrolled .site-logo img { filter: none; }
.site-header:not(.is-scrolled) .site-logo .logo-blue { display: none; }
.site-header.is-scrolled .site-logo .logo-bone { display: none; }

.primary-nav {
  display: flex; gap: clamp(1.5rem, 2.8vw, 2.6rem);
}
.primary-nav a {
  font-family: var(--font-eyebrow);
  text-decoration: none;
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bone);
  padding: 0.4rem 0;
  border-bottom: 1px solid transparent;
  text-shadow: 0 1px 6px rgba(0,0,0,0.35);
  transition: color 0.25s ease, border-color 0.2s ease, text-shadow 0.25s ease;
}
.is-scrolled .primary-nav a { color: var(--blue); text-shadow: none; }
.primary-nav a:hover { border-bottom-color: currentColor; }

.nav-toggle {
  display: none;
  background: none; border: 0; padding: 0.5rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block; width: 28px; height: 2px;
  background: var(--bone);
  margin: 6px 0;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.25s ease;
}
.is-scrolled .nav-toggle span { background: var(--blue); }
.nav-toggle[aria-expanded="true"] span { background: var(--blue); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; z-index: 2; }
  .primary-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bone);
    border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .primary-nav.open { max-height: 460px; }
  .primary-nav a {
    color: var(--blue);
    text-shadow: none;
    padding: 1.15rem var(--gutter);
    border-bottom: 1px solid var(--line);
  }
  .primary-nav a:hover { border-bottom-color: var(--line); }
}

/* ---------- Hero / slideshow ---------- */
.hero {
  position: relative;
  height: 100vh; min-height: 620px;
  overflow: hidden;
  color: var(--bone);
}
.hero-slides {
  position: absolute; inset: 0;
}
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease;
  transform: scale(1.05);
  animation: ambient 16s ease-in-out infinite alternate;
}
.hero-slide.is-active { opacity: 1; }
@keyframes ambient {
  from { transform: scale(1.02); }
  to   { transform: scale(1.1); }
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,46,106,0.12) 0%, rgba(20,46,106,0.55) 100%);
  pointer-events: none;
}
.hero-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 0 var(--gutter);
  z-index: 1;
}
.hero-logo {
  width: min(72vw, 720px);
  height: auto;
  filter: drop-shadow(0 4px 30px rgba(0,0,0,0.4));
  animation: hero-logo-in 1.4s ease-out 0.2s both;
}
@keyframes hero-logo-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
.hero-dots {
  position: absolute; bottom: clamp(1.5rem, 4vh, 3rem); left: 0; right: 0;
  display: flex; justify-content: center; gap: 0.7rem;
  z-index: 2;
}
.hero-dots button {
  width: 10px; height: 10px; border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--bone);
  cursor: pointer; padding: 0;
  transition: background 0.25s ease;
}
.hero-dots button[aria-current="true"] { background: var(--bone); }

/* ---------- Sections ---------- */
.section { padding: var(--section-y) 0; position: relative; }
.section--centered { text-align: center; }

.section--text .container {
  display: flex; flex-direction: column; align-items: center;
}
.section--text h2 {
  max-width: 18ch;
  text-align: center;
  margin: 0 0 1.5rem;
}
.section--text .eyebrow { color: var(--reddy); }

/* ---------- Image banner ---------- */
.banner {
  position: relative;
  min-height: clamp(540px, 82vh, 860px);
  background-size: cover;
  background-position: center;
  display: flex; align-items: center;
  color: var(--bone);
  overflow: hidden;
}
.banner::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(20,46,106,0.6) 0%, rgba(20,46,106,0.2) 60%, rgba(20,46,106,0) 100%);
}
.banner--right::before {
  background: linear-gradient(270deg, rgba(20,46,106,0.6) 0%, rgba(20,46,106,0.2) 60%, rgba(20,46,106,0) 100%);
}
.banner--center::before {
  background: linear-gradient(180deg, rgba(20,46,106,0.3), rgba(20,46,106,0.55));
}
.banner-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  padding: clamp(4rem, 10vw, 7rem) var(--gutter);
}
.banner-inner--wide { max-width: 740px; }
.banner--right .banner-inner { margin-left: auto; text-align: right; }
.banner--right .banner-inner .lede,
.banner--right .banner-inner .body-large { margin-left: auto; margin-right: 0; }
.banner--center { justify-content: center; text-align: center; }
.banner--center .banner-inner { max-width: 780px; }
.banner--center .banner-inner .lede { margin: 0 auto; }

.banner .eyebrow { color: var(--yolk); text-shadow: 0 1px 6px rgba(0,0,0,0.4); }
.banner h2 {
  color: var(--bone);
  text-shadow: 0 2px 18px rgba(0,0,0,0.35);
  margin: 0 0 1.2rem;
}
.banner .lede,
.banner .body-large {
  color: var(--bone);
  text-shadow: 0 1px 10px rgba(0,0,0,0.4);
  max-width: 42ch;
}

/* ---------- Family grid (Who We Are) ---------- */
#who-we-are { padding-bottom: clamp(2rem, 4vw, 3rem); }
#how-we-farm { padding-top: clamp(2.5rem, 5vw, 4rem); }

.family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(2.5rem, 4vw, 3.5rem);
  margin-top: clamp(3rem, 6vw, 5rem);
}
.family-card {
  display: flex; flex-direction: column;
  text-align: left;
}
.family-card__media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: var(--bone-soft);
}
.family-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.family-card:hover .family-card__media img { transform: scale(1.04); }
.family-card h3 {
  color: var(--blue);
  font-family: var(--font-eyebrow);
  font-size: clamp(1.1rem, 1.3vw, 1.3rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 1rem;
}
.family-card p {
  font-size: clamp(0.98rem, 1.05vw, 1.05rem);
  line-height: 1.65;
  color: var(--blue);
  opacity: 0.92;
}

/* ---------- Dark "No X" section ---------- */
.section--dark {
  background: var(--blue);
  color: var(--bone);
}
.section--dark .eyebrow { color: var(--yolk); text-align: center; display: block; }
.section--dark h2 {
  color: var(--bone);
  text-align: center;
  margin: 0 auto clamp(3rem, 6vw, 5rem);
  max-width: 18ch;
}
.icon-grid {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 4vw, 3.5rem);
  text-align: center;
}
.icon-grid img {
  width: clamp(110px, 14vw, 150px);
  height: clamp(110px, 14vw, 150px);
  margin: 0 auto 1.5rem;
  object-fit: contain;
}
.icon-grid h3 {
  color: var(--yolk);
  font-family: var(--font-eyebrow);
  font-size: clamp(1rem, 1.1vw, 1.15rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}
.icon-grid p {
  font-family: var(--font-body);
  font-size: clamp(0.98rem, 1.05vw, 1.05rem);
  line-height: 1.55;
  opacity: 0.95;
  max-width: 30ch;
  margin: 0 auto;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-block;
  font-family: var(--font-eyebrow);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.85rem;
  background: var(--yolk);
  color: var(--blue);
  padding: 1.1rem 2.4rem;
  border: 1.5px solid var(--yolk);
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.button:hover { background: transparent; color: var(--bone); border-color: var(--bone); }
.button--blue {
  background: var(--blue); color: var(--bone); border-color: var(--blue);
}
.button--blue:hover { background: transparent; color: var(--blue); }
.button-row { margin-top: 2rem; }

/* ---------- Contact ---------- */
.section--contact { background: var(--bone-soft); }
.section--contact .eyebrow { color: var(--reddy); text-align: center; display: block; }
.section--contact h2 {
  text-align: center;
  margin: 0 auto 3rem;
}
.contact-form {
  display: grid; gap: 1.25rem;
  margin: 0 auto 3rem;
  max-width: 620px;
}
.contact-form label {
  display: grid; gap: 0.4rem;
  font-family: var(--font-eyebrow);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 400;
}
.contact-form em { font-style: normal; color: var(--reddy); }
.contact-form input,
.contact-form textarea {
  width: 100%;
  font: inherit;
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: 0;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0.95rem 1.05rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 0;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(27,63,146,0.15);
}
.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px; height: 1px; opacity: 0;
}
.contact-form .button { justify-self: start; }
.form-status { min-height: 1.4em; margin: 0.5rem 0 0; font-size: 0.95rem; }
.form-status.is-success { color: #1b6b2e; }
.form-status.is-error { color: var(--reddy); }

.contact-info {
  text-align: center;
  font-family: var(--font-body);
  font-size: 1.05rem;
}
.contact-info p { margin: 0 0 0.7rem; }
.contact-social a {
  font-family: var(--font-eyebrow);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.85rem;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}
.contact-social a:hover { color: var(--reddy); border-color: var(--reddy); }
.contact-social span { margin: 0 0.8rem; opacity: 0.5; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--blue);
  color: var(--bone);
  padding: 2.25rem 0;
  text-align: center;
  font-family: var(--font-eyebrow);
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.site-footer p { margin: 0; }

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-slide { animation: none; transform: none; }
  html { scroll-behavior: auto; }
}
