/* =====================================================================
   PHOTOGRAPHS: carousel, hero variants, side photos, photo band, statement photo.
   Shared rules first, then one block per prototype so each treats the photos differently.
   ===================================================================== */

/* ---------- Carousel ---------- */
.carousel {
  position: absolute;
  inset: 0;
}
.carousel-slides {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.slide {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transition: opacity 1.3s ease;
}
.slide.is-active {
  z-index: 2;
  opacity: 1;
}
.slide img {
  position: absolute;
  inset: -4% 0;
  width: 100%;
  height: 108%;
  object-fit: cover;
}
@media (prefers-reduced-motion: no-preference) {
  .slide.is-active {
    animation: phKb 15s ease-out both;
  }
}
@keyframes phKb {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.12);
  }
}
.carousel-ui {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}
.carousel-dots {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  pointer-events: auto;
}
.carousel-dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.carousel-dot::before {
  content: '';
  width: 16px;
  height: 2px;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.5s var(--ease), background-color 0.3s;
}
.carousel-dot:hover::before {
  background: #fff;
}
.carousel-dot.is-active::before {
  width: 26px;
  background: var(--gold);
}
.carousel-count {
  position: absolute;
  right: calc(10px + var(--n, 3) * 28px + 12px);
  bottom: 18px;
  color: #fff;
  font: 600 0.7rem/1 var(--font-body);
  letter-spacing: 0.2em;
}
.carousel-progress {
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
}
.carousel-progress i {
  display: block;
  height: 100%;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  animation: phProg var(--ci, 6s) linear forwards;
}
.carousel.is-paused .carousel-progress i {
  animation-play-state: paused;
}
@keyframes phProg {
  to {
    transform: scaleX(1);
  }
}
.hero-frame .hero-tint {
  z-index: 3;
}
.hero-frame .hero-tag {
  z-index: 4;
}

/* ---------- Hero: full-bleed photograph variant (02, 07) ---------- */

/* ---------- Hero: photo mosaic variant (03) ---------- */

/* ---------- Side photographs (Services, Approach) ---------- */
.side-photo {
  position: relative;
  margin-top: 2.2rem;
  max-width: 32rem;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  outline: 1px solid var(--brass);
  outline-offset: 10px;
}
.side-photo img {
  position: absolute;
  inset: -6% 0;
  width: 100%;
  height: 112%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.04);
}
.approach-photo {
  aspect-ratio: 5 / 4;
}
.services-aside .side-photo {
  outline-color: var(--gold-line);
}

/* ---------- Photo band ---------- */
.photo-band {
  position: relative;
  background: var(--navy-3);
}
.photo-band figure {
  position: relative;
  margin: 0;
}
.photo-band-frame {
  position: relative;
  height: clamp(260px, 42vw, 560px);
  overflow: hidden;
}
.photo-band-frame img {
  position: absolute;
  inset: -8% 0;
  width: 100%;
  height: 116%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.05);
}
.photo-band-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(1, 2, 32, 0.35), rgba(1, 2, 32, 0.05) 40%, rgba(1, 2, 32, 0.86));
}
.photo-band figcaption {
  position: absolute;
  left: 50%;
  bottom: clamp(1.2rem, 3vw, 2.4rem);
  z-index: 2;
  width: max-content;
  max-width: calc(100% - 2 * var(--gutter));
  margin: 0;
  transform: translateX(-50%);
  text-align: center;
  justify-content: center;
}
.photo-band figcaption::before {
  display: none;
}

/* ---------- Statement band photograph ---------- */
.statement.has-photo {
  isolation: isolate;
}
.statement-photo {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.statement-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.7) contrast(1.08) brightness(0.78);
}
.statement-photo::before,
.statement-photo::after {
  content: '';
  position: absolute;
  inset: 0;
}
.statement-photo::before {
  background: #0a0a8a;
  mix-blend-mode: multiply;
  opacity: 0.55;
}
.statement-photo::after {
  background: radial-gradient(ellipse at center, rgba(2, 1, 74, 0.45), rgba(2, 1, 74, 0.86));
}

/* =====================================================================
   01 HERITAGE: framed portrait carousel, soft crossfade, hairline offset frame
   ===================================================================== */
html[data-demo='01'] .hero-frame-wrap {
  width: min(100%, 470px);
}
html[data-demo='01'] .hero-frame img {
  filter: saturate(0.92) contrast(1.05);
}

/* =====================================================================
   02 NOIR: full-bleed photographs, vertical blinds transition
   ===================================================================== */

/* =====================================================================
   03 DAYLIGHT: bright photo mosaic, rounded corners, soft shadows
   ===================================================================== */

/* =====================================================================
   04 DOSSIER: taped polaroid with sepia crossfade, clipped photographs
   ===================================================================== */

/* =====================================================================
   05 OBSIDIAN: wide glass stage, blur-through transition
   ===================================================================== */

/* =====================================================================
   06 MONOLITH: duotone gold photographs, hard horizontal wipe
   ===================================================================== */

/* =====================================================================
   07 PREMIERE: letterboxed film frames, long dissolves, chapter photographs
   ===================================================================== */

/* ---------- hero tuning after review ---------- */

/* let hover reach the carousel through the decorative overlays (pauses autoplay) */
.hero-frame .hero-tint,
.hero-frame .hero-tag {
  pointer-events: none;
}
