@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Variable.ttf") format("truetype");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Italic-Variable.ttf") format("truetype");
  font-weight: 100 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --green: #2bb812;
  --green-ink: #187a0a;
  --ink: #1c1c1c;
  --text: #333333;
  --muted: #5c5c5c;
  --line: #e4e4e0;
  --bg: #ffffff;
  --bg-soft: #f6f6f3;
  --max: 1200px;
  --header: 5.25rem;
  --radius: 6px;
  --font-body: "JetBrains Mono", ui-monospace, "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;
  --font-heading: "JetBrains Mono", ui-monospace, "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--ink);
  text-decoration-color: var(--green);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

h1,
h2,
h3,
.serif {
  font-family: var(--font-heading);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2.15rem, 5vw, 3.35rem);
  margin: 0 0 1rem;
  font-weight: 600;
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.05rem);
  margin: 0 0 0.85rem;
}

h3 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 0.8rem;
  z-index: 100;
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
  color: #fff;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header::before {
  content: "";
  display: block;
  height: 3px;
  background: var(--green);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  display: block;
  flex: 0 0 auto;
  text-decoration: none;
}

.logo img {
  width: 380px;
  height: auto;
}

.nav-toggle {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--ink);
  position: relative;
  margin: 0 auto;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem;
}

.site-nav a {
  display: block;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--bg-soft);
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--green);
  border-radius: var(--radius) var(--radius) 0 0;
}

/* Layout */

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  min-height: 60vh;
}

.section {
  padding: 4.25rem 0;
}

.section-alt {
  background: var(--bg-soft);
}

.eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.7rem;
}

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 38rem;
}

/* Hero */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 5.5rem 0 4.5rem;
  --hero-crossfade: 1.4s;
}

.hero-media {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #0b0f0c;
}

.hero.has-montage .hero-media {
  display: block;
}

.hero-clip {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--hero-crossfade) ease-in-out;
  pointer-events: none;
}

.hero-clip.is-active {
  opacity: 1;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 12, 10, 0.82) 0%, rgba(8, 12, 10, 0.55) 48%, rgba(8, 12, 10, 0.35) 100%),
    linear-gradient(180deg, rgba(8, 12, 10, 0.35) 0%, rgba(8, 12, 10, 0.55) 100%);
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero .lede {
  font-size: 1.25rem;
  color: var(--text);
  margin-bottom: 1.6rem;
}

.hero.has-montage {
  color: #f2f4f1;
}

.hero.has-montage h1,
.hero.has-montage .eyebrow,
.hero.has-montage .lede,
.hero.has-montage .hero-meta {
  color: #f2f4f1;
}

.hero.has-montage .eyebrow {
  color: rgba(242, 244, 241, 0.78);
}

.hero.has-montage .lede,
.hero.has-montage .hero-meta {
  color: rgba(242, 244, 241, 0.9);
}

.hero.has-montage .btn-primary {
  background: #fff;
  color: var(--ink);
}

.hero.has-montage .btn-primary:hover {
  background: #f2f4f1;
  color: var(--ink);
}

.hero.has-montage .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

.hero.has-montage .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  color: var(--muted);
  font-size: 0.98rem;
  margin-bottom: 2rem;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-meta span::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  background: var(--green);
  border-radius: 1px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
}

.btn-primary:hover {
  background: #000;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: #cfcfc9;
}

.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: #fff;
}

/* Capability grid */

.grid {
  display: grid;
  gap: 1rem;
}

.grid-5,
.grid-services,
.grid-3,
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.35rem 1.3rem 1.4rem;
}

.card h3 {
  margin-top: 0;
}

.card p {
  color: var(--muted);
  font-size: 0.98rem;
}

.capability {
  position: relative;
  padding-top: 1.5rem;
}

.capability::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 2rem;
  height: 3px;
  background: var(--green);
}

.note {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Work cards */

.work-list {
  display: grid;
  gap: 1.25rem;
}

.work-card {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1.4rem;
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.4rem;
}

.work-card.no-media {
  grid-template-columns: 1fr;
}

.work-media {
  width: 8.5rem;
  min-height: 5.2rem;
  background: var(--bg-soft);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-card h3 {
  margin-bottom: 0.35rem;
}

.work-card p {
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.7rem 0 0.85rem;
}

.tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  background: var(--bg-soft);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.2rem;
  font-size: 0.95rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.facts {
  list-style: none;
  margin: 0;
  padding: 0;
}

.facts li {
  border-top: 1px solid var(--line);
  padding: 0.85rem 0;
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
}

.facts li:last-child {
  border-bottom: 1px solid var(--line);
}

.facts dt,
.facts .label {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.9rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.4rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--ink);
}

.page-title {
  padding: 3.5rem 0 0.5rem;
}

.page-title .lede {
  margin-top: 0.4rem;
}

/* Responsive */

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

  .grid-services {
    grid-template-columns: repeat(12, 1fr);
  }

  .grid-services > * {
    grid-column: span 3;
  }

  .grid-services > :nth-child(n+5) {
    grid-column: span 4;
  }
}

@media (max-width: 760px) {
  .logo img {
    width: 260px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.5rem 1rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
  }

  .site-nav a[aria-current="page"] {
    box-shadow: none;
    border-left: 3px solid var(--green);
    border-radius: var(--radius);
  }

  .hero {
    padding: 3rem 0 2.8rem;
  }

  .section {
    padding: 3rem 0;
  }

  .split,
  .work-card,
  .grid-2,
  .grid-3,
  .grid-5,
  .grid-services {
    grid-template-columns: 1fr;
  }


  .facts li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

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

  .hero-clip {
    transition: none;
  }

  .hero.has-montage .hero-clip:not(.is-active) {
    display: none;
  }
}
