.castle-case-page .collection-detail-hero > figure img { object-position: center; }

.castle-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.castle-plan-grid figure,
.castle-gallery figure {
  margin: 0;
  background: #fff;
}

.castle-plan-grid img,
.castle-gallery img {
  display: block;
  width: 100%;
  cursor: zoom-in;
}

.castle-plan-grid img { aspect-ratio: 4 / 3; object-fit: contain; background: #f8f5ef; }

.castle-plan-grid figcaption,
.castle-gallery figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px 18px;
  color: #24211d;
}

.castle-plan-grid figcaption strong,
.castle-gallery figcaption strong { font: 500 .95rem/1.5 "IBM Plex Sans SC", sans-serif; }
.castle-plan-grid figcaption span,
.castle-gallery figcaption span { color: #7a746c; font: 400 .72rem/1.5 Manrope, "IBM Plex Sans SC", sans-serif; letter-spacing: .04em; }

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

.castle-gallery figure,
.castle-gallery figure.is-wide {
  grid-column: auto;
  display: grid;
  grid-template-rows: auto minmax(72px, auto);
}
.castle-gallery img { aspect-ratio: 4 / 3; object-fit: cover; }
.castle-gallery figure.is-wide img { aspect-ratio: 4 / 3; }
.castle-case-note { align-items: stretch; }

.castle-brand-panel {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(340px, 1.18fr);
  overflow: hidden;
  background: #242321;
  color: #fff;
}

.castle-brand-mark,
.castle-brand-copy { padding: clamp(42px, 6vw, 82px); }

.castle-brand-mark {
  display: flex;
  min-height: 420px;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(255,255,255,.16);
}

.castle-brand-mark span {
  color: #d8a8a3;
  font: 500 .68rem/1.4 Manrope, sans-serif;
  letter-spacing: .16em;
}

.castle-brand-mark strong {
  font: 400 clamp(3.3rem, 6vw, 6.4rem)/.95 Manrope, sans-serif;
  letter-spacing: -.055em;
}

.castle-brand-copy { align-self: center; }
.castle-brand-copy h2 { max-width: 9em; margin: 0 0 22px; color: #fff !important; font: 400 clamp(2.2rem, 3.6vw, 3.8rem)/1.18 "Noto Serif SC", serif; }
.castle-brand-copy p { max-width: 620px; margin: 0; color: rgba(255,255,255,.76); line-height: 1.9; }
.castle-brand-copy .focus-actions { margin-top: 30px; }
.castle-brand-copy .ia-button { background: #fff; border-color: #fff; color: #242321; }
.castle-brand-copy .ia-button-secondary { background: transparent; border-color: rgba(255,255,255,.42); color: #fff; }

.castle-case-page .castle-brand-panel {
  background: #f1ede7;
  color: #242321;
  border: 1px solid #d9d1c8;
}

.castle-brand-product {
  position: relative;
  display: grid;
  min-width: 0;
  padding: clamp(26px, 4vw, 54px);
  background: #fff;
  border-right: 1px solid #d9d1c8;
  color: #242321;
  text-decoration: none;
}

.castle-brand-product > span {
  color: #8b3039;
  font: 500 .68rem/1.4 Manrope, sans-serif;
  letter-spacing: .15em;
}

.castle-brand-product img {
  align-self: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  transition: transform .35s ease;
}

.castle-brand-product:hover img { transform: scale(1.025); }
.castle-brand-product > div { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding-top: 18px; border-top: 1px solid #ded7ce; }
.castle-brand-product strong { font: 500 1.05rem/1.4 "IBM Plex Sans SC", sans-serif; }
.castle-brand-product small { color: #8b3039; font-size: .7rem; }
.castle-case-page .castle-brand-copy h2 { color: #242321 !important; }
.castle-case-page .castle-brand-copy > p:not(.focus-eyebrow) { color: #6f6861; }
.castle-case-page .castle-brand-copy .focus-eyebrow { margin: 0 0 20px; color: #8b3039; }
.castle-case-page .castle-brand-copy .ia-button { background: #822d38; border-color: #822d38; color: #fff; }
.castle-case-page .castle-brand-copy .ia-button-secondary { background: transparent; border-color: #9f958b; color: #242321; }

.pc-gallery-hint { display: none; }

.case-library-nav { display: flex; width: min(1280px,calc(100% - 80px)); margin: 0 auto; justify-content: space-between; gap: 24px; padding: 32px 0 70px; }
.case-library-nav a { color: #6f6861; font-size: .78rem; text-decoration: none; border-bottom: 1px solid currentColor; }

@media (max-width: 700px) {
  .castle-plan-grid { grid-template-columns: 1fr; gap: 12px; }
  .castle-plan-grid figcaption,
  .castle-gallery figcaption { align-items: flex-start; flex-direction: column; gap: 4px; padding: 13px 14px 15px; }
  .pc-gallery-hint { display: block; margin: 0 0 12px; color: #963342; font: 500 11px/1.5 Manrope, "IBM Plex Sans SC", sans-serif; letter-spacing: .05em; }
  .castle-case-page .castle-gallery {
    display: flex;
    gap: 10px;
    margin-right: -20px;
    margin-left: -20px;
    padding: 0 20px 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .castle-case-page .castle-gallery::-webkit-scrollbar { display: none; }
  .castle-case-page .castle-gallery figure,
  .castle-case-page .castle-gallery figure.is-wide { flex: 0 0 82vw; grid-column: auto; scroll-snap-align: start; }
  .castle-case-page .castle-gallery img,
  .castle-case-page .castle-gallery figure.is-wide img { width: 100%; height: auto; aspect-ratio: 16 / 11; object-fit: cover; }
  .castle-brand-panel { grid-template-columns: 1fr; }
  .castle-brand-mark,
  .castle-brand-copy { padding: 34px 22px; }
  .castle-brand-mark { min-height: 245px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.16); }
  .castle-brand-mark strong { font-size: 3.6rem; }
  .castle-brand-copy h2 { font-size: 2.1rem; }
  .castle-brand-product { padding: 24px 18px; border-right: 0; border-bottom: 1px solid #d9d1c8; }
  .castle-brand-product > div { align-items: flex-start; flex-direction: column; gap: 5px; }
  .case-library-nav { width: calc(100% - 40px); align-items: flex-start; flex-direction: column; padding: 24px 0 54px; }
}
