:root {
  --cream: #f6f3ea;
  --cream-dark: #ece6d6;
  --text: #2f3a2a;
  --muted: #5b6655;
  --green: #3f5a34;
  --green-bio: #4f7a2c;
  --accent: #6b8a3a;
  --tan: #b8946a;
  --line: #d6cfbb;
  --radius: 8px;
  --font-heading: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-script: "Caveat", "Segoe Script", cursive;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--green);
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--text);
}

h1 {
  font-size: clamp(2.1rem, 6vw, 3.6rem);
}

h2 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

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

.container {
  width: min(1160px, 100% - 2.5rem);
  margin-inline: auto;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--green);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  z-index: 100;
}

.skip-link:focus {
  top: 1rem;
}

.label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.label::after {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  background: var(--accent);
  margin-top: 0.6rem;
}

.label-light {
  color: #dfe9cf;
}

.label-light::after {
  background: #dfe9cf;
}

.script {
  font-family: var(--font-script);
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  color: var(--green);
  line-height: 1.2;
}

.script-light {
  color: #fff;
  text-align: center;
  margin: 2.5rem 0 0;
}

.button {
  display: inline-block;
  background: var(--green);
  color: #fff;
  border: 2px solid var(--green);
  border-radius: var(--radius);
  padding: 0.75rem 1.4rem;
  font: 600 1rem var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.button:hover {
  background: #33492a;
}

.button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.button-ghost {
  background: transparent;
  color: var(--green);
}

.button-ghost:hover {
  background: var(--green);
  color: #fff;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 243, 234, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: transform 0.2s;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
}

.nav-toggle-bar::before {
  top: -7px;
}

.nav-toggle-bar::after {
  top: 7px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-links {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  padding: 0.5rem 1.25rem 1rem;
}

.nav-links.is-open {
  display: flex;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  padding: 0.6rem 0;
  font-weight: 600;
}

.nav-links a:hover {
  color: var(--green);
}

@media (min-width: 720px) {
  .nav-toggle {
    display: none;
  }

  .nav-links {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 1.75rem;
    padding: 0;
    border: 0;
    background: none;
  }

  .nav-links a {
    font-size: 0.95rem;
  }

  .nav-links .nav-cta {
    background: var(--green);
    color: #fff;
    padding: 0.45rem 1.1rem;
    border-radius: var(--radius);
  }

  .nav-links .nav-cta:hover {
    color: #fff;
    background: #33492a;
  }
}

/* Photo slots: placeholder shows until a real image loads */
.photo {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.35), transparent 55%),
    linear-gradient(135deg, #c9d6b0, #8fa86a 55%, #c7ab83);
}

.photo::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 45%;
  width: 40px;
  height: 40px;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.85);
  -webkit-mask: url("../img/leaf.svg") center / contain no-repeat;
  mask: url("../img/leaf.svg") center / contain no-repeat;
}

.photo::after {
  content: attr(data-label);
  position: absolute;
  left: 0;
  right: 0;
  top: calc(45% + 32px);
  text-align: center;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.photo img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo img.is-missing {
  display: none;
}

.gallery .photo:has(img:not(.is-missing)) {
  cursor: zoom-in;
}

/* Hero */
.hero {
  padding: 3rem 0 3.5rem;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.photo-hero {
  aspect-ratio: 4 / 3;
  box-shadow: 0 20px 40px -24px rgba(47, 58, 42, 0.5);
}

@media (min-width: 900px) {
  .hero {
    padding: 4.5rem 0 5rem;
  }

  .hero-grid {
    grid-template-columns: 1fr 1.15fr;
    gap: 3.5rem;
  }
}

/* Intro */
.intro {
  border-block: 1px solid var(--line);
  padding: 2.5rem 0;
  background: #fbf9f3;
}

.intro-grid {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.intro h2 {
  margin: 0;
}

.leaf-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.leaf-list li {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}

.leaf-list li::before {
  content: "";
  flex: none;
  width: 26px;
  height: 26px;
  background: var(--accent);
  -webkit-mask: url("../img/leaf.svg") center / contain no-repeat;
  mask: url("../img/leaf.svg") center / contain no-repeat;
}

@media (min-width: 800px) {
  .intro-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--cream-dark);
}

/* Modules */
.modules {
  display: grid;
  gap: 1.75rem;
  margin-top: 2rem;
}

.module h3 {
  margin: 1rem 0 0.3rem;
  color: var(--green);
}

.module p {
  margin: 0;
  color: var(--muted);
  font-style: italic;
}

@media (min-width: 600px) {
  .modules {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .modules {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-flow: dense;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* Wide photos span two columns so 10 photos fill complete rows */
.gallery .photo-wide {
  grid-column: span 2;
  aspect-ratio: 8 / 3;
}

@media (min-width: 600px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

@media (min-width: 960px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Biodiversity band */
.bio {
  background: var(--green-bio);
  color: #f3f7ec;
  padding: 4rem 0;
}

.bio h2,
.bio h3 {
  color: #fff;
}

.bio-blocks {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.bio-blocks > div {
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  padding-top: 1.25rem;
}

.bio-icons {
  list-style: none;
  padding: 0;
  margin: 3rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  text-align: center;
  font-size: 0.9rem;
}

.bio-icons li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.bio-icons li + li {
  border-left: 1px solid rgba(255, 255, 255, 0.35);
}

.bio-icons svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 800px) {
  .bio-blocks {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }

  .bio-icons {
    max-width: 720px;
    margin-inline: auto;
    font-size: 1rem;
  }
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 2.5rem;
}

.contact-name {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin: 1.5rem 0 0.25rem;
}

.contact-phone {
  font-size: 1.6rem;
  font-weight: 600;
  text-decoration: none;
}

.contact-area {
  color: var(--muted);
}

.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: #fdfcf8;
  border: 1px solid #c9c2ad;
  border-radius: 6px;
  padding: 0.65rem 0.75rem;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--green);
  outline: 2px solid rgba(63, 90, 52, 0.25);
  outline-offset: 0;
}

.field textarea {
  resize: vertical;
  min-height: 8rem;
}

.form-status {
  margin: 1rem 0 0;
  font-weight: 600;
}

.form-status:empty {
  display: none;
}

.form-status.is-success {
  color: var(--green);
}

.form-status.is-error {
  color: #9a3b26;
}

.form-note {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

@media (min-width: 800px) {
  .contact-grid {
    grid-template-columns: 1fr 1.1fr;
    gap: 4rem;
    align-items: start;
  }

  .contact-form {
    padding: 2rem;
  }
}

/* Footer */
.site-footer {
  background: var(--green);
  color: #e8eee0;
  padding: 2rem 0;
  font-size: 0.9rem;
}

.site-footer a,
.site-footer .brand {
  color: #fff;
}

.footer-grid {
  display: grid;
  gap: 0.75rem;
}

.footer-grid p {
  margin: 0;
}

@media (min-width: 800px) {
  .footer-grid {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
  }
}

/* Lightbox */
.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(92vw, 1400px);
  max-height: 92vh;
}

.lightbox::backdrop {
  background: rgba(20, 26, 18, 0.85);
}

.lightbox img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: var(--radius);
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

/* Legal page */
.legal {
  padding: 3rem 0 4rem;
}

.legal .container {
  max-width: 760px;
}

.legal h2 {
  font-size: 1.4rem;
  margin-top: 2rem;
}

.legal dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 1.25rem;
}

.legal dt {
  font-weight: 600;
}

.legal dd {
  margin: 0;
}

.todo {
  background: #fbe9b7;
  padding: 0 0.3em;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

.site-footer .brand img {
  outline: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 7px;
}
