:root {
  --bg: #f6f3ef;
  --surface: #ffffff;
  --surface-alt: #efe8df;
  --text: #2d2a26;
  --muted: #60574d;
  --accent: #7a4b2f;
  --accent-2: #b58a63;
  --border: #d8cbbd;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
}

.site-header {
  background: linear-gradient(to bottom, rgba(45,42,38,0.78), rgba(45,42,38,0.56)),
    url('assets/hero/horse-eye-hero-low.jpg') center center/cover;
  color: #fff;
  padding-bottom: 2rem;
}

.site-header.is-loaded {
  background-image: linear-gradient(to bottom, rgba(45,42,38,0.78), rgba(45,42,38,0.56)),
    url('assets/hero/horse-eye-hero.jpg');
}

.nav {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  padding: .25rem;
}

.brand-logo {
  display: block;
  width: min(240px, 58vw);
  height: auto;
  filter: invert(1) drop-shadow(0 2px 8px rgba(0, 0, 0, .55));
  opacity: .95;
}

.hero { padding: 0; max-width: 760px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .8rem;
  font-weight: 600;
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 4vw, 3.4rem); margin: .4rem 0 1rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-top: 0; }

.hero-copy { font-size: 1.08rem; color: #f0e8df; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.5rem; }

.btn {
  display: inline-block;
  padding: .72rem 1.15rem;
  border-radius: .4rem;
  font-weight: 600;
  text-decoration: none;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #603a24; }
.btn-secondary { border: 1px solid #fff; color: #fff; }
.btn-secondary:hover { background: #fff; color: var(--accent); }

.section { padding: 2rem 0; }
.section-alt { background: var(--surface-alt); }

.section-eyebrow {
  color: var(--accent);
  margin: 0 0 .45rem;
}

.split-section {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 2.5rem;
  align-items: start;
}

.section-copy p:first-child,
.location-layout p {
  margin-top: 0;
}

.location-layout {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 440px);
  gap: 2.5rem;
  align-items: center;
}

.location-layout img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: .6rem;
  border: 1px solid var(--border);
}

.location-layout .farm-photo {
  object-position: 18% center;
}

.team-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.5rem;
}

.team-heading h2 {
  margin-bottom: 0;
}

.team-gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, calc((100% - 2rem) / 3));
  gap: 1rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding-bottom: .25rem;
}

.team-card {
  background: #f8f5f0;
  border: 1px solid var(--border);
  border-radius: .6rem;
  overflow: hidden;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}

.team-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.progressive-img {
  filter: blur(10px);
  transform: scale(1.02);
  transition: filter .28s ease, transform .28s ease;
}

.progressive-img.is-loaded {
  filter: blur(0);
  transform: scale(1);
}

.brand-logo.progressive-img {
  filter: invert(1) blur(10px) drop-shadow(0 2px 8px rgba(0, 0, 0, .55));
}

.brand-logo.progressive-img.is-loaded {
  filter: invert(1) drop-shadow(0 2px 8px rgba(0, 0, 0, .55));
}

.team-card div {
  padding: 1rem;
  background: #f8f5f0;
  border-top: 1px solid var(--border);
  flex: 1;
}

.team-card h3 {
  margin: 0 0 .35rem;
}

.team-card p {
  margin: 0;
  color: #51483f;
}

.grid.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: .6rem;
}

.instagram-section {
  overflow: hidden;
}

.instagram-gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, calc((100% - 2rem) / 3));
  gap: 1rem;
  align-items: stretch;
  margin-top: 1.5rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding-bottom: .25rem;
}

.instagram-tile {
  aspect-ratio: 4 / 5;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: .6rem;
  overflow: hidden;
  scroll-snap-align: start;
}

.instagram-tile .instagram-media {
  width: 100% !important;
  max-width: 540px !important;
  min-width: 0 !important;
  margin: 0 auto !important;
}

.instagram-tile iframe {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 0;
  background: var(--surface);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 720px) {
  .site-header { background-position: 28% center; }
  .nav { flex-direction: column; gap: .65rem; }
  .split-section,
  .location-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .team-heading {
    align-items: start;
    flex-direction: column;
  }
  .team-gallery {
    grid-auto-columns: 86%;
  }
  .instagram-gallery { grid-auto-columns: 86%; }
}

@media (min-width: 721px) and (max-width: 980px) {
  .team-gallery {
    grid-auto-columns: minmax(260px, calc((100% - 1rem) / 2));
  }
  .instagram-gallery {
    grid-auto-columns: minmax(300px, calc((100% - 1rem) / 2));
  }
}
