:root {
  --navy: #08263a;
  --navy-deep: #061d2d;
  --lime: #b8ff45;
  --warm: #f3f0e8;
  --warm-2: #e8e3d8;
  --ink: #0a2638;
  --muted: #697981;
  --line: rgba(8, 38, 58, 0.16);
  --white: #fbfaf6;
  --max: 1440px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  zoom: 1.15;
  line-height: 1.5;
}

body {
  margin: 0;
  background: var(--warm);
  color: var(--ink);
  font-family: "Helvetica Neue", "Avenir Next", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.menu-open,
body.lightbox-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.wrap {
  width: min(calc(100% - 112px), var(--max));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--lime);
  color: var(--navy);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: 220px 1fr auto;
  align-items: center;
  width: 100%;
  min-height: 92px;
  padding: 18px 42px;
  border-bottom: 1px solid #ffffff26;
  color: var(--white);
  transition: background 250ms, color 250ms, min-height 250ms, box-shadow 250ms;
}

.site-header.is-scrolled {
  min-height: 74px;
  background: #fbfaf6f5;
  color: var(--ink);
  box-shadow: 0 10px 35px #08263a14;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.brand {
  display: block;
  width: 154px;
  color: currentColor;
}

.brand img {
  width: 100%;
  filter: brightness(0) invert(1);
  transition: filter 250ms;
}

.site-header.is-scrolled .brand img {
  filter: none;
}

.site-header nav {
  display: flex;
  justify-content: center;
  gap: clamp(22px, 2.4vw, 46px);
}

.site-header nav a {
  position: relative;
  font-size: 12px;
  font-weight: 560;
}

.site-header nav a::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms;
}

.site-header nav a:hover::after,
.site-header nav a:focus-visible::after {
  transform: scaleX(1);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid #ffffff66;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: background 200ms, border-color 200ms, color 200ms;
}

.site-header.is-scrolled .header-cta {
  border-color: var(--ink);
}

.header-cta:hover {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--navy);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
}

.eyebrow {
  margin: 0 0 24px;
  color: var(--lime);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.page-hero {
  display: flex;
  align-items: flex-end;
  min-height: 58svh;
  padding: 180px 0 82px;
  background: var(--navy);
  color: var(--white);
}

.page-hero h1,
.detail-hero h1 {
  max-width: 1050px;
  margin: 0;
  font-size: clamp(58px, 7.4vw, 112px);
  font-weight: 430;
  letter-spacing: -0.055em;
  line-height: 0.96;
}

.page-hero h1 span {
  color: #afc0c7;
  font-weight: 320;
}

.page-hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  align-items: end;
  gap: 60px;
}

.page-hero-copy > p {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  line-height: 1.7;
}

.catalog {
  padding: 72px 0 132px;
}

.catalog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  margin-bottom: 54px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.catalog-count {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-buttons button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 650;
}

.filter-buttons button:hover,
.filter-buttons button:focus-visible,
.filter-buttons button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 76px 30px;
}

.project-card {
  min-width: 0;
}

.project-card[hidden] {
  display: none;
}

.project-image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #19384a;
}

.project-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.project-card:hover img,
.project-card:focus-visible img {
  transform: scale(1.025);
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding-top: 22px;
}

.project-meta span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.project-meta h2,
.project-meta h3 {
  margin: 10px 0 0;
  font-size: clamp(22px, 2.1vw, 34px);
  font-weight: 450;
  letter-spacing: -0.04em;
}

.project-open {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  font-size: 17px;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.project-card:hover .project-open,
.project-card:focus-visible .project-open {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--navy);
}

.detail-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(880px, 100svh);
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
}

.detail-hero > img,
.detail-hero::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.detail-hero > img {
  object-fit: cover;
}

.detail-hero::after {
  background: rgba(6, 29, 45, 0.58);
  content: "";
}

.detail-hero-content {
  position: relative;
  z-index: 1;
  padding-bottom: 72px;
}

.detail-hero h1 {
  max-width: 980px;
}

.back-link {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 38px;
  font-size: 11px;
  font-weight: 650;
}

.project-intro {
  padding: 112px 0;
}

.project-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(420px, 1.22fr);
  gap: clamp(70px, 10vw, 170px);
}

.project-facts {
  display: grid;
  gap: 0;
  margin: 0;
}

.project-facts div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

.project-facts dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.project-facts dd {
  margin: 0;
  font-size: 13px;
}

.project-story h2,
.related h2,
.contact-band h2 {
  margin: 0;
  font-size: clamp(42px, 5vw, 76px);
  font-weight: 430;
  letter-spacing: -0.055em;
  line-height: 0.96;
}

.project-story p {
  max-width: 700px;
  margin: 34px 0 0;
  color: #52666f;
  font-size: 15px;
  line-height: 1.8;
}

.gallery-section {
  padding: 0 0 132px;
}

.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.gallery-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
}

.gallery-header span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #19384a;
  cursor: zoom-in;
}

.gallery-item:first-child:nth-last-child(1) {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
  transform: scale(1.02);
}

.related {
  padding: 112px 0 132px;
  background: var(--warm-2);
}

.related-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
  margin-bottom: 54px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid currentColor;
  font-size: 11px;
  font-weight: 700;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.related-grid .project-meta h3 {
  font-size: 22px;
}

.contact-band {
  padding: 110px 0;
  background: var(--lime);
  color: var(--navy);
}

.contact-band .wrap {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 60px;
}

.contact-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid var(--navy);
  font-size: 11px;
  font-weight: 700;
}

.contact-button:hover,
.contact-button:focus-visible {
  background: var(--navy);
  color: var(--white);
}

.empty-state {
  padding: 180px 0 120px;
  text-align: center;
}

.empty-state h1 {
  margin: 0 0 22px;
  font-size: clamp(46px, 7vw, 90px);
  font-weight: 430;
  letter-spacing: -0.055em;
  line-height: 0.96;
}

.empty-state p {
  margin: 0 0 32px;
  color: var(--muted);
}

.lightbox {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: none;
  place-items: center;
  padding: 72px;
  background: rgba(6, 29, 45, 0.96);
}

.lightbox.is-open {
  display: grid;
}

.lightbox img {
  max-width: min(1500px, 92vw);
  max-height: 82vh;
  object-fit: contain;
}

.lightbox button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font-size: 24px;
}

.lightbox button:hover,
.lightbox button:focus-visible {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--navy);
}

.lightbox-close {
  top: 22px;
  right: 22px;
}

.lightbox-prev {
  top: 50%;
  left: 22px;
}

.lightbox-next {
  top: 50%;
  right: 22px;
}

.site-footer {
  padding: 78px 0 30px;
  background: var(--navy-deep);
  color: var(--white);
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  align-items: start;
  gap: 50px;
  padding-bottom: 76px;
}

.footer-main > img {
  width: 180px;
}

.footer-main div > span {
  color: #78909a;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.footer-main p {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  line-height: 1.75;
}

.footer-main a:hover,
.footer-main a:focus-visible {
  color: var(--lime);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #738993;
  font-size: 9px;
  letter-spacing: 0.08em;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 4px;
}

@media (max-width: 1100px) {
  .wrap {
    width: min(calc(100% - 64px), var(--max));
  }

  .site-header {
    grid-template-columns: 180px 1fr auto;
    padding-inline: 28px;
  }

  .site-header nav {
    gap: 20px;
  }

  .site-header nav a {
    font-size: 11px;
  }

  .project-intro-grid {
    gap: 70px;
  }
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: 1fr auto;
    min-height: 76px;
    padding: 14px 24px;
  }

  .brand {
    width: 136px;
  }

  .menu-toggle {
    position: relative;
    z-index: 3;
    display: grid;
    place-content: center;
    gap: 7px;
    width: 42px;
    height: 42px;
    padding: 0;
  }

  .menu-toggle span {
    display: block;
    width: 23px;
    height: 1px;
    background: currentColor;
  }

  .site-header nav {
    position: fixed;
    inset: 0;
    display: flex;
    visibility: hidden;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    background: var(--navy);
    color: var(--white);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 250ms;
  }

  .site-header nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  .site-header nav a {
    font-size: 28px;
    font-weight: 430;
  }

  .header-cta {
    display: none;
  }

  .page-hero-copy,
  .project-intro-grid {
    grid-template-columns: 1fr;
  }

  .page-hero-copy {
    gap: 38px;
  }

  .project-intro-grid {
    gap: 58px;
  }

  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .related-grid > :last-child {
    display: none;
  }

  .footer-main {
    grid-template-columns: 1.2fr 1fr 1fr;
  }

  .footer-main > img {
    grid-column: 1 / -1;
    margin-bottom: 20px;
  }
}

@media (max-width: 620px) {
  .wrap {
    width: calc(100% - 40px);
  }

  .site-header {
    padding-inline: 19px;
  }

  .page-hero {
    min-height: 620px;
    padding: 150px 0 62px;
  }

  .page-hero h1,
  .detail-hero h1 {
    font-size: clamp(50px, 16vw, 76px);
  }

  .catalog {
    padding: 52px 0 92px;
  }

  .catalog-toolbar,
  .related-heading,
  .contact-band .wrap {
    align-items: flex-start;
    flex-direction: column;
  }

  .catalog-toolbar {
    margin-bottom: 38px;
  }

  .project-grid,
  .gallery-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .project-grid {
    gap: 52px;
  }

  .detail-hero {
    min-height: 680px;
  }

  .detail-hero-content {
    padding-bottom: 46px;
  }

  .project-intro,
  .related {
    padding: 84px 0;
  }

  .gallery-section {
    padding-bottom: 92px;
  }

  .gallery-item:first-child:nth-last-child(1) {
    aspect-ratio: 4 / 3;
  }

  .project-facts div {
    grid-template-columns: 90px 1fr;
  }

  .related-grid > :last-child {
    display: block;
  }

  .contact-band {
    padding: 82px 0;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
  }

  .footer-main > img,
  .footer-main div:first-of-type {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .lightbox {
    padding: 64px 18px;
  }

  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
