/* Dairy Ferry Farm — layout and components. Uses tokens.css only. */

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--df-font-sans);
  color: var(--df-ink);
  background: var(--df-cream);
  line-height: 1.65;
}

img,
video {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4,
.font-serif {
  font-family: var(--df-font-serif);
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
  color: var(--df-green-deep);
}

h1 {
  font-size: clamp(2.15rem, 5vw, 3.6rem);
  font-weight: 600;
  line-height: 1.12;
}

h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.45rem);
  font-weight: 600;
  line-height: 1.2;
}

h3 {
  font-size: 1.35rem;
  font-weight: 600;
}

.lead {
  font-size: 1.15rem;
  color: var(--df-muted);
}

:focus-visible {
  outline: 3px solid var(--df-gold);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 1080;
  background: var(--df-gold);
  color: var(--df-green-deep);
  padding: 0.6rem 1rem;
  border-radius: var(--df-radius);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

/* Navbar */
.site-navbar {
  background: rgba(5, 47, 17, 0.94);
  backdrop-filter: blur(12px);
  min-height: var(--df-nav-h);
  box-shadow: 0 1px 0 rgba(245, 208, 0, 0.18);
}

.site-navbar .navbar-brand {
  padding: 0;
}

.logo-rotator {
  display: block;
  width: 3.15rem;
  height: 3.15rem;
  padding: 0;
  border: 2px solid var(--df-gold);
  border-radius: 50%;
  overflow: hidden;
  background: var(--df-gold);
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(245, 208, 0, 0.2);
}

.logo-rotator img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.08);
}

.brand-wordmark {
  font-family: var(--df-font-serif);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--df-cream);
  text-decoration: none;
  line-height: 1.15;
}

.brand-wordmark:hover {
  color: var(--df-gold);
}

.site-navbar .nav-link {
  color: rgba(250, 246, 238, 0.82);
  font-weight: 500;
  padding: 0.45rem 0.75rem !important;
  border-radius: var(--df-radius-pill);
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link:focus {
  color: var(--df-gold);
}

.site-navbar .nav-link.active {
  color: var(--df-green-deep);
  background: var(--df-gold);
}

.navbar-toggler {
  border-color: rgba(245, 208, 0, 0.45);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23F5D000' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Buttons */
.btn {
  font-weight: 600;
  border-radius: var(--df-radius-pill);
  padding: 0.65rem 1.35rem;
}

.btn-lg {
  padding: 0.8rem 1.6rem;
}

.btn-gold {
  background: var(--df-gold);
  border: 2px solid var(--df-gold);
  color: var(--df-green-deep);
}

.btn-gold:hover,
.btn-gold:focus {
  background: var(--df-gold-soft);
  border-color: var(--df-gold-soft);
  color: var(--df-green-deep);
}

.btn-green {
  background: var(--df-green);
  border: 2px solid var(--df-green);
  color: var(--df-cream);
}

.btn-green:hover,
.btn-green:focus {
  background: var(--df-green-deep);
  border-color: var(--df-green-deep);
  color: var(--df-cream);
}

.btn-outline-cream {
  background: transparent;
  border: 2px solid rgba(250, 246, 238, 0.75);
  color: var(--df-cream);
}

.btn-outline-cream:hover,
.btn-outline-cream:focus {
  background: var(--df-cream);
  border-color: var(--df-cream);
  color: var(--df-green-deep);
}

.btn-outline-green {
  background: transparent;
  border: 2px solid var(--df-green);
  color: var(--df-green-deep);
}

.btn-outline-green:hover,
.btn-outline-green:focus {
  background: var(--df-green);
  color: var(--df-cream);
}

/* Kickers & sections */
.kicker {
  font-family: var(--df-font-sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--df-green-mid);
  margin-bottom: 0.6rem;
}

.kicker-light {
  color: var(--df-gold);
}

.kicker::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  background: var(--df-gold);
  margin-top: 0.55rem;
  border-radius: 2px;
}

.section {
  padding: var(--df-space-section) 0;
}

.section-cream {
  background: var(--df-cream);
}

.section-white {
  background: var(--df-white);
}

.section-green {
  background: var(--df-green-deep);
  color: var(--df-cream);
}

.section-green h2,
.section-green h3 {
  color: var(--df-cream);
}

.section-green .lead,
.section-green p {
  color: rgba(250, 246, 238, 0.86);
}

.band-gold {
  background: var(--df-gold);
  color: var(--df-green-deep);
}

.band-gold h2 {
  color: var(--df-green-deep);
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--df-nav-h));
  display: flex;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(5, 47, 17, 0.82) 0%, rgba(5, 47, 17, 0.48) 55%, rgba(5, 47, 17, 0.22) 100%),
    url("../img/photos/farm01.jpg") center / cover no-repeat;
  color: var(--df-cream);
}

.hero h1,
.hero .lead {
  color: var(--df-cream);
}

.hero .lead {
  max-width: var(--df-max-copy);
}

.hero-video-badge {
  width: min(220px, 58vw);
  height: min(220px, 58vw);
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--df-gold);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), 0 0 0 8px rgba(245, 208, 0, 0.18);
  background: var(--df-gold);
}

.hero-video-badge video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-hero {
  position: relative;
  min-height: 38vh;
  display: flex;
  align-items: flex-end;
  padding: 4.5rem 0 2.5rem;
  color: var(--df-cream);
  background-color: var(--df-green-deep);
  background-size: cover;
  background-position: center;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 47, 17, 0.88) 0%, rgba(5, 47, 17, 0.4) 100%);
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1,
.page-hero .lead {
  color: var(--df-cream);
}

.page-hero-about {
  background-image: url("../img/photos/farm08.jpg");
}

.page-hero-products {
  background-image: url("../img/photos/produce01.png");
}

.page-hero-fresh {
  background-image: url("../img/photos/farm02.jpg");
}

.page-hero-partners {
  background-image: url("../img/photos/farm03.jpg");
  background-position: center 70%;
}

.page-hero-contact {
  background-image: url("../img/photos/farm07.jpg");
}

/* Cards */
.product-card {
  border: 0;
  border-radius: var(--df-radius-lg);
  overflow: hidden;
  box-shadow: var(--df-shadow-soft);
  height: 100%;
  background: var(--df-white);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--df-shadow);
}

.product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.product-card .card-body {
  padding: 1.35rem 1.35rem 1.5rem;
}

.icon-tile {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--df-gold);
  color: var(--df-green-deep);
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.method-card,
.contact-card,
.form-panel,
.story-panel {
  background: var(--df-white);
  border-radius: var(--df-radius-lg);
  box-shadow: var(--df-shadow-soft);
  height: 100%;
}

.method-card,
.contact-card {
  padding: 1.75rem;
}

.form-panel {
  padding: 1.75rem;
}

.split-img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  border-radius: var(--df-radius-lg);
  box-shadow: var(--df-shadow-soft);
}

.split-img-tall {
  min-height: 360px;
}

#goat,
#eggs,
#produce,
#pantry,
#konfections,
#order {
  scroll-margin-top: 5rem;
}

/* Gallery */
.gallery-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--df-radius);
  box-shadow: var(--df-shadow-soft);
}

.gallery-grid .gallery-tall img {
  height: 100%;
  min-height: 220px;
}

/* Forms */
.form-label {
  font-weight: 600;
  color: var(--df-green-deep);
}

.form-control,
.form-select {
  border-radius: var(--df-radius);
  border-color: #d9d1c3;
  padding: 0.7rem 0.9rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--df-green);
  box-shadow: 0 0 0 0.25rem rgba(245, 208, 0, 0.35);
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--df-green);
  color: var(--df-cream);
  text-decoration: none;
  font-size: 1.15rem;
}

.social-link:hover {
  background: var(--df-gold);
  color: var(--df-green-deep);
}

.map-embed {
  border: 0;
  width: 100%;
  min-height: 320px;
  border-radius: var(--df-radius-lg);
  box-shadow: var(--df-shadow-soft);
}

/* Footer */
.site-footer {
  background: var(--df-green-deep);
  color: rgba(250, 246, 238, 0.82);
  padding: 3.5rem 0 1.5rem;
}

.site-footer h3,
.site-footer .footer-brand {
  color: var(--df-cream);
  font-family: var(--df-font-serif);
}

.site-footer a {
  color: var(--df-gold);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--df-gold-soft);
}

.footer-logo {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--df-gold);
}

.footer-bottom {
  border-top: 1px solid rgba(245, 208, 0, 0.18);
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  font-size: 0.9rem;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .product-card {
    transition: none;
  }
}

@media (max-width: 767.98px) {
  .hero {
    min-height: auto;
    padding: 3.25rem 0 2.75rem;
    background:
      linear-gradient(to top, rgba(5, 47, 17, 0.9) 10%, rgba(5, 47, 17, 0.55) 100%),
      url("../img/photos/farm01.jpg") center / cover no-repeat;
    align-items: flex-end;
  }

  .hero .btn,
  .page-hero .btn {
    width: 100%;
  }

  .product-card img {
    height: 200px;
  }

  .gallery-grid img {
    height: 200px;
  }
}
