/* ==========================================================================
   media.css — Photography treatments
   Real photos from nateshouse.org, given room to breathe and a consistent
   editorial frame: gold hairline, deep shadow, slow zoom on hover.
   Depends on theme.css tokens.
   ========================================================================== */

/* ---------- Shared frame ---------- */
.ph {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--navy-800);
  isolation: isolate;
}
.ph > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .8s cubic-bezier(.2, .7, .2, 1), filter .5s ease;
}
/* subtle warm grade so the phone snapshots sit together as one set */
.ph--graded > img { filter: saturate(1.06) contrast(1.04); }

/* gold hairline that rides on top of the image */
.ph--edge::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(217, 164, 65, .35);
  pointer-events: none;
  z-index: 3;
}

/* readable gradient for text laid over a photo */
.ph--scrim::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(13, 27, 42, .05) 0%, rgba(13, 27, 42, .55) 55%, rgba(13, 27, 42, .88) 100%);
}

.ph--zoom:hover > img,
.ph--zoom:focus-visible > img { transform: scale(1.06); }

@media (prefers-reduced-motion: reduce) {
  .ph > img { transition: none; }
  .ph--zoom:hover > img { transform: none; }
}

/* ---------- Hero bento photo cell ---------- */
.bento__cell--photo {
  padding: 0;
  overflow: hidden;
  position: relative;
  min-height: 240px;
  grid-column: span 6;
}
/* 780px matches the bento's own breakpoint in layout.css — keep them in step.
   The photo sits between the Rooms and Satisfaction cells: 2 + 2 + 2 = 6 cols. */
@media (min-width: 780px) {
  .bento__cell--photo { grid-column: span 2; grid-row: span 2; min-height: 0; }
}
.bento__cell--photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 9s ease-out;
}
.bento__cell--photo:hover img { transform: scale(1.07); }
.bento__photo-quote {
  position: relative;
  z-index: 3;
  margin: 0;
  align-self: end;
  padding: clamp(1.2rem, 3vw, 1.9rem);
  font-family: var(--font-head);
  font-style: italic;
  font-size: clamp(1.05rem, 1rem + .6vw, 1.4rem);
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .5);
}
.bento__photo-quote cite {
  display: block;
  margin-top: .6rem;
  font-family: var(--font-body);
  font-style: normal;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-400);
}
.bento__cell--photo { display: grid; align-content: end; }

/* In the 2-column slot between Rooms and Satisfaction the box is narrow, so the
   pull quote steps down a size. Must come after the base .bento__photo-quote
   rule above — same specificity, so source order decides. */
@media (min-width: 780px) {
  .bento__photo-quote {
    font-size: clamp(.86rem, .78rem + .28vw, 1rem);
    line-height: 1.42;
    padding: clamp(.85rem, 1.5vw, 1.15rem);
  }
  .bento__photo-quote cite { margin-top: .45rem; font-size: .63rem; }
}

/* ---------- Mission: portrait beside the copy ---------- */
.split-media {
  display: grid;
  gap: clamp(1.6rem, 4vw, 3rem);
  align-items: center;
  margin-top: 2rem;
}
@media (min-width: 880px) {
  .split-media { grid-template-columns: .85fr 1.15fr; }
  .split-media--flip > .split-media__fig { order: 2; }
}
.split-media__fig {
  position: relative;
  margin: 0;
}
.split-media__fig .ph {
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow-lg);
}
/* offset gold plate behind the portrait */
.split-media__fig::before {
  content: "";
  position: absolute;
  inset: auto -14px -14px auto;
  width: 62%;
  height: 62%;
  border-radius: var(--r-lg);
  background: linear-gradient(140deg, var(--gold-500), var(--gold-400));
  z-index: -1;
}
.split-media__caption {
  margin-top: 1rem;
  font-size: .82rem;
  letter-spacing: .06em;
  color: var(--muted);
}

/* ---------- Photo feature cards ---------- */
.card--photo { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card--photo .ph { border-radius: 0; aspect-ratio: 16 / 10; flex: none; }
.card--photo .card__text { padding: clamp(1.1rem, 2.5vw, 1.5rem); }
.card--photo h3 { margin-bottom: .4rem; }
.feature-bento .card--tall.card--photo .ph { aspect-ratio: 4 / 3; }
@media (min-width: 820px) {
  .feature-bento .card--tall.card--photo .ph { aspect-ratio: auto; flex: 1 1 auto; min-height: 180px; }
}

/* ---------- Homes gallery ---------- */
.gallery {
  display: grid;
  gap: clamp(.8rem, 2vw, 1.15rem);
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 900px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
  }
  .gallery__item--hero { grid-column: span 2; grid-row: span 2; }
  .gallery__item--tall { grid-row: span 2; }
  .gallery__item--wide { grid-column: span 2; }
}
.gallery__item {
  position: relative;
  min-height: 190px;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.gallery__item .ph { border-radius: inherit; width: 100%; height: 100%; }
.gallery__cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  padding: 1.5rem 1.1rem .95rem;
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.02rem;
  line-height: 1.3;
}
.gallery__cap span {
  display: block;
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: .3rem;
}

/* ---------- CTA band over a photo ---------- */
.cta-band--photo {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  /* the photo replaces the flat gradient from components.css */
  background: var(--navy-900);
}
.cta-band--photo > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
  z-index: 0;
}
.cta-band--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(140deg, rgba(13, 27, 42, .93), rgba(42, 111, 107, .84));
}
/* lift the actual content above image + scrim */
.cta-band--photo > :not(img) { position: relative; z-index: 2; }

/* ---------- Footer logo ---------- */
.footer__logo {
  width: 170px;
  height: auto;
  margin-bottom: .2rem;
}
