/* ==========================================================================
   East Impala Farm — Base Stylesheet
   Design tokens, reset, typography and shared components
   (Navbar, Footer, Page Hero, CTA Band, Buttons, Reveal animation)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..900;1,9..144,300..900&family=Outfit:wght@300..800&display=swap');

/* ---------- Design tokens ---------- */
:root {
  --cream: #FAF3E3;
  --sand: #F1E3C6;
  --ink: #241809;
  --impala-light: #E8B27A;
  --impala: #CC8138;
  --impala-dark: #9C5B1D;
  --russet: #7E4014;
  --sunset: #E4641E;
  --gold: #F2A93B;
  --acacia-light: #93A95B;
  --acacia: #637E30;
  --acacia-dark: #42551F;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;

  --radius: 0.75rem;
  --radius-lg: calc(var(--radius) + 4px);
  --radius-xl: 1.75rem;
  --radius-2xl: 2rem;

  --max-width: 1280px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, select, textarea { font: inherit; }
h1, h2, h3, h4, p { margin: 0; }

::selection { background: var(--gold); color: var(--ink); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--sand); }
::-webkit-scrollbar-thumb { background: var(--impala); border-radius: 8px; }

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

.font-display { font-family: var(--font-display); }

/* ---------- Shared section / typography utilities ---------- */
.section { padding: 6rem 0; }
@media (max-width: 640px) { .section { padding: 4rem 0; } }

.eyebrow { font-size: 0.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3em; }
.eyebrow-sunset { color: var(--sunset); }
.eyebrow-gold { color: var(--gold); }

.section-title {
  margin-top: 0.75rem;
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.15;
  color: var(--ink);
  font-size: clamp(1.875rem, 4vw, 3rem);
}
.section-title.on-dark { color: var(--cream); }
.section-subtitle { margin-top: 1rem; max-width: 40rem; font-size: 1.125rem; color: rgba(36,24,9,0.7); }
.section-subtitle.on-dark { color: rgba(250,243,227,0.7); margin-left: auto; margin-right: auto; }
.section-heading-center { text-align: center; }
.section-heading-center .section-subtitle { margin-left: auto; margin-right: auto; }

.lead-text { margin-top: 1.5rem; font-size: 1.125rem; line-height: 1.7; color: rgba(36,24,9,0.75); }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  font-weight: 700;
  color: var(--russet);
  transition: color 0.2s ease;
}
.text-link svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
.text-link:hover { color: var(--sunset); }
.text-link:hover svg { transform: translateX(3px); }

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  /* Visible by default — this is the safe fallback if JavaScript is slow,
     blocked, or disabled. The fade/slide animation below only switches on
     once js/main.js confirms it's running (see the .js html class). */
  opacity: 1;
  transform: none;
}
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.js .reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  font-weight: 700;
  padding: 0.9rem 1.9rem;
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; transition: transform 0.25s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn:hover { transform: scale(1.05); }

.btn-sunset { background: var(--sunset); color: var(--cream); box-shadow: 0 18px 35px -12px rgba(228,100,30,.5); }
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 18px 35px -12px rgba(242,169,59,.5); }
.btn-russet { background: var(--russet); color: var(--cream); }
.btn-russet:hover { background: var(--sunset); }
.btn-ink { background: var(--ink); color: var(--cream); }
.btn-ink:hover { background: var(--russet); }
.btn-acacia { background: var(--acacia); color: var(--cream); }
.btn-acacia:hover { background: var(--acacia-dark); }

.btn-outline-cream {
  border: 2px solid rgba(250,243,227,0.95);
  color: var(--cream);
  background: rgba(20,13,5,0.55);
  backdrop-filter: blur(4px);
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.btn-outline-cream:hover { background: var(--cream); color: var(--ink); text-shadow: none; }

.btn-outline-acacia {
  border: 2px solid var(--acacia-light);
  color: var(--cream);
}
.btn-outline-acacia:hover { background: var(--acacia); }

/* ---------- Navbar ---------- */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
  background: linear-gradient(to bottom, rgba(36,24,9,0.5), transparent);
}
.site-header.is-solid {
  background: rgba(250, 243, 227, 0.95);
  box-shadow: 0 10px 30px -15px rgba(36,24,9,0.15);
  backdrop-filter: blur(10px);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem;
}

.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand svg { width: 44px; height: 44px; flex-shrink: 0; }
.brand-text { line-height: 1; }
.brand-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  transition: color 0.3s ease;
}
.brand-sub {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--russet);
  transition: color 0.3s ease;
}
.site-header:not(.is-solid) .brand-name { color: var(--cream); }
.site-header:not(.is-solid) .brand-sub { color: var(--gold); }

.nav-links {
  display: none;
  align-items: center;
  gap: 0.25rem;
}
.nav-links a {
  display: block;
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--cream);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.site-header.is-solid .nav-links a { color: var(--ink); }
.nav-links a:hover { background: rgba(250,243,227,0.15); }
.site-header.is-solid .nav-links a:hover { background: var(--sand); }
.nav-links a.active { background: var(--sunset); color: var(--cream); }

.nav-call {
  display: none;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(250,243,227,0.6);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--cream);
  transition: all 0.2s ease;
}
.nav-call svg { width: 16px; height: 16px; }
.site-header.is-solid .nav-call { border-color: var(--impala); color: var(--russet); }
.nav-call:hover { background: var(--cream); color: var(--ink); }
.site-header.is-solid .nav-call:hover { background: var(--impala); color: var(--cream); }

.nav-toggle {
  display: inline-flex;
  padding: 0.5rem;
  border-radius: 999px;
  color: var(--cream);
}
.site-header.is-solid .nav-toggle { color: var(--ink); }
.nav-toggle svg { width: 28px; height: 28px; }

@media (min-width: 1024px) {
  .nav-links, .nav-call { display: flex; }
  .nav-toggle { display: none; }
}

/* mobile drawer */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  visibility: hidden;
}
.nav-drawer.is-open { visibility: visible; }
.nav-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(36,24,9,0.55);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.nav-drawer.is-open .nav-drawer-backdrop { opacity: 1; }
.nav-drawer-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 85%;
  max-width: 320px;
  background: var(--cream);
  padding: 1.5rem;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
}
.nav-drawer.is-open .nav-drawer-panel { transform: translateX(0); }
.nav-drawer-close {
  display: flex;
  justify-content: flex-end;
}
.nav-drawer-close svg { width: 24px; height: 24px; }
.nav-drawer-links {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.nav-drawer-links a {
  border-radius: 0.9rem;
  padding: 0.75rem 1rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
}
.nav-drawer-links a.active { background: var(--sunset); color: var(--cream); }
.nav-drawer-links a:hover:not(.active) { background: var(--sand); }
.nav-drawer-call {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.9rem;
  background: var(--acacia);
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: var(--cream);
}
.nav-drawer-call svg { width: 16px; height: 16px; }

/* ---------- Page Hero ---------- */
.page-hero {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ink);
}
.page-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
/* Overlay sits ABOVE the photo but BELOW the text, and never blocks clicks —
   it must always be pointer-events:none since it visually covers the whole hero. */
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(20,13,5,0.4);
}
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(20,13,5,0.97), rgba(20,13,5,0.85) 45%, rgba(20,13,5,0.55) 75%, rgba(20,13,5,0.25));
}
.page-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 9rem 0 3.5rem;
}
.page-hero-eyebrow {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}
.page-hero-title {
  margin-top: 0.75rem;
  max-width: 48rem;
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.05;
  color: var(--cream);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  text-shadow: 0 4px 20px rgba(0,0,0,0.55);
}
.page-hero-subtitle {
  margin-top: 1rem;
  max-width: 40rem;
  font-size: 1.125rem;
  color: rgba(250,243,227,0.95);
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}

/* ---------- CTA Band ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
}
.cta-band img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.cta-band::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to right, rgba(20,13,5,0.93), rgba(94,48,15,0.85) 55%, rgba(180,78,22,0.6));
}
.cta-band-inner {
  position: relative;
  z-index: 2;
  padding: 5rem 0;
}
.cta-band-title {
  max-width: 40rem;
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.15;
  color: var(--cream);
  font-size: clamp(1.875rem, 4vw, 3rem);
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.cta-band-text {
  margin-top: 1rem;
  max-width: 34rem;
  font-size: 1.125rem;
  color: rgba(250,243,227,0.95);
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.cta-band-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--cream);
}
.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image: repeating-linear-gradient(45deg, rgba(228,100,30,0.08) 0, rgba(228,100,30,0.08) 2px, transparent 2px, transparent 14px);
}
.footer-inner {
  position: relative;
  padding: 4rem 0;
  display: grid;
  gap: 3rem;
}
@media (min-width: 768px) { .footer-inner { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-inner { grid-template-columns: repeat(4, 1fr); } }

.footer-about p {
  margin-top: 1.25rem;
  max-width: 20rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(250,243,227,0.7);
}
.footer-social { margin-top: 1.25rem; display: flex; gap: 0.75rem; }
.footer-social a {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(250,243,227,0.1);
  padding: 0.6rem;
  color: rgba(250,243,227,0.8);
  transition: all 0.2s ease;
}
.footer-social a:hover { background: var(--sunset); color: var(--cream); }
.footer-social svg { width: 16px; height: 16px; }

.footer-heading {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gold);
}
.footer-links { margin-top: 1rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
@media (min-width: 1024px) { .footer-links { grid-template-columns: 1fr; } }
.footer-links a { font-size: 0.875rem; color: rgba(250,243,227,0.7); transition: color 0.2s ease; }
.footer-links a:hover { color: var(--gold); }

.footer-contact { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.75rem; font-size: 0.875rem; color: rgba(250,243,227,0.7); }
.footer-contact li { display: flex; gap: 0.65rem; align-items: flex-start; }
.footer-contact svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 0.15rem; color: var(--sunset); }
.footer-contact a:hover { color: var(--gold); }

.footer-hours { margin-top: 1rem; display: flex; gap: 0.65rem; font-size: 0.875rem; color: rgba(250,243,227,0.7); }
.footer-hours svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 0.15rem; color: var(--sunset); }
.footer-note { margin-top: 0.75rem; font-size: 0.875rem; color: rgba(250,243,227,0.7); }
.footer-visit-btn { margin-top: 1.25rem; display: inline-block; }

.footer-bottom {
  position: relative;
  margin-top: 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid rgba(250,243,227,0.15);
  padding: 1.5rem 0;
  font-size: 0.75rem;
  color: rgba(250,243,227,0.5);
}
@media (min-width: 640px) { .footer-bottom { flex-direction: row; } }

/* ---------- Marquee ticker ---------- */
.ticker {
  overflow: hidden;
  border-top: 2px solid rgba(36,24,9,0.1);
  border-bottom: 2px solid rgba(36,24,9,0.1);
  background: var(--gold);
  padding: 0.75rem 0;
}
.ticker-track {
  display: flex;
  width: max-content;
  gap: 2.5rem;
  animation: marquee 30s linear infinite;
}
.ticker-track span {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink);
}
.ticker-track .star { color: var(--sunset); }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
