:root {
  --ink: #181614;
  --muted: #66625c;
  --paper: #f8f4ee;
  --paper-2: #eee6da;
  --white: #fffdf8;
  --line: rgba(24, 22, 20, 0.14);
  --accent: #2f6f63;
  --accent-dark: #1f5148;
  --gold: #b58238;
  --charcoal: #25211d;
  --radius: 8px;
  --shadow: 0 24px 60px rgba(24, 22, 20, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Neue Montreal", "NeueMontreal", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

body.nav-open {
  overflow: hidden;
}

body.lightbox-open {
  overflow: hidden;
}

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

a {
  color: inherit;
}

.site-shell {
  min-height: 100vh;
}

.container {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 244, 238, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
  font-size: 1.05rem;
}

.brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand .brand-text > span {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.94rem;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
}

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

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  font: inherit;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  line-height: 1;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn.secondary {
  background: transparent;
  color: var(--ink);
}

.btn.secondary:hover {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

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

.hero {
  position: relative;
  min-height: calc(100vh - 76px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--white);
  background: var(--charcoal);
}

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

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(24, 22, 20, 0.86), rgba(24, 22, 20, 0.42) 55%, rgba(24, 22, 20, 0.16));
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 88px 0 76px;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 920px;
  font-size: clamp(3.4rem, 8vw, 7.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 760px;
  margin: 26px 0 0;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
}

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

.hero .btn.secondary {
  border-color: rgba(255, 253, 248, 0.68);
  color: var(--white);
}

.hero .btn.secondary:hover {
  background: var(--white);
  color: var(--ink);
}

.section {
  padding: 90px 0;
}

.section.tight {
  padding: 62px 0;
}

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

.section.dark {
  background: var(--charcoal);
  color: var(--white);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 0.55fr);
  gap: 42px;
  align-items: end;
  margin-bottom: 38px;
}

.section-title {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

.section-intro {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.dark .section-intro,
.dark .muted {
  color: rgba(255, 253, 248, 0.72);
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(24, 22, 20, 0.04);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease, background-color 220ms ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 260ms ease;
  z-index: 1;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(47, 111, 99, 0.42);
  background-color: #fffaf1;
  box-shadow: 0 18px 42px rgba(24, 22, 20, 0.12);
}

.card:hover::before {
  transform: scaleX(1);
}

.card.pad {
  padding: 28px;
}

.dark .card {
  background: rgba(255, 253, 248, 0.08);
  border-color: rgba(255, 253, 248, 0.18);
}

.dark .card:hover {
  background: rgba(255, 253, 248, 0.12);
  border-color: rgba(255, 253, 248, 0.32);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  line-height: 1.1;
}

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

.dark .card p {
  color: rgba(255, 253, 248, 0.72);
}

.media-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 360ms ease, filter 360ms ease;
}

.media-card:hover img {
  transform: scale(1.035);
  filter: saturate(1.05) contrast(1.03);
}

.media-card .card-body {
  padding: 22px;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.62fr);
  gap: 48px;
  align-items: center;
}

.rounded-media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 42px rgba(24, 22, 20, 0.1);
}

.feature-list {
  display: grid;
  gap: 14px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.dark .feature-list li {
  border-top-color: rgba(255, 253, 248, 0.18);
}

.page-hero {
  position: relative;
  min-height: 520px;
  display: grid;
  align-items: end;
  padding: 120px 0 72px;
  overflow: hidden;
  color: var(--white);
  background: var(--charcoal);
  background-image: var(--page-hero-image, none);
  background-size: 0 0;
  background-repeat: no-repeat;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: inherit;
  background-size: cover;
  background-position: center;
  filter: saturate(1.08) contrast(1.05) brightness(0.82);
  transform: scale(1.01);
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(24, 22, 20, 0.72), rgba(24, 22, 20, 0.36) 52%, rgba(24, 22, 20, 0.08)),
    linear-gradient(0deg, rgba(24, 22, 20, 0.42), rgba(24, 22, 20, 0) 48%);
  pointer-events: none;
}

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

.page-hero .eyebrow {
  color: rgba(255, 253, 248, 0.76);
}

.page-hero h1 {
  color: var(--white);
  font-size: clamp(3rem, 7vw, 6.4rem);
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.2);
}

.page-hero p {
  max-width: 800px;
  margin: 22px 0 0;
  color: rgba(255, 253, 248, 0.78);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.filter-btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.filter-btn[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.portfolio-item.is-hidden {
  display: none;
}

.case-hero-image {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto 44px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.case-hero-image img {
  width: 100%;
  max-height: 680px;
  object-fit: cover;
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.case-meta div {
  background: var(--white);
  padding: 18px;
}

.case-meta span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.case-meta strong {
  display: block;
  margin-top: 6px;
  line-height: 1.2;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  cursor: zoom-in;
  transition: transform 220ms ease, filter 220ms ease, box-shadow 220ms ease;
}

.gallery img:hover,
.gallery img:focus {
  outline: none;
  transform: translateY(-3px);
  filter: saturate(1.06) contrast(1.04);
  box-shadow: 0 14px 34px rgba(24, 22, 20, 0.16);
}

.cta-band {
  padding: 64px 0;
  background: var(--accent-dark);
  color: var(--white);
}

.cta-band .container {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: center;
}

.cta-band h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
}

.cta-band p {
  margin: 12px 0 0;
  color: rgba(255, 253, 248, 0.74);
}

.site-footer {
  padding: 38px 0;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 0.94rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

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

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 72px 28px 36px;
  background: rgba(12, 11, 10, 0.88);
  backdrop-filter: blur(14px);
}

.lightbox.is-open {
  display: flex;
}

.lightbox__figure {
  width: min(1120px, 100%);
  margin: 0;
}

.lightbox__image {
  width: 100%;
  max-height: calc(100vh - 160px);
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

.lightbox__caption {
  min-height: 1.4em;
  margin-top: 14px;
  color: rgba(255, 253, 248, 0.78);
  font-size: 0.95rem;
  text-align: center;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  border: 1px solid rgba(255, 253, 248, 0.28);
  background: rgba(255, 253, 248, 0.1);
  color: var(--white);
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.lightbox__close {
  top: 22px;
  right: 22px;
  min-height: 42px;
  padding: 0 16px;
}

.lightbox__nav {
  top: 50%;
  width: 54px;
  height: 54px;
  transform: translateY(-50%);
}

.lightbox__nav--prev {
  left: 22px;
}

.lightbox__nav--next {
  right: 22px;
}

.lightbox__close:hover,
.lightbox__nav:hover,
.lightbox__close:focus,
.lightbox__nav:focus {
  outline: none;
  background: rgba(255, 253, 248, 0.2);
  border-color: rgba(255, 253, 248, 0.46);
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav {
    position: fixed;
    inset: 76px 16px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
  }

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

  .nav a {
    padding: 13px 12px;
  }

  .section-head,
  .split,
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

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

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

  .cta-band .container {
    display: block;
  }

  .lightbox {
    padding: 68px 14px 28px;
  }

  .lightbox__nav {
    top: auto;
    bottom: 18px;
    transform: none;
  }

  .lightbox__nav--prev {
    left: 18px;
  }

  .lightbox__nav--next {
    right: 18px;
  }

  .lightbox__image {
    max-height: calc(100vh - 190px);
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .container,
  .hero-inner,
  .case-hero-image {
    width: min(100% - 28px, 1160px);
  }

  .hero {
    min-height: 690px;
  }

  h1 {
    font-size: clamp(3rem, 16vw, 4.4rem);
  }

  .section {
    padding: 66px 0;
  }

  .case-meta,
  .gallery {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .card::before,
  .media-card img {
    transition: none;
  }

  .card:hover,
  .media-card:hover img,
  .gallery img:hover,
  .gallery img:focus {
    transform: none;
  }
}
