.references-page {
  background: #f7f3eb;
  color: var(--night);
}

.references-hero {
  position: relative;
  min-height: min(82vh, 850px);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.references-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.references-hero-image {
  object-position: center 38%;
}

.references-hero-inner {
  position: relative;
  z-index: 1;
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: 0 28px clamp(62px, 8vw, 104px);
}

.references-hero-card {
  width: min(610px, 100%);
  padding: clamp(28px, 4vw, 48px);
  background: rgba(255, 252, 244, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.24);
}

.references-hero-card .hero-kicker {
  color: var(--red);
}

.references-hero-card h1 {
  margin: 0 0 22px;
  max-width: 580px;
  font-size: clamp(3rem, 5.3vw, 5.4rem);
  line-height: 0.94;
}

.references-hero-card > p:not(.hero-kicker) {
  max-width: 520px;
  margin: 0 0 30px;
  font-size: clamp(1.03rem, 1.35vw, 1.22rem);
  line-height: 1.72;
}

.reference-stats {
  background: var(--red);
  color: var(--night);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 0 28px;
}

.stats-grid article {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 28px 22px;
  border-right: 1px solid rgba(17,16,15,0.22);
}

.stats-grid article:first-child {
  border-left: 1px solid rgba(17,16,15,0.22);
}

.stats-grid strong {
  font-family: var(--display);
  font-size: clamp(2.25rem, 3.3vw, 4rem);
  font-weight: 500;
  line-height: 1;
}

.stats-grid span {
  color: var(--night);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reference-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(460px, 1.1fr);
  gap: clamp(48px, 7vw, 100px);
  align-items: center;
}

.reference-intro-copy h2,
.reference-heading h2,
.clients-layout h2,
.references-closing h2 {
  font-size: clamp(2.5rem, 4.2vw, 4.5rem);
  line-height: 1.02;
}

.reference-intro-copy p:not(.eyebrow) {
  max-width: 680px;
  color: #504940;
  font-size: 1.02rem;
  line-height: 1.8;
}

.reference-intro-copy .reference-opening {
  color: var(--night);
  font-family: var(--display);
  font-size: clamp(1.3rem, 1.8vw, 1.7rem);
  line-height: 1.45;
}

.reference-intro-image {
  margin: 0;
}

.reference-intro-image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.reference-intro-image img + img {
  margin-top: 18px;
}

.reference-intro-image figcaption {
  padding: 14px 0 0;
  color: #71685d;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.reference-heading {
  max-width: 940px;
  margin-bottom: clamp(46px, 6vw, 76px);
}

.reference-heading > p:last-child {
  max-width: 740px;
  color: #655d53;
  font-size: 1.05rem;
  line-height: 1.75;
}

.reference-projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.reference-project {
  display: grid;
  grid-template-rows: 340px 1fr;
  background: #fff;
  box-shadow: 0 24px 60px rgba(49, 37, 24, 0.09);
}

.reference-project.project-wide {
  grid-column: 1 / -1;
  grid-template-columns: 1.25fr 0.75fr;
  grid-template-rows: minmax(430px, auto);
}

.reference-project.project-reverse {
  grid-template-columns: 0.75fr 1.25fr;
}

.reference-project.project-reverse figure {
  order: 2;
}

.reference-project figure {
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

.reference-project figure > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.reference-project:hover figure > img {
  transform: scale(1.025);
}

.project-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 52px);
}

.project-copy span {
  color: var(--red);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.project-copy h3 {
  margin: 12px 0 16px;
  font-size: clamp(1.8rem, 2.8vw, 3rem);
  line-height: 1.05;
}

.project-copy p {
  margin: 0;
  color: #5c544a;
  line-height: 1.75;
}

.project-logos {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 16px 22px;
  min-height: 58px;
  margin-top: 28px;
}

.project-logos img {
  display: block;
  width: auto;
  max-width: 168px;
  height: 52px;
  object-fit: contain;
  object-position: left center;
}

.reference-clients {
  padding-block: clamp(86px, 10vw, 140px);
}

.clients-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(52px, 8vw, 120px);
  align-items: center;
}

.clients-layout h2 {
  color: white;
}

.clients-layout p:not(.eyebrow) {
  color: rgba(255,255,255,0.7);
  line-height: 1.75;
}

.client-cloud {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255,255,255,0.18);
  border-left: 1px solid rgba(255,255,255,0.18);
}

.client-cloud span {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-right: 1px solid rgba(255,255,255,0.18);
  border-bottom: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.9);
  font-family: var(--display);
  font-size: clamp(1rem, 1.35vw, 1.3rem);
  text-align: center;
}

.compact-heading {
  margin-bottom: 48px;
}

.range-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: #d8d0c3;
  border: 1px solid #d8d0c3;
}

.range-grid article {
  min-height: 320px;
  padding: clamp(28px, 3vw, 42px);
  background: #fff;
}

.range-grid span {
  color: var(--red);
  font-family: var(--display);
  font-size: 2rem;
}

.range-grid h3 {
  margin: 70px 0 16px;
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.12;
}

.range-grid p {
  color: #625a50;
  line-height: 1.72;
}

.reference-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 38px;
  color: var(--red);
  font-size: 1.12rem;
  font-weight: 800;
  text-decoration: none;
}

.reference-link span {
  font-size: 1.5em;
  transition: transform 0.2s ease;
}

.reference-link:hover span,
.reference-link:focus-visible span {
  transform: translateX(6px);
}

.references-closing {
  background: #efe8dc;
  overflow: hidden;
}

.references-closing-photo {
  width: 100%;
  margin: 0;
  background: #11100f;
}

.references-closing-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.references-closing-copy {
  width: 100%;
  padding: clamp(78px, 9vw, 128px) 28px clamp(58px, 7vw, 92px);
}

.references-closing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.72fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: stretch;
}

.closing-card {
  width: 100%;
  padding: clamp(30px, 4.5vw, 56px);
  background: #fffdf8;
  box-shadow: 0 24px 70px rgba(72, 51, 28, 0.12);
}

.references-aerial-photo {
  margin: 0;
  overflow: hidden;
  background: #11100f;
  box-shadow: 0 24px 70px rgba(72, 51, 28, 0.12);
}

.references-aerial-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.closing-card h2 {
  margin-bottom: 20px;
}

.closing-card > p:not(.eyebrow) {
  max-width: 540px;
  color: #514940;
  line-height: 1.75;
}

.closing-card .button-row {
  align-items: center;
  gap: 24px;
}

.closing-card .reference-link {
  margin-top: 0;
}

@media (max-width: 1080px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid article:nth-child(4) { border-left: 1px solid rgba(17,16,15,0.22); }
  .reference-intro-grid,
  .clients-layout { grid-template-columns: 1fr; }
  .reference-intro-image { max-width: 780px; }
  .range-grid { grid-template-columns: repeat(2, 1fr); }
  .references-closing-layout { grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr); gap: 28px; }
}

@media (max-width: 760px) {
  .references-hero { min-height: 820px; }
  .references-hero-image { object-position: 58% 40%; }
  .references-hero-inner { padding-inline: 18px; padding-bottom: 34px; }
  .references-hero-card { padding: 28px 24px; }
  .references-hero-card h1 { font-size: clamp(2.65rem, 13vw, 4rem); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); padding-inline: 18px; }
  .stats-grid article { min-height: 138px; border-left: 1px solid rgba(17,16,15,0.22); }
  .stats-grid article:last-child { grid-column: 1 / -1; }
  .reference-projects { grid-template-columns: 1fr; }
  .reference-project,
  .reference-project.project-wide,
  .reference-project.project-reverse { grid-column: auto; grid-template-columns: 1fr; grid-template-rows: 270px auto; }
  .reference-project.project-reverse figure { order: 0; }
  .project-logos img { max-width: 145px; height: 46px; }
  .client-cloud { grid-template-columns: repeat(2, 1fr); }
  .range-grid { grid-template-columns: 1fr; }
  .range-grid article { min-height: 250px; }
  .range-grid h3 { margin-top: 42px; }
  .references-closing-copy { padding: 68px 18px 50px; }
  .references-closing-layout { grid-template-columns: 1fr; }
  .references-aerial-photo { width: min(100%, 560px); margin-inline: auto; aspect-ratio: 3 / 4; }
  .closing-card .button-row { align-items: flex-start; }
  .closing-card .eyebrow { font-size: .67rem; letter-spacing: .105em; white-space: nowrap; }
}

@media (max-width: 460px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stats-grid article:last-child { grid-column: auto; }
  .client-cloud { grid-template-columns: 1fr 1fr; }
  .client-cloud span { min-height: 74px; font-size: 0.95rem; }
}
