/* Keystone Maple Farms — styles.css */

:root {
  --cream: #F3EDE4;
  --cream-2: #EAE1D3;
  --bark: #1E1511;
  --bark-2: #2A1E18;
  --amber: #C27A24;
  --amber-2: #A8651A;
  --ink: #241A15;
  --muted: #73645A;
  --muted-dark: #B9A997;
  --line: rgba(30, 21, 17, .12);
  --line-dark: rgba(243, 237, 228, .14);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --container: 1200px;
  --gutter: 24px;
  --section: 120px;
  --radius: 6px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (max-width: 767px) {
  :root { --section: 72px; --gutter: 16px; }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 300;
  letter-spacing: -.015em;
  line-height: 1.05;
  margin: 0;
  font-optical-sizing: auto;
}
h2 { font-size: clamp(2.1rem, 4.2vw, 3.6rem); max-width: 16ch; }
h3 { font-size: 1.5rem; font-weight: 400; }
p { margin: 0 0 1em; }
.eyebrow {
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 20px;
}
.lead { font-size: 1.25rem; line-height: 1.5; max-width: 34em; }
.measure { max-width: 38em; }
.muted { color: var(--muted); }
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: var(--section) 0; }
.section-head { margin-bottom: 56px; }
.section-head h2 + p { margin-top: 24px; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; border-radius: 2px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip {
  position: absolute; left: -999px; top: 8px; z-index: 1000;
  background: var(--bark); color: var(--cream); padding: 10px 14px; text-decoration: none;
}
.skip:focus { left: 8px; }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 600; font-size: .95rem; letter-spacing: .01em;
  padding: 16px 26px; border-radius: 999px; text-decoration: none; border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn--amber { background: var(--amber); color: #fff; }
.btn--amber:hover { background: var(--amber-2); }
.btn--ghost { background: transparent; color: var(--ink); border-color: rgba(30, 21, 17, .25); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--light { background: var(--cream); color: var(--bark); }
.btn--light:hover { background: #fff; }
.btn:active { transform: translateY(1px); }
.link {
  color: var(--amber-2); text-decoration: none; font-weight: 600;
  border-bottom: 1px solid transparent; transition: border-color .2s var(--ease);
}
.link:hover { border-bottom-color: currentColor; }

/* Brand */
.brand {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-family: var(--display); font-weight: 400; font-size: 1.15rem; letter-spacing: -.01em; white-space: nowrap;
}
.brand svg { width: 22px; height: 22px; fill: var(--amber); flex: none; }

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transform: translateY(-100%);
  transition: transform .5s var(--ease);
  background: rgba(243, 237, 228, .86);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav.is-visible { transform: none; }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 68px; }
.nav__links { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  text-decoration: none; font-size: .95rem; font-weight: 500; color: var(--ink); opacity: .78;
  transition: opacity .2s var(--ease);
}
.nav__links a:hover { opacity: 1; }
.nav .btn { padding: 11px 18px; font-size: .875rem; }
@media (max-width: 767px) { .nav__links { display: none; } }

/* Hero */
.hero { position: relative; height: 380vh; background: var(--bark); color: var(--cream); padding: 0; }
.hero__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero__canvas, .hero__still {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero__still { display: none; }
.hero__scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(30, 21, 17, .55) 0%, rgba(30, 21, 17, .18) 42%, rgba(30, 21, 17, 0) 68%),
    linear-gradient(0deg, rgba(30, 21, 17, .62) 0%, rgba(30, 21, 17, 0) 42%);
}
.hero__beat {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: 12vh; opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.hero__beat.is-on { opacity: 1; transform: none; pointer-events: auto; }
.hero__beat .container { width: 100%; }
.hero__wordmark {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--display); font-weight: 300; font-size: clamp(1.5rem, 3vw, 2.3rem); letter-spacing: -.01em;
  margin-bottom: 20px;
}
.hero__wordmark svg { width: .9em; height: .9em; fill: var(--amber); }
.hero h1, .hero__line {
  font-family: var(--display); font-weight: 300; letter-spacing: -.015em; line-height: 1.04;
  font-size: clamp(2.5rem, 5.8vw, 5.2rem); max-width: 13ch; margin: 0;
  text-shadow: 0 2px 30px rgba(30, 21, 17, .35);
}
.hero__cta { margin-top: 32px; }
.hero__cue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; opacity: .75;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.hero__cue::after {
  content: ""; width: 1px; height: 40px; background: var(--cream); opacity: .4;
  animation: cue 2.6s var(--ease) infinite;
}
@keyframes cue { 0%, 100% { opacity: .25; } 50% { opacity: .85; } }

/* Preloader */
.loader {
  position: absolute; inset: 0; z-index: 5; background: var(--bark); color: var(--cream);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  transition: opacity .7s var(--ease);
}
.loader.is-done { opacity: 0; pointer-events: none; }
.loader__mark { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 300; font-size: 1.4rem; }
.loader__mark svg { width: 20px; height: 20px; fill: var(--amber); }
.loader__bar { width: 160px; height: 1px; background: var(--line-dark); overflow: hidden; }
.loader__bar i { display: block; height: 100%; width: 0; background: var(--amber); transition: width .3s linear; }

/* Static hero (reduced motion, or frames unavailable) */
.hero.is-static { height: 100vh; height: 100svh; }
.hero.is-static .hero__still { display: block; }
.hero.is-static .hero__canvas, .hero.is-static .loader, .hero.is-static .hero__cue { display: none; }
.hero.is-static .hero__beat { opacity: 0; pointer-events: none; }
.hero.is-static .hero__beat--3 { opacity: 1; transform: none; pointer-events: auto; }
.hero.is-static .hero__beat--3 .hero__wordmark { display: flex; }
.hero__beat--3 .hero__wordmark { display: none; }

/* Layout helpers */
.split { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 40px; } }
.figure { margin: 0; }
.figure img { border-radius: var(--radius); width: 100%; }
.figure figcaption { font-size: .85rem; color: var(--muted); margin-top: 12px; }

/* Process */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 64px; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.step__num { font-family: var(--display); color: var(--amber); font-size: .95rem; letter-spacing: .1em; margin: 22px 0 8px; }
.step h3 { font-size: 1.35rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 1rem; margin: 0; }
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  margin-top: 88px; padding-top: 40px; border-top: 1px solid var(--line);
}
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; } }
.stat b {
  display: block; font-family: var(--display); font-weight: 300;
  font-size: clamp(2rem, 3.5vw, 3rem); line-height: 1; letter-spacing: -.02em;
}
.stat span { display: block; color: var(--muted); font-size: .9rem; margin-top: 8px; }

/* Farm */
.farm { background: var(--bark); color: var(--cream); padding-top: 0; }
.farm__img { height: min(78vh, 760px); overflow: hidden; }
.farm__img img { width: 100%; height: 100%; object-fit: cover; }
.farm .container { padding-top: var(--section); }
.farm .split { align-items: start; grid-template-columns: 5fr 6fr; }
@media (max-width: 900px) { .farm .split { grid-template-columns: 1fr; } }
.farm p { color: var(--muted-dark); }
.farm .pull {
  font-family: var(--display); font-weight: 300; font-size: 1.55rem; line-height: 1.35; color: var(--cream);
  margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line-dark);
}

/* Trust */
.trust { background: var(--cream-2); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px; }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px; }
.card h3 { font-size: 1.3rem; margin-bottom: 10px; }
.card p { color: var(--muted); margin: 0; font-size: 1rem; }
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 72px; }
@media (max-width: 860px) { .quotes { grid-template-columns: 1fr; } }
.quote { border-top: 1px solid var(--line); padding-top: 24px; margin: 0; }
.quote p { font-family: var(--display); font-weight: 300; font-size: 1.35rem; line-height: 1.35; }
.quote cite { font-style: normal; color: var(--muted); font-size: .9rem; }
.placeholder-note {
  display: inline-block; margin-top: 28px; padding: 10px 14px;
  font-size: .8rem; color: var(--muted); border: 1px dashed rgba(30, 21, 17, .3); border-radius: 4px;
}

/* Shop */
.shop .figure { margin: 56px 0 72px; }
.menu { border-top: 1px solid var(--line); }
.item {
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 24px; align-items: center;
  padding: 26px 0; border-bottom: 1px solid var(--line);
}
.swatch { width: 36px; height: 36px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.swatch--golden { background: linear-gradient(160deg, #E9C76A, #D6A53A); }
.swatch--amber { background: linear-gradient(160deg, #D98A2B, #B2611A); }
.swatch--dark { background: linear-gradient(160deg, #7A3A12, #3B1A08); }
.swatch--flight { background: linear-gradient(90deg, #E9C76A 33%, #C77A24 33% 66%, #4A220C 66%); }
.swatch--cream { background: linear-gradient(160deg, #F5E9D2, #E2CFA6); }
.swatch--sugar { background: linear-gradient(160deg, #E7C27E, #C99A4E); }
.item h3 { font-size: 1.25rem; margin: 0 0 4px; }
.item p { margin: 0; color: var(--muted); font-size: .98rem; }
.item__meta { text-align: right; white-space: nowrap; }
.item__meta b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.3rem; }
.item__meta span { color: var(--muted); font-size: .85rem; }
.item .btn { padding: 11px 18px; font-size: .85rem; }
@media (max-width: 700px) {
  .item { grid-template-columns: auto 1fr; gap: 12px 16px; }
  .item__meta { grid-column: 2; text-align: left; }
  .item .btn { grid-column: 2; justify-self: start; }
}
.shop__note { margin-top: 28px; color: var(--muted); font-size: .95rem; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 88px; }
@media (max-width: 760px) { .duo { grid-template-columns: 1fr; } }
.tile { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--bark); display: block; text-decoration: none; }
.tile img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; transition: transform 1.4s var(--ease); }
.tile:hover img { transform: scale(1.03); }
.tile__cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px; color: var(--cream);
  background: linear-gradient(0deg, rgba(30, 21, 17, .78), rgba(30, 21, 17, 0));
}
.tile__cap h3 { font-size: 1.5rem; margin-bottom: 4px; }
.tile__cap p { margin: 0; color: var(--muted-dark); font-size: .95rem; }

/* FAQ */
.faq { background: var(--cream-2); }
.faq__list { margin-top: 48px; border-top: 1px solid var(--line); max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 22px 0; font-family: var(--display); font-size: 1.3rem; font-weight: 400;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--sans); color: var(--amber); font-size: 1.4rem; line-height: 1;
  transition: transform .3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 24px; color: var(--muted); max-width: 60ch; }

/* Signup */
.signup { background: var(--bark); color: var(--cream); }
.signup .split { grid-template-columns: 1fr 1fr; align-items: center; }
@media (max-width: 900px) { .signup .split { grid-template-columns: 1fr; } }
.signup p { color: var(--muted-dark); }
.form { display: flex; gap: 10px; max-width: 520px; }
.form input {
  flex: 1; min-width: 0; background: transparent; border: 1px solid var(--line-dark); border-radius: 999px;
  padding: 16px 22px; color: var(--cream); font: inherit; font-size: 1rem;
}
.form input::placeholder { color: rgba(243, 237, 228, .5); }
.form input:focus { border-color: var(--amber); outline: none; }
@media (max-width: 520px) { .form { flex-direction: column; } }
.form__msg { margin-top: 14px; font-size: .95rem; color: var(--amber); min-height: 1.5em; }

/* Contact */
.contact .split { grid-template-columns: 5fr 7fr; }
@media (max-width: 900px) { .contact .split { grid-template-columns: 1fr; } }
.contact address { font-style: normal; line-height: 1.8; margin-top: 28px; }
.contact address a { text-decoration: none; color: var(--amber-2); font-weight: 500; }
.contact address a:hover { text-decoration: underline; }
.contact .figure img { aspect-ratio: 16 / 9; object-fit: cover; }

/* Footer */
.footer { background: var(--bark); color: var(--cream); padding: 72px 0 40px; }
.footer__top {
  display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: start;
  padding-bottom: 48px; border-bottom: 1px solid var(--line-dark);
}
@media (max-width: 760px) { .footer__top { grid-template-columns: 1fr; } }
.footer .brand { font-size: 1.4rem; }
.footer__tag { color: var(--muted-dark); margin: 14px 0 0; max-width: 30ch; }
.footer__links { display: flex; flex-wrap: wrap; gap: 18px 28px; list-style: none; padding: 0; margin: 0 0 28px; }
.footer__links a { text-decoration: none; color: var(--cream); opacity: .75; font-size: .95rem; transition: opacity .2s var(--ease); }
.footer__links a:hover { opacity: 1; }
.footer__bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 28px; font-size: .85rem; color: var(--muted-dark);
}

/* Reveal on scroll */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__beat, .tile img, .nav { transition: none; }
  .hero__cue::after { animation: none; }
}

/* Hero on phones: smaller type, deeper bottom scrim, keep copy clear of the bottle */
@media (max-width: 767px) {
  .hero h1, .hero__line { font-size: clamp(1.9rem, 8.6vw, 2.5rem); max-width: 14ch; }
  .hero__wordmark { font-size: 1.15rem; margin-bottom: 14px; }
  .hero__beat { padding-bottom: 11vh; }
  .hero__cta { margin-top: 22px; }
  .hero__scrim {
    background:
      linear-gradient(0deg, rgba(30, 21, 17, .82) 0%, rgba(30, 21, 17, .4) 30%, rgba(30, 21, 17, 0) 56%);
  }
  .hero__cue { bottom: 16px; }
}
.hero__cue { transition: opacity .5s var(--ease); }
.hero__cue.is-hidden { opacity: 0; }

/* Nav on small phones: shorter button, slightly smaller brand */
@media (max-width: 480px) {
  .nav__long { display: none; }
  .nav .brand { font-size: 1.02rem; }
  .nav .btn { padding: 10px 16px; }
}

/* Nav links never wrap; tighter gaps on tablets */
.nav__links a { white-space: nowrap; }
@media (max-width: 900px) { .nav__links { gap: 22px; } .nav__inner { gap: 16px; } }
