:root {
  --brand: #7bd062;
  --brand-dark: #54a940;
  --ink: #242825;
  --muted: #747974;
  --paper: #eeeeec;
  --white: #fafbf9;
  --line: rgba(36, 40, 37, .16);
  --max: 1240px;
  --pad: clamp(1.25rem, 4vw, 4rem);
}

* { box-sizing: border-box; }

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

main,
section,
.hero-copy,
.hero-mark,
.section-heading > *,
.contact-grid > * {
  min-width: 0;
}

@supports (overflow: clip) {
  html,
  body { overflow-x: clip; }
}

.scroll-progress {
  position: fixed;
  z-index: 48;
  top: 50%;
  right: 16px;
  width: 2px;
  height: 112px;
  background: rgba(36, 40, 37, .15);
  transform: translateY(-50%);
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: var(--scroll, 0%);
  background: var(--brand);
  box-shadow: 0 0 12px rgba(123, 208, 98, .7);
}

body.menu-open { overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: .75rem;
  left: .75rem;
  padding: .75rem 1rem;
  background: var(--ink);
  color: white;
  transform: translateY(-150%);
}

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

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 0 var(--pad);
  border-bottom: 1px solid transparent;
  transition: background-color .25s ease, border-color .25s ease;
}

.site-header.is-scrolled {
  background: rgba(238, 238, 236, .9);
  border-color: var(--line);
  backdrop-filter: blur(16px);
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .09em;
  font-size: .72rem;
  font-weight: 700;
}

.brand img { width: 29px; height: 29px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.site-nav a {
  position: relative;
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: .7rem;
  font-weight: 700;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: -.45rem;
  left: 0;
  height: 2px;
  background: var(--brand);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .2s ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
}

.menu-toggle > span:not(.sr-only) {
  display: block;
  width: 24px;
  height: 2px;
  margin: 6px auto;
  background: var(--ink);
  transition: transform .2s ease;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 7rem);
  max-width: var(--max);
  margin: 0 auto;
  padding: 8rem var(--pad) 5rem;
  overflow: hidden;
  --spot-x: 70%;
  --spot-y: 45%;
}

.hero::before {
  position: absolute;
  top: 18%;
  bottom: 11%;
  left: calc(62% + 1rem);
  width: 1px;
  background: var(--line);
  content: "";
}

.hero::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: radial-gradient(circle 310px at var(--spot-x) var(--spot-y), rgba(123, 208, 98, .15), transparent 70%);
  content: "";
  pointer-events: none;
}

.hero-field {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .72;
  pointer-events: none;
}

.hero > *:not(.hero-field) { z-index: 1; }

.eyebrow,
.section-number {
  margin: 0 0 2rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .17em;
  font-size: .68rem;
  font-weight: 750;
}

.eyebrow { display: flex; align-items: center; gap: .8rem; }
.eyebrow span { width: 36px; height: 2px; background: var(--brand); }

.hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(3.6rem, 8.2vw, 8.2rem);
  font-weight: 520;
  line-height: .84;
  letter-spacing: -.068em;
}

.hero-lead {
  max-width: 620px;
  margin: clamp(2rem, 5vh, 3.5rem) 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.28rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  min-height: 52px;
  padding: 0 1.35rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .68rem;
  font-weight: 750;
  transition: transform .2s ease, background-color .2s ease, color .2s ease;
}

.button:hover { transform: translateY(-3px); }
.button-primary { background: var(--ink); color: white; }
.button-primary:hover { background: var(--brand); color: var(--ink); }
.button-quiet { border-color: transparent; }

.hero-mark {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 420px;
}

.mark-disc {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(260px, 28vw, 410px);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  --mark-x: 0deg;
  --mark-y: 0deg;
  transform: perspective(900px) rotateX(var(--mark-y)) rotateY(var(--mark-x));
  transform-style: preserve-3d;
  transition: transform .18s ease-out;
  will-change: transform;
}

.mark-disc::before,
.mark-disc::after {
  position: absolute;
  border-radius: inherit;
  content: "";
}

.mark-disc::before { inset: 8%; border: 1px dashed rgba(36, 40, 37, .22); animation: mark-spin 18s linear infinite; }
.mark-disc::after { width: 12px; height: 12px; top: 14%; right: 16%; background: var(--brand); }
.mark-disc img { width: 42%; filter: drop-shadow(0 16px 34px rgba(83, 133, 70, .12)); transform: translateZ(54px); }

.hero-mark > p {
  width: 100%;
  margin: 2rem 0 0;
  color: var(--ink);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .64rem;
  line-height: 1.8;
  font-weight: 700;
}

.hero-mark > p span { color: var(--muted); }

.hero-index {
  position: absolute;
  right: var(--pad);
  bottom: 2rem;
  left: var(--pad);
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--muted);
  font-size: .62rem;
}

.hero-index div { flex: 1; height: 1px; background: var(--line); }

.section { padding: clamp(5rem, 10vw, 10rem) var(--pad); }

.section-heading,
.project-grid,
.about,
.contact,
.site-footer {
  max-width: var(--max);
  margin-inline: auto;
}

.work { background: var(--ink); color: white; }

.section-heading {
  display: grid;
  grid-template-columns: .65fr 1.35fr .75fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
  margin-bottom: clamp(4rem, 8vw, 7rem);
}

.work .section-number,
.work .section-heading > p:last-child { color: #aab0aa; }

.section-heading h2,
.about h2,
.contact h2 {
  margin: 0;
  font-size: clamp(2.8rem, 6.2vw, 6rem);
  font-weight: 500;
  line-height: .96;
  letter-spacing: -.055em;
}

h2 em {
  color: var(--brand);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.section-heading > p:last-child {
  margin: 0;
  line-height: 1.75;
}

.project-grid {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: clamp(3rem, 7vw, 7rem) clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}

.project-card-large { grid-row: span 2; }
.project-card:nth-child(3) { align-self: end; }

.project-card {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --glare-x: 50%;
  --glare-y: 50%;
  transform-style: preserve-3d;
  will-change: transform;
}

.project-card.reveal.is-visible {
  transform: perspective(1300px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition: opacity .7s ease, transform .22s ease-out;
}

.project-image {
  position: relative;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #151815;
  cursor: zoom-in;
  transform: translateZ(14px);
}

.project-image::after {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 260px at var(--glare-x) var(--glare-y), rgba(255, 255, 255, .24), transparent 68%);
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.project-card:hover .project-image::after { opacity: 1; }

.project-card-large .project-image { aspect-ratio: 4 / 4.5; }
.project-card:not(.project-card-large) .project-image { aspect-ratio: 4 / 3; }

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: saturate(.8);
  transition: transform .65s cubic-bezier(.2, .7, .2, 1), filter .35s ease;
}

.project-image:hover img,
.project-image:focus-visible img { transform: scale(1.035); filter: saturate(1); }

.project-open {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--ink);
  font-size: 1.15rem;
  transition: transform .25s ease;
}

.project-image:hover .project-open { transform: rotate(8deg) scale(1.06); }

.project-meta {
  display: grid;
  grid-template-columns: .55fr 1.45fr;
  gap: 1rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(255, 255, 255, .18);
  transform: translateZ(5px);
}

.project-meta p {
  margin: .35rem 0 0;
  color: #aab0aa;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .61rem;
}

.project-meta h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 2.25rem);
  line-height: 1.1;
  font-weight: 520;
  letter-spacing: -.03em;
}

.about {
  position: relative;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(3rem, 8vw, 9rem);
  min-height: 700px;
  align-items: center;
  overflow: hidden;
}

.about-copy {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.about-copy p { color: var(--muted); }
.about-copy .about-lead { margin: 0; color: var(--ink); font-size: clamp(1.5rem, 3vw, 2.7rem); line-height: 1.28; letter-spacing: -.025em; }
.about-copy p + p { margin-top: 1.5rem; }

.text-link {
  display: inline-flex;
  gap: 1.5rem;
  align-items: center;
  margin-top: 1rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--brand);
  text-decoration: none;
  font-weight: 700;
}

.about-watermark {
  position: absolute;
  right: -3vw;
  bottom: -26%;
  color: rgba(123, 208, 98, .12);
  font-size: min(38rem, 58vw);
  font-weight: 800;
  line-height: 1;
}

.contact {
  background: var(--white);
  border: 1px solid var(--line);
}

.contact-heading {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(3rem, 8vw, 9rem);
  align-items: start;
}

.contact-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(3rem, 8vw, 9rem);
  margin-top: clamp(4rem, 8vw, 7rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.contact-label {
  margin: 0 0 1.25rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: .64rem;
  font-weight: 750;
}

.contact address { color: var(--muted); font-style: normal; line-height: 1.8; }
.contact-grid > div:last-child { display: flex; flex-direction: column; align-items: flex-start; }
.contact-grid a { margin-bottom: .65rem; text-underline-offset: .25em; }

.contact-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: clamp(4rem, 8vw, 7rem);
  padding: 2rem 0 1.25rem;
  border-top: 1px solid var(--ink);
  text-decoration: none;
  font-size: clamp(1.8rem, 5vw, 4.75rem);
  line-height: 1;
  letter-spacing: -.04em;
  transition: color .2s ease;
}

.contact-cta:hover { color: var(--brand-dark); }

.contact-cta span:last-child { color: var(--brand-dark); }

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem var(--pad);
  color: var(--muted);
  font-size: .72rem;
}

.site-footer p { margin: 0; }
.site-footer > a { justify-self: end; text-underline-offset: .25em; }

.project-dialog {
  width: min(1100px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  overflow: auto;
  border: 0;
  background: var(--ink);
  color: white;
}

.project-dialog::backdrop { background: rgba(15, 18, 15, .82); backdrop-filter: blur(8px); }
.project-dialog figure { margin: 0; }
.project-dialog img { width: 100%; max-height: 78vh; object-fit: contain; background: #111; }
.project-dialog figcaption { padding: 1.25rem 1.5rem 1.5rem; font-size: 1.25rem; }

.dialog-close {
  position: sticky;
  z-index: 2;
  top: .75rem;
  left: calc(100% - 7rem);
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: -3.4rem;
  padding: .65rem .8rem;
  border: 0;
  background: var(--brand);
  color: var(--ink);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .65rem;
  font-weight: 750;
}

.dialog-close span { font-size: 1.2rem; line-height: 1; }

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
}

.reveal.is-visible { opacity: 1; transform: none; }

@keyframes mark-spin {
  to { transform: rotate(360deg); }
}

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

@media (max-width: 900px) {
  .scroll-progress { display: none; }
  .menu-toggle { display: block; position: relative; z-index: 55; }

  .site-nav {
    position: fixed;
    z-index: 54;
    inset: 0;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 1.8rem;
    background: var(--paper);
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.2, .7, .2, 1);
  }

  .site-nav a { font-size: clamp(2rem, 8vw, 4rem); letter-spacing: -.03em; text-transform: none; }
  .menu-open .site-nav { transform: none; }
  .menu-open .menu-toggle > span:nth-child(2) { transform: translateY(4px) rotate(45deg); }
  .menu-open .menu-toggle > span:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }

  .hero { grid-template-columns: 1fr; padding-top: 9rem; }
  .hero::before { display: none; }
  .hero-mark { min-height: auto; margin-top: 1rem; }
  .mark-disc { width: min(72vw, 360px); }
  .hero-index { display: none; }

  .section-heading { grid-template-columns: 1fr; }
  .section-heading > p:last-child { max-width: 560px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card-large { grid-row: auto; }
  .project-card-large .project-image { aspect-ratio: 4 / 3; }

  .about,
  .contact-heading,
  .contact-grid { grid-template-columns: 1fr; }

  .about { min-height: auto; padding-block: 7rem; }
  .contact { border-right: 0; border-left: 0; }
  .site-footer { grid-template-columns: 1fr auto; }
  .site-footer p { display: none; }
}

@media (max-width: 560px) {
  :root { --pad: clamp(1rem, 5vw, 1.25rem); }

  .site-header {
    min-height: 68px;
    padding-right: max(var(--pad), env(safe-area-inset-right));
    padding-left: max(var(--pad), env(safe-area-inset-left));
  }

  .brand span { max-width: 150px; line-height: 1.2; }
  .hero {
    width: 100%;
    min-height: auto;
    padding-right: max(var(--pad), env(safe-area-inset-right));
    padding-bottom: 6rem;
    padding-left: max(var(--pad), env(safe-area-inset-left));
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(2.35rem, 11.8vw, 3.05rem);
    line-height: .9;
    letter-spacing: -.06em;
  }

  .hero-lead { font-size: .98rem; }
  .button { width: 100%; }
  .button-quiet { width: auto; }
  .project-meta { grid-template-columns: 1fr; }
  .project-meta p { margin: 0; }
  .contact-grid a { max-width: 100%; overflow-wrap: anywhere; }
  .contact-cta { align-items: flex-end; gap: 1rem; font-size: clamp(1.65rem, 8vw, 2.2rem); }
  .site-footer {
    grid-template-columns: 1fr;
    padding-right: max(var(--pad), env(safe-area-inset-right));
    padding-left: max(var(--pad), env(safe-area-inset-left));
  }
  .site-footer > a { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-field { display: none; }
}
