/* Manrope (SIL Open Font License), variable weight, self-hosted */
@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope.woff2") format("woff2-variations"), url("fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #22423A;      /* dark sections */
  --green-2: #2E554B;    /* inputs and borders on dark */
  --green-line: #3F6559;
  --paper: #EEF1EE;      /* page background */
  --white: #FFFFFF;
  --text: #1B2220;
  --muted: #56605B;      /* secondary text on light */
  --muted-dark: #B9C9C1; /* secondary text on dark */
  --line: #D3D9D5;
  --sage: #A8C5A0;       /* accent: buttons and highlights on dark */
  --sage-hover: #BAD3B3;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid #4C8C74; outline-offset: 3px; border-radius: 2px; }
.dark :focus-visible { outline-color: var(--sage); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 { font-weight: 800; letter-spacing: -0.025em; line-height: 1.08; margin: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.95);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand img { height: 42px; width: auto; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a {
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 10px 14px; border-radius: 999px;
  transition: background-color .15s ease;
}
.nav a:hover { background: var(--paper); }
.nav a.cta { background: var(--green); color: var(--white); padding: 10px 18px; }
.nav a.cta:hover { background: var(--green-2); }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 700; font-size: 1rem;
  text-decoration: none; border: 0; cursor: pointer;
  background: var(--sage); color: var(--green);
  padding: 14px 24px; border-radius: 999px;
  transition: background-color .15s ease;
}
.button:hover { background: var(--sage-hover); }
.button.ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1.5px var(--green-line); }
.button.ghost:hover { background: var(--green-2); }

/* Hero */
.hero { background: var(--green); color: var(--white); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: min(76vh, 680px); }
.hero-copy {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(40px, 7vw, 96px) var(--gutter) clamp(40px, 6vw, 80px) max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
}
.hero h1 { font-size: clamp(2.2rem, 4.2vw, 3.6rem); max-width: 14ch; }
.hero p { max-width: 40ch; font-size: 1.15rem; color: var(--muted-dark); margin: 24px 0 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-media { position: relative; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 60%; }

/* Sections */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: end; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
.section-head p { margin: 0; color: var(--muted); max-width: 52ch; }

/* About */
.about { background: var(--white); }
.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.about-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 65% 30%; border-radius: 8px; }
.about h2 { font-size: clamp(2rem, 3.6vw, 3rem); margin-bottom: 24px; }
.about p { max-width: 58ch; margin: 0 0 16px; }
.facts { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 28px; }
.facts li { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.facts svg { flex: none; }
.facts circle { fill: var(--sage); }
.facts path { stroke: var(--green); }

/* Services */
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 64px); border-top: 2px solid var(--text); }
.services li { padding: 22px 0; border-bottom: 1px solid var(--line); }
.services h3 { font-size: 1.3rem; letter-spacing: -0.015em; }
.services p { margin: 6px 0 0; color: var(--muted); }
.services li.full { grid-column: 1 / -1; }

/* Before and after */
.projects-section { padding-top: 0; }
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 3vw, 40px) clamp(16px, 2.4vw, 32px); }
.project.wide { grid-column: 1 / -1; }
.project figure { margin: 0; }
.stack { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; background: var(--line); }
.project.wide .stack { aspect-ratio: 16 / 9; }
.stack img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .45s ease; }
.stack img.before { opacity: 0; }
.project[data-show="before"] .stack img.before { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .stack img { transition: none; } }
.project-meta { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.project-meta h3 { font-size: 1.1rem; letter-spacing: -0.01em; }
.project-meta p { margin: 2px 0 0; color: var(--muted); font-size: 0.95rem; }
.toggle { display: inline-flex; background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.toggle button {
  font: inherit; font-size: 0.9rem; font-weight: 700; color: var(--muted);
  background: transparent; border: 0; border-radius: 999px; padding: 7px 16px; cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.toggle button[aria-pressed="true"] { background: var(--green); color: var(--white); }

/* Contact */
.contact { background: var(--green); color: var(--white); }
.contact .section-head p { color: var(--muted-dark); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(32px, 6vw, 88px); }
form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
label { font-weight: 600; font-size: 0.95rem; }
label .opt { font-weight: 400; color: var(--muted-dark); }
input, select, textarea {
  font: inherit; color: var(--white);
  background: var(--green-2); border: 1px solid var(--green-line); border-radius: 6px;
  padding: 13px 14px; width: 100%;
}
input::placeholder, textarea::placeholder { color: #9FB4AA; }
textarea { min-height: 150px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px rgba(168,197,160,.35); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #C9D6CF 50%), linear-gradient(135deg, #C9D6CF 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
select option { color: var(--text); background: var(--white); }
.form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form-status { margin: 0; color: var(--muted-dark); }
.form-status.error { color: #F4C1AE; }
.form-note { grid-column: 1 / -1; margin: 0; color: var(--muted-dark); font-size: 0.9rem; }
.form-note a { text-underline-offset: 3px; }
.hidden { position: absolute; left: -9999px; }
.sent { grid-column: 1 / -1; border: 1px solid var(--green-line); border-radius: 8px; padding: 28px; }
.sent h3 { margin: 0 0 8px; font-size: 1.5rem; }
.sent p { margin: 0; color: var(--muted-dark); }

.details { margin: 0; border-top: 1px solid var(--green-line); }
.details div { padding: 18px 0; border-bottom: 1px solid var(--green-line); }
.details dt { color: var(--muted-dark); font-size: 0.9rem; }
.details dd { margin: 4px 0 0; font-size: 1.15rem; font-weight: 700; }
.details a { text-decoration-color: var(--sage); text-underline-offset: 4px; overflow-wrap: anywhere; }

/* Footer */
footer { background: #182F29; color: var(--muted-dark); padding: 36px 0; font-size: 0.9rem; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px 32px; flex-wrap: wrap; }
footer img { height: 36px; width: auto; }
footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
footer a { color: var(--white); text-underline-offset: 3px; }

/* Privacy page */
.policy { background: var(--white); padding: clamp(48px, 8vw, 96px) 0; }
.policy .wrap { max-width: 760px; }
.policy h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 12px; }
.policy h2 { font-size: 1.3rem; letter-spacing: -0.015em; margin: 40px 0 10px; }
.policy p, .policy li { max-width: 66ch; }
.policy ul { padding-left: 1.2em; }
.policy .updated { color: var(--muted); margin: 0 0 32px; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .about-grid, .contact-grid, .section-head { grid-template-columns: 1fr; }
  .hero-media { order: -1; aspect-ratio: 16 / 10; }
  .hero-copy { padding: 36px var(--gutter) 48px; }
  .about-photo img { aspect-ratio: 1 / 1; max-height: 520px; }
  .services { grid-template-columns: 1fr; }
  .details { order: -1; }
}
@media (max-width: 640px) {
  .site-header .wrap { height: 64px; }
  html { scroll-padding-top: 68px; }
  .brand img { height: 32px; }
  .nav a { padding: 8px 10px; font-size: 0.875rem; }
  .nav a.cta { padding: 8px 14px; }
  .nav a.about-link { display: none; }
  .projects { grid-template-columns: 1fr; }
  .project.wide .stack { aspect-ratio: 4 / 3; }
  form { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .brand img { height: 26px; }
  .nav a.work-link { padding: 8px 6px; }
}
