/* Keep the gallery content as close to the header as the homepage content. */
body.gallery main > .section:first-child {
  margin-top: 0;
  padding-top: clamp(12px, 1.5vw, 18px);
}

@media (max-width: 950px) {
body.gallery .reveal {
    opacity: 1;
    transform: none;
  }

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

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

body.gallery .gallery-detail__grid--single {
    grid-template-columns: minmax(0, 280px);
  }

body.gallery .gallery-detail-shot {
    min-height: 0;
  }
}

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

.gallery-detail {
  display: grid;
  gap: 18px;
}

.gallery-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 9px 13px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, .58);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.gallery-back:hover,
.gallery-back:focus-visible {
  border-color: var(--ink);
  color: #fff;
  background: var(--ink);
  transform: translateX(-2px);
}

.gallery-back > span:first-child {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
}

.gallery-detail__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
}

.gallery-detail__head h1 {
  margin: 6px 0 0;
  font-family: "Fraunces", serif;
  font-size: clamp(2.1rem, 3.8vw, 3.8rem);
  line-height: 1;
}

.gallery-detail__head p {
  margin: 0;
  max-width: 36rem;
  color: var(--muted);
  line-height: 1.65;
}

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

.gallery-detail-shot {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  opacity: 0;
  transform: translateY(18px) scale(0.965);
  transition: opacity 520ms ease, transform 620ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 520ms ease;
  transition-delay: var(--gallery-image-delay, 0ms);
  border: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)),
    linear-gradient(135deg, #e9d7be, #caa981 55%, #8f6c4d);
}

.gallery-detail-shot::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.34) 45%, transparent 70%);
  transform: translateX(-120%);
  animation: gallery-image-shimmer 1.45s ease-in-out infinite;
}

.gallery-detail-shot:has(.gallery-detail-shot__image.is-loaded)::after {
  opacity: 0;
  animation: none;
  transition: opacity 260ms ease;
}

body.gallery .gallery-detail-shot.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.gallery-detail-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.045);
  transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1), filter 700ms ease;
  filter: saturate(0.88);
}

.gallery-detail-shot__image {
  opacity: 0;
  transition: opacity 420ms ease, transform 900ms cubic-bezier(0.22, 1, 0.36, 1), filter 700ms ease;
}

.gallery-detail-shot__image.is-loaded {
  opacity: 1;
}

@keyframes gallery-image-shimmer {
  to { transform: translateX(120%); }
}

.gallery-detail-shot.is-visible img {
  transform: scale(1);
  filter: saturate(1);
}

.gallery-detail-shot.is-visible:hover {
  box-shadow: 0 14px 30px rgba(28, 20, 14, 0.15);
}

@media (prefers-reduced-motion: reduce) {
  .gallery-detail-shot,
  .gallery-detail-shot img {
    transition: none;
    transform: none;
  }
}
}

.gallery-detail__grid--single {
  grid-template-columns: minmax(0, 280px);
  justify-content: start;
}

.gallery-detail__grid--single .gallery-detail-shot {
  aspect-ratio: 4 / 5;
}

.gallery-detail__more {
  display: block;
  margin: 18px auto 0;
  padding: 12px 18px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gallery-detail__more[hidden] {
  display: none;
}

.gallery-detail__more:hover {
  background: var(--ink);
  color: var(--paper);
}

.gallery-detail__more.btn-primary {
  display: flex;
  margin: 18px auto 0;
  background: var(--ink);
  color: #f8f3ed;
  border-color: var(--ink);
}

.gallery-detail__more.btn-primary[hidden] {
  display: none;
}

.gallery-detail-shot[data-tone="sand"] {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, #e9d7be, #caa981 55%, #8f6c4d);
}

.gallery-detail-shot[data-tone="ink"] {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04)),
    linear-gradient(135deg, #43352b, #1b1512 60%, #0f0d0c);
}

.gallery-detail-shot[data-tone="rose"] {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, #e1b7a5, #c4907e 58%, #8f6059);
}

.gallery-detail-shot[data-tone="cream"] {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.12)),
    linear-gradient(135deg, #f8eedf, #e0c8a5 60%, #c09a72);
}

.gallery-detail-shot[data-tone="sage"] {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, #c2cdc1, #93a298 55%, #66766f);
}

.gallery-image-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.gallery-image-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.gallery-image-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.52);
  backdrop-filter: blur(10px);
}

.gallery-image-modal__dialog {
  position: relative;
  width: fit-content;
  max-width: min(92vw, 760px);
  max-height: min(90vh, 900px);
  padding: 12px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 246, 239, 0.98)),
    linear-gradient(135deg, rgba(181, 140, 97, 0.06), transparent 26%);
  box-shadow: 0 28px 90px rgba(18, 14, 10, 0.24);
  display: grid;
}

.gallery-image-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: rgba(255, 255, 255, 0.86);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}

.gallery-image-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: rgba(255, 255, 255, 0.88);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}

.gallery-image-modal__nav--prev {
  left: 14px;
}

.gallery-image-modal__nav--next {
  right: 14px;
}

.gallery-image-modal__figure {
  position: relative;
  display: grid;
}

.gallery-image-modal__image {
  display: block;
  width: min(100%, 640px);
  height: auto;
  max-width: 100%;
  max-height: calc(90vh - 32px);
  margin: 0 auto;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.08);
}

.gallery-image-modal__meta {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 10px 24px rgba(18, 14, 10, 0.08);
  text-align: left;
}

.gallery-image-modal__meta strong {
  font-family: "Fraunces", serif;
  font-size: 1rem;
  line-height: 1.08;
}

.gallery-image-modal__meta span {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.65rem;
  color: var(--accent);
}

.gallery-image-modal__meta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

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

@media (max-width: 860px) {
.gallery-grid {
    grid-template-columns: 1fr;
  }

.gallery-detail__head {
    flex-direction: column;
    align-items: flex-start;
  }

.gallery-detail__head h1 {
    font-size: clamp(1.7rem, 7vw, 2.4rem);
  }

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

body.gallery .gallery-detail__grid--single {
    grid-template-columns: minmax(0, 280px);
  }
}

@media (max-width: 480px) {
  .gallery-detail__head h1 {
    font-size: 1.55rem;
  }
}

@media (min-width: 951px) and (max-width: 1160px) {
  .gallery-detail__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .gallery-detail__grid--single {
    grid-template-columns: minmax(0, 280px);
  }
}

/* Page-specific rules moved out of style.css. */
.gallery-grid{
  display: grid;
  gap: 16px;
}

.gallery-card{
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
}

.gallery-toolbar{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.gallery-card{
  position: relative;
  min-height: 240px;
  overflow: hidden;
  display: grid;
  align-content: end;
  gap: 0;
  text-align: left;
  padding: 18px 18px 16px;
  border: 0;
  cursor: pointer;
  transition: transform 180ms ease;
  box-shadow: none;
  color: #fff9f4;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.gallery-card::before{
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0 40%, rgba(17, 17, 17, 0.76) 100%),
    linear-gradient(135deg, rgba(181, 140, 97, 0.16), transparent 36%);
}

.gallery-card::after{
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--gallery-cover);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.82;
  pointer-events: none;
}

.gallery-card > *{
  position: relative;
  z-index: 1;
}

.gallery-card:hover{
  transform: translateY(-4px);
}

.gallery-card:focus-visible,
.gallery-modal__close:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(181, 140, 97, 0.18), 0 0 0 4px rgba(17, 17, 17, 0.08);
}

.gallery-card h3{
  margin: 6px 0 4px;
  font-family: "Fraunces", serif;
  font-size: 1.9rem;
  line-height: 1;
  color: #fff9f4;
}

.gallery-card p{
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  max-width: 28rem;
}

.gallery-card__tags{
  display: none;
}

.gallery-card__tags span{
  display: none;
}

.gallery-card[data-span="8"]{
  grid-column: span 8;
}

.gallery-card[data-span="6"]{
  grid-column: span 6;
}

.gallery-card[data-span="4"]{
  grid-column: span 4;
}

.gallery-card[data-tone="sand"]{
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, #e9d7be, #caa981 55%, #8f6c4d);
}

.gallery-card[data-tone="ink"]{
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04)),
    linear-gradient(135deg, #43352b, #1b1512 60%, #0f0d0c);
}

.gallery-card[data-tone="rose"]{
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, #e1b7a5, #c4907e 58%, #8f6059);
}

.gallery-card[data-tone="cream"]{
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.12)),
    linear-gradient(135deg, #f8eedf, #e0c8a5 60%, #c09a72);
}

.gallery-card[data-tone="sage"]{
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, #c2cdc1, #93a298 55%, #66766f);
}

/* Gallery overview: editorial rows instead of a rigid tile wall. */
body.gallery-overview .gallery-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}

body.gallery-overview .gallery-card,
body.gallery-overview .gallery-card[data-span="8"],
body.gallery-overview .gallery-card[data-span="6"],
body.gallery-overview .gallery-card[data-span="4"]{
  grid-column: auto;
  min-height: 210px;
  padding: 30px 28px 30px 40%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  transform: none;
}

body.gallery-overview .gallery-card::after{
  left: 0;
  right: auto;
  top: 18px;
  bottom: 18px;
  width: 34%;
  opacity: .94;
  transform: none;
  transition: transform 420ms cubic-bezier(.22, 1, .36, 1), opacity 240ms ease;
}

body.gallery-overview .gallery-card::before{
  left: 0;
  right: auto;
  top: 18px;
  bottom: 18px;
  width: 34%;
  background: linear-gradient(180deg, rgba(17, 17, 17, .02), rgba(17, 17, 17, .42));
}

body.gallery-overview .gallery-card > *{
  z-index: 1;
}

body.gallery-overview .gallery-card .label{
  color: var(--accent);
}

body.gallery-overview .gallery-card h3{
  max-width: 38rem;
  color: var(--ink);
  font-size: clamp(1.8rem, 3.2vw, 3.2rem);
  line-height: .98;
}

body.gallery-overview .gallery-card p{
  color: var(--muted);
}

body.gallery-overview .gallery-card:hover{
  transform: none;
}

body.gallery-overview .gallery-card:hover::after{
  opacity: 1;
  transform: scale(1.035);
}

body.gallery-overview .gallery-card:nth-child(even){
  padding-right: 40%;
  padding-left: 28px;
}

body.gallery-overview .gallery-card:nth-child(even)::before{
  left: auto;
  right: 0;
}

body.gallery-overview .gallery-card:nth-child(even)::after{
  left: auto;
  right: 0;
}

@media (max-width: 680px){
  body.gallery-overview .gallery-card,
  body.gallery-overview .gallery-card:nth-child(even){
    min-height: 0;
    padding: 184px 0 20px;
  }

  body.gallery-overview .gallery-card::before,
  body.gallery-overview .gallery-card::after,
  body.gallery-overview .gallery-card:nth-child(even)::before,
  body.gallery-overview .gallery-card:nth-child(even)::after{
    top: 0;
    bottom: auto;
    left: 0;
    right: 0;
    width: 100%;
    height: 164px;
  }

  body.gallery-overview .gallery-card h3{
    font-size: 2rem;
  }
}

/* Gallery overview: rounded editorial cards, not rectangular tiles. */
body.gallery-overview .gallery-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px 22px;
  border: 0;
}

body.gallery-overview .gallery-card,
body.gallery-overview .gallery-card[data-span="8"],
body.gallery-overview .gallery-card[data-span="6"],
body.gallery-overview .gallery-card[data-span="4"]{
  grid-column: auto;
  min-height: 360px;
  padding: 274px 10px 16px;
  border: 0;
  background: transparent;
  color: var(--ink);
  transform: none;
  box-shadow: none;
}

body.gallery-overview .gallery-card:nth-child(3n + 2){
  transform: translateY(34px);
}

body.gallery-overview .gallery-card::after,
body.gallery-overview .gallery-card::before{
  top: 0;
  left: 0;
  right: 0;
  bottom: auto;
  width: 100%;
  height: 252px;
  border-radius: 48% 48% 14px 14px;
}

body.gallery-overview .gallery-card::after{
  opacity: .96;
  transform: none;
  transition: transform 420ms cubic-bezier(.22, 1, .36, 1), opacity 220ms ease;
}

body.gallery-overview .gallery-card::before{
  background: linear-gradient(180deg, rgba(17, 17, 17, 0) 45%, rgba(17, 17, 17, .5) 100%);
}

body.gallery-overview .gallery-card > *{
  z-index: 1;
}

body.gallery-overview .gallery-card .label{
  color: var(--accent);
}

body.gallery-overview .gallery-card h3{
  margin: 7px 0 5px;
  color: var(--ink);
  font-size: clamp(1.55rem, 2.4vw, 2.25rem);
  line-height: .98;
}

body.gallery-overview .gallery-card p{
  color: var(--muted);
}

body.gallery-overview .gallery-card:hover,
body.gallery-overview .gallery-card:nth-child(3n + 2):hover{
  transform: translateY(-4px);
}

body.gallery-overview .gallery-card:nth-child(3n + 2):hover{
  transform: translateY(30px);
}

body.gallery-overview .gallery-card:hover::after{
  opacity: 1;
  transform: scale(1.035);
}

@media (max-width: 900px){
  body.gallery-overview .gallery-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.gallery-overview .gallery-card:nth-child(3n + 2){
    transform: none;
  }

  body.gallery-overview .gallery-card:nth-child(3n + 2):hover{
    transform: translateY(-4px);
  }
}

@media (max-width: 560px){
  body.gallery-overview .gallery-grid{
    grid-template-columns: 1fr;
    gap: 24px;
  }

  body.gallery-overview .gallery-card,
  body.gallery-overview .gallery-card[data-span="8"],
  body.gallery-overview .gallery-card[data-span="6"],
  body.gallery-overview .gallery-card[data-span="4"]{
    min-height: 330px;
    padding-top: 248px;
  }

  body.gallery-overview .gallery-card::after,
  body.gallery-overview .gallery-card::before{
    height: 228px;
  }
}

/* Gallery overview: editorial showcase rows, replacing the old tile wall. */
body.gallery-overview .gallery-grid {
  display: grid;
  gap: 22px;
}

/* Gallery content must remain visible even when the optional reveal script is unavailable. */
body.gallery-overview .reveal {
  opacity: 1;
  transform: none;
}

body.gallery-overview .gallery-card.gallery-card--editorial,
body.gallery-overview .gallery-card.gallery-card--editorial[data-span="8"],
body.gallery-overview .gallery-card.gallery-card--editorial[data-span="6"],
body.gallery-overview .gallery-card.gallery-card--editorial[data-span="4"] {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  grid-column: 1 / -1;
  min-height: 330px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface, #fffdf9);
  color: var(--ink);
  box-shadow: 0 16px 40px rgba(37, 27, 18, .06);
  transform: none;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

body.gallery-overview .gallery-card.gallery-card--editorial:nth-child(even) {
  grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr);
}

body.gallery-overview .gallery-card.gallery-card--editorial:hover,
body.gallery-overview .gallery-card.gallery-card--editorial:nth-child(even):hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 56px rgba(37, 27, 18, .12);
}

body.gallery-overview .gallery-card.gallery-card--editorial::before {
  display: none;
}

body.gallery-overview .gallery-card.gallery-card--editorial::after {
  display: none;
}

body.gallery-overview .gallery-card__visual {
  position: relative;
  min-height: 330px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .12), rgba(20, 15, 12, .26)),
    var(--gallery-cover, linear-gradient(145deg, #e8d7c0, #b99876));
  background-position: center;
  background-size: cover;
}

body.gallery-overview .gallery-card__visual::after {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, .42);
  content: "";
}

body.gallery-overview .gallery-card__copy {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  padding: 46px clamp(28px, 5vw, 74px);
  background: linear-gradient(145deg, #fffdf9, #f5ede3);
}

body.gallery-overview .gallery-card__index {
  position: absolute;
  top: 26px;
  right: 30px;
  color: var(--accent);
  font-size: .68rem;
  letter-spacing: .16em;
}

body.gallery-overview .gallery-card .label {
  color: var(--accent);
  font-size: .68rem;
  letter-spacing: .2em;
}

body.gallery-overview .gallery-card__title {
  max-width: 18ch;
  color: var(--ink);
  font-family: "Fraunces", serif;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: .98;
}

body.gallery-overview .gallery-card__description {
  max-width: 34rem;
  color: var(--muted);
  line-height: 1.55;
}

body.gallery-overview .gallery-card__meta {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

body.gallery-overview .gallery-card__meta span {
  color: var(--accent);
  font-size: 1.25rem;
  line-height: 1;
}

body.gallery-overview .gallery-card.gallery-card--editorial:nth-child(even) .gallery-card__visual {
  order: 2;
}

body.gallery-overview .gallery-card.gallery-card--editorial:nth-child(even) .gallery-card__copy {
  order: 1;
}

@media (max-width: 720px) {
  body.gallery-overview .gallery-card.gallery-card--editorial,
  body.gallery-overview .gallery-card.gallery-card--editorial:nth-child(even) {
    grid-template-columns: 1fr;
  }

  body.gallery-overview .gallery-card.gallery-card--editorial:nth-child(even) .gallery-card__visual,
  body.gallery-overview .gallery-card.gallery-card--editorial:nth-child(even) .gallery-card__copy {
    order: initial;
  }

  body.gallery-overview .gallery-card__visual {
    min-height: 230px;
  }

  body.gallery-overview .gallery-card__copy {
    min-height: 250px;
    padding: 32px 26px 34px;
  }

  body.gallery-overview .gallery-card__title {
    font-size: clamp(2rem, 10vw, 3rem);
  }
}

/* Gallery palette: keep the layout warm and restrained, not gold-heavy. */
body.gallery-overview .gallery-card.gallery-card--editorial {
  border-color: rgba(17, 17, 17, .11) !important;
  background: #fbfaf7 !important;
  box-shadow: 0 16px 40px rgba(37, 27, 18, .05) !important;
  min-height: 245px !important;
}

body.gallery-overview .gallery-card__visual {
  min-height: 245px !important;
  background:
    linear-gradient(145deg, rgba(17, 17, 17, .06), rgba(17, 17, 17, .24)),
    var(--gallery-cover, linear-gradient(145deg, #f2eee8, #d8d0c6)) !important;
}

body.gallery-overview .gallery-card__copy {
  min-height: 245px;
  padding: 30px clamp(24px, 4vw, 54px);
  background: linear-gradient(145deg, #fffefa, #f5f4f1) !important;
}

body.gallery-overview .gallery-card__title {
  font-size: clamp(1.65rem, 3vw, 3rem);
}

body.gallery-overview .gallery-card__description {
  font-size: .9rem;
}

body.gallery-overview .gallery-card__index,
body.gallery-overview .gallery-card.gallery-card--editorial .label,
body.gallery-overview .gallery-card__meta span {
  color: #806f61 !important;
}

body.gallery-overview .gallery-card__meta {
  border-color: rgba(17, 17, 17, .14) !important;
}

/* Gallery overview: simple album grid, with galleries side by side. */
body.gallery-overview .gallery-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 18px !important;
  align-items: stretch !important;
}

body.gallery-overview .gallery-grid [hidden] {
  display: none !important;
}

body.gallery-overview .gallery-grid a.gallery-card.gallery-card--editorial[hidden] {
  display: none !important;
}

body.gallery-overview .gallery-card.gallery-card--editorial,
body.gallery-overview .gallery-card.gallery-card--editorial:nth-child(even) {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-column: auto !important;
  grid-template-rows: 280px 190px !important;
  height: 470px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(17, 17, 17, .11) !important;
  border-radius: 0 !important;
  background: #fbfaf7 !important;
  cursor: pointer !important;
  transform: none !important;
  box-shadow: 0 10px 28px rgba(37, 27, 18, .06) !important;
}

body.gallery-overview .gallery-card.gallery-card--editorial:hover,
body.gallery-overview .gallery-card.gallery-card--editorial:nth-child(even):hover {
  transform: translateY(-3px) !important;
}

body.gallery-overview .gallery-card.gallery-card--editorial::before,
body.gallery-overview .gallery-card.gallery-card--editorial::after {
  display: none !important;
}

body.gallery-overview .gallery-card.gallery-card--editorial .gallery-card__visual,
body.gallery-overview .gallery-card.gallery-card--editorial:nth-child(even) .gallery-card__visual {
  order: 1 !important;
  width: 100% !important;
  min-height: 0 !important;
  height: 280px !important;
  aspect-ratio: 4 / 5 !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-color: #eeeae4 !important;
}

body.gallery-overview .gallery-card.gallery-card--editorial .gallery-card__copy,
body.gallery-overview .gallery-card.gallery-card--editorial:nth-child(even) .gallery-card__copy {
  order: 2 !important;
  min-height: 0 !important;
  height: 190px !important;
  overflow: hidden !important;
  padding: 20px 20px 22px !important;
  gap: 8px !important;
}

body.gallery-overview .gallery-card__index {
  top: 20px !important;
  right: 20px !important;
}

body.gallery-overview .gallery-card__title {
  max-width: none !important;
  font-size: clamp(1.45rem, 2vw, 2.1rem) !important;
}

body.gallery-overview .gallery-card__description {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body.gallery-overview .gallery-card__meta {
  margin-top: 7px !important;
  padding-top: 10px !important;
}

@media (max-width: 900px) {
  body.gallery-overview .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.gallery-overview .gallery-card.gallery-card--editorial,
  body.gallery-overview .gallery-card.gallery-card--editorial:nth-child(even) {
    grid-template-rows: 250px 190px !important;
    height: 440px !important;
  }

  body.gallery-overview .gallery-card.gallery-card--editorial .gallery-card__visual,
  body.gallery-overview .gallery-card.gallery-card--editorial:nth-child(even) .gallery-card__visual {
    height: 250px !important;
  }
}

@media (max-width: 560px) {
  body.gallery-overview .gallery-grid {
    grid-template-columns: 1fr !important;
  }

  body.gallery-overview .gallery-card.gallery-card--editorial,
  body.gallery-overview .gallery-card.gallery-card--editorial:nth-child(even) {
    grid-template-rows: 270px auto !important;
    height: auto !important;
  }

  body.gallery-overview .gallery-card.gallery-card--editorial .gallery-card__visual,
  body.gallery-overview .gallery-card.gallery-card--editorial:nth-child(even) .gallery-card__visual {
    height: 270px !important;
  }

  body.gallery-overview .gallery-card.gallery-card--editorial .gallery-card__copy,
  body.gallery-overview .gallery-card.gallery-card--editorial:nth-child(even) .gallery-card__copy {
    height: auto !important;
  }
}

body.gallery-overview .gallery-overview__more {
  display: flex;
  justify-content: center;
  padding-top: 26px;
}

body.gallery-overview .gallery-overview__more-button {
  min-width: 210px;
}

/* Let longer gallery descriptions expand the copy area instead of being clipped. */
body.gallery-overview .gallery-card.gallery-card--editorial,
body.gallery-overview .gallery-card.gallery-card--editorial:nth-child(even) {
  grid-template-rows: 280px minmax(190px, auto) !important;
  height: auto !important;
  min-height: 470px !important;
}

body.gallery-overview .gallery-card.gallery-card--editorial .gallery-card__copy,
body.gallery-overview .gallery-card.gallery-card--editorial:nth-child(even) .gallery-card__copy {
  height: auto !important;
  min-height: 190px !important;
  overflow: visible !important;
}

body.gallery-overview .gallery-card__description {
  -webkit-line-clamp: 3;
}

body.gallery-overview .gallery-card__title {
  display: block;
  min-height: 1.96em;
}

@media (max-width: 560px) {
  body.gallery-overview .gallery-card.gallery-card--editorial,
  body.gallery-overview .gallery-card.gallery-card--editorial:nth-child(even) {
    grid-template-rows: 270px auto !important;
    min-height: 0 !important;
  }
}

.gallery-services-frame{
  display: grid;
  gap: 18px;
}

.gallery-section-head{
  max-width: 52rem;
}

.gallery-category-frame{
  display: grid;
  gap: 18px;
}

.gallery-category-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 200px;
  grid-auto-flow: dense;
  gap: 10px;
}

.gallery-category-item{
  min-height: 0;
  height: 100%;
  padding: 0;
  grid-column: span var(--cols, 1);
  grid-row: span var(--rows, 1);
}

.gallery-category-item::after{
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.gallery-category-item:hover{
  transform: translateY(-4px) scale(1.01);
}

.gallery-category-modal{
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  place-items: center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.gallery-category-modal.is-open{
  opacity: 1;
  pointer-events: auto;
}

.gallery-category-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.52);
  backdrop-filter: blur(10px);
}

.gallery-category-modal__dialog{
  position: relative;
  width: min(100%, 1240px);
  max-height: min(90vh, 940px);
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 246, 239, 0.98)),
    linear-gradient(135deg, rgba(181, 140, 97, 0.08), transparent 26%);
  box-shadow: 0 28px 90px rgba(18, 14, 10, 0.24);
}

.gallery-category-modal__close{
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: rgba(255, 255, 255, 0.86);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-category-modal__head{
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding-right: 56px;
}

.gallery-category-modal__head h2{
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 0.96;
}

.gallery-category-modal__grid{
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 110px;
  grid-auto-flow: dense;
  gap: 8px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.48);
  overflow: hidden;
}

.gallery-modal-shot{
  position: relative;
  margin: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  grid-column: span var(--cols, 1);
  grid-row: span var(--rows, 1);
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.28), transparent 24%),
    radial-gradient(circle at 72% 68%, rgba(255, 255, 255, 0.08), transparent 20%),
    linear-gradient(180deg, #ecd8c2, #cda985);
}

.gallery-modal-shot::after{
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.gallery-modal-shot.is-focused{
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.gallery-modal-shot[data-tone="sand"]{
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.28), transparent 24%),
    radial-gradient(circle at 72% 68%, rgba(255, 255, 255, 0.08), transparent 20%),
    linear-gradient(180deg, #ead8c2, #cda07c);
}

.gallery-modal-shot[data-tone="cream"]{
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.32), transparent 24%),
    radial-gradient(circle at 72% 68%, rgba(255, 255, 255, 0.12), transparent 20%),
    linear-gradient(180deg, #f1ebe3, #dacdbd);
}

.gallery-modal-shot[data-tone="rose"]{
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.3), transparent 24%),
    radial-gradient(circle at 72% 68%, rgba(255, 255, 255, 0.12), transparent 20%),
    linear-gradient(180deg, #ead6d1, #c89f95);
}

.gallery-modal-shot[data-tone="sage"]{
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.3), transparent 24%),
    radial-gradient(circle at 72% 68%, rgba(255, 255, 255, 0.12), transparent 20%),
    linear-gradient(180deg, #d7e0d9, #9eb0a7);
}

.gallery-modal-shot[data-tone="ink"]{
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.12), transparent 24%),
    radial-gradient(circle at 72% 68%, rgba(255, 255, 255, 0.06), transparent 20%),
    linear-gradient(180deg, #3b332d, #140f0d);
}

.gallery-modal{
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.gallery-modal.is-open{
  opacity: 1;
  pointer-events: auto;
}

.gallery-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.46);
  backdrop-filter: blur(8px);
}

.gallery-modal__dialog{
  position: relative;
  width: min(100%, 1100px);
  max-height: min(88vh, 900px);
  overflow: auto;
  padding: 28px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 246, 239, 0.98)),
    linear-gradient(135deg, rgba(181, 140, 97, 0.06), transparent 26%);
  box-shadow: 0 28px 90px rgba(18, 14, 10, 0.24);
}

.gallery-modal__close{
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: rgba(255, 255, 255, 0.86);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-modal__content{
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 20px;
  align-items: start;
}

.gallery-modal__text{
  display: grid;
  gap: 14px;
  padding-right: 16px;
}

.gallery-modal__text h3{
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.92;
}

.gallery-modal__lead{
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  max-width: 42rem;
}

.gallery-modal__details{
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.75;
  max-width: 48rem;
}

.gallery-modal__shots{
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 82px;
  gap: 0;
  border: 1px solid rgba(17, 17, 17, 0.08);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.54);
  min-height: 574px;
}

.gallery-shot{
  margin: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.34), transparent 24%),
    radial-gradient(circle at 72% 68%, rgba(255, 255, 255, 0.14), transparent 20%),
    linear-gradient(180deg, #ecd8c2, #cda985);
}

.gallery-shot[data-tone="sand"]{
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.34), transparent 24%),
    radial-gradient(circle at 72% 68%, rgba(255, 255, 255, 0.14), transparent 20%),
    linear-gradient(180deg, #ead8c2, #cda07c);
}

.gallery-shot[data-tone="cream"]{
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.34), transparent 24%),
    radial-gradient(circle at 72% 68%, rgba(255, 255, 255, 0.12), transparent 20%),
    linear-gradient(180deg, #f1ebe3, #dacdbd);
}

.gallery-shot[data-tone="rose"]{
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.34), transparent 24%),
    radial-gradient(circle at 72% 68%, rgba(255, 255, 255, 0.14), transparent 20%),
    linear-gradient(180deg, #ead6d1, #c89f95);
}

.gallery-shot[data-tone="sage"]{
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.34), transparent 24%),
    radial-gradient(circle at 72% 68%, rgba(255, 255, 255, 0.14), transparent 20%),
    linear-gradient(180deg, #d7e0d9, #9eb0a7);
}

.gallery-shot[data-tone="ink"]{
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 255, 255, 0.12), transparent 24%),
    radial-gradient(circle at 72% 68%, rgba(255, 255, 255, 0.06), transparent 20%),
    linear-gradient(180deg, #3b332d, #140f0d);
}

.gallery-shot:nth-child(1){
  grid-column: 1 / 8;
  grid-row: 1 / 5;
}

.gallery-shot:nth-child(2){
  grid-column: 8 / 13;
  grid-row: 1 / 3;
}

.gallery-shot:nth-child(3){
  grid-column: 8 / 13;
  grid-row: 3 / 5;
}

.gallery-shot:nth-child(4){
  grid-column: 1 / 4;
  grid-row: 5 / 8;
}

.gallery-shot:nth-child(5){
  grid-column: 4 / 10;
  grid-row: 5 / 8;
}

.gallery-shot:nth-child(6){
  grid-column: 10 / 13;
  grid-row: 5 / 8;
}

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

.gallery-mosaic__item{
  min-height: 220px;
}

.gallery-mosaic__item--1{
  grid-column: span 5;
  grid-row: span 2;
}

.gallery-mosaic__item--2{
  grid-column: span 4;
}

.gallery-mosaic__item--3{
  grid-column: span 3;
}

.gallery-mosaic__item--4{
  grid-column: span 3;
}

.gallery-mosaic__item--5{
  grid-column: span 4;
}

.gallery-mosaic__item--6{
  grid-column: span 5;
  grid-row: span 2;
}

.gallery-mosaic__item--7{
  grid-column: span 4;
}

.gallery-mosaic__item--8{
  grid-column: span 3;
}

.gallery-card{
  position: relative;
  display: grid;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.gallery-card:hover{
  transform: translateY(-2px);
  border-color: rgba(181, 140, 97, 0.35);
  box-shadow: 0 28px 70px rgba(27, 20, 14, 0.12);
}

.gallery-card__media{
  position: absolute;
  inset: 0;
}

.gallery-card__media img,
.gallery-card__placeholder{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-card__placeholder{
  display: grid;
  align-content: end;
  gap: 6px;
  padding: 18px;
  color: var(--bg);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.54)),
    linear-gradient(135deg, rgba(181, 140, 97, 0.48), rgba(125, 139, 134, 0.34));
}

.gallery-card__placeholder span{
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.65rem;
}

.gallery-card__placeholder strong{
  font-family: "Fraunces", serif;
  font-size: 1.3rem;
  line-height: 1.02;
}

.gallery-card__overlay{
  position: relative;
  z-index: 1;
  display: grid;
  align-content: space-between;
  gap: 16px;
  padding: 18px;
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.56));
  color: #fff;
}

.gallery-card__tags{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gallery-card__tag{
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.62rem;
}

.gallery-card__content{
  display: grid;
  gap: 8px;
}

.gallery-card__content h3{
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(1.15rem, 1.7vw, 1.8rem);
  line-height: 1.02;
}

.gallery-card__content p{
  margin: 0;
  max-width: 28rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
}

.gallery-mosaic__item.is-employee .gallery-card__overlay{
  background:
    linear-gradient(180deg, rgba(17, 17, 17, 0.08), rgba(17, 17, 17, 0.52)),
    linear-gradient(135deg, rgba(125, 139, 134, 0.24), rgba(181, 140, 97, 0.3));
}

.gallery-mosaic__item.is-service .gallery-card__overlay{
  background:
    linear-gradient(180deg, rgba(17, 17, 17, 0.08), rgba(17, 17, 17, 0.56)),
    linear-gradient(135deg, rgba(181, 140, 97, 0.28), rgba(216, 196, 170, 0.18));
}

.gallery-card{
  position: relative;
  min-height: 240px;
  overflow: hidden;
  display: grid;
  align-content: end;
  gap: 0;
  text-align: left;
  padding: 18px 18px 16px;
  border: 0;
  cursor: default;
  transition: transform 180ms ease;
  box-shadow: none;
  color: #fff9f4;
}

.gallery-card::before{
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0 40%, rgba(17, 17, 17, 0.76) 100%),
    linear-gradient(135deg, rgba(181, 140, 97, 0.16), transparent 36%);
}

.gallery-card > *{
  position: relative;
  z-index: 1;
}

.gallery-card:hover{
  transform: translateY(-4px);
}

.gallery-card .label{
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.68rem;
  color: rgba(255, 249, 244, 0.74);
}

.gallery-card h3{
  margin: 6px 0 4px;
  font-family: "Fraunces", serif;
  font-size: 1.9rem;
  line-height: 1;
  color: #fff9f4;
}

.gallery-card p{
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  max-width: 28rem;
}

.gallery-card[data-span="8"]{
  grid-column: span 8;
}

.gallery-card[data-span="6"]{
  grid-column: span 6;
}

.gallery-card[data-span="4"]{
  grid-column: span 4;
}

.gallery-card[data-tone="sand"]{
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, #e9d7be, #caa981 55%, #8f6c4d);
}

.gallery-card[data-tone="ink"]{
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04)),
    linear-gradient(135deg, #43352b, #1b1512 60%, #0f0d0c);
}

.gallery-card[data-tone="rose"]{
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, #e1b7a5, #c4907e 58%, #8f6059);
}

.gallery-card[data-tone="cream"]{
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.12)),
    linear-gradient(135deg, #f8eedf, #e0c8a5 60%, #c09a72);
}

.gallery-card[data-tone="sage"]{
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, #c2cdc1, #93a298 55%, #66766f);
}

@media (max-width: 1160px) {

  .gallery-card[data-span="8"],
.gallery-card[data-span="6"],
.gallery-card[data-span="4"]{
    grid-column: span 6;
  }

  .gallery-category-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 180px;
  }

  .gallery-category-item{
    grid-column: span var(--cols, 1);
    grid-row: span var(--rows, 1);
  }

  .gallery-category-modal__dialog{
    padding: 20px;
  }

  .gallery-category-modal__grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 130px;
  }

  .gallery-modal-shot{
    grid-column: auto !important;
    grid-row: auto !important;
  }}

@media (max-width: 860px) {

  .gallery-category-grid{
    grid-template-columns: 1fr;
    grid-auto-rows: 180px;
  }

  .gallery-category-item{
    grid-column: auto !important;
    grid-row: auto !important;
    min-height: 180px;
  }

  .gallery-category-modal__grid{
    grid-template-columns: 1fr;
    grid-auto-rows: 160px;
  }

  .gallery-card{
    min-height: 240px;
  }

  .gallery-card[data-span="8"],
.gallery-card[data-span="6"],
.gallery-card[data-span="4"]{
    grid-column: auto;
  }

  .gallery-modal__dialog{
    padding: 22px;
  }

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

  .gallery-modal__text{
    padding-right: 0;
  }

  .gallery-modal__shots{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 120px;
    min-height: auto;
  }

  .gallery-modal__shots > .gallery-shot{
    grid-column: auto !important;
    grid-row: auto !important;
  }}

.gallery-grid{
  gap: var(--content-gap);
}

.gallery-card{
  padding: var(--card-space);
}

/* Final overview presentation: rounded editorial gallery cards. */
body.gallery-overview .gallery-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px 22px;
}

body.gallery-overview .gallery-card,
body.gallery-overview .gallery-card[data-span="8"],
body.gallery-overview .gallery-card[data-span="6"],
body.gallery-overview .gallery-card[data-span="4"]{
  grid-column: auto;
  min-height: 360px;
  padding: 274px 10px 16px;
  border: 0;
  background: transparent;
  color: var(--ink);
  transform: none;
  box-shadow: none;
}

body.gallery-overview .gallery-card:nth-child(3n + 2){
  transform: translateY(34px);
}

body.gallery-overview .gallery-card::before,
body.gallery-overview .gallery-card::after{
  top: 0;
  left: 0;
  right: 0;
  bottom: auto;
  width: 100%;
  height: 252px;
  border-radius: 48% 48% 14px 14px;
}

body.gallery-overview .gallery-card::before{
  background: linear-gradient(180deg, rgba(17, 17, 17, 0) 45%, rgba(17, 17, 17, .5) 100%);
}

body.gallery-overview .gallery-card::after{
  opacity: .96;
  transform: none;
  transition: transform 420ms cubic-bezier(.22, 1, .36, 1), opacity 220ms ease;
}

body.gallery-overview .gallery-card .label{
  color: var(--accent);
}

body.gallery-overview .gallery-card h3{
  margin: 7px 0 5px;
  color: var(--ink);
  font-size: clamp(1.55rem, 2.4vw, 2.25rem);
  line-height: .98;
}

body.gallery-overview .gallery-card p{
  color: var(--muted);
}

body.gallery-overview .gallery-card:hover{
  transform: translateY(-4px);
}

body.gallery-overview .gallery-card:nth-child(3n + 2):hover{
  transform: translateY(30px);
}

body.gallery-overview .gallery-card:hover::after{
  opacity: 1;
  transform: scale(1.035);
}

@media (max-width: 900px){
  body.gallery-overview .gallery-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.gallery-overview .gallery-card:nth-child(3n + 2),
  body.gallery-overview .gallery-card:nth-child(3n + 2):hover{
    transform: none;
  }

  body.gallery-overview .gallery-card:hover{
    transform: translateY(-4px);
  }
}

@media (max-width: 560px){
  body.gallery-overview .gallery-grid{
    grid-template-columns: 1fr;
    gap: 24px;
  }

  body.gallery-overview .gallery-card,
  body.gallery-overview .gallery-card[data-span="8"],
  body.gallery-overview .gallery-card[data-span="6"],
  body.gallery-overview .gallery-card[data-span="4"]{
    min-height: 330px;
    padding-top: 248px;
  }

  body.gallery-overview .gallery-card::before,
  body.gallery-overview .gallery-card::after{
    height: 228px;
  }
}

/* Final gallery overview layout: one editorial showcase row per gallery. */
body.gallery-overview .gallery-grid {
  display: grid;
  gap: 22px;
}

body.gallery-overview .gallery-card.gallery-card--editorial,
body.gallery-overview .gallery-card.gallery-card--editorial[data-span="8"],
body.gallery-overview .gallery-card.gallery-card--editorial[data-span="6"],
body.gallery-overview .gallery-card.gallery-card--editorial[data-span="4"] {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  grid-column: 1 / -1;
  min-height: 330px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface, #fffdf9);
  color: var(--ink);
  box-shadow: 0 16px 40px rgba(37, 27, 18, .06);
  transform: none;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

body.gallery-overview .gallery-card.gallery-card--editorial:nth-child(even) {
  grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr);
}

body.gallery-overview .gallery-card.gallery-card--editorial:hover,
body.gallery-overview .gallery-card.gallery-card--editorial:nth-child(even):hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 56px rgba(37, 27, 18, .12);
}

body.gallery-overview .gallery-card.gallery-card--editorial::before,
body.gallery-overview .gallery-card.gallery-card--editorial::after {
  display: none;
}

body.gallery-overview .gallery-card__visual {
  position: relative;
  min-height: 330px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .12), rgba(20, 15, 12, .26)),
    var(--gallery-cover, linear-gradient(145deg, #e8d7c0, #b99876));
  background-position: center;
  background-size: cover;
}

body.gallery-overview .gallery-card__visual::after {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, .42);
  content: "";
}

body.gallery-overview .gallery-card__copy {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  padding: 46px clamp(28px, 5vw, 74px);
  background: linear-gradient(145deg, #fffdf9, #f5ede3);
}

body.gallery-overview .gallery-card__index {
  position: absolute;
  top: 26px;
  right: 30px;
  color: var(--accent);
  font-size: .68rem;
  letter-spacing: .16em;
}

body.gallery-overview .gallery-card.gallery-card--editorial .label {
  color: var(--accent);
  font-size: .68rem;
  letter-spacing: .2em;
}

body.gallery-overview .gallery-card__title {
  max-width: 18ch;
  color: var(--ink);
  font-family: "Fraunces", serif;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: .98;
}

body.gallery-overview .gallery-card__description {
  max-width: 34rem;
  color: var(--muted);
  line-height: 1.55;
}

body.gallery-overview .gallery-card__meta {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

body.gallery-overview .gallery-card__meta span {
  color: var(--accent);
  font-size: 1.25rem;
  line-height: 1;
}

body.gallery-overview .gallery-card.gallery-card--editorial:nth-child(even) .gallery-card__visual {
  order: 2;
}

body.gallery-overview .gallery-card.gallery-card--editorial:nth-child(even) .gallery-card__copy {
  order: 1;
}

@media (max-width: 720px) {
  body.gallery-overview .gallery-card.gallery-card--editorial,
  body.gallery-overview .gallery-card.gallery-card--editorial:nth-child(even) {
    grid-template-columns: 1fr;
  }

  body.gallery-overview .gallery-card.gallery-card--editorial:nth-child(even) .gallery-card__visual,
  body.gallery-overview .gallery-card.gallery-card--editorial:nth-child(even) .gallery-card__copy {
    order: initial;
  }

  body.gallery-overview .gallery-card__visual {
    min-height: 230px;
  }

  body.gallery-overview .gallery-card__copy {
    min-height: 250px;
    padding: 32px 26px 34px;
  }

  body.gallery-overview .gallery-card__title {
    font-size: clamp(2rem, 10vw, 3rem);
  }
}
