/* Dauner Farm
   Palette drawn from the place: galvanized-white ground, field green,
   corn gold, Nebraska sky, bin gray. Type: Zilla Slab (signage) + Public Sans. */

:root {
  --ground: #f4f5f0;
  --surface: #ffffff;
  --ink: #1a241c;
  --ink-soft: #46524a;
  --muted: #7c857f;
  --line: #d6dad3;
  --green: #2e5a38;
  --green-deep: #1f3f27;
  --on-green: #f4f5f0;
  --gold: #c79a2c;
  --gold-soft: #f3e7c7;
  --sky: #6e9cc4;
  --focus: #6e9cc4;
  --logo-filter: none;
  --logo-blend: multiply;
  --hero-shade: rgba(20, 30, 22, 0.28);

  --display: "Zilla Slab", "Rockwell", "Roboto Slab", Georgia, serif;
  --body: "Public Sans", "Helvetica Neue", Arial, sans-serif;

  --measure: 62ch;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --label-col: 12rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #121814;
    --surface: #1a221c;
    --ink: #e9ece6;
    --ink-soft: #b9c1bb;
    --muted: #8f9992;
    --line: #2d382f;
    --green: #4e8a5c;
    --green-deep: #24402b;
    --on-green: #eef2ec;
    --gold: #d9ae49;
    --gold-soft: #3a3320;
    --sky: #8db4d6;
    --focus: #8db4d6;
    --logo-filter: invert(1);
    --logo-blend: screen;
    --hero-shade: rgba(10, 16, 12, 0.42);
  }
}
:root[data-theme="dark"] {
  --ground: #121814;
  --surface: #1a221c;
  --ink: #e9ece6;
  --ink-soft: #b9c1bb;
  --muted: #8f9992;
  --line: #2d382f;
  --green: #4e8a5c;
  --green-deep: #24402b;
  --on-green: #eef2ec;
  --gold: #d9ae49;
  --gold-soft: #3a3320;
  --sky: #8db4d6;
  --focus: #8db4d6;
  --logo-filter: invert(1);
  --logo-blend: screen;
  --hero-shade: rgba(10, 16, 12, 0.42);
}

/* ---------- base ---------- */

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
a:hover { color: var(--gold); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--green); color: var(--on-green);
  padding: 0.5rem 0.9rem; z-index: 100;
}
.skip:focus { top: 1rem; }

.eyebrow, .site-nav a {
  font-family: var(--body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem var(--gutter);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex; align-items: center; gap: 0.85rem;
  color: var(--ink); text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 72px; height: 54px;
  object-fit: cover;
  filter: var(--logo-filter);
  mix-blend-mode: var(--logo-blend);
}
.brand-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.01em;
}

.site-nav { display: flex; gap: 1.75rem; }
.site-nav a { color: var(--ink-soft); text-decoration: none; padding: 0.25rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--gold); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 100%;
  grid-template-rows: clamp(380px, 68vh, 680px) auto;
}

.hero-photo {
  grid-row: 1;
  grid-column: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 40% 55%;
}

.hero::before {
  content: "";
  grid-row: 1;
  grid-column: 1;
  position: relative;
  z-index: 1;
  background: linear-gradient(to top, var(--hero-shade), transparent 55%);
  pointer-events: none;
}

.hero-panel {
  grid-row: 2;
  grid-column: 1;
  position: relative;
  z-index: 2;
  margin: -6.5rem var(--gutter) 0;
  max-width: 34rem;
  padding: 2rem 2.25rem 2.25rem;
  background: var(--green-deep);
  color: var(--on-green);
  border-top: 4px solid var(--gold);
  animation: rise 0.6s ease-out both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.hero-panel .eyebrow { margin: 0 0 0.75rem; color: var(--gold); }
.hero-panel h1 {
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.hero-panel .lede {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  margin: 0.5rem 0 0;
  opacity: 0.92;
}
.hero-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem;
  margin-top: 1.75rem;
}

.button {
  display: inline-block;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.8rem 1.4rem;
  background: var(--gold);
  color: #1a241c;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}
.button:hover { background: #dcb04a; color: #1a241c; }

.text-link { color: var(--on-green); font-weight: 500; }
.text-link:hover { color: var(--gold); }

/* ---------- sections ---------- */

.section {
  display: grid;
  grid-template-columns: var(--label-col) minmax(0, 1fr);
  gap: 2rem var(--gutter);
  padding: 4.5rem var(--gutter);
  border-bottom: 1px solid var(--line);
}
.section:last-of-type { border-bottom: 0; }

.section-label h2 {
  font-size: 1.15rem;
  font-weight: 700;
  padding-top: 0.35rem;
  border-top: 3px solid var(--gold);
  display: inline-block;
}
.section-note {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.section-body { min-width: 0; }

.prose-lead {
  font-family: var(--display);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 500;
  line-height: 1.35;
  max-width: 30ch;
  margin: 0 0 1.25rem;
  text-wrap: pretty;
}
.prose { max-width: var(--measure); color: var(--ink-soft); margin: 0; }


/* ---------- gallery ---------- */

.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1.75rem 1.5rem;
}
.photo { margin: 0; }
.photo img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  background: var(--line);
}
.photo-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.photo-open img { transition: opacity 0.15s ease; }
.photo-open:hover img { opacity: 0.88; }
.gallery .photo:nth-child(4) { grid-column: span 2; }
.gallery .photo:nth-child(4) img { aspect-ratio: 8 / 3; }

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) 3.5rem;
  align-items: center;
  background: rgba(14, 20, 16, 0.94);
  color: #f4f5f0;
  animation: fade 0.18s ease-out both;
}
.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.lightbox-figure {
  grid-column: 2;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 3.5rem 0 1.5rem;
  text-align: center;
}
.lightbox-img {
  display: inline-block;
  max-width: 100%;
  max-height: calc(100vh - 7rem);
  width: auto;
  height: auto;
  vertical-align: top;
  background: #000;
}
.lightbox-count {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b9c1bb;
  font-variant-numeric: tabular-nums;
}

.lightbox button {
  background: none;
  border: 0;
  color: #f4f5f0;
  cursor: pointer;
  font-family: var(--body);
  line-height: 1;
  padding: 0.75rem;
}
.lightbox button:hover { color: var(--gold); }
.lightbox button:focus-visible { outline: 3px solid var(--sky); outline-offset: -3px; }
.lightbox-prev, .lightbox-next { font-size: 3rem; justify-self: center; }
.lightbox-prev { grid-column: 1; }
.lightbox-next { grid-column: 3; }
.lightbox-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 2.25rem;
}

@media (max-width: 560px) {
  .lightbox { grid-template-columns: 2.5rem minmax(0, 1fr) 2.5rem; }
  .lightbox-prev, .lightbox-next { font-size: 2.25rem; padding: 0.5rem; }
}

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 3rem;
  align-items: start;
}

.contact-block + .contact-block { margin-top: 2rem; }
.contact-block h3 {
  font-family: var(--body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.contact-block p { margin: 0; }
.big-link {
  font-family: var(--display);
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.notice {
  margin-top: 2.5rem;
  padding: 1.25rem 1.4rem;
  background: var(--gold-soft);
  border-left: 4px solid var(--gold);
  max-width: 34rem;
}
.notice h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.notice p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

.inquiry {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.75rem;
  display: grid;
  gap: 1.1rem;
}
.inquiry h3 { font-size: 1.4rem; }
.form-help { margin: -0.5rem 0 0; color: var(--muted); font-size: 0.92rem; }

.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 500; font-size: 0.95rem; }
.field input, .field select, .field textarea {
  font: inherit;
  color: var(--ink);
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0.65rem 0.75rem;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 7rem; }
.inquiry .button { justify-self: start; }

/* ---------- footer ---------- */

.site-footer {
  padding: 2rem var(--gutter) 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--gold); }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .section { grid-template-columns: 1fr; gap: 1.5rem; padding: 3.25rem var(--gutter); }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .gallery .photo:nth-child(4) { grid-column: auto; }
  .gallery .photo:nth-child(4) img { aspect-ratio: 4 / 3; }
}

@media (max-width: 560px) {
  .site-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .site-nav { gap: 1.25rem; }
  .brand-mark { width: 56px; height: 42px; }
  .hero { grid-template-rows: clamp(300px, 48vh, 480px) auto; }
  .hero-panel { margin: -3.5rem 1rem 0; padding: 1.5rem 1.4rem 1.75rem; }
}
