:root {
  --ink: #18201d;
  --muted-ink: #5f6964;
  --paper: #fbfaf7;
  --soft: #f1eee8;
  --line: rgba(24, 32, 29, 0.12);
  --brand: #2c6f67;
  --brand-dark: #17443f;
  --accent: #b35b3f;
  --white: #fff;
  --shadow: 0 20px 60px rgba(18, 28, 25, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
  line-height: 1.6;
}

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

a {
  color: inherit;
}

code {
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  padding: 0.1rem 0.35rem;
}

.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;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 72px;
  padding: 0 5vw;
  color: var(--white);
  transition: background 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(251, 250, 247, 0.94);
  color: var(--ink);
  box-shadow: 0 8px 26px rgba(14, 22, 20, 0.08);
  backdrop-filter: blur(14px);
}

.brand {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.site-nav a {
  position: relative;
  text-decoration: none;
  opacity: 0.86;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  opacity: 1;
}

.site-nav a[aria-current="page"]::after {
  position: absolute;
  right: 0;
  bottom: -0.45rem;
  left: 0;
  height: 2px;
  background: currentColor;
  content: "";
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: transparent;
  color: inherit;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.hero,
.page-hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  overflow: hidden;
  color: var(--white);
}

.page-hero {
  min-height: 72vh;
}

.hero-media,
.hero-scrim {
  position: absolute;
  inset: 0;
}

.hero-media {
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

.home-hero .hero-media {
  background-position: center 42%;
}

.hero-scrim {
  background:
    linear-gradient(90deg, rgba(12, 18, 17, 0.72), rgba(12, 18, 17, 0.26) 54%, rgba(12, 18, 17, 0.48)),
    linear-gradient(0deg, rgba(12, 18, 17, 0.62), rgba(12, 18, 17, 0.08) 42%);
}

.hero-content,
.page-hero-content {
  position: relative;
  z-index: 1;
  align-self: center;
  width: min(760px, 90vw);
  margin: 0 5vw;
  padding-top: 72px;
}

.page-hero-content {
  width: min(860px, 90vw);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--brand);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 1rem;
  font-size: clamp(3rem, 9vw, 7.4rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.page-hero h1 {
  font-size: clamp(2.5rem, 7vw, 5.8rem);
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4.6vw, 4rem);
  line-height: 1.03;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.55rem;
  font-size: 1.35rem;
  line-height: 1.2;
}

.hero-copy,
.page-hero-content p,
.lead {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.lead {
  color: var(--muted-ink);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button,
.text-link,
.card-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.button {
  padding: 0.8rem 1.15rem;
}

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

.button.ghost {
  border: 1px solid rgba(255, 255, 255, 0.48);
  color: var(--white);
}

.text-link {
  color: var(--brand-dark);
}

.text-link::after,
.card-actions a::after {
  margin-left: 0.45rem;
  content: "->";
}

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  z-index: 2;
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  transform: translateX(-50%);
}

.scroll-cue::after {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  border-radius: 999px;
  background: var(--white);
  transform: translateX(-50%);
  content: "";
}

.section {
  padding: clamp(4rem, 8vw, 7rem) 5vw;
}

.muted,
.intro-band {
  background: var(--soft);
}

.section-inner {
  width: min(1160px, 100%);
  margin: 0 auto;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: start;
}

.feature-row {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.feature-row.reverse {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.95fr);
}

.feature-row.reverse .feature-image {
  order: 2;
}

.feature-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  box-shadow: var(--shadow);
  object-fit: cover;
}

.feature-copy p {
  color: var(--muted-ink);
  font-size: 1.05rem;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 1.2fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 2rem;
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.filter-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.filter-button.is-active {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--white);
}

.gallery-status {
  color: var(--muted-ink);
}

.gallery-grid {
  column-count: 3;
  column-gap: 1rem;
}

.gallery-item {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 1rem;
  border: 0;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  background: #ddd;
  box-shadow: 0 10px 30px rgba(18, 28, 25, 0.08);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  transition: transform 220ms ease, filter 220ms ease;
}

.gallery-item:hover img {
  filter: brightness(0.82);
  transform: scale(1.03);
}

.gallery-item span {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 2.2rem 0.9rem 0.8rem;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), transparent);
  color: var(--white);
  font-weight: 800;
  text-align: left;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  grid-template-rows: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 2rem;
  background: rgba(5, 8, 8, 0.92);
  color: var(--white);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  grid-column: 2;
  justify-self: center;
  max-height: calc(100vh - 9rem);
  border-radius: 8px;
  object-fit: contain;
}

.lightbox-close,
.lightbox-nav {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  cursor: pointer;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  font-size: 2rem;
  line-height: 1;
}

.lightbox-nav {
  width: 48px;
  height: 64px;
}

.lightbox-nav.previous::before {
  content: "<";
}

.lightbox-nav.next::before {
  content: ">";
}

.lightbox-caption {
  grid-column: 2;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
}

.link-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.link-tile,
.project-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 14px 40px rgba(18, 28, 25, 0.08);
}

.link-tile {
  display: block;
  min-height: 150px;
  padding: 1.2rem;
  text-decoration: none;
}

.link-tile span {
  display: block;
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.link-tile strong {
  display: block;
  margin-top: 0.65rem;
  font-size: 1.35rem;
  line-height: 1.2;
}

.section-heading {
  margin-bottom: 2rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.project-card {
  overflow: hidden;
}

.project-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.project-card img.project-logo {
  background: var(--white);
  object-fit: contain;
  padding: 1.25rem;
}

.project-content {
  padding: 1.2rem;
}

.project-content p {
  color: var(--muted-ink);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}

.tag-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

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

.card-actions a {
  min-height: 36px;
  color: var(--brand-dark);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 5vw;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.82);
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  text-decoration: none;
}

@media (max-width: 900px) {
  .site-header {
    min-height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 64px;
    right: 5vw;
    left: 5vw;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.5rem;
    background: var(--paper);
    color: var(--ink);
    box-shadow: var(--shadow);
  }

  .site-header.is-open .site-nav {
    display: flex;
  }

  .site-nav a {
    padding: 0.8rem;
  }

  .site-nav a[aria-current="page"]::after {
    display: none;
  }

  .split,
  .feature-row,
  .feature-row.reverse,
  .toolbar,
  .link-panel,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .feature-row.reverse .feature-image {
    order: 0;
  }

  .filter-list {
    justify-content: flex-start;
  }

  .gallery-grid {
    column-count: 2;
  }
}

@media (max-width: 560px) {
  .hero,
  .page-hero {
    min-height: 86vh;
  }

  .section {
    padding: 3.2rem 5vw;
  }

  .gallery-grid {
    column-count: 1;
  }

  .lightbox {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    padding: 1rem;
  }

  .lightbox img {
    max-height: calc(100vh - 8rem);
  }
}
