/* Davis Tree Farm — one stylesheet for every page. Colors are tokens; dark mode redefines them. */

:root {
  --bg: #f7f3ea;
  --surface: #fffdf8;
  --tint: #efe8d9;
  --ink: #1d2a21;
  --muted: #4f5b53;
  --line: #ddd4c1;
  --forest: #1f3d2b;
  --forest-deep: #162e20;
  --forest-ink: #f5eedf;
  --forest-muted: #c9d3c4;
  --bark: #6b4a2f;
  --gold: #c9a45a;
  --gold-ink: #22180a;
  --accent-text: #7a5a1e;
  --link: #2c5a3f;
  --tree-back: #2a4f38;
  --art-sky: #e9e1cf;
  --art-sun: #d9b56a;
  --art-hill-back: #9fb39a;
  --art-hill-front: #6f8d6f;
  --art-trees: #1f3d2b;
  --shadow: 0 1px 2px rgb(31 61 43 / 6%), 0 8px 24px rgb(31 61 43 / 8%);
  --radius: 14px;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111a14;
    --surface: #18241c;
    --tint: #142019;
    --ink: #ece5d6;
    --muted: #b3bcb0;
    --line: #2b3a30;
    --forest: #17301f;
    --forest-deep: #0f2016;
    --forest-ink: #f2ead9;
    --forest-muted: #c4cfbf;
    --bark: #b48c66;
    --gold: #d4b06a;
    --gold-ink: #1c1407;
    --accent-text: #d9b874;
    --link: #a9cfb1;
    --tree-back: #1d3a28;
    --art-sky: #1c2b21;
    --art-sun: #b8954f;
    --art-hill-back: #2e4636;
    --art-hill-front: #3c5a45;
    --art-trees: #0d1a11;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.25rem, 7vw, 3.75rem); }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); }
h3 { font-size: 1.3rem; font-weight: 500; }
p { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 32px; } }
.narrow { max-width: 720px; }
.center { text-align: center; }
.small { font-size: 0.95rem; color: var(--muted); }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--gold); color: var(--gold-ink); padding: 10px 16px; border-radius: 8px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Header */
.site-header {
  background: var(--forest);
  color: var(--forest-ink);
  border-bottom: 1px solid rgb(255 255 255 / 8%);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 8px 16px;
  flex-wrap: wrap; min-height: 64px; padding-top: 10px; padding-bottom: 10px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--forest-ink); text-decoration: none;
}
.brand .mark { width: 30px; height: 30px; fill: var(--gold); flex: none; }
.brand-name { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; }
.site-nav { display: flex; gap: 2px; flex-wrap: wrap; }
.site-nav a {
  color: var(--forest-muted); text-decoration: none; font-size: 0.95rem; font-weight: 500;
  padding: 8px 10px; border-radius: 8px; white-space: nowrap;
}
.site-nav a:hover { color: var(--forest-ink); background: rgb(255 255 255 / 7%); }
.site-nav a[aria-current="page"] { color: var(--forest-ink); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }

/* Hero */
.hero {
  position: relative;
  background-color: var(--forest);
  background-image:
    radial-gradient(ellipse 80% 70% at 85% 10%, rgb(201 164 90 / 16%), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.05' stroke-width='1.2'%3E%3Cpath d='M-20 60c40-30 80 10 120-10s80-40 160 0'/%3E%3Cpath d='M-20 100c50-30 90 15 130-5s70-35 150 5'/%3E%3Cpath d='M-20 140c40-25 85 20 125 0s80-30 155 10'/%3E%3Cpath d='M-20 180c45-30 90 10 130-10s75-30 150 5'/%3E%3Cpath d='M-20 220c40-20 80 15 120-5s85-35 160 5'/%3E%3Cpath d='M-20 20c45-25 85 15 125-5s80-30 155 5'/%3E%3C/g%3E%3C/svg%3E");
  color: var(--forest-ink);
  padding: 56px 0 120px;
  overflow: hidden;
}
.hero-short { padding-bottom: 112px; }
.hero-inner { position: relative; z-index: 1; max-width: 820px; margin-left: auto; margin-right: auto; }
@media (min-width: 900px) { .hero { padding-top: 96px; padding-bottom: 150px; } }
.hero h1 { color: var(--forest-ink); }
.lede { font-size: 1.15rem; color: var(--forest-muted); max-width: 38em; }
@media (min-width: 640px) { .lede { font-size: 1.25rem; } }
.eyebrow {
  font-family: var(--sans); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 0.9em;
}
.eyebrow-dark { color: var(--accent-text); }
.treeline {
  position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(84px, 10vw, 140px); display: block;
}
.treeline-back { fill: var(--tree-back); }
.treeline-front { fill: var(--bg); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.actions-center { justify-content: center; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  background: var(--forest-ink); color: var(--forest);
  font-weight: 600; font-size: 1rem; text-decoration: none; line-height: 1.2;
  border: 2px solid transparent; transition: transform 0.15s ease, background-color 0.15s ease;
}
.button:hover { transform: translateY(-1px); text-decoration: none; }
.section .button { background: var(--forest); color: var(--forest-ink); }
@media (prefers-color-scheme: dark) { .section .button { background: var(--gold); color: var(--gold-ink); } }
.button-ghost, .section .button-ghost { background: transparent; color: var(--forest-ink); border-color: rgb(245 238 223 / 45%); }
.button-outline, .section .button-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.button-gold, .section .button-gold { background: var(--gold); color: var(--gold-ink); }
.button-gold:hover { background: #d8b56c; }
.button-large { min-height: 56px; padding: 14px 30px; font-size: 1.1rem; box-shadow: 0 6px 20px rgb(0 0 0 / 20%); }
.button-large::after { content: "\2192"; font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .button { transition: none; } .button:hover { transform: none; } }

/* Sections */
.section { padding: 56px 0; }
@media (min-width: 900px) { .section { padding: 88px 0; } }
.section-tint {
  background-color: var(--tint);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section h2 { color: var(--ink); }
.section p { color: var(--ink); }
.section .small { color: var(--muted); }

.cards {
  list-style: none; padding: 0; margin: 32px 0 24px;
  display: grid; gap: 16px; grid-template-columns: 1fr;
}
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); position: relative;
}
.card::before {
  content: ""; position: absolute; left: 24px; right: 24px; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent); border-radius: 0 0 3px 3px;
}
.card p:last-child { margin-bottom: 0; color: var(--muted); }
.card-icon { width: 40px; height: 40px; fill: var(--forest); margin-bottom: 12px; }
@media (prefers-color-scheme: dark) { .card-icon { fill: var(--gold); } }
.card-kicker {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-text); margin-bottom: 0.5em;
}

/* Drawings: colours for src/_art/pines.svg */
.art-sky { fill: var(--art-sky); }
.art-sun { fill: var(--art-sun); }
.art-hill-back { fill: var(--art-hill-back); }
.art-hill-front { fill: var(--art-hill-front); }
.art-trees { fill: var(--art-trees); }

/* Leases: included + rules */
.two-col { display: grid; gap: 40px; }
@media (min-width: 820px) { .two-col { grid-template-columns: 1fr 1fr; gap: 64px; } }
.checks, .rules { padding: 0; margin: 20px 0 0; list-style: none; }
.checks li, .rules li { position: relative; padding-left: 40px; margin-bottom: 16px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 0.2em; width: 26px; height: 26px; border-radius: 50%;
  background: var(--forest) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23c9a45a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.rules { counter-reset: rule; }
.rules li { counter-increment: rule; }
.rules li::before {
  content: counter(rule); position: absolute; left: 0; top: 0.15em; width: 26px; height: 26px;
  border-radius: 50%; border: 1.5px solid var(--bark); color: var(--bark);
  font-size: 0.8rem; font-weight: 600; display: grid; place-items: center; line-height: 1;
}

/* Call to action */
.cta {
  text-align: center; background: var(--forest); color: var(--forest-ink);
  border-radius: calc(var(--radius) + 6px); padding: 44px 20px; box-shadow: var(--shadow);
  background-image: radial-gradient(ellipse 70% 80% at 50% 120%, rgb(201 164 90 / 22%), transparent 70%);
}
.section .cta h2 { color: var(--forest-ink); }
.section .cta p { color: var(--forest-muted); }
.cta .contact { margin: 22px 0 0; font-size: 0.98rem; }
.cta .contact a { color: var(--forest-ink); }

.page-title { font-size: clamp(2rem, 6vw, 3rem); }

/* Footer */
.site-footer { margin-top: 24px; color: var(--forest-muted); }
.footer-ridge { display: block; width: 100%; height: 40px; fill: var(--forest-deep); margin-bottom: -1px; }
.footer-body { background: var(--forest-deep); padding: 32px 0 40px; }
.footer-inner { display: grid; gap: 20px; }
@media (min-width: 760px) { .footer-inner { grid-template-columns: 1fr auto; align-items: center; } }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand .mark { width: 36px; height: 36px; fill: var(--gold); flex: none; }
.footer-brand p { margin: 0; }
.footer-name { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--forest-ink); }
.footer-place { font-size: 0.9rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-nav a { color: var(--forest-ink); font-size: 0.95rem; padding: 6px 0; }
.footer-note { grid-column: 1 / -1; margin: 0; font-size: 0.88rem; border-top: 1px solid rgb(255 255 255 / 10%); padding-top: 16px; }

/* A photo behind the hero (build.mjs PHOTOS): the photo, then a green veil, then the text and treeline. */
.hero-photo { position: absolute; inset: 0; z-index: 0; display: block; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgb(15 32 22 / 50%) 0%, rgb(15 32 22 / 64%) 55%, rgb(15 32 22 / 86%) 100%);
}
.hero.has-photo .lede { color: #e4e9df; }
.hero.has-photo h1, .hero.has-photo .lede, .hero.has-photo .eyebrow { text-shadow: 0 1px 12px rgb(0 0 0 / 35%); }

/* Section extras */
.section-lede { color: var(--muted); max-width: 40em; margin-left: auto; margin-right: auto; }
.section .section-lede { color: var(--muted); }
.section-flush { padding-top: 0; }
.section-tint + .section-flush { padding-top: 56px; }
@media (min-width: 900px) { .section-tint + .section-flush { padding-top: 88px; } }
.more { font-weight: 600; text-decoration: none; color: var(--link); }
.more::after { content: " \2192"; }
.more:hover { text-decoration: underline; }
@media (min-width: 640px) { .cards-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards-4 { grid-template-columns: repeat(4, 1fr); } }
.card-icon-line { fill: none; stroke: var(--forest); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-color-scheme: dark) { .card-icon-line { fill: none; stroke: var(--gold); } }
.card-link { display: flex; flex-direction: column; }
.card-link p:nth-last-child(2) { flex: 1; }
.card-link .more { margin-top: 12px; }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--gold); color: var(--gold-ink);
  font-size: 0.72rem; letter-spacing: 0.12em; font-weight: 600;
}
.badge-hero { font-size: 0.78rem; padding: 4px 12px; }

/* Gallery */
.gallery {
  list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 760px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.gallery figure { margin: 0; }
.gallery picture, .gallery .art-frame {
  display: block; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--tint);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.gallery img, .gallery .art-frame svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 8px; line-height: 1.35; }
@media (min-width: 760px) { .gallery figcaption { font-size: 0.95rem; } }

/* About: the family */
.family { display: grid; gap: 32px; align-items: center; }
@media (min-width: 820px) { .family { grid-template-columns: 5fr 6fr; gap: 64px; } }
.family-media { position: relative; max-width: 460px; width: 100%; margin: 0 auto; }
.family-media::before {
  content: ""; position: absolute; inset: 18px -12px -12px 18px; border-radius: 18px;
  border: 2px solid var(--gold); opacity: 0.7;
}
.family-photo, .family-art { position: relative; display: block; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.family-photo img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.family-art svg { display: block; width: 100%; height: auto; }
.family-text h2 { margin-bottom: 0.6em; }
.crest-bg { fill: var(--forest); }
.crest-line { fill: none; stroke: var(--gold); stroke-opacity: 0.6; stroke-width: 1.5; }
.crest-mark { fill: var(--gold); }
.crest-name { fill: var(--forest-ink); font-family: var(--serif); font-size: 34px; font-weight: 600; }
.crest-place { fill: var(--forest-muted); font-family: var(--sans); font-size: 12px; letter-spacing: 2.5px; font-weight: 600; }

/* Firewood: cut, split, seasoned */
.steps {
  list-style: none; padding: 0; margin: 36px auto 0; max-width: 900px;
  display: grid; gap: 16px; grid-template-columns: 1fr; counter-reset: step;
}
@media (min-width: 700px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.steps li {
  counter-increment: step; text-align: center; padding: 24px 20px; border-radius: var(--radius);
  border: 1px dashed var(--line); background: var(--surface);
}
.steps h3::before { content: counter(step) ". "; color: var(--accent-text); }
.steps .card-icon { margin: 0 auto 8px; display: block; }
.steps p { margin: 0; color: var(--muted); }

/* Drawings shown in place of a photo */
.art-frame { line-height: 0; }
