:root {
  color-scheme: light;
  --ink: #17201b;
  --muted: #5b655f;
  --line: #d8ddd8;
  --paper: #f7f6f1;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-dark: #0b4f4a;
  --warm: #b7791f;
  --dark: #1f2a24;
  --shadow: 0 18px 42px rgba(23, 32, 27, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

a {
  color: inherit;
}

.hero {
  position: relative;
  min-height: 82svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
  background: var(--dark);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(20, 28, 24, 0.86), rgba(20, 28, 24, 0.48) 48%, rgba(20, 28, 24, 0.1));
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

.hero-copy {
  width: min(720px, 90vw);
  padding: 0 0 13vh 5vw;
  color: #fffaf0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--warm);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.2rem, 7vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero p:not(.eyebrow) {
  max-width: 620px;
  margin: 22px 0 0;
  font-size: clamp(1.06rem, 2vw, 1.42rem);
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  background: var(--accent);
  color: #fff;
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.58);
  color: #fff;
}

.button.outline {
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
}

.button.outline.inverse {
  border-color: rgba(255, 255, 255, 0.58);
  color: #fff;
}

.contact-band .button.secondary,
.case-link {
  border-color: var(--line);
  color: var(--ink);
}

.section {
  padding: 72px 5vw;
}

.section-heading {
  max-width: 900px;
  margin-bottom: 28px;
}

.split-heading {
  max-width: none;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section h2,
.contact-band h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.case-list {
  display: grid;
  gap: 28px;
}

.case-card {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.35fr);
  gap: 28px;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.case-copy h3 {
  margin: 0 0 14px;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  line-height: 1.1;
}

.case-copy p {
  margin: 0 0 14px;
  color: var(--muted);
}

.capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.capabilities span,
.filters button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8faf8;
  color: var(--muted);
  padding: 7px 11px;
  font-size: 0.85rem;
  font-weight: 750;
}

.case-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-self: stretch;
}

.case-photos button,
.gallery button,
.gallery-job-grid button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #d8ddd8;
  cursor: zoom-in;
}

.case-photos img,
.gallery img,
.gallery-job-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  transition: transform 180ms ease;
}

.case-photos button:hover img,
.gallery button:hover img,
.gallery-job-grid button:hover img {
  transform: scale(1.04);
}

.gallery-section {
  background: #eef2ef;
}

.page-hero {
  position: relative;
  min-height: 46svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
  background: var(--dark);
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(20, 28, 24, 0.86), rgba(20, 28, 24, 0.34));
}

.page-hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-position: center;
  background-size: cover;
}

.page-hero-copy {
  width: min(760px, 90vw);
  padding: 0 0 56px 5vw;
  color: #fffaf0;
}

.page-hero h1 {
  margin: 0 0 24px;
  font-size: clamp(2.8rem, 6vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.filters button {
  cursor: pointer;
}

.filters button.active {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.gallery figure {
  margin: 0;
}

.gallery figcaption {
  padding-top: 7px;
  color: var(--muted);
  font-size: 0.85rem;
}

.gallery-job-list {
  display: grid;
  gap: 46px;
}

.gallery-job {
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.gallery-job:first-child {
  border-top: 0;
  padding-top: 0;
}

.gallery-job-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
  margin-bottom: 16px;
}

.gallery-job-header h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.1;
}

.gallery-job-header span {
  color: var(--muted);
  font-weight: 800;
}

.gallery-job-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.gallery-job-grid figure {
  margin: 0;
}

.gallery-job-grid figcaption {
  padding-top: 7px;
  color: var(--muted);
  font-size: 0.82rem;
}

.contact-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 70px 5vw;
  background: var(--dark);
  color: #fffaf0;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(12, 18, 15, 0.9);
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-height: 82svh;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.lightbox p {
  position: absolute;
  left: 28px;
  bottom: 18px;
  right: 28px;
  color: #fffaf0;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

@media (max-width: 900px) {
  .hero {
    min-height: 680px;
  }

  .hero-copy {
    padding: 0 5vw 70px;
  }

  .case-card,
  .contact-band {
    grid-template-columns: 1fr;
  }

  .gallery-job-header {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .split-heading {
    align-items: start;
    flex-direction: column;
  }

  .case-card {
    padding: 18px;
  }
}

@media (max-width: 620px) {
  .case-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .button {
    width: 100%;
  }
}
