/* About photo fan gallery hero — white / orange */

.about-photo-hero {
  position: relative;
  /* Allow hover-scale cards to breathe; clip only horizontal bleed */
  overflow-x: clip;
  overflow-y: visible;
  /* Clear fixed nav, then keep the copy+fan block compact */
  padding: calc(var(--header-height, 72px) + 6px) 0 28px;
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(240, 90, 20, 0.12), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #FFF8F3 55%, #ffffff 100%);
  text-align: center;
}

.about-photo-hero__grid {
  pointer-events: none;
  position: absolute;
  inset: 0;
  top: 42%;
  z-index: 0;
  height: 320px;
  opacity: 0.18;
  background-image:
    linear-gradient(to right, rgba(194, 65, 12, 0.35) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(194, 65, 12, 0.35) 1px, transparent 1px);
  background-size: 3rem 3rem;
  -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 70%, transparent 110%);
  mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 70%, transparent 110%);
}

.about-photo-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.about-photo-hero__brand {
  margin: 0 auto 12px;
}

.about-photo-hero__logo {
  display: block;
  width: clamp(140px, 22vw, 200px);
  height: auto;
  margin: 0 auto;
}

.about-photo-hero__eyebrow {
  display: block;
  margin: 0 0 2px;
  font-size: clamp(11px, 1.4vw, 13px);
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--color-accent, #F05A14);
}

.about-photo-hero__title {
  margin: 0 auto 6px;
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--color-text, #3F2A1E);
  text-wrap: balance;
  /* Accent span sits inline — do not honor cms-breaks pre-line newlines here */
  white-space: normal;
}

.about-photo-hero__title-accent {
  background: linear-gradient(90deg, #E5520C 0%, #F05A14 55%, #FFB347 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.about-photo-hero__subtitle {
  margin: 0 auto 10px;
  max-width: 42ch;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.55;
  color: var(--color-text-muted, #8A6E5C);
}

.about-photo-hero__stage {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  overflow: visible;
  /* Fan cards use transform (no layout growth) — pad for fan-y + hover scale */
  min-height: 0;
  padding-bottom: 64px;
  margin: 0 auto 14px;
  opacity: 1;
}

.about-photo-hero__stack {
  position: relative;
  width: 240px;
  aspect-ratio: 16 / 10;
  height: auto;
}

.about-photo-hero__card {
  position: absolute;
  left: 0;
  top: 0;
  width: 240px;
  aspect-ratio: 16 / 10;
  height: auto;
  margin: 0;
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 22px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  transition:
    transform 0.55s cubic-bezier(0.22, 1.2, 0.36, 1),
    box-shadow 0.3s ease;
  box-shadow: 0 10px 28px rgba(63, 42, 30, 0.14);
  will-change: transform;
}

.about-photo-hero__card:active {
  cursor: grabbing;
}

.about-photo-hero__card.is-spread {
  /* final x/y/rotate set via CSS vars when .is-loaded */
}

.about-photo-hero.is-loaded .about-photo-hero__card.is-spread {
  transform:
    translate3d(var(--fan-x, 0px), var(--fan-y, 0px), 0)
    rotate(var(--fan-rotate, 0deg))
    scale(1);
  transition-delay: calc(var(--fan-order, 0) * 0.12s);
}

/* Must beat .is-loaded .is-spread specificity or hover scale never applies */
.about-photo-hero.is-loaded .about-photo-hero__card.is-spread:focus-visible {
  z-index: 9999 !important;
  transform:
    translate3d(var(--fan-x, 0px), var(--fan-y, 0px), 0)
    rotate(calc(var(--fan-rotate, 0deg) + var(--fan-hover-tilt, 2deg)))
    scale(1.08);
  box-shadow: 0 18px 40px rgba(63, 42, 30, 0.22);
  outline: none;
  transition-delay: 0s;
}

/* Pointer devices only — touch keeps fan layout; sticky :hover not needed */
@media (hover: hover) and (pointer: fine) {
  .about-photo-hero.is-loaded .about-photo-hero__card.is-spread:hover {
    z-index: 9999 !important;
    transform:
      translate3d(var(--fan-x, 0px), var(--fan-y, 0px), 0)
      rotate(calc(var(--fan-rotate, 0deg) + var(--fan-hover-tilt, 2deg)))
      scale(1.08);
    box-shadow: 0 18px 40px rgba(63, 42, 30, 0.22);
    transition-delay: 0s;
  }
}

.about-photo-hero__card.is-dragging {
  z-index: 9999 !important;
  transition: none;
  box-shadow: 0 22px 48px rgba(63, 42, 30, 0.28);
}

.about-photo-hero__frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 22px;
  background: var(--photo-frame-pad, #F0E6DC);
}

.about-photo-hero__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.about-photo-hero__actions {
  display: flex;
  justify-content: center;
}

.btn--about-photo {
  background: var(--color-accent, #F05A14);
  color: #fff;
  border: 1.5px solid var(--color-accent, #F05A14);
  padding: 14px 28px;
  box-shadow: 0 10px 28px rgba(232, 93, 4, 0.28);
}

.btn--about-photo:hover {
  background: var(--color-accent-hover, #D44C10);
  border-color: var(--color-accent-hover, #D44C10);
  color: #fff;
  transform: translateY(-2px);
}

@media (max-width: 900px) {
  .about-photo-hero__stack {
    width: 192px;
  }

  .about-photo-hero__card {
    width: 192px;
    border-radius: 18px;
  }

  .about-photo-hero__frame {
    border-radius: 18px;
  }

  .about-photo-hero__stage {
    padding-bottom: 44px;
  }
}

@media (max-width: 640px) {
  .about-photo-hero {
    padding: calc(var(--header-height, 72px) + 4px) 0 24px;
  }

  .about-photo-hero__grid {
    display: none;
  }

  .about-photo-hero__title {
    margin-bottom: 5px;
  }

  .about-photo-hero__subtitle {
    margin-bottom: 8px;
    line-height: 1.5;
  }

  .about-photo-hero__stack {
    width: 144px;
  }

  .about-photo-hero__card {
    width: 144px;
    border-radius: 14px;
  }

  .about-photo-hero__frame {
    border-radius: 14px;
  }

  .about-photo-hero__stage {
    padding-bottom: 36px;
    margin-bottom: 12px;
  }

  /* Narrower fan on mobile via override vars set in JS */
}

/* Keep next section from opening another huge island of whitespace */
.about-photo-hero + .section.about-trust {
  padding-top: 56px;
}

@media (prefers-reduced-motion: reduce) {
  .about-photo-hero__card,
  .about-photo-hero.is-loaded .about-photo-hero__card.is-spread,
  .about-photo-hero.is-loaded .about-photo-hero__card.is-spread:hover,
  .about-photo-hero.is-loaded .about-photo-hero__card.is-spread:focus-visible {
    transition: none;
  }
}
