/* ============================================================
   Sip & Steers — design tokens
   Rustic elegance: cream, espresso, sage olive, dusty terracotta
   ============================================================ */
:root,
[data-theme='light'] {
  /* Surfaces */
  --color-bg: #f6f2ea;
  --color-surface: #fbf8f1;
  --color-surface-2: #f1ebe0;
  --color-surface-offset: #efe7d9;
  --color-divider: #e3dacc;
  --color-border: #d8ccb8;

  /* Text */
  --color-text: #2c241c;
  --color-text-muted: #6f6354;
  --color-text-faint: #a99c87;
  --color-text-inverse: #fbf8f1;

  /* Accents */
  --color-sage: #5c6b3c;
  --color-sage-hover: #47542d;
  --color-terra: #b35c3a;
  --color-cream: #fbf8f1;
  --color-espresso: #2c241c;

  /* Type */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Work Sans', 'Helvetica Neue', Arial, sans-serif;

  /* Radius / shadow / transition */
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px oklch(0.2 0.02 70 / 0.06);
  --shadow-md: 0 6px 20px oklch(0.2 0.02 70 / 0.1);
  --shadow-lg: 0 18px 48px oklch(0.2 0.02 70 / 0.16);
  --transition: 200ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-hero: clamp(2.75rem, 0.8rem + 6vw, 6rem);

  /* Spacing */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem; --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem; --space-20: 5rem; --space-24: 6rem; --space-32: 8rem;
}

[data-theme='dark'] {
  --color-bg: #1c1812;
  --color-surface: #221d16;
  --color-surface-2: #2a2419;
  --color-surface-offset: #241f18;
  --color-divider: #322a20;
  --color-border: #443a2c;

  --color-text: #efe7d8;
  --color-text-muted: #a99c87;
  --color-text-faint: #7a6f5d;
  --color-text-inverse: #2c241c;

  --color-sage: #9fb06a;
  --color-sage-hover: #b3c285;
  --color-terra: #d08862;
  --color-cream: #efe7d8;
  --color-espresso: #1c1812;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 6px 20px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 18px 48px oklch(0 0 0 / 0.45);
}

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

html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
}

img, svg { display: block; max-width: 100%; height: auto; }
ul[role='list'] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }

h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; line-height: 1.12; font-weight: 600; }
p, li, figcaption { text-wrap: pretty; max-width: 72ch; }

::selection { background: oklch(from var(--color-sage) l c h / 0.28); }
:focus-visible { outline: 2px solid var(--color-sage); outline-offset: 3px; border-radius: var(--radius-sm); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

a, button, [role='button'], input, textarea, select {
  transition: color var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

button { cursor: pointer; background: none; border: none; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--color-espresso); color: var(--color-cream);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm);
}
.skip-link:focus { left: var(--space-4); }

/* ============================================================
   Layout helpers
   ============================================================ */
.container { width: 100%; max-width: 1100px; margin-inline: auto; padding-inline: var(--space-6); }
.center { margin-inline: auto; text-align: center; }

.section { padding-block: clamp(var(--space-16), 8vw, var(--space-32)); }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-terra);
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.eyebrow.center { text-align: center; }

.section__title { font-size: var(--text-xl); max-width: 18ch; }
.section__title.center { margin-inline: auto; }
.section__lede { margin-top: var(--space-5); color: var(--color-text-muted); font-size: var(--text-base); }

/* ============================================================
   Header
   ============================================================ */
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--color-bg) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}
.header.is-scrolled { border-bottom-color: var(--color-border); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); height: 4.5rem; }

.brand { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--color-text); text-decoration: none; }
.brand__mark { width: 30px; height: 30px; color: var(--color-sage); }
.brand__name { font-family: var(--font-display); font-weight: 600; font-size: var(--text-lg); letter-spacing: -0.01em; }

.nav__list { display: flex; align-items: center; gap: var(--space-8); }
.nav a { color: var(--color-text-muted); text-decoration: none; font-size: var(--text-sm); font-weight: 500; }
.nav a:hover { color: var(--color-text); }

.theme-toggle { color: var(--color-text-muted); display: inline-flex; padding: var(--space-2); border-radius: var(--radius-full); }
.theme-toggle:hover { color: var(--color-text); background: var(--color-surface-2); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-size: var(--text-sm); font-weight: 600;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  text-decoration: none; border: 1px solid transparent;
  white-space: nowrap;
}
.btn--primary { background: var(--color-sage); color: var(--color-cream); }
.btn--primary:hover { background: var(--color-sage-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--ghost { color: var(--color-cream); border-color: color-mix(in oklab, var(--color-cream) 50%, transparent); }
.btn--ghost:hover { background: color-mix(in oklab, var(--color-cream) 12%, transparent); }
.btn--small { padding: var(--space-2) var(--space-4); }
.btn--block { width: 100%; }

/* ============================================================
   Hero
   ============================================================ */
.hero { position: relative; min-height: min(92vh, 820px); display: flex; align-items: flex-end; isolation: isolate; }
.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; }
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(in oklab, transparent 30%, color-mix(in oklab, var(--color-espresso) 75%, transparent) 100%),
    linear-gradient(in oklab, color-mix(in oklab, var(--color-espresso) 45%, transparent) 0%, transparent 45%);
}
.hero__content { padding-block: var(--space-24) var(--space-20); color: var(--color-cream); }
.hero__content .eyebrow { color: #f0d9b8; }
.hero__title {
  font-size: var(--text-hero); font-weight: 600;
  letter-spacing: -0.02em; max-width: 14ch; margin-bottom: var(--space-6);
  text-shadow: 0 2px 24px oklch(0.2 0.02 70 / 0.4);
}
.hero__lede { font-size: var(--text-lg); max-width: 46ch; color: oklch(from var(--color-cream) l c h / 0.92); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.hero__loc { margin-top: var(--space-8); font-size: var(--text-sm); color: oklch(from var(--color-cream) l c h / 0.75); }
.hero__name {
  position: absolute; right: var(--space-6); bottom: var(--space-6); z-index: 2;
  display: inline-flex; flex-direction: column; line-height: 1.05;
  background: oklch(from var(--color-espresso) l c h / 0.55); color: var(--color-cream);
  backdrop-filter: blur(6px);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-full);
  font-family: var(--font-display); font-style: italic; font-size: var(--text-base); border: 1px solid oklch(from var(--color-cream) l c h / 0.25);
}
.hero__name small { font-family: var(--font-body); font-style: normal; font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase; color: oklch(from var(--color-cream) l c h / 0.7); margin-top: 2px; }

/* ============================================================
   Story
   ============================================================ */
.section--story { background: var(--color-surface); }
.story { max-width: 760px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); margin-top: var(--space-16); }
.stat { text-align: center; }
.stat__num { display: block; font-family: var(--font-display); font-weight: 600; font-size: var(--text-2xl); color: var(--color-sage); }
.stat__label { display: block; margin-top: var(--space-2); font-size: var(--text-sm); color: var(--color-text-muted); }

/* ============================================================
   Animals
   ============================================================ */
.section--animals { background: var(--color-bg); }
.animals { display: flex; flex-direction: column; gap: var(--space-20); margin-top: var(--space-16); }
.animal { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); align-items: center; }
.animal--reverse .animal__media { order: 2; }
.animal__media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 5; position: relative; }
.animal__media img { width: 100%; height: 100%; object-fit: cover; }
.animal__name {
  position: absolute; left: var(--space-4); bottom: var(--space-4); z-index: 2;
  display: inline-flex; flex-direction: column; line-height: 1.05;
  background: oklch(from var(--color-espresso) l c h / 0.5); color: var(--color-cream);
  backdrop-filter: blur(6px); padding: var(--space-2) var(--space-4); border-radius: var(--radius-full);
  font-family: var(--font-display); font-style: italic; font-size: var(--text-base); border: 1px solid oklch(from var(--color-cream) l c h / 0.22);
}
.animal__name small { font-family: var(--font-body); font-style: normal; font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase; color: oklch(from var(--color-cream) l c h / 0.7); margin-top: 2px; }
.animal__body h3 { font-size: var(--text-2xl); margin-bottom: var(--space-4); color: var(--color-text); }
.animal__body p { color: var(--color-text-muted); font-size: var(--text-base); }

/* ============================================================
   Herd gallery
   ============================================================ */
.section--herd { background: var(--color-surface); }
.herd { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-10); margin-top: var(--space-16); }
@media (min-width: 640px) { .herd { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .herd { grid-template-columns: repeat(3, 1fr); } }
.herd__member { margin: 0; text-align: center; }
.herd__photo { aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); background: var(--color-surface-2); }
.herd__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; transition: transform 0.5s ease; }
.herd__member:hover .herd__photo img { transform: scale(1.04); }
.herd__name { display: block; font-family: var(--font-display); font-style: italic; font-size: var(--text-lg); color: var(--color-text); margin-top: var(--space-4); }
.herd__role { display: block; font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-text-muted); }

/* ============================================================
   Packages
   ============================================================ */
.section--packages { background: var(--color-surface); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); margin-top: var(--space-16); }
.card {
  position: relative; background: var(--color-bg);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: var(--space-8); display: flex; flex-direction: column; gap: var(--space-2);
}
.card h3 { font-size: var(--text-lg); margin-bottom: var(--space-1); }
.card__pricelabel { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-text-faint); }
.card__price { font-family: var(--font-display); font-weight: 600; font-size: var(--text-2xl); color: var(--color-sage); line-height: 1; margin-bottom: var(--space-4); }
.card__features { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-2); }
.card__features li { position: relative; padding-left: var(--space-6); font-size: var(--text-sm); color: var(--color-text-muted); }
.card__features li::before {
  content: ''; position: absolute; left: 0; top: 0.45em;
  width: 0.7rem; height: 0.7rem; border-radius: var(--radius-full);
  background: var(--color-sage); opacity: 0.85;
}
.card__sub { font-size: var(--text-sm); color: var(--color-terra); font-weight: 600; }
.card p { color: var(--color-text-muted); }
.card--featured { background: var(--color-espresso); color: var(--color-cream); border-color: var(--color-espresso); padding-top: var(--space-16); }
.card--featured .card__price { color: #e6b486; }
.card--featured .card__pricelabel { color: oklch(from var(--color-cream) l c h / 0.5); }
.card--featured .card__features li { color: oklch(from var(--color-cream) l c h / 0.85); }
.card--featured .card__features li::before { background: #e6b486; }
.card--featured .card__sub { color: #e6b486; }
.card--featured p { color: oklch(from var(--color-cream) l c h / 0.82); }
.card__badge {
  position: absolute; top: var(--space-5); right: var(--space-5);
  font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  background: var(--color-terra); color: var(--color-cream); padding: var(--space-1) var(--space-3); border-radius: var(--radius-full);
}
.packages__note { margin-top: var(--space-10); text-align: center; color: var(--color-text-muted); font-size: var(--text-sm); }

/* Add-ons */
.addons {
  margin-top: var(--space-16); background: var(--color-bg);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: var(--space-10);
}
.addons__title { font-size: var(--text-lg); text-align: center; margin-bottom: var(--space-8); }
.addons__list {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4) var(--space-10);
  max-width: 760px; margin-inline: auto;
}
.addons__list li {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4);
  padding-bottom: var(--space-3); border-bottom: 1px solid var(--color-divider);
}
.addons__list span { font-size: var(--text-sm); color: var(--color-text-muted); }
.addons__list strong { font-family: var(--font-display); font-weight: 600; font-size: var(--text-base); color: var(--color-text); white-space: nowrap; }

/* ============================================================
   Contact
   ============================================================ */
.section--contact { background: var(--color-surface-offset); }
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); align-items: start; }
.contact__copy .section__title { margin-top: var(--space-4); }
.contact__list { margin-top: var(--space-8); display: flex; flex-direction: column; gap: var(--space-4); }
.contact__list li { display: grid; grid-template-columns: 5rem 1fr; gap: var(--space-4); font-size: var(--text-sm); }
.contact__list span { color: var(--color-text-faint); text-transform: uppercase; letter-spacing: 0.08em; font-size: var(--text-xs); }
.contact__list a { color: var(--color-text); text-decoration: none; font-weight: 500; }
.contact__list a:hover { color: var(--color-sage); }

.contact__form {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-8);
  display: flex; flex-direction: column; gap: var(--space-5);
}
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field span { font-size: var(--text-sm); font-weight: 500; color: var(--color-text-muted); }
.field input, .field textarea {
  width: 100%; background: var(--color-bg); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); font-size: var(--text-base);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--color-sage); box-shadow: 0 0 0 3px oklch(from var(--color-sage) l c h / 0.18); }
.field textarea { resize: vertical; min-height: 6rem; }
.form__note { font-size: var(--text-xs); color: var(--color-text-faint); text-align: center; margin-top: var(--space-1); }

/* ============================================================
   Footer
   ============================================================ */
.footer { background: var(--color-espresso); color: oklch(from var(--color-cream) l c h / 0.8); padding-block: var(--space-12); }
.footer__inner { display: flex; flex-direction: column; gap: var(--space-3); }
.footer__brand .brand__name { color: var(--color-cream); }
.footer__brand p { color: oklch(from var(--color-cream) l c h / 0.6); font-size: var(--text-sm); }
.footer__farm { color: oklch(from var(--color-cream) l c h / 0.6); font-size: var(--text-sm); }
.footer__legal { color: oklch(from var(--color-cream) l c h / 0.4); font-size: var(--text-xs); margin-top: var(--space-4); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 880px) {
  .nav__list { gap: var(--space-5); }
  .nav__list li:not(:last-child) { display: none; }
  .stats { grid-template-columns: 1fr; gap: var(--space-8); }
  .animal { grid-template-columns: 1fr; gap: var(--space-6); }
  .animal--reverse .animal__media { order: 0; }
  .cards { grid-template-columns: 1fr; }
  .card--featured { order: -1; }
  .addons__list { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; gap: var(--space-10); }
  .hero__content { padding-block: var(--space-20) var(--space-16); }
}

@media (max-width: 480px) {
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }
}
