/* RMK homepage refinements: one calm, consistent section system. */
.process,
.about,
.proof {
  background: #eee5db;
  color: var(--ink);
}

.process li,
.proof div {
  border-color: rgba(32, 32, 30, .25);
}

.proof span,
.process .eyebrow,
.process li span,
.contact .eyebrow {
  color: #a66d5c;
}

.about .text-link {
  border-color: var(--ink);
}

.eyebrow {
  font-size: .82rem;
  letter-spacing: .09em;
}

.section-heading h2 em,
.about h2 em,
.contact h2 em {
  font-style: normal;
  font-weight: 500;
}

.work-link {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid currentColor;
  color: var(--ink);
  font: 500 .95rem/1.2 var(--sans);
}

.service-catalog-link {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  margin: .25rem 0 .35rem 3rem;
  padding-bottom: .25rem;
  border-bottom: 1px solid currentColor;
  font-size: .82rem;
  font-weight: 500;
}

/* Completed-work page */
.work-page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 3.25rem 4.2vw 6rem;
}

.work-page-intro {
  max-width: none;
  margin: 0 0 3.25rem;
}

.work-page-intro .text-link {
  display: inline-block;
  margin-bottom: 2.75rem;
}

.work-page-intro h1 {
  max-width: 65rem;
  margin: 0;
  font: 500 clamp(3.2rem, 4.3vw, 4.8rem)/.94 var(--serif);
  letter-spacing: -.06em;
}

.work-page-intro > p:last-child {
  max-width: 34rem;
  margin: 1.25rem 0 0;
  font-size: 1.05rem;
}

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

.work-page-gallery article:last-child {
  grid-column: auto;
}

.work-page-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.work-page-gallery article:last-child img {
  aspect-ratio: 4 / 5;
}

.work-page-gallery div {
  padding-top: .9rem;
}

.work-page-gallery h2 {
  margin: 0;
  font: 500 1.55rem/1.1 var(--serif);
}

.project-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card-action {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  margin-top: .65rem;
  padding-bottom: .2rem;
  border-bottom: 1px solid currentColor;
  font: 500 .8rem/1.2 var(--sans);
}

.project-card:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 6px;
}

.project-card .card-action > span {
  transition: transform .2s ease;
}

.project-card:hover .card-action > span {
  transform: translateX(.2rem);
}

/* Individual completed-work categories */
.category-page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 2.75rem 4.2vw 5.5rem;
}

.category-intro {
  max-width: 46rem;
  margin-bottom: 2.5rem;
}

.category-intro .text-link {
  display: inline-block;
  margin-bottom: 1.75rem;
}

.category-intro .eyebrow {
  margin-bottom: .8rem;
}

.category-intro h1 {
  max-width: 54rem;
  margin: 0;
  font: 500 clamp(2.8rem, 4vw, 4.5rem)/.96 var(--serif);
  letter-spacing: -.055em;
}

.category-intro .category-description {
  max-width: 38rem;
  margin: 1rem 0 0;
  font-size: 1rem;
}

.category-gallery {
  display: grid;
  max-width: 980px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 1.5rem;
  align-items: start;
}

.category-gallery-single {
  max-width: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.category-gallery figure {
  margin: 0;
}

.album-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  line-height: 0;
  cursor: zoom-in;
  overflow: hidden;
}

/* Keep every category album aligned despite mixed portrait and landscape originals. */
.category-gallery .album-trigger {
  aspect-ratio: 4 / 3;
  background: #e8e1d8;
}

.category-gallery .album-trigger img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.album-trigger:hover img {
  transform: scale(1.018);
}

.album-caption {
  position: static;
  display: grid;
  padding-top: .8rem;
  background: transparent;
}

.album-caption strong {
  font: 500 1.15rem/1.1 var(--serif);
}

.lightbox {
  width: min(94vw, 1280px);
  max-width: none;
  max-height: 92vh;
  padding: 0;
  border: 0;
  background: transparent;
}

.lightbox::backdrop {
  background: rgba(32, 32, 30, .84);
}

.lightbox img {
  display: block;
  max-width: 94vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  margin: auto;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  padding: .35rem .55rem;
  border: 1px solid rgba(247, 246, 242, .55);
  background: transparent;
  color: var(--paper);
  font: 500 .7rem/1 var(--mono);
  cursor: pointer;
}

@media (min-width: 721px) {
  .hero {
    min-height: auto;
    padding-top: 3.5rem;
    padding-bottom: 3.25rem;
    grid-template-columns: .92fr 1.08fr;
    gap: 4.2vw;
    align-items: start;
  }

  .hero-copy {
    align-self: end;
  }

  .hero h1 {
    font-size: clamp(3.8rem, 6.3vw, 7rem);
  }

  .hero .intro {
    margin-bottom: 1rem;
  }

  .hero-image {
    height: min(46vw, 540px);
  }

  .hero-image img {
    object-position: center center;
  }

  .section {
    padding: 6rem 4.2vw;
  }

  .section-heading,
  .project-grid,
  .service-list,
  .process ol,
  .about > .eyebrow,
  .about > div {
    width: 100%;
    max-width: 1320px;
    margin-right: auto;
    margin-left: auto;
  }

  .section-heading {
    display: block;
    margin-bottom: 2.75rem;
  }

  .section-heading .eyebrow {
    margin-bottom: 1.25rem;
  }

  .section-heading h2,
  .about h2 {
    max-width: 820px;
    font-size: clamp(2.8rem, 4.8vw, 5rem);
    line-height: .95;
    text-align: left;
  }

  .work.section {
    padding-top: 4.5rem;
    padding-bottom: 5rem;
  }

  .work .section-heading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.4rem;
    margin-bottom: 2.25rem;
  }

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

  .project {
    grid-row: auto;
    grid-column: auto;
    margin-bottom: 0;
  }

  .project img,
  .project-large img,
  .project-wide img {
    aspect-ratio: 4 / 5;
  }

  .services.section,
  .process.section {
    padding-top: 4.75rem;
    padding-bottom: 4.75rem;
  }

  .services .section-heading,
  .process .section-heading {
    margin-bottom: 2.25rem;
  }

  .services .section-heading h2,
  .process .section-heading h2 {
    max-width: 760px;
    font-size: clamp(2.5rem, 4vw, 4.2rem);
  }

  .services details {
    padding: 1rem 0;
  }

  .services details p {
    margin-top: .7rem;
  }

  .service-list {
    margin-top: 0;
  }

  .service-list summary strong {
    font-size: clamp(1.2rem, 1.85vw, 1.7rem);
  }

  .process ol {
    margin-top: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1.5rem;
  }

  .process h3 {
    margin: 1.2rem 0 .5rem;
    font-size: 2rem;
  }

  .about {
    display: block;
    padding: 6rem 4.2vw;
  }

  .about > .eyebrow {
    margin-bottom: 1.25rem;
  }

  .about h2 {
    margin-bottom: 1.5rem;
  }

  .about div > p {
    max-width: 42rem;
  }

  .contact {
    padding: 4.75rem 4.2vw;
  }

  .contact .eyebrow {
    margin-bottom: 1.25rem;
  }

  .contact h2 {
    max-width: 700px;
    margin-right: auto;
    margin-left: auto;
    font-size: clamp(2.6rem, 4.2vw, 4.4rem);
    line-height: .95;
  }

  .contact > p:not(.eyebrow) {
    margin: 1.5rem auto 2rem;
  }
}

@media (min-width: 1100px) {
  .process ol {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .eyebrow {
    font-size: .76rem;
  }

  .section {
    padding: 5.5rem 5vw;
  }

  .section-heading {
    display: block;
    margin-bottom: 2.5rem;
  }

  .section-heading .eyebrow {
    margin-bottom: 1.1rem;
  }

  .section-heading h2,
  .about h2,
  .contact h2 {
    font-size: clamp(2.4rem, 12vw, 4rem);
    line-height: .96;
  }

  .work .section-heading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .process ol {
    margin-top: 0;
    gap: 2.25rem;
  }

  .about {
    padding: 5.5rem 5vw;
  }

  .contact {
    padding: 5rem 5vw;
  }

  .contact .eyebrow {
    margin-bottom: 1.25rem;
  }

  .contact > p:not(.eyebrow) {
    margin: 1.5rem auto 2rem;
  }

  .work-page {
    padding: 3rem 5vw 5rem;
  }

  .work-page-intro {
    margin-bottom: 3rem;
  }

  .work-page-intro .text-link {
    margin-bottom: 2.75rem;
  }

  .work-page-intro h1 {
    font-size: clamp(2.9rem, 14vw, 4.2rem);
  }

  .work-page-gallery {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }

  .work-page-gallery article:last-child {
    grid-column: auto;
  }

  .work-page-gallery img,
  .work-page-gallery article:last-child img {
    aspect-ratio: 1 / 1.15;
  }

  .category-page {
    padding: 3rem 5vw 5rem;
  }

  .category-intro {
    margin-bottom: 2.5rem;
  }

  .category-intro .text-link {
    margin-bottom: 2.75rem;
  }

  .category-intro h1 {
    font-size: clamp(2.8rem, 13vw, 4rem);
  }

  .category-intro .category-description {
    font-size: 1rem;
  }

  .category-gallery {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .category-gallery-single {
    grid-template-columns: 1fr;
  }
}

/* Keep all four homepage categories in a balanced, width-aware grid. */
.work .project-grid {
  grid-template-columns: 1fr;
  gap: 2rem 1.5rem;
}

.work .project {
  grid-row: auto;
  grid-column: auto;
  margin-bottom: 0;
}

.work .project img {
  aspect-ratio: 4 / 5;
}

.work .project h3,
.work-page-gallery h2 {
  text-wrap: balance;
}

@media (min-width: 520px) {
  .work .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .work .project-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Oversized homepage hero */
.hero {
  min-height: auto;
  padding: 3.5rem 4.2vw 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  background: var(--soft);
}

.hero-eyebrow {
  margin-bottom: 1.25rem;
}

.hero-service-area::before {
  content: " · ";
}

.hero-image {
  grid-row: 2;
  grid-column: 1;
  width: 100%;
  height: min(66vw, 900px);
}

.hero-image img {
  object-position: center center;
}

.hero-copy {
  max-width: none;
  margin: 0;
  padding: 2rem 4.2vw 3rem;
  background: var(--soft);
}

.hero-copy > div {
  max-width: 1320px;
  margin: 0 auto;
}

.hero-copy h1 {
  max-width: 900px;
  margin: 0;
  font: 500 clamp(2.3rem, 3vw, 3.75rem)/.98 var(--serif);
  letter-spacing: -.05em;
}

.hero-copy .intro {
  max-width: 34rem;
  margin: 1.35rem 0 0;
}

@media (max-width: 720px) {
  .hero {
    padding: 10vw 5vw 0;
  }

  .hero-image {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .hero-company-type,
  .hero-service-area {
    display: block;
  }

  .hero-service-area {
    margin-top: .45rem;
  }

  .hero-service-area::before {
    content: none;
  }

  .hero-copy {
    padding: 1.75rem 5vw 3rem;
  }

  .hero-copy h1 {
    font-size: clamp(2.4rem, 9vw, 3.4rem);
  }
}
