/* =====================================================
   GOLDEN CRUST — Stylesheet
   ===================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Lato', sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ===== VARIABLES ===== */
:root {
  --gold:        #8B7A1A;
  --gold-dark:   #6A5C12;
  --gold-light:  #C4A835;
  --gold-pale:   #F5EFC5;
  --cream:       #FDFAF2;
  --white:       #FFFFFF;
  --dark:        #1C1B18;
  --text:        #333330;
  --muted:       #6B6860;
  --border:      #E5DCC8;

  --nav-h:       72px;
  --max-w:       1160px;
  --pad:         clamp(1.25rem, 5vw, 2.5rem);
  --section-py:  clamp(4rem, 9vw, 7rem);
}

/* ===== UTILITIES ===== */

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

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

.eyebrow {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--dark);
  margin-bottom: 1.25rem;
}

.section-header {
  text-align: center;
  max-width: 580px;
  margin: 0 auto 3.5rem;
}

.section-sub {
  color: var(--muted);
  font-size: 1rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  border-radius: 6px;
  font-family: 'Lato', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid transparent;
  line-height: 1;
  transition: background 0.25s ease, border-color 0.25s ease,
              color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

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

.btn--gold {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}
.btn--gold:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  color: #fff;
  box-shadow: 0 6px 20px rgba(139, 122, 26, 0.3);
}

.btn--outline {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}
.btn--outline:hover {
  background: var(--gold);
  color: #fff;
}

.btn--light {
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.3);
}
.btn--light:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

/* ===== 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);
}

/* =====================================================
   HEADER / NAV
   ===================================================== */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.header.scrolled {
  background: rgba(253, 250, 242, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}

.nav__logo img {
  height: 46px;
  width: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav__links a {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dark);
  position: relative;
  transition: color 0.2s ease;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav__links a:hover {
  color: var(--gold);
}
.nav__links a:hover::after {
  transform: scaleX(1);
}

/* Burger button */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 201;
}

.nav__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

/* =====================================================
   HERO
   ===================================================== */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: var(--cream);
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 60% at 78% 48%, rgba(139, 122, 26, 0.07) 0%, transparent 65%),
    radial-gradient(ellipse 45% 70% at 12% 82%, rgba(139, 122, 26, 0.04) 0%, transparent 55%);
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  padding-block: 4rem;
  position: relative;
  z-index: 1;
}

.hero__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 6.5vw, 5rem);
  font-weight: 700;
  line-height: 1.08;
  color: var(--dark);
  margin-bottom: 1.5rem;
}

.hero__title em {
  font-style: italic;
  color: var(--gold);
}

.hero__sub {
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 420px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero__buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ===== HERO VISUAL — WHEAT + LOAF ===== */

.hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 460px;
  /* soft warm glow behind the loaf */
  background: radial-gradient(ellipse 70% 60% at 50% 60%, rgba(196,168,53,0.08) 0%, transparent 70%);
  border-radius: 24px;
}

/* ---- Wheat field ---- */
.wheat-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  z-index: 1;
}

/* Wheat keyframes */
@keyframes wheat-sway {
  0%, 100% { transform: rotate(1.5deg); }
  40%       { transform: rotate(-1.2deg); }
  70%       { transform: rotate(0.4deg); }
}

@keyframes wheat-sway-active {
  0%, 100% { transform: rotate(4.5deg); }
  50%       { transform: rotate(-4deg); }
}

@keyframes wheat-sway-wild {
  0%   { transform: rotate(0deg); }
  18%  { transform: rotate(11deg); }
  50%  { transform: rotate(-9deg); }
  82%  { transform: rotate(8deg); }
  100% { transform: rotate(0deg); }
}

/* Base stalk */
.wh {
  position: absolute;
  bottom: 0;
  transform-origin: 50% 100%;
  animation: wheat-sway var(--dur, 4s) ease-in-out infinite;
}

.wh svg {
  width: 100%;
  height: auto;   /* scale proportionally from the 80×280 viewBox */
  display: block;
}

/* Field hover — other stalks sway more */
.wheat-field:hover .wh:not(:hover) {
  animation-name: wheat-sway-active;
}

/* Individual stalk hover — wild sway */
.wh:hover {
  animation: wheat-sway-wild 0.75s ease-in-out infinite;
  cursor: pointer;
  z-index: 3;
}

/* Per-stalk: position · width · colour · timing
   Height is auto from the 80×280 SVG aspect ratio (1:3.5) */
.wh--1 { left:  3%; width: 55px;  color: #8A7820;  --dur: 4.1s;  animation-delay:  -0.4s; }
.wh--2 { left: 16%; width: 72px;  color: #C4A835;  --dur: 3.7s;  animation-delay:  -1.9s; }
.wh--3 { left: 29%; width: 60px;  color: #9B8A28;  --dur: 4.4s;  animation-delay:  -2.7s; }
.wh--4 { left: 44%; width: 85px;  color: #C8AC38;  --dur: 3.5s;  animation-delay:  -0.8s; }
.wh--5 { left: 59%; width: 63px;  color: #A89025;  --dur: 4.2s;  animation-delay:  -3.2s; }
.wh--6 { left: 73%; width: 70px;  color: #B8A030;  --dur: 3.85s; animation-delay:  -1.4s; }
.wh--7 { left: 87%; width: 52px;  color: #9A8828;  --dur: 4.5s;  animation-delay:  -0.2s; }

/* ---- Sourdough loaf (real photo) ---- */
.hero__loaf {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.loaf-img {
  width: 380px;
  max-width: 90%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(60, 28, 4, 0.3));
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s ease;
}

.hero__loaf:hover .loaf-img {
  transform: translateY(-8px) scale(1.02);
  filter: drop-shadow(0 28px 50px rgba(60, 28, 4, 0.4));
}

/* =====================================================
   ABOUT
   ===================================================== */
.about {
  background: var(--white);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  align-items: center;
  gap: clamp(3rem, 7vw, 6rem);
}

/* Left decorative visual */
.about__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.about__ring {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: var(--gold-pale);
  border: 2px solid rgba(139, 122, 26, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.about__ring-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.3125rem;
  color: var(--gold-dark);
  line-height: 1.5;
}

.about__ring-text em {
  font-style: italic;
}

/* Pills */
.pill {
  position: absolute;
  background: var(--gold);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  white-space: nowrap;
}

.pill--a { bottom: 20px; right: -4px; }
.pill--b { top: 28px;   left: -4px; }
.pill--c { bottom: 80px; left: -12px; }

/* Right content */
.about__content p {
  color: var(--muted);
  margin-bottom: 1rem;
}

.about__cta {
  margin-top: 1.75rem;
}

/* =====================================================
   MENU
   ===================================================== */
.menu {
  background: var(--cream);
}

.cat-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.cat-title::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 48px;
  height: 2px;
  background: var(--gold);
}

.cat-title--second {
  margin-top: 3.5rem;
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
}

.product {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  gap: 1.125rem;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.product:hover {
  box-shadow: 0 8px 28px rgba(139, 122, 26, 0.1);
  transform: translateY(-3px);
}

.product__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
}

.product__body h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.375rem;
  line-height: 1.3;
}

.product__body p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 0.5rem;
}

.product__ing {
  font-size: 0.8rem !important;
}

.product__ing strong {
  color: var(--dark);
  font-weight: 700;
}

/* Disclaimer */
.disclaimer {
  margin-top: 3.5rem;
  padding: 1.125rem 1.5rem;
  background: linear-gradient(to right, var(--gold-pale), rgba(245, 239, 197, 0.4));
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
}

.disclaimer p {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.65;
}

/* =====================================================
   HOW TO ORDER
   ===================================================== */
.order {
  background: var(--dark);
}

.order .eyebrow {
  color: var(--gold-light);
}

.order .section-title {
  color: #fff;
}

.steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: start;
  gap: 2rem;
  margin-bottom: 3.5rem;
}

.step__num {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 1rem;
}

.step__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.125rem;
  color: #fff;
  margin-bottom: 0.625rem;
}

.step p {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.75;
}

.step__divider {
  width: 1px;
  height: 56px;
  background: rgba(255, 255, 255, 0.12);
  margin-top: 3.75rem;
  flex-shrink: 0;
}

.market-note {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--gold-pale);
  border: 1.5px solid var(--gold-light);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-top: 2.5rem;
  max-width: 680px;
}

.market-note__icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.market-note__text {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.65;
}

.market-note__text a {
  color: var(--gold-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.market-note__text a:hover {
  color: var(--gold);
}

.order__cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* =====================================================
   CONTACT
   ===================================================== */
.contact {
  background: var(--white);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
}

.contact__list {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.375rem;
}

.contact__list li {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
}

.contact__key {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  min-width: 72px;
  flex-shrink: 0;
}

.contact__val {
  font-size: 1rem;
  color: var(--dark);
  transition: color 0.2s ease;
}

a.contact__val:hover {
  color: var(--gold);
}

.contact__actions {
  margin-top: 2.25rem;
}

.contact__logo-side {
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact__logo-side img {
  max-width: 340px;
  width: 100%;
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
  background: var(--dark);
  padding: 2.5rem 0;
}

.footer__legal {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.32);
  text-align: center;
  max-width: 580px;
  margin: 0 auto 1.5rem;
  line-height: 1.75;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.38);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.25rem;
}

.footer__bottom a {
  color: rgba(255, 255, 255, 0.38);
  transition: color 0.2s ease;
}

.footer__bottom a:hover {
  color: var(--gold-light);
}

/* =====================================================
   RESPONSIVE — TABLET (≤ 900px)
   ===================================================== */
@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__sub {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__buttons {
    justify-content: center;
  }

  .hero__visual {
    display: none;
  }

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

  .about__visual {
    display: none;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .step__divider {
    display: none;
  }

  .contact__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact__logo-side {
    display: none;
  }
}

/* =====================================================
   RESPONSIVE — MOBILE (≤ 640px)
   ===================================================== */
@media (max-width: 640px) {
  /* Mobile nav */
  .nav__links {
    display: none;
    position: fixed;
    inset: var(--nav-h) 0 0;
    background: var(--cream);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.25rem;
    z-index: 199;
  }

  .nav__links.open {
    display: flex;
  }

  .nav__links a {
    font-size: 1rem;
  }

  .nav__burger {
    display: flex;
  }

  /* Products single column */
  .products {
    grid-template-columns: 1fr;
  }

  /* Full-width buttons on small screens */
  .hero__buttons,
  .order__cta {
    flex-direction: column;
  }

  .hero__buttons .btn,
  .order__cta .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  /* Larger tap targets for nav links */
  .nav__links a {
    padding: 0.75rem 1.5rem;
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  /* Footer */
  .footer__bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}
