/* ==========================================================================
   Kahnke's Tree Farm — Design Tokens
   Palette:
     --bark      #241C15  deep brown-black (text, nav)
     --spruce    #1F3D2C  primary deep green
     --spruce-2  #2E5940  lighter spruce (hover states)
     --meadow    #6F8F5C  secondary sage green
     --gold      #C68A2E  harvest gold (accent / CTA)
     --gold-2    #E3A94A  lighter gold (hover)
     --clay      #93613A  clay brown (small accents)
     --cream     #F6F1E4  page background
     --cream-2   #EFE7D3  card background
   Type:
     Display : 'Fraunces'      (organic serif, variable optical size — "grown" feel)
     Body    : 'Inter'
     Utility : 'IBM Plex Mono' (labels, dates, tier numbers)
   ========================================================================== */

:root {
  --bark: #20281f;
  --spruce: #234f28;
  --spruce-2: #2e6636;
  --meadow: #7a9631;
  --gold: #4caf50;
  --gold-2: #66bb6a;
  --clay: #5c7a2e;
  --cream: #ffffff;
  --cream-2: #f4f7f1;
  --ring-line: rgba(30, 42, 31, 0.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--cream);
  color: var(--bark);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

.font-display { font-family: 'Fraunces', serif; }
.font-mono { font-family: 'IBM Plex Mono', monospace; }

/* ---------- Typographic scale ------------------------------------------
   Headings default to Fraunces (display serif) with a consistent size/weight
   ladder so every page reads the same way even if a page-level utility class
   is missed. Tailwind's own text-size / text-color classes still win where
   present (class selectors outrank these type selectors), so this is a safe
   baseline, not an override of intentional per-page sizing. ------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  line-height: 1.18;
  color: var(--spruce);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 1.7rem + 1.6vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.65rem, 1.4rem + 1vw, 2.35rem); }
h3 { font-size: clamp(1.2rem, 1.08rem + 0.5vw, 1.4rem); }
h4 { font-size: 1.05rem; }

body {
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
p { line-height: 1.7; }

/* Lead / intro paragraph — the first sentence under a heading that should
   read a size up from ordinary body copy, used for section intros. */
.lead {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--bark);
}

/* ---------- Emphasis / highlight ----------------------------------------
   For calling out a key phrase, figure, or promise inline within a sentence
   (warranty terms, service radius, guarantees, prices) without resorting to
   a whole new heading. Two strengths: a soft background wash for a light
   touch, and a bold accent for the sentence that matters most. ---------- */
.text-highlight {
  background: linear-gradient(to bottom, transparent 62%, rgba(76,175,80,0.28) 62%);
  font-weight: 600;
  color: var(--bark);
  padding: 0 0.05em;
}
.text-highlight-strong {
  color: var(--gold);
  font-weight: 700;
}
mark {
  background: rgba(76,175,80,0.22);
  color: var(--bark);
  padding: 0.05em 0.3em;
  border-radius: 3px;
}

/* ---------- Utility label (eyebrow) ---------- */
.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 500;
}

/* ---------- Organic underline (signature squiggle instead of hard rule) --- */
.grow-underline {
  position: relative;
  display: inline-block;
}
.grow-underline::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: -0.18em;
  height: 0.5em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 16' preserveAspectRatio='none'%3E%3Cpath d='M0 8 Q 15 0, 30 8 T 60 8 T 90 8 T 120 8 T 150 8 T 180 8 T 210 8' stroke='%234CAF50' stroke-width='3' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 100px 100%;
  z-index: -1;
  opacity: 0.9;
}

/* ---------- Tree-ring motif (signature decorative device) ---------------- */
.ring-field,
.ring-decor-lg {
  display: none !important;
}

/* Real site's decorative leaf divider (authentic asset) */
.leaf-divider {
  display: block;
  margin: 0 auto 0.75rem auto;
  height: 26px;
  width: auto;
  opacity: 0.9;
}

.ring-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 auto;
}
.ring-divider .ring-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
}
.ring-divider .ring-line {
  height: 1px;
  width: 64px;
  background: linear-gradient(to right, transparent, var(--clay), transparent);
}

/* growth-ring timeline node used on About page */
.ring-node {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--cream);
  border: 3px solid var(--gold);
  position: relative;
  flex-shrink: 0;
  z-index: 2;
}
.ring-node::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(198,138,46,0.35);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.85rem 1.6rem;
  border-radius: 2px;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold);
  color: var(--bark);
}
.btn-primary:hover { background: var(--gold-2); transform: translateY(-2px); }

.btn-outline {
  border: 1px solid currentColor;
  color: var(--cream);
}
.btn-outline:hover { background: rgba(246,241,228,0.1); transform: translateY(-2px); }

.btn-dark {
  background: var(--spruce);
  color: var(--cream);
}
.btn-dark:hover { background: var(--spruce-2); transform: translateY(-2px); }

/* ---------- Header ---------- */
#site-header {
  transition: background-color 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}
#site-header.scrolled {
  box-shadow: 0 4px 24px rgba(36,28,21,0.08);
}

.nav-link {
  position: relative;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0%; height: 1.5px;
  background: var(--gold);
  transition: width 0.25s ease;
}
.nav-link:hover::after { width: 100%; }

.dropdown-panel {
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}
.has-dropdown:hover .dropdown-panel,
.has-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ---------- Cards ---------- */
.service-card {
  background: var(--cream-2);
  border: 1px solid rgba(36,28,21,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -20px rgba(31,61,44,0.35);
  border-color: var(--gold);
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Full-width hero slider (edge-to-edge, no cropping padding) --- */
.hero-slider-full {
  width: 100%;
  background: var(--cream-2);
}
.hero-slider-wrap-full {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
}
@media (min-width: 640px) { .hero-slider-wrap-full { height: 320px; } }
@media (min-width: 1024px) { .hero-slider-wrap-full { height: 440px; } }

.hero-slider-wrap-full .hero-slide img {
  object-fit: cover;
  object-position: center;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 40px; height: 40px;
  border-radius: 999px;
  background: rgba(255,255,255,0.85);
  color: var(--spruce);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  transition: background 0.2s ease;
}
.hero-arrow:hover { background: #ffffff; }
.hero-arrow-left { left: 16px; }
.hero-arrow-right { right: 16px; }

.hero-slider-full .hero-slider-controls {
  background: none;
  padding-bottom: 1rem;
}

/* Google review widget cards render entirely via inline Tailwind +
   inline styles from js/main.js (renderGoogleReviews) — intentionally
   no separate CSS block here, so the widget can't break if this
   stylesheet fails to load or gets out of sync with the markup. */

/* ---------- Hero slider (interior/contained version, still used elsewhere) */
.hero-slider-wrap {
  position: relative;
  height: 280px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--cream-2);
  box-shadow: 0 20px 50px -20px rgba(30,42,31,0.45);
}
@media (min-width: 640px) { .hero-slider-wrap { height: 360px; } }
@media (min-width: 1024px) { .hero-slider-wrap { height: 440px; } }

.hero-slide {
  opacity: 0;
  transition: opacity 0.9s ease;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-slide.active { opacity: 1; z-index: 1; }
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.hero-slider-controls {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.6rem 0;
  background: linear-gradient(to top, rgba(30,42,31,0.55), transparent);
}

/* ---------- Tier table ---------- */
.tier-row td, .tier-row th { border-bottom: 1px solid rgba(36,28,21,0.08); }

/* ---------- Misc ---------- */
/* ---------- Top bar (exact match to live site) ---------- */
.leaf-bullet::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 0.6rem;
  background: var(--meadow);
  border-radius: 0 60% 0 60%;
  transform: rotate(20deg);
}

.topbar {
  background: #e9e9e9;
}
.topbar a, .topbar span { color: #234f28; }
.topbar-btn {
  background: #8a9a3f;
  font-weight: 600;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  transition: background 0.2s ease;
}
.topbar a.topbar-btn { color: #ffffff; }
.topbar-btn:hover { background: #7a8a34; }

.topbar-btn-alt {
  background: #234f28;
}
.topbar a.topbar-btn-alt { color: #ffffff; }
.topbar-btn-alt:hover { background: #1a3b1e; }

/* ---------- Footer (exact diagonal gradient match to live site) ---------- */
.site-footer {
  background: linear-gradient(135deg, #9aa83c 0%, #4b7a3e 45%, #1c3b22 100%);
  color: #ffffff;
}
.site-footer h4 {
  color: #cfe8b8;
  letter-spacing: 0.03em;
}
.site-footer ul.footer-list {
  list-style: disc;
  padding-left: 1.1rem;
}
.site-footer ul.footer-list li { color: #ffffff; }
.site-footer ul.footer-list a { color: #ffffff; }
.site-footer ul.footer-list a:hover { color: #dff0c8; }
.site-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.25);
}

::selection { background: var(--gold); color: var(--bark); }

.skip-link:focus {
  transform: translateY(0);
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
