:root {
  --plaster: #f5f2ed;
  --paper: #fbfaf7;
  --ink: #1c211e;
  --muted: #5b635d;
  --line: #e0dad0;
  --green: #4f8a2a;
  --green-ink: #3d6e1f;
  --green-soft: #e8f0dd;
  --deep: #1f2a24;
  --deep-2: #2a372f;
  --radius: 14px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 .5em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }

.eyebrow {
  font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--green-ink); margin-bottom: .9em;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.4em; border-radius: 999px; font: 600 .95rem/1 var(--sans);
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-ink); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
:focus-visible { outline: 2.5px solid var(--green); outline-offset: 3px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand img { height: 44px; width: auto; mix-blend-mode: multiply; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { text-decoration: none; font-size: .95rem; font-weight: 500; color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--ink); }
.nav .nav-cta { color: #fff; background: var(--ink); padding: .6em 1.15em; border-radius: 999px; }
.nav .nav-cta:hover { color: #fff; background: var(--green-ink); }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--ink); transition: transform .25s, top .25s; }
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px 16px 20px; display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; color: var(--ink); }
  .nav .nav-cta { margin-top: 14px; text-align: center; border: 0; }
}

/* Hero */
.hero { background: var(--plaster); padding: clamp(40px, 7vw, 96px) 0 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(2.8rem, 6.4vw, 5.2rem); font-weight: 400; margin-bottom: .35em; }
.hero h1 em { font-style: italic; color: var(--green-ink); }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 32em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-media { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3.2; box-shadow: 0 30px 60px -30px rgba(31, 42, 36, .35); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

.facts {
  list-style: none; margin: clamp(40px, 6vw, 72px) 0 0; padding: 28px 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  border-top: 1px solid var(--line);
}
.facts li { display: flex; flex-direction: column; }
.facts strong { font: 500 clamp(1.8rem, 3vw, 2.4rem)/1.1 var(--serif); }
.facts span { color: var(--muted); font-size: .92rem; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
}

/* Sections */
.section { padding: clamp(64px, 10vw, 128px) 0; }
.section-tint { background: var(--plaster); }
.section-dark { background: var(--deep); color: #e9ece6; }
.section-dark .eyebrow { color: #a9d37f; }
.section-dark p { color: #c3cbc4; }
.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head p:last-child { color: var(--muted); }

.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.split-reverse { grid-template-columns: 1.2fr .8fr; }
.split-media { margin: 0; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split-media.portrait { aspect-ratio: 3 / 4; max-width: 420px; justify-self: end; width: 100%; }
.split-copy p { color: var(--muted); }
.section-dark .split-copy p { color: #c3cbc4; }
@media (max-width: 860px) {
  .split, .split-reverse { grid-template-columns: 1fr; }
  .split-media.portrait { justify-self: start; max-width: 360px; }
}

.places { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.places li {
  font-size: .88rem; font-weight: 500; padding: .45em .95em;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper);
}
.places li:first-child { background: var(--green-soft); border-color: transparent; color: var(--green-ink); }

/* Systems */
.systems { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.system {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(24px, 3.5vw, 40px); display: flex; flex-direction: column; gap: 24px;
}
.system-top p { color: var(--muted); margin: 0; }
.tag {
  display: inline-block; font-size: .78rem; font-weight: 600; color: var(--green-ink);
  background: var(--green-soft); padding: .35em .8em; border-radius: 999px; margin-bottom: 16px;
}
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 28px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 16px; height: 9px;
  border-left: 2px solid var(--green); border-bottom: 2px solid var(--green);
  transform: rotate(-45deg) translate(2px, -4px);
}
.checks-light { margin: 0 0 32px; }
.checks-light li { color: #e1e6df; }
.checks-light li::before { border-color: #a9d37f; }
.small-h { font: 600 .95rem/1.4 var(--sans); margin: 28px 0 14px; color: #fff; letter-spacing: 0; }

.specs { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.specs div { padding: 14px 16px; border-right: 1px solid var(--line); }
.specs div:last-child { border-right: 0; }
.specs dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.specs dd { margin: 4px 0 0; font-weight: 600; font-size: .95rem; }
@media (max-width: 480px) {
  .specs { grid-template-columns: 1fr; }
  .specs div { border-right: 0; border-bottom: 1px solid var(--line); }
  .specs div:last-child { border-bottom: 0; }
}

.docs { margin-top: auto; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.docs-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; color: var(--muted); margin: 0 0 4px; }
.doc {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 10px; background: var(--plaster);
  text-decoration: none; font-weight: 500; font-size: .95rem; transition: background .2s;
}
.doc:hover { background: var(--green-soft); }
.doc span { font-size: .72rem; font-weight: 700; letter-spacing: .08em; color: var(--green-ink); border: 1px solid currentColor; padding: .2em .5em; border-radius: 5px; }
.ext { font-size: .9rem; color: var(--green-ink); font-weight: 500; margin-top: 4px; text-decoration: none; }
.ext:hover { text-decoration: underline; }
@media (max-width: 860px) { .systems { grid-template-columns: 1fr; } }

/* References */
.refs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.ref {
  appearance: none; border: 0; padding: 0; margin: 0; background: none; text-align: left;
  cursor: pointer; font: inherit; color: inherit;
}
.ref { display: block; width: 100%; }
.ref-img { display: block; position: relative; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: var(--plaster); }
.ref-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.ref:hover .ref-img img { transform: scale(1.04); }
.ref-count {
  position: absolute; right: 10px; bottom: 10px; font-size: .75rem; font-weight: 600;
  background: rgba(28, 33, 30, .75); color: #fff; padding: .3em .65em; border-radius: 999px;
}
.ref-name { display: block; margin-top: 12px; font-family: var(--serif); font-size: 1.2rem; font-weight: 500; }
.ref-place { display: block; color: var(--muted); font-size: .9rem; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.contact-info > p { color: var(--muted); }
.contact-list { margin: 32px 0 0; display: grid; gap: 20px; }
.contact-list dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; color: var(--muted); }
.contact-list dd { margin: 2px 0 0; font-size: 1.15rem; }
.contact-list a { text-decoration: none; }
.contact-list a:hover { color: var(--green-ink); }
.contact-form {
  background: var(--plaster); border-radius: var(--radius); padding: clamp(24px, 3.5vw, 40px);
  display: grid; gap: 18px;
}
.field label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.field.invalid input, .field.invalid textarea { border-color: #b3261e; }
.contact-form .btn { justify-self: start; }
.form-note { margin: 0; font-size: .9rem; color: var(--muted); min-height: 1.4em; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: var(--deep); color: #c3cbc4; padding: 56px 0 28px; font-size: .95rem; }
.site-footer strong { color: #fff; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 24px; }
.footer-places { color: #a9d37f; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--deep-2); font-size: .85rem; color: #8b958d; }
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; } }

/* Lightbox */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(15, 19, 17, .94); color: #fff;
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: transparent; }
.lightbox figure { margin: 0; max-width: min(1000px, 86vw); text-align: center; }
.lightbox img { width: 100%; max-height: 76vh; object-fit: contain; border-radius: 8px; image-rendering: auto; }
.lightbox figcaption { margin-top: 14px; font-size: .95rem; color: #c3cbc4; }
.lb-close, .lb-nav {
  position: absolute; background: rgba(255, 255, 255, .1); color: #fff; border: 0; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.8rem; line-height: 1;
  display: grid; place-items: center; transition: background .2s;
}
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .22); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
  .lb-prev, .lb-next { top: auto; bottom: 20px; transform: none; }
  .lightbox figure { max-width: calc(100vw - 32px); }
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .ref-img img { transition: none; }
}

/* Single system layout */
.system-wide { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.system-main p { color: var(--muted); margin: 0 0 24px; }
.system-wide .docs { margin-top: 0; padding-top: 0; border-top: 0; }
@media (max-width: 860px) {
  .system-wide { grid-template-columns: 1fr; }
  .system-wide .docs { padding-top: 24px; border-top: 1px solid var(--line); }
}
