/* ============================================================
   Hearth & Healing Bread Co. — Stylesheet
   Aesthetic: Warm artisan editorial — parchment, wheat, ember
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --parchment:    #f5efe4;
  --cream:        #faf6ef;
  --wheat:        #c8954a;
  --wheat-light:  #ddb06a;
  --ember:        #8b3a1a;
  --bark:         #3d2010;
  --sage:         #7a8c6e;
  --smoke:        #6b5e52;
  --white:        #fffdf9;

  --ff-display:   'Playfair Display', Georgia, serif;
  --ff-body:      'Cormorant Garamond', Georgia, serif;
  --ff-sans:      'Jost', sans-serif;

  --max-w:        1180px;
  --section-gap:  6rem;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--bark);
  font-family: var(--ff-body);
  font-size: 1.15rem;
  line-height: 1.75;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }

/* ── Utility ───────────────────────────────────────────────── */
.container {
  width: min(var(--max-w), 92vw);
  margin-inline: auto;
}

.section-label {
  font-family: var(--ff-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--wheat);
  display: block;
  margin-bottom: 0.6rem;
}

.divider {
  width: 60px;
  height: 2px;
  background: var(--wheat);
  margin: 1.4rem auto 0;
  border: none;
}

/* ── Grain overlay ─────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
  opacity: 0.5;
}

/* ══════════════════════════════════════════════════════════════
   NAVIGATION
══════════════════════════════════════════════════════════════ */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.35s, box-shadow 0.35s;
  padding: 1.1rem 0;
}

#nav.scrolled {
  background: rgba(245, 239, 228, 0.96);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 20px rgba(61, 32, 16, 0.1);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-logo img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--wheat);
}

.nav-logo span {
  font-family: var(--ff-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--bark);
  line-height: 1.2;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--ff-sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--smoke);
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--wheat);
  transition: width 0.25s;
}

.nav-links a:hover { color: var(--ember); }
.nav-links a:hover::after { width: 100%; }

.nav-social {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-social a {
  color: var(--smoke);
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

.nav-social a:hover { color: var(--ember); }
.nav-social svg { width: 18px; height: 18px; fill: currentColor; }

/* hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--bark);
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--parchment);
  padding: 1.5rem 1.5rem 2rem;
  gap: 1.2rem;
  border-top: 1px solid rgba(200,149,74,0.25);
}

.mobile-menu a {
  font-family: var(--ff-sans);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--smoke);
  transition: color 0.2s;
}

.mobile-menu a:hover { color: var(--ember); }
.mobile-menu.open { display: flex; }

/* ══════════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════════ */
#hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  overflow: hidden;
}

.hero-text-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 5vw 5rem 6vw;
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  font-family: var(--ff-sans);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--wheat);
  margin-bottom: 1.2rem;
}

.hero-title {
  font-family: var(--ff-display);
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--bark);
  margin-bottom: 1.4rem;
}

.hero-title em {
  font-style: italic;
  color: var(--ember);
}

.hero-tagline {
  font-family: var(--ff-body);
  font-size: 1.2rem;
  color: var(--smoke);
  max-width: 38ch;
  margin-bottom: 2.5rem;
  font-style: italic;
  font-weight: 300;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--ember);
  color: var(--white);
  font-family: var(--ff-sans);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  border-radius: 2px;
  transition: background 0.25s, transform 0.2s;
  align-self: flex-start;
}

.hero-cta:hover {
  background: var(--bark);
  transform: translateY(-2px);
}

.hero-cta svg { width: 14px; height: 14px; fill: currentColor; }

.hero-image-panel {
  position: relative;
  overflow: hidden;
}

.hero-image-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.05);
  transition: transform 8s ease;
}

.hero-image-panel img.loaded { transform: scale(1); }

.hero-image-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--cream) 0%, transparent 30%);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--ff-sans);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--wheat);
  animation: bounce 2s infinite;
}

.hero-scroll svg { width: 16px; height: 16px; fill: var(--wheat); }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ══════════════════════════════════════════════════════════════
   STORY
══════════════════════════════════════════════════════════════ */
#story {
  padding: var(--section-gap) 0;
  background: var(--white);
  position: relative;
}

#story::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(to right, transparent, var(--wheat), transparent);
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 5rem;
  align-items: center;
}

.story-image-wrap {
  position: relative;
}

.story-image-wrap img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 12px 18px 50px rgba(61,32,16,0.18);
}

.story-badge {
  position: absolute;
  bottom: -1.5rem;
  right: -1.5rem;
  background: var(--wheat);
  color: var(--white);
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--ff-display);
  font-size: 0.72rem;
  line-height: 1.4;
  padding: 1rem;
  box-shadow: 0 6px 24px rgba(61,32,16,0.2);
  animation: rotate-badge 20s linear infinite;
}

.story-badge strong { font-size: 1.6rem; font-weight: 700; display: block; }

@keyframes rotate-badge {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.story-text h2 {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--bark);
  margin-bottom: 1.5rem;
}

.story-text h2 em {
  font-style: italic;
  color: var(--ember);
}

.story-text p {
  color: var(--smoke);
  font-size: 1.1rem;
  margin-bottom: 1.1rem;
  font-weight: 300;
}

.story-text blockquote {
  border-left: 3px solid var(--wheat);
  padding-left: 1.2rem;
  margin: 1.8rem 0;
  font-size: 1.25rem;
  font-style: italic;
  color: var(--bark);
  font-weight: 400;
}

/* ══════════════════════════════════════════════════════════════
   GALLERY
══════════════════════════════════════════════════════════════ */
#gallery {
  padding: var(--section-gap) 0;
  background: var(--parchment);
}

.gallery-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.gallery-header h2 {
  font-family: var(--ff-display);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  color: var(--bark);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto;
  gap: 14px;
}

.gallery-item {
  overflow: hidden;
  border-radius: 2px;
  position: relative;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img { transform: scale(1.06); }

.gallery-item:nth-child(1) { grid-column: 1 / 6;  grid-row: 1; aspect-ratio: 1/1; }
.gallery-item:nth-child(2) { grid-column: 6 / 9;  grid-row: 1; aspect-ratio: 3/4; }
.gallery-item:nth-child(3) { grid-column: 9 / 13; grid-row: 1; aspect-ratio: 4/5; }
.gallery-item:nth-child(4) { grid-column: 1 / 5;  grid-row: 2; aspect-ratio: 4/3; }
.gallery-item:nth-child(5) { grid-column: 5 / 13; grid-row: 2; aspect-ratio: 16/7; }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(61,32,16,0.5) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 1.2rem;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-overlay span {
  font-family: var(--ff-sans);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
}

/* ══════════════════════════════════════════════════════════════
   OFFERINGS
══════════════════════════════════════════════════════════════ */
#offerings {
  padding: var(--section-gap) 0;
  background: var(--white);
}

.offerings-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.offerings-header h2 {
  font-family: var(--ff-display);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  color: var(--bark);
}

.offerings-intro {
  font-family: var(--ff-body);
  font-size: 1.1rem;
  color: var(--smoke);
  font-style: italic;
  max-width: 55ch;
  margin: 0.8rem auto 0;
}

.offerings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.offering-card {
  background: var(--parchment);
  border-radius: 4px;
  padding: 2rem 1.8rem;
  border: 1px solid rgba(200,149,74,0.2);
  position: relative;
  transition: transform 0.25s, box-shadow 0.25s;
}

.offering-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(61,32,16,0.12);
}

.offering-icon {
  font-size: 2rem;
  margin-bottom: 0.8rem;
}

.offering-card h3 {
  font-family: var(--ff-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--bark);
  margin-bottom: 0.5rem;
}

.offering-card p {
  font-size: 1rem;
  color: var(--smoke);
  font-weight: 300;
  line-height: 1.65;
}

.offering-tag {
  display: inline-block;
  margin-top: 0.9rem;
  font-family: var(--ff-sans);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--wheat);
  border: 1px solid var(--wheat-light);
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
}

/* ══════════════════════════════════════════════════════════════
   PROCESS / VALUES
══════════════════════════════════════════════════════════════ */
#process {
  padding: var(--section-gap) 0;
  background: var(--bark);
  color: var(--parchment);
  position: relative;
  overflow: hidden;
}

#process::before {
  content: '"';
  position: absolute;
  top: -1rem;
  left: 2vw;
  font-family: var(--ff-display);
  font-size: 30rem;
  color: rgba(255,255,255,0.03);
  line-height: 1;
  pointer-events: none;
}

.process-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.process-text h2 {
  font-family: var(--ff-display);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--parchment);
  margin-bottom: 1.2rem;
}

.process-text h2 em { color: var(--wheat-light); font-style: italic; }

.process-text p {
  font-size: 1.1rem;
  color: rgba(245,239,228,0.75);
  font-weight: 300;
  margin-bottom: 1rem;
}

.process-steps {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.process-step {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
}

.step-num {
  font-family: var(--ff-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: rgba(200,149,74,0.3);
  line-height: 1;
  min-width: 2.5rem;
}

.step-body h4 {
  font-family: var(--ff-display);
  font-size: 1.1rem;
  color: var(--wheat-light);
  margin-bottom: 0.3rem;
}

.step-body p {
  font-size: 0.95rem;
  color: rgba(245,239,228,0.7);
  font-weight: 300;
}

/* ══════════════════════════════════════════════════════════════
   FIND US / MARKET BANNER
══════════════════════════════════════════════════════════════ */
#market {
  padding: var(--section-gap) 0;
  background: var(--parchment);
  text-align: center;
}

.market-inner h2 {
  font-family: var(--ff-display);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  color: var(--bark);
  margin-bottom: 0.8rem;
}

.market-inner p {
  font-size: 1.1rem;
  color: var(--smoke);
  font-style: italic;
  font-weight: 300;
  margin-bottom: 2rem;
  max-width: 50ch;
  margin-inline: auto;
}

.market-details {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.market-detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.market-detail .label {
  font-family: var(--ff-sans);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--wheat);
}

.market-detail .value {
  font-family: var(--ff-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--bark);
}

.market-note {
  font-family: var(--ff-sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--smoke);
  background: rgba(200,149,74,0.12);
  border: 1px solid rgba(200,149,74,0.3);
  padding: 0.6rem 1.4rem;
  border-radius: 2px;
  display: inline-block;
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════ */
#footer {
  background: var(--bark);
  color: var(--parchment);
  padding: 4rem 0 2rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(245,239,228,0.1);
  margin-bottom: 2rem;
}

.footer-brand img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(200,149,74,0.5);
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.95rem;
  color: rgba(245,239,228,0.6);
  font-weight: 300;
  max-width: 30ch;
  line-height: 1.7;
}

.footer-col h4 {
  font-family: var(--ff-sans);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--wheat-light);
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; }

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a {
  font-size: 0.95rem;
  color: rgba(245,239,228,0.6);
  font-weight: 300;
  transition: color 0.2s;
}

.footer-col ul li a:hover { color: var(--wheat-light); }

.footer-social {
  display: flex;
  gap: 0.8rem;
  margin-top: 0.5rem;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(200,149,74,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(245,239,228,0.6);
  transition: background 0.2s, color 0.2s;
}

.footer-social a:hover {
  background: var(--wheat);
  color: var(--white);
  border-color: var(--wheat);
}

.footer-social svg { width: 15px; height: 15px; fill: currentColor; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-family: var(--ff-sans);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: rgba(245,239,228,0.35);
}

/* ══════════════════════════════════════════════════════════════
   SC COTTAGE FOOD COMPLIANCE BAR
══════════════════════════════════════════════════════════════ */
.cottage-food-bar {
  background: rgba(0,0,0,0.25);
  border-top: 1px solid rgba(200,149,74,0.2);
  padding: 1.6rem 2rem;
  text-align: center;
}

.cottage-food-required {
  font-family: var(--ff-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--wheat-light);
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}

.cottage-food-note {
  font-family: var(--ff-sans);
  font-size: 0.65rem;
  color: rgba(245,239,228,0.3);
  max-width: 740px;
  margin-inline: auto;
  line-height: 1.65;
  letter-spacing: 0.02em;
}

/* ══════════════════════════════════════════════════════════════
   LIGHTBOX
══════════════════════════════════════════════════════════════ */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10,5,2,0.92);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

#lightbox.open {
  opacity: 1;
  pointer-events: all;
}

#lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.6);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--parchment);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lightbox-close:hover { opacity: 1; }

/* ══════════════════════════════════════════════════════════════
   SCROLL ANIMATIONS
══════════════════════════════════════════════════════════════ */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  #hero { grid-template-columns: 1fr; }

  .hero-text-panel {
    padding: 8rem 5vw 4rem;
    min-height: 60svh;
  }

  .hero-image-panel {
    height: 55vw;
    max-height: 420px;
  }

  .hero-image-panel::after {
    background: linear-gradient(to bottom, var(--cream) 0%, transparent 25%);
  }

  .story-grid { grid-template-columns: 1fr; gap: 3rem; }
  .story-image-wrap { max-width: 400px; margin: 0 auto; }
  .story-badge { bottom: -1rem; right: 0; }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-item:nth-child(1) { grid-column: 1/2; grid-row: 1; aspect-ratio: 1/1; }
  .gallery-item:nth-child(2) { grid-column: 2/3; grid-row: 1; aspect-ratio: 1/1; }
  .gallery-item:nth-child(3) { grid-column: 1/2; grid-row: 2; aspect-ratio: 1/1; }
  .gallery-item:nth-child(4) { grid-column: 2/3; grid-row: 2; aspect-ratio: 1/1; }
  .gallery-item:nth-child(5) { grid-column: 1/3; grid-row: 3; aspect-ratio: 16/7; }

  .process-inner { grid-template-columns: 1fr; gap: 3rem; }

  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  :root { --section-gap: 4rem; }

  .nav-links, .nav-social { display: none; }
  .hamburger { display: flex; }

  #nav { padding: 0.8rem 0; }

  .hero-title { font-size: clamp(2.2rem, 9vw, 3rem); }

  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item:nth-child(n) { grid-column: 1; grid-row: auto; aspect-ratio: 4/3; }

  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .market-details { gap: 1.5rem; }
}
