/* Headwaters Ranch — beta site
   Mobile-first. Earthy greens, cream, and leather-brown. */

:root {
  --forest: #1d3328;
  --forest-deep: #121c16;
  --forest-mid: #2c4a38;
  --moss: #3f5c44;
  --sage: #6a8464;
  --cream: #f4efe6;
  --cream-dark: #e6dccb;
  --paper: #faf7f2;
  --ink: #1c1915;
  --ink-soft: #4a453d;
  --muted: #6b655c;
  --leather: #7a5340;
  --tan: #c4a574;
  --gold: #d4b483;
  --white: #fffdf8;
  --rule: rgba(28, 25, 21, 0.12);
  --shadow: 0 18px 40px rgba(18, 28, 22, 0.14);
  --header-h: 4.25rem;
  --font-serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --font-sans: "Source Sans 3", "Source Sans Pro", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

html:focus-within {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--leather);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--forest);
}

:focus-visible {
  outline: 2px solid var(--tan);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3.5rem;
  z-index: 200;
  background: var(--forest);
  color: var(--cream);
  padding: 0.6rem 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 2px;
}

.skip-link:focus {
  top: 0.75rem;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-over-hero {
  background: linear-gradient(to bottom, rgba(14, 22, 17, 0.78), rgba(14, 22, 17, 0.42));
}

.site-header.is-solid {
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom-color: var(--rule);
  box-shadow: 0 8px 24px rgba(18, 28, 22, 0.06);
}

.header-inner {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1;
  color: inherit;
}

.logo-word {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.logo-name {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.01em;
  margin-top: 0.12rem;
}

.site-header.is-over-hero .logo {
  color: var(--cream);
}

.site-header.is-solid .logo {
  color: var(--forest);
}

.nav-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
}

.nav-toggle-bars {
  position: relative;
  width: 1.35rem;
  height: 0.9rem;
}

.nav-toggle-bars span,
.nav-toggle-bars span::before,
.nav-toggle-bars span::after {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.2s ease;
  content: "";
}

.nav-toggle-bars span {
  top: 50%;
  transform: translateY(-50%);
}

.nav-toggle-bars span::before { top: -6px; }
.nav-toggle-bars span::after { top: 6px; }

.nav-open .nav-toggle-bars span { background: transparent; }
.nav-open .nav-toggle-bars span::before {
  top: 0;
  transform: rotate(45deg);
}
.nav-open .nav-toggle-bars span::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-header.is-over-hero .nav-toggle { color: var(--cream); }
.site-header.is-solid .nav-toggle { color: var(--forest); }

.site-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--forest-deep);
  padding: 1.25rem 1.25rem 2rem;
  transform: translateY(-0.5rem);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), visibility 0.25s, transform 0.25s var(--ease);
}

.nav-open .site-nav {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.site-nav a {
  display: block;
  color: var(--cream);
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 500;
  padding: 0.65rem 0.25rem;
  border-bottom: 1px solid rgba(244, 239, 230, 0.1);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--gold);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  margin-top: calc(var(--header-h) * -1);
  padding-top: var(--header-h);
  display: flex;
  align-items: flex-end;
  color: var(--cream);
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      to top,
      rgba(14, 22, 17, 0.9) 0%,
      rgba(14, 22, 17, 0.52) 46%,
      rgba(14, 22, 17, 0.22) 100%
    ),
    linear-gradient(
      to bottom,
      rgba(14, 22, 17, 0.55) 0%,
      rgba(14, 22, 17, 0) 32%
    );
}

.hero-inner {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3.5rem 0 3.25rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.85rem;
}

.hero h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.35rem, 8.4vw, 4.85rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  max-width: 14ch;
}

.hero-lede {
  margin: 0 0 1.75rem;
  max-width: 36rem;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  line-height: 1.55;
  color: rgba(244, 239, 230, 0.9);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.25rem;
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--cream);
  color: var(--forest-deep);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--white);
  color: var(--forest-deep);
}

.btn-secondary {
  background: transparent;
  color: var(--cream);
  border-color: rgba(244, 239, 230, 0.55);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: rgba(244, 239, 230, 0.1);
  color: var(--cream);
  border-color: var(--cream);
}

.btn-on-light {
  background: var(--forest);
  color: var(--cream);
}

.btn-on-light:hover,
.btn-on-light:focus-visible {
  background: var(--forest-mid);
  color: var(--cream);
}

.btn-ghost {
  background: transparent;
  color: var(--forest);
  border-color: rgba(29, 51, 40, 0.35);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--forest);
  color: var(--cream);
  border-color: var(--forest);
}

/* ---------- Layout helpers ---------- */

.section {
  padding: 4rem 0;
}

.section-inner {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.section-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--leather);
  margin: 0 0 0.6rem;
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  color: var(--forest);
}

.section-intro {
  margin: 0;
  max-width: 38rem;
  color: var(--ink-soft);
  font-size: 1.125rem;
}

/* ---------- Services ---------- */

.services {
  background: var(--cream);
}

.service-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.25rem;
}

.service-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.service-card figure {
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--forest-mid);
}

.service-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.service-card--hay img {
  object-position: center 78%;
}

.service-card:hover img {
  transform: scale(1.04);
}

.service-card-body {
  padding: 1.4rem 1.3rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.service-card h3 {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 500;
  margin: 0 0 0.6rem;
  color: var(--forest);
}

.service-card p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.service-card p:last-of-type {
  margin-bottom: 1.25rem;
}

.service-note {
  font-size: 0.95rem;
  color: var(--ink);
}

.service-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* ---------- About ---------- */

.about {
  background: var(--paper);
}

.about-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.about-photo {
  margin: 0;
  overflow: hidden;
  background: var(--forest-deep);
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 72%;
  aspect-ratio: 4 / 3;
  max-height: 22rem;
}

.about-copy p {
  color: var(--ink-soft);
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

/* ---------- Contact ---------- */

.contact {
  background: var(--forest);
  color: var(--cream);
}

.contact .section-title {
  color: var(--cream);
}

.contact .section-kicker {
  color: var(--gold);
}

.contact .section-intro {
  color: rgba(244, 239, 230, 0.86);
}

.contact-grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.contact-block h3 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
}

.contact-block p,
.contact-block address {
  margin: 0 0 0.5rem;
  font-style: normal;
  color: rgba(244, 239, 230, 0.86);
}

.contact a.email-link,
.contact a {
  color: var(--gold);
}

.contact a:hover {
  color: var(--cream);
}

.phone-placeholder {
  display: inline-block;
  margin: 0.15rem 0 0.75rem;
  padding: 0.35rem 0.7rem;
  border: 1px dashed rgba(212, 180, 131, 0.55);
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.inquiry-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.inquiry-list a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid rgba(244, 239, 230, 0.2);
  padding: 0.35rem 0;
  width: 100%;
  font-weight: 600;
}

.inquiry-list a::after {
  content: "→";
  margin-left: auto;
  color: var(--gold);
}

.inquiry-list a:hover {
  color: var(--gold);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--forest-deep);
  color: rgba(244, 239, 230, 0.72);
  padding: 2rem 0 1.75rem;
  font-size: 0.92rem;
}

.footer-inner {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.footer-name {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--cream);
  margin: 0 0 0.35rem;
}

.footer-legal {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
}

.footer-beta {
  margin: 0;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(244, 239, 230, 0.12);
  font-size: 0.8rem;
  color: rgba(244, 239, 230, 0.55);
}

/* ---------- Desktop ---------- */

@media (min-width: 768px) {
  :root { --header-h: 4.5rem; }

  .nav-toggle { display: none; }

  .site-nav {
    position: static;
    inset: auto;
    background: transparent;
    padding: 0;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .site-nav ul {
    flex-direction: row;
    gap: 0.15rem 1.65rem;
  }

  .site-nav a {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.4rem 0;
    border-bottom: 0;
    letter-spacing: 0.02em;
  }

  .site-header.is-over-hero .site-nav a { color: var(--cream); }
  .site-header.is-solid .site-nav a { color: var(--forest); }

  .site-header.is-over-hero .site-nav a:hover,
  .site-header.is-solid .site-nav a:hover {
    color: var(--tan);
  }

  .hero-inner { padding: 5.5rem 0 5rem; }

  .service-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.35rem;
  }

  .about-grid {
    grid-template-columns: 0.95fr 1.05fr;
    gap: 3.5rem;
  }

  .about-photo img {
    aspect-ratio: 4 / 5;
    max-height: 36rem;
    min-height: 0;
  }

  .contact-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3.5rem;
  }

  .inquiry-list a { width: auto; min-width: 16rem; }

  .section { padding: 5.5rem 0; }
}

@media (min-width: 1100px) {
  .header-inner,
  .hero-inner,
  .section-inner,
  .footer-inner {
    width: min(1120px, calc(100% - 3.5rem));
  }

  .service-card-body { padding: 1.6rem 1.5rem 1.7rem; }
}


/* Mobile menu: lock scroll and keep a dark header over the drawer */
body.nav-open {
  overflow: hidden;
}

.site-header.nav-open,
.site-header.nav-open.is-over-hero,
.site-header.nav-open.is-solid {
  background: var(--forest-deep);
  border-bottom-color: rgba(244, 239, 230, 0.12);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-header.nav-open .logo,
.site-header.nav-open .nav-toggle {
  color: var(--cream);
}
