:root {
  --bg: #f4f5ef;
  --bg-2: #e8ebe1;
  --text: #1c261e;
  --muted: #4f5c52;
  --green: #1f4d2e;
  --green-ink: #163a22;
  --on-green: #f4f5ef;
  --line: #cfd5c8;
  --radius: 12px;
  --pad: clamp(1rem, 4vw, 3rem);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121a14;
    --bg-2: #18231b;
    --text: #e8ece4;
    --muted: #a7b2a9;
    --green: #6fb086;
    --green-ink: #8ac79f;
    --on-green: #0f1a12;
    --line: #2a3a2e;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 650; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.25em; }
p { margin: 0 0 1em; max-width: 60ch; }
a { color: var(--green-ink); }

section { padding: clamp(3.5rem, 9vw, 7rem) var(--pad); max-width: 1200px; margin: 0 auto; }

/* nav */
.nav {
  position: absolute; inset: 0 0 auto 0; z-index: 2;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 1rem;
  padding: 1.25rem var(--pad);
  color: #fff;
}
.nav a { color: inherit; text-decoration: none; }
.wordmark { font-weight: 650; letter-spacing: -0.01em; font-size: 1.1rem; white-space: nowrap; }
.nav nav { display: flex; gap: 1.5rem; font-size: 0.95rem; }
.nav nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* hero */
.hero {
  position: relative; max-width: none; margin: 0;
  min-height: 100dvh; display: grid; align-items: end;
  padding: 0;
  color: #fff;
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-bg { animation: drift 24s ease-in-out infinite alternate; }
  @keyframes drift { from { transform: scale(1); } to { transform: scale(1.08); } }
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgb(10 20 12 / .85) 0%, rgb(10 20 12 / .35) 55%, rgb(10 20 12 / .25) 100%);
}
.hero-text {
  width: 100%; max-width: 1200px; margin: 0 auto;
  padding: 0 var(--pad) clamp(3rem, 8vw, 6rem);
}
.hero-text h1 { max-width: 14ch; }
.hero-text p { font-size: clamp(1.05rem, 1.6vw, 1.3rem); max-width: 40ch; margin-bottom: 1.75rem; color: rgb(255 255 255 / .88); }

.button {
  display: inline-block;
  background: var(--bg); color: var(--green-ink);
  padding: 0.85rem 1.6rem; border-radius: var(--radius);
  font-weight: 600; text-decoration: none;
  transition: transform .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: scale(.98); }

/* about */
.about p { font-size: clamp(1.05rem, 1.6vw, 1.25rem); }

/* produce */
.produce { max-width: none; background: var(--bg-2); }
.produce > * { max-width: calc(1200px - 2 * var(--pad)); margin-left: auto; margin-right: auto; }
.tiles {
  display: grid; gap: 1rem;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-rows: 260px 260px;
}
.produce > p { color: var(--muted); margin-bottom: 1.5rem; }
.tile {
  margin: 0; padding: 0; border: 0; position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--line); cursor: pointer; font: inherit; text-align: left; color: #fff;
}
.tile:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.tile-large { grid-row: span 2; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile:hover img { transform: scale(1.04); }
.tile span {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2.5rem 1rem 0.9rem; color: #fff; font-weight: 600; font-size: 1.1rem;
  background: linear-gradient(to top, rgb(10 20 12 / .75), transparent);
}

/* process */
.process { display: grid; grid-template-columns: 2fr 3fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.process video { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; height: auto; }
.process ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; counter-reset: step; }
.process li { padding-left: 2.75rem; position: relative; }
.process li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0.1rem;
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--green); color: var(--on-green); font-size: 0.9rem; font-weight: 600;
}
.process li p { color: var(--muted); }

/* lightbox */
.lightbox {
  border: 0; padding: 0; border-radius: var(--radius); overflow: hidden;
  background: var(--bg); color: var(--text);
  width: min(960px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem);
  display: none; grid-template-columns: 1fr 1fr;
}
.lightbox[open] { display: grid; }
.lightbox::backdrop { background: rgb(10 20 12 / .7); }
.lightbox img, .lightbox video { width: 100%; height: 100%; object-fit: cover; max-height: calc(100dvh - 2rem); }
.lightbox [hidden] { display: none; }
.lightbox-text { padding: clamp(1.5rem, 4vw, 3rem); display: grid; align-content: center; gap: 0.5rem; }
.lightbox-text h3 { font-size: 1.6rem; }
.lightbox-text p { color: var(--muted); }
.lightbox .button { background: var(--green); color: var(--on-green); justify-self: start; }
.close {
  position: absolute; top: 0.5rem; right: 0.5rem; z-index: 1;
  width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%;
  background: var(--bg); color: var(--text); font-size: 1.5rem; line-height: 1; cursor: pointer;
}

/* contact */
.contact { text-align: left; border-top: 1px solid var(--line); }
.contact p { color: var(--muted); font-size: 1.1rem; }
.email { font-size: clamp(1.3rem, 3.5vw, 2.2rem); font-weight: 600; text-decoration: none; letter-spacing: -0.01em; }
.email:hover { text-decoration: underline; text-underline-offset: 6px; }

footer {
  max-width: 1200px; margin: 0 auto;
  padding: 2rem var(--pad) 3rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem 2rem;
  color: var(--muted); font-size: 0.9rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 760px) {
  .nav nav { gap: 1rem; font-size: 0.9rem; }
  .tiles { grid-template-columns: 1fr 1fr; grid-template-rows: 220px 220px 220px; }
  .tile-large { grid-row: span 2; }
  .tiles .tile:nth-child(5) { grid-column: 1 / 3; }
  .process { grid-template-columns: 1fr; }
  .process video { aspect-ratio: 16 / 10; }
  .lightbox { grid-template-columns: 1fr; overflow-y: auto; }
  .lightbox img, .lightbox video { max-height: 45dvh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .tile img { transition: none; }
}
