/* ==========================================================
   Dellinger Tree Farm
   Heritage look: sage + forest green (matches the sign),
   serif headings, large readable body text.
   ========================================================== */

:root {
  --sage: #B4C3A1;
  --sage-light: #E6ECDD;
  --sage-mist: #F1F4EC;
  --forest: #2E4A33;
  --forest-deep: #1E3324;
  --forest-soft: #4C6B4F;
  --cream: #FAF7F0;
  --paper: #FFFDF8;
  --bark: #7A5C43;
  --brass: #A8834F;
  --text: #1F2A20;
  --text-muted: #4E5A4F;
  --line: #D5DCCB;
  --danger: #9B2C2C;

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", Arial, sans-serif;

  --radius: 6px;
  --shadow: 0 10px 30px -12px rgba(30, 51, 36, 0.25);
  --ease: cubic-bezier(.22, .8, .3, 1);
  --header-h: 84px;
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.1875rem;     /* 19px: easy to read for every age */
  line-height: 1.65;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--forest); text-underline-offset: 3px; }
a:hover { color: var(--forest-deep); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  color: var(--forest-deep);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(2.1rem, 4vw, 3rem); }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1em; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.container.narrow { width: min(820px, 100% - 32px); }

.sr-only, .hp {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--forest); color: #fff; padding: 10px 16px; border-radius: var(--radius);
  transition: top .2s;
}
.skip-link:focus { top: 12px; color: #fff; }

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

.eyebrow {
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--bark);
  margin-bottom: .75rem;
  display: inline-flex; align-items: center; gap: .75rem;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 28px;
  font: 700 1.05rem/1 var(--font-body); letter-spacing: .02em;
  border-radius: var(--radius); border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease),
              transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--forest); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--forest-deep); color: #fff; }
.btn-ghost { border-color: var(--forest); color: var(--forest); background: transparent; }
.btn-ghost:hover { background: var(--forest); color: #fff; }
.btn-small { min-height: 44px; padding: 0 20px; background: var(--forest); color: #fff !important; }
.btn-small:hover { background: var(--forest-deep); }
.btn-block { width: 100%; }

/* ---------- Top bar & header ---------- */
.topbar { background: var(--forest-deep); color: var(--sage-light); font-size: .95rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 40px; }
.topbar-phone { color: #fff; font-weight: 700; text-decoration: none; }
.topbar-phone:hover { color: var(--sage); }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 240, .94);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s, border-color .3s;
}
.site-header.scrolled { box-shadow: 0 6px 24px -14px rgba(0,0,0,.35); border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 16px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 50px; height: 50px; flex: none; transition: transform .5s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; color: var(--forest-deep); }
.brand-sub { font-size: .78rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--forest-soft); margin-top: 4px; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 6px; }
.site-nav a:not(.btn) {
  position: relative; display: block; padding: 10px 14px;
  font-weight: 600; color: var(--text); text-decoration: none;
}
.site-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
  background: var(--forest); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.site-nav a:not(.btn):hover::after, .site-nav a.active::after { transform: scaleX(1); }
.site-nav a.active { color: var(--forest); }

.nav-toggle {
  display: none; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 16px;
  background: var(--sage-light); border: 2px solid var(--forest); border-radius: var(--radius);
  font: 700 1rem var(--font-body); color: var(--forest-deep); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 20px; height: 2px; background: currentColor; position: relative;
  transition: transform .3s var(--ease), background-color .2s;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--sage-mist) 0%, var(--sage-light) 55%, var(--sage) 100%);
  padding: clamp(64px, 10vw, 128px) 0 clamp(150px, 18vw, 230px);
}
.hero-art { position: absolute; inset: auto 0 0 0; height: 70%; pointer-events: none; }
.hero-art svg { width: 100%; height: 100%; }
.ridge { transform-origin: bottom; animation: rise 1.6s var(--ease) both; }
.ridge-1 { fill: #A3B48F; opacity: .55; animation-delay: .1s; }
.ridge-2 { fill: #6F8A68; opacity: .55; animation-delay: .25s; }
.ridge-3 { fill: var(--forest); animation-delay: .4s; }
.treeline { fill: var(--forest-deep); animation: rise 1.6s .55s var(--ease) both; }
@keyframes rise { from { transform: translateY(60px); opacity: 0; } }

.hero-content { position: relative; z-index: 1; max-width: 1180px; }
.hero h1 { max-width: 15ch; }
.hero-lead { font-size: clamp(1.2rem, 2vw, 1.4rem); max-width: 40ch; color: var(--text); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 40px; }
.hero-facts {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 14px;
}
.hero-facts li {
  background: rgba(255, 253, 248, .85); border: 1px solid var(--line); border-left: 4px solid var(--forest);
  padding: 12px 20px; border-radius: var(--radius); display: flex; flex-direction: column; line-height: 1.3;
}
.hero-facts strong { font-family: var(--font-display); font-size: 1.45rem; color: var(--forest-deep); }
.hero-facts span { font-size: .95rem; color: var(--text-muted); }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 9vw, 120px) 0; }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head p:last-child { color: var(--text-muted); }

/* About */
.about { background: var(--paper); }
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.memorial {
  font-family: var(--font-display); font-style: italic; font-size: 1.35rem; color: var(--forest-soft);
  border-left: 3px solid var(--brass); padding-left: 18px; margin-top: 28px;
}
.about-photo { margin: 0; }

.photo-placeholder {
  height: 100%; min-height: 240px; border-radius: var(--radius);
  display: grid; place-items: center; text-align: center;
  color: var(--forest); font-weight: 600;
  background:
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(46,74,51,.06) 14px 28px),
    var(--sage-light);
  border: 1px dashed var(--forest-soft);
}
.photo-placeholder small { font-weight: 400; color: var(--text-muted); }
.photo-placeholder.tall { min-height: 460px; }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: clamp(56px, 7vw, 88px); }
.value {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px; transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.value:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.value svg { width: 44px; height: 44px; fill: var(--forest); margin-bottom: 14px; }
.value p { color: var(--text-muted); margin: 0; }

/* Inventory */
.inventory { background: var(--cream); }
.notice {
  background: #FBF3E2; border: 1px solid #E6D3AC; border-left: 4px solid var(--brass);
  padding: 16px 20px; border-radius: var(--radius); margin-bottom: 28px;
}
.inv-controls { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 20px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > span { font-weight: 600; font-size: 1rem; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--text);
  min-height: 54px; padding: 12px 14px;
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--forest); box-shadow: 0 0 0 4px rgba(46,74,51,.15);
}
.field.invalid input, .field.invalid select { border-color: var(--danger); }

.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.inv-table { width: 100%; border-collapse: collapse; }
.inv-table th, .inv-table td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--line); }
.inv-table th {
  background: var(--forest); color: #fff; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase;
}
.inv-table tbody tr { transition: background-color .2s; }
.inv-table tbody tr:hover { background: var(--sage-mist); }
.inv-table tbody tr:last-child td { border-bottom: 0; }
.inv-name { font-weight: 700; color: var(--forest-deep); }
.inv-name small { display: block; font-weight: 400; font-style: italic; color: var(--text-muted); }
.inv-row-in { animation: rowIn .45s var(--ease) both; }
@keyframes rowIn { from { opacity: 0; transform: translateY(8px); } }
.inv-count { color: var(--text-muted); margin-top: 12px; font-size: 1rem; }
.tag {
  display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .9rem;
  background: var(--sage-light); color: var(--forest-deep); white-space: nowrap;
}

/* Delivery */
.delivery { background: var(--forest); color: var(--sage-light); position: relative; overflow: hidden; }
.delivery h2 { color: #fff; }
.delivery .eyebrow { color: var(--sage); }
.delivery a:not(.btn) { color: #fff; }
.delivery .btn-primary { background: var(--sage); color: var(--forest-deep); }
.delivery .btn-primary:hover { background: #fff; color: var(--forest-deep); }
.delivery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.big-stat { font-size: 1.3rem; color: #fff; }
.big-stat span {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(4rem, 9vw, 6.5rem); line-height: 1; color: var(--sage);
}

.radius { position: relative; aspect-ratio: 1; max-width: 440px; width: 100%; margin-inline: auto; display: grid; place-items: center; }
.ring { position: absolute; border-radius: 50%; border: 2px solid rgba(180,195,161,.55); }
.ring-1 { inset: 34%; background: rgba(180,195,161,.18); }
.ring-2 { inset: 17%; border-style: dashed; }
.ring-3 { inset: 0; background: rgba(180,195,161,.07); }
.in-view .ring { animation: pulse 3.6s var(--ease) infinite; }
.in-view .ring-2 { animation-delay: .4s; }
.in-view .ring-3 { animation-delay: .8s; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
.pin { position: relative; display: flex; flex-direction: column; align-items: center; color: #fff; font-weight: 700; }
.pin svg { width: 44px; height: 44px; fill: var(--sage); }
.ring-label { position: absolute; top: 4%; right: 8%; font-family: var(--font-display); font-size: 1.5rem; color: var(--sage); }

/* Gallery */
.gallery { background: var(--paper); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 260px; gap: 16px; }
.g-item { margin: 0; border-radius: var(--radius); overflow: hidden; }
.g-wide { grid-column: span 2; }
.g-item img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: transform .8s var(--ease); }
.g-item:hover img { transform: scale(1.05); }

.lightbox {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px;
  background: rgba(20, 30, 22, .9); opacity: 0; pointer-events: none; transition: opacity .3s;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-height: 85vh; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox button {
  position: absolute; top: 20px; right: 20px; min-height: 48px; padding: 0 18px;
  font: 700 1rem var(--font-body); background: #fff; border: 0; border-radius: var(--radius); cursor: pointer;
}

/* FAQ */
.faq { background: var(--sage-mist); }
.faq-list details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px;
  transition: box-shadow .3s;
}
.faq-list details[open] { box-shadow: var(--shadow); }
.faq-list summary {
  list-style: none; cursor: pointer; padding: 20px 60px 20px 24px; position: relative;
  font-weight: 700; font-size: 1.15rem; color: var(--forest-deep);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%;
  background: var(--sage-light); color: var(--forest); font-size: 1.4rem; line-height: 1;
  transition: transform .3s var(--ease), background-color .3s;
}
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); background: var(--sage); }
.faq-list details p { padding: 0 24px 22px; margin: 0; color: var(--text-muted); }
.faq-list details[open] p { animation: rowIn .4s var(--ease); }

/* Contact */
.contact { background: var(--cream); }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.contact-card {
  display: flex; flex-direction: column; gap: 2px; padding: 18px 22px; margin-bottom: 12px;
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--sage);
  border-radius: var(--radius); text-decoration: none; color: var(--text);
  transition: border-color .25s, transform .25s var(--ease), box-shadow .25s;
}
a.contact-card:hover { border-left-color: var(--forest); transform: translateX(4px); box-shadow: var(--shadow); color: var(--text); }
.cc-label { font-size: .85rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--bark); }
.cc-value { font-size: 1.25rem; font-weight: 600; color: var(--forest-deep); }
.cc-email { font-size: 1.05rem; overflow-wrap: anywhere; }
.cc-action { font-size: .95rem; color: var(--forest); font-weight: 600; margin-top: 4px; }

.contact-form {
  background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--forest);
  border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow);
}
.form-hint { color: var(--text-muted); font-size: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-status { margin: 16px 0 0; font-weight: 600; min-height: 1.5em; }
.form-status.ok { color: var(--forest); }
.form-status.err { color: var(--danger); }

.map-wrap { margin-top: 56px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map-wrap iframe { display: block; width: 100%; height: 380px; border: 0; filter: saturate(.85); }

/* Footer */
.site-footer { background: var(--forest-deep); color: var(--sage-light); padding: 56px 0 24px; }
.site-footer a { color: #fff; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-brand { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(180,195,161,.25); font-size: .95rem;
}
.footer-bottom p { margin: 0; }
.back-top { text-decoration: none; }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in-view { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px -20px rgba(0,0,0,.3);
    max-height: 0; overflow: hidden; transition: max-height .45s var(--ease);
  }
  .site-nav.open { max-height: 520px; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 8px 16px 20px; gap: 0; }
  .site-nav a:not(.btn) { padding: 16px 4px; font-size: 1.15rem; border-bottom: 1px solid var(--line); }
  .site-nav a:not(.btn)::after { display: none; }
  .site-nav .btn { margin-top: 14px; min-height: 54px; width: 100%; }

  .about-grid, .delivery-grid, .contact-grid { grid-template-columns: 1fr; }
  .photo-placeholder.tall { min-height: 300px; }
  .values { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 200px; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --header-h: 72px; }
  .topbar-inner > span { display: none; }
  .topbar-inner { justify-content: center; }
  .brand-mark { width: 42px; height: 42px; }
  .brand-name { font-size: 1.55rem; }
  .brand-sub { font-size: .68rem; letter-spacing: .14em; }
  .nav-toggle-label { display: none; }
  .hero-actions .btn { width: 100%; }
  .hero-facts li { flex: 1 1 100%; }
  .inv-controls, .field-row { grid-template-columns: 1fr; gap: 0; }
  .gallery-grid { grid-template-columns: 1fr; }
  .g-wide { grid-column: auto; }

  /* Inventory table becomes stacked cards on phones */
  .inv-table thead { display: none; }
  .inv-table, .inv-table tbody, .inv-table tr, .inv-table td { display: block; width: 100%; }
  .inv-table tr { padding: 14px 18px; border-bottom: 1px solid var(--line); }
  .inv-table td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 16px; }
  .inv-table td::before { content: attr(data-label); font-weight: 600; color: var(--text-muted); }
  .inv-table td.inv-name { display: block; font-size: 1.2rem; }
  .inv-table td.inv-name::before { content: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
