:root {
  --ink: #25221d;
  --muted: #6e675d;
  --paper: #fbf7f0;
  --warm-white: #fffdf8;
  --sand: #eee4d5;
  --olive: #56663d;
  --olive-dark: #38452a;
  --clay: #a7654c;
  --moss-wash: #e7eadf;
  --line: rgba(37, 34, 29, 0.14);
  --shadow: 0 18px 48px rgba(37, 34, 29, 0.14);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 20;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--warm-white);
  padding: 10px 14px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  min-height: 72px;
  padding: 16px clamp(20px, 5vw, 56px);
  border-bottom: 1px solid rgba(37, 34, 29, 0.1);
  background: rgba(251, 247, 240, 0.9);
  backdrop-filter: blur(18px);
}

.brand-mark {
  text-decoration: none;
  display: grid;
  gap: 0;
}

.brand-mark span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  letter-spacing: 0;
}

.brand-mark small,
.eyebrow,
.meta-label,
.project-count,
.gallery-caption {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-mark small {
  color: var(--muted);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.nav-links a {
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: var(--moss-wash);
  color: var(--olive-dark);
}

main {
  overflow: clip;
}

.section-panel,
.selected-work,
.project-case {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--clay);
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0;
}

h1 {
  max-width: 880px;
  font-size: clamp(3.2rem, 7vw, 6.9rem);
}

h2 {
  font-size: clamp(2.1rem, 4vw, 4.1rem);
}

h3 {
  font-size: clamp(1.8rem, 3vw, 3.15rem);
}

p {
  margin: 0;
}

.closing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

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

.contact-note {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  color: var(--muted);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

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

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

.button.secondary:hover,
.button.secondary:focus-visible {
  background: var(--sand);
}

.selected-work {
  padding: clamp(34px, 6vw, 72px) 0 clamp(54px, 8vw, 108px);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(280px, 1fr);
  gap: 24px 64px;
  align-items: end;
  margin-bottom: 34px;
}

.section-heading .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: -10px;
}

.section-heading p {
  color: var(--muted);
  max-width: 620px;
}

.project-index {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 18px;
}

.index-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 0 0 18px;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.index-card figure {
  margin: 0 0 18px;
  overflow: hidden;
  background: var(--sand);
}

.index-card img {
  width: 100%;
  height: auto;
  transition: filter 300ms ease;
}

.index-card:hover img,
.index-card:focus-visible img {
  filter: saturate(1.04);
}

.index-card .meta-label {
  color: var(--clay);
  font-weight: 700;
}

.index-card h3 {
  margin-top: 10px;
  font-size: clamp(1.5rem, 2vw, 2rem);
}

.index-card p {
  margin-top: 8px;
  color: var(--muted);
}

.project-case {
  display: grid;
  grid-template-columns: minmax(270px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(54px, 8vw, 112px) 0;
  border-top: 1px solid var(--line);
}

.project-sidebar {
  position: sticky;
  top: 104px;
  align-self: start;
}

.project-sidebar h3 {
  margin-top: 12px;
}

.project-overview {
  margin-top: 20px;
  color: var(--muted);
}

.project-facts {
  display: grid;
  gap: 20px;
  margin-top: 34px;
}

.fact-block {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.fact-block p,
.fact-block ul {
  margin: 8px 0 0;
  color: var(--muted);
}

.fact-block ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.fact-block li {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.56);
  font-size: 0.88rem;
}

.proof {
  margin-top: 34px;
  padding: 22px;
  border-left: 3px solid var(--olive);
  background: var(--moss-wash);
}

.proof strong {
  display: block;
  margin-bottom: 8px;
}

.proof p {
  color: #4f5941;
}

.gallery {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 22px;
}

.gallery-item {
  --caption-bg: var(--olive-dark);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: visible;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
  text-align: left;
  font: inherit;
  box-shadow: 0 12px 30px rgba(37, 34, 29, 0.1);
}

.gallery-media {
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--sand);
}

.gallery-item img {
  width: 100%;
  height: auto;
  transition: filter 260ms ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
  filter: saturate(1.03);
}

.gallery-caption {
  position: static;
  display: block;
  width: 100%;
  max-width: none;
  padding: 10px 12px;
  background: var(--caption-bg);
  color: var(--warm-white);
  font-weight: 700;
  line-height: 1.08;
  text-align: left;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 2px rgba(37, 34, 29, 0.28);
}

.project-case.featured {
  background:
    linear-gradient(90deg, rgba(86, 102, 61, 0.06), transparent 50%),
    var(--paper);
  width: 100%;
  max-width: none;
  padding-inline: max(20px, calc((100vw - var(--max)) / 2));
}

.closing {
  padding: clamp(62px, 9vw, 120px) 0;
  border-top: 1px solid var(--line);
}

.closing h2 {
  max-width: 900px;
}

.closing p:not(.eyebrow) {
  max-width: 740px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 1.08rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(37, 34, 29, 0.88);
}

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

.lightbox figure {
  display: grid;
  gap: 12px;
  width: min(980px, 100%);
  max-height: calc(100vh - 76px);
  margin: 0;
}

.lightbox img {
  width: 100%;
  max-height: calc(100vh - 124px);
  object-fit: contain;
  background: var(--paper);
}

.lightbox figcaption {
  color: var(--warm-white);
  text-align: center;
}

.lightbox-close {
  position: fixed;
  right: 22px;
  top: 18px;
  min-height: 42px;
  border: 1px solid rgba(255, 253, 248, 0.45);
  border-radius: 4px;
  padding: 9px 14px;
  background: rgba(255, 253, 248, 0.12);
  color: var(--warm-white);
  cursor: pointer;
}

@media (max-width: 980px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .section-heading,
  .project-case {
    grid-template-columns: 1fr;
  }

  .project-sidebar {
    position: static;
  }

  .project-index {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .section-panel,
  .selected-work,
  .project-case {
    width: min(100% - 28px, var(--max));
  }

  h1 {
    font-size: clamp(2.65rem, 15vw, 4.4rem);
  }

  h2 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .nav-links a {
    padding-inline: 8px;
  }

  .button {
    width: 100%;
  }

  .lightbox {
    padding: 14px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
