/* =========================================================
   Buffalo Gap Minerals — light, classic, West Texas feel
   Mobile-first, no frameworks. Optimized for iPhone/iPad.
   ========================================================= */

:root {
  /* Warm earth palette */
  --bg: #fbf8f2;
  --bg-card: #f4ede0;
  --ink: #2a1f15;
  --ink-soft: #5b4a3a;
  --muted: #8a7a68;
  --rule: #d9cdb8;
  --line: #ebe2cf;

  --accent: #a86a36;          /* leather / saddle */
  --accent-deep: #8a5226;
  --accent-soft: #f0d9bf;
  --bluebonnet: #6b7fa3;      /* pulled from watercolor sky */

  --serif: 'Fraunces', 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans:  'Source Sans 3', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', Helvetica, Arial, sans-serif;

  --max: 1120px;
  --max-narrow: 760px;

  --shadow-sm: 0 1px 2px rgba(60,40,20,0.06);
  --shadow-md: 0 8px 24px rgba(60,40,20,0.08);
}

/* ---------- Reset ---------- */
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-deep); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; cursor: pointer; }

h1,h2,h3,h4 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.4em;
  text-wrap: balance;
}
h1 em { font-style: italic; color: var(--accent-deep); }
p { margin: 0 0 1em; text-wrap: pretty; }

.skip {
  position: absolute; left: -9999px; top: auto;
  background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 4px;
}
.skip:focus { left: 12px; top: 12px; z-index: 100; }

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

.kicker {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 600;
  margin: 0 0 12px;
}
.kicker.centered { text-align: center; }

.rule {
  width: 56px; height: 2px;
  background: var(--accent);
  margin: 22px 0 28px;
  border-radius: 2px;
}
.rule.center { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 24px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  min-height: 48px;
}
.btn:hover, .btn:focus-visible { text-decoration: none; }
.btn-primary {
  background-color: #a86a36 !important;
  color: #fff !important;
  box-shadow: 0 1px 2px rgba(60,40,20,0.12);
}
.btn-primary:hover { background-color: #8a5226 !important; }
.btn-ghost {
  background-color: transparent;
  color: #2a1f15;
  border-color: #d9cdb8;
}
.btn-ghost:hover { background-color: #f4ede0; }
.btn-large { padding: 18px 32px; font-size: 16px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 242, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 22px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 52px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-line-1 {
  font-family: var(--serif); font-weight: 600; font-size: 18px; letter-spacing: -0.01em;
}
.brand-line-2 {
  font-family: var(--sans); font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--ink-soft); margin-top: 4px;
}

.nav-links { display: none; }
.nav-links a {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 8px 4px;
}
.nav-links a:hover { color: var(--accent-deep); text-decoration: none; }

.nav-toggle {
  width: 44px; height: 44px;
  background: transparent; border: 0;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
  border-radius: 6px;
}
.nav-toggle:hover { background: var(--bg-card); }
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 820px) {
  .nav-toggle { display: none; }
  .nav-links {
    display: inline-flex; gap: 26px; align-items: center;
  }
}

/* Mobile dropdown */
@media (max-width: 819px) {
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column; gap: 0;
    max-height: 0; overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav.open .nav-links {
    display: flex; max-height: 360px;
  }
  .nav-links a {
    padding: 16px 22px;
    border-top: 1px solid var(--line);
    width: 100%;
  }
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: 96px 0 88px;
  overflow: hidden;
}
.hero-watercolor {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-watercolor img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
  opacity: var(--watercolor-opacity, 0.18);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 20%, rgba(0,0,0,0.95) 50%, rgba(0,0,0,1) 100%);
          mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 20%, rgba(0,0,0,0.95) 50%, rgba(0,0,0,1) 100%);
}
.hero .hero-text {
  position: relative;
  z-index: 1;
}
@media (max-width: 720px) {
  .hero { padding: 64px 0 56px; }
  .hero-watercolor img {
    object-position: 50% 100%;
  }
}
.hero-text {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 22px 36px;
  text-align: left;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 600;
  margin: 0 0 16px;
}
.hero h1 {
  font-size: clamp(34px, 6.5vw, 60px);
  margin: 0 0 18px;
  font-weight: 500;
}
.lede {
  font-size: clamp(17px, 1.6vw, 19px);
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 0 28px;
}
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-band {
  width: 100%;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #cfd8e6;
}
.hero-band img {
  width: 100%;
  height: auto;
  max-height: clamp(320px, 60vw, 640px);
  object-fit: contain;
  object-position: 50% 50%;
  display: block;
  margin: 0 auto;
}

/* ---------- WELCOME VIDEO ---------- */
.welcome { padding: 72px 0 56px; text-align: center; }
.welcome h2 { font-size: clamp(28px, 4vw, 40px); }
.video-frame {
  position: relative;
  margin: 24px auto 16px;
  border-radius: 6px;
  overflow: hidden;
  background: #1a120a;
  box-shadow: var(--shadow-md);
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
}
.video-frame video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.play-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
  background: linear-gradient(180deg, rgba(58,42,26,0.05), rgba(58,42,26,0.45));
  color: #fff;
  border: 0;
  transition: opacity 0.3s ease;
}
.play-overlay svg { width: 76px; height: 76px; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.25)); }
.play-overlay span {
  font-family: var(--serif); font-style: italic; font-size: 18px; letter-spacing: 0.02em;
  text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.play-overlay.hidden { opacity: 0; pointer-events: none; }
.caption { color: var(--muted); font-size: 14px; font-style: italic; }
.welcome-logo {
  display: block;
  margin: 32px auto 0;
  max-width: 380px;
  width: 80%;
  height: auto;
}

/* ---------- ABOUT ---------- */
.about { padding: 72px 0 56px; }
.about h2 { font-size: clamp(26px, 4vw, 40px); }
.about-copy {
  max-width: 64ch;
  margin: 0 auto 48px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 17px;
}
.about-copy .pullquote {
  color: var(--accent-deep);
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  margin-top: 24px;
}
.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 880px;
  margin: 0 auto;
}
@media (min-width: 640px) { .stats { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.stat {
  text-align: center;
  padding: 30px 18px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.stat .num {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 5vw, 46px);
  color: var(--accent-deep);
  margin-bottom: 6px;
}
.stat .lbl {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- PROCESS ---------- */
.process {
  padding: 72px 0 56px;
  background: var(--bg-card);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.process h2 { font-size: clamp(26px, 4vw, 40px); }
.steps {
  list-style: none; padding: 0; margin: 32px 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.steps li {
  text-align: center;
  padding: 20px 12px;
}
.step-num {
  display: inline-block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--accent-deep);
  letter-spacing: 0.2em;
  margin-bottom: 12px;
  position: relative;
}
.step-num::after {
  content: '';
  display: block;
  width: 24px; height: 1px;
  background: var(--accent);
  margin: 8px auto 0;
}
.steps h3 { font-size: 22px; margin-bottom: 8px; }
.steps p { color: var(--ink-soft); margin: 0; max-width: 32ch; margin-left: auto; margin-right: auto; }

/* ---------- WHY US ---------- */
.why { padding: 72px 0; }
.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}
@media (min-width: 880px) {
  .why-grid { grid-template-columns: 1fr 1fr; gap: 64px; }
}
.why h2 { font-size: clamp(26px, 3.6vw, 36px); }
.why-intro p { color: var(--ink-soft); max-width: 50ch; margin-bottom: 24px; }
.why-cards {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.why-cards li {
  padding: 22px 18px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.why-cards h4 { font-size: 17px; margin: 0 0 6px; font-family: var(--serif); }
.why-cards p { font-size: 14px; color: var(--ink-soft); margin: 0; }

/* ---------- RECIPES CALLOUT ---------- */
.recipes-callout {
  padding: 72px 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(168,106,54,0.08), transparent 60%),
    radial-gradient(circle at 80% 100%, rgba(107,127,163,0.10), transparent 60%),
    var(--bg);
  border-top: 1px solid var(--line);
}
.recipes-callout h2 { font-size: clamp(28px, 4vw, 42px); }
.recipes-callout p { color: var(--ink-soft); font-size: 17px; max-width: 52ch; margin: 0 auto 28px; }

/* ---------- CTA ---------- */
.cta {
  padding: 80px 0;
  background: var(--ink);
  color: #f5ece0;
  text-align: center;
  background-image:
    radial-gradient(circle at 30% 30%, rgba(168,106,54,0.18), transparent 60%),
    radial-gradient(circle at 70% 80%, rgba(107,127,163,0.12), transparent 60%);
}
.cta h2 { color: #fff; font-size: clamp(28px, 4vw, 42px); }
.cta p { color: rgba(255,255,255,0.78); font-size: 17px; max-width: 50ch; margin: 0 auto 28px; }

/* ---------- CONTACT ---------- */
.contact { padding: 72px 0; }
.contact h2 { font-size: clamp(26px, 4vw, 40px); }
.contact-grid {
  list-style: none; padding: 0; margin: 32px 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  max-width: 720px;
  margin-left: auto; margin-right: auto;
}
@media (min-width: 720px) { .contact-grid { grid-template-columns: repeat(3, 1fr); } }
.contact-grid li {
  text-align: center;
  padding: 24px 16px;
}
.contact-grid .ico {
  display: inline-flex;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-radius: 50%;
  margin-bottom: 12px;
}
.contact-grid .ico svg { width: 22px; height: 22px; }
.contact-grid .lbl {
  display: block;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.contact-grid a, .contact-grid li > span:last-child { font-weight: 600; color: var(--ink); }

/* ---------- CONTACT FORM ---------- */
.contact-intro { color: var(--ink-soft); font-size: 17px; max-width: 52ch; margin: 0 auto 36px; }

.contact-form {
  max-width: 640px;
  margin: 0 auto;
}
.form-row.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 580px) { .form-row.two-col { grid-template-columns: 1fr; } }

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.form-field label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.form-field input,
.form-field textarea {
  font: inherit;
  font-size: 16px;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 12px 14px;
  color: var(--ink);
  width: 100%;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--muted); }
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(168,106,54,0.12);
}
.form-field textarea { resize: vertical; min-height: 88px; }

.form-footer {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.form-status {
  font-size: 15px;
  margin: 0;
  flex: 1;
}
.form-status.success { color: #3a7a3a; }
.form-status.error   { color: #a83232; }

.contact-divider {
  max-width: 640px;
  margin: 48px auto 40px;
  border-top: 1px solid var(--line);
}

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-card);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
}
.footer p { margin: 0; }
.foot-links a { color: var(--accent-deep); }

/* ---------- Dark mode (follows device setting) ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg:          #16110d;
    --bg-card:     #1f1812;
    --ink:         #f0e6d3;
    --ink-soft:    #c4b49a;
    --muted:       #8a7a68;
    --rule:        #362b1f;
    --line:        #2a2018;
    --accent:      #c4804a;
    --accent-deep: #d4945e;
    --accent-soft: #2e2018;
    --bluebonnet:  #8a9fcc;
    --shadow-sm:   0 1px 2px rgba(0,0,0,0.3);
    --shadow-md:   0 8px 24px rgba(0,0,0,0.4);
  }
  .cta { background: #0e0b08; }
  .nav { background: rgba(22, 17, 13, 0.92); }
  .hero-watercolor img {
    content: url('assets/hero-watercolor-dark.jpg');
    opacity: 0.52;
    object-position: 50% 100%;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 20%, rgba(0,0,0,0.95) 50%, rgba(0,0,0,1) 100%);
            mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.6) 20%, rgba(0,0,0,0.95) 50%, rgba(0,0,0,1) 100%);
  }
  .btn-ghost {
    color: rgba(240, 230, 211, 0.88);
    border-color: rgba(240, 230, 211, 0.35);
  }
  .btn-ghost:hover {
    background-color: rgba(240, 230, 211, 0.08);
    border-color: rgba(240, 230, 211, 0.6);
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Tweaks panel hooks ---------- */
[data-palette="sage"] {
  --accent: #6f7e5a;
  --accent-deep: #5a6747;
  --accent-soft: #dfe5d2;
}
[data-palette="leather"] {
  --accent: #7d3f1f;
  --accent-deep: #5e2e16;
  --accent-soft: #ecd1bc;
}
[data-palette="bluebonnet"] {
  --accent: #6b7fa3;
  --accent-deep: #4f6388;
  --accent-soft: #d8e0ee;
}
