/* ==========================================================================
   Alternating panels
   ========================================================================== */
.panels {
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
}

.section-logo {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-5);
}

.section-logo.reveal {
  opacity: 0;
  transform: scale(0.88) translateY(10px);
  transition: none;
}

.section-logo.reveal.is-visible {
  animation: logoFadeIn 1.1s var(--ease) forwards;
}

@keyframes logoFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.88) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.section-logo img {
  height: 96px;
  width: auto;
  animation: logoFloat 5s ease-in-out 1.1s infinite;
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .section-logo.reveal,
  .section-logo.reveal.is-visible {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .section-logo img {
    animation: none;
  }
}

@media (max-width: 640px) {
  .section-logo img {
    height: 72px;
  }
}

.panel {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-5);
  align-items: center;
  margin-bottom: var(--space-6);
}

.panel:last-child {
  margin-bottom: 0;
}

.panel.reverse {
  grid-template-columns: 1fr 1.1fr;
}

.panel.reverse .panel-media {
  order: 2;
}

.panel.reverse .panel-text {
  order: 1;
}

.panel-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3.2;
  background: var(--color-bg-alt);
}

/* The groomer photo is a portrait shot (her + two dogs stacked vertically),
   not the landscape studio shots the other panels use — forcing it into the
   same wide aspect ratio crops one of the dogs out, so it gets its own
   taller ratio instead. */
.panel-media.panel-media-portrait {
  aspect-ratio: 4 / 4.9;
}

.panel-media img,
.panel-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    opacity 2.8s var(--ease),
    transform 3.2s var(--ease),
    clip-path 3.2s var(--ease);
}

.panel:hover .panel-media img,
.panel:hover .panel-media video {
  transform: scale(1.035);
}

/* Photo reveal: the frame stays put while the picture wipes up into view
   from the bottom and settles out of a soft zoom — echoing the way the
   copy rises in, with a photographic finish. */
.panel-media.reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

.panel-media.reveal img {
  opacity: 0;
  transform: scale(1.09);
  clip-path: inset(24% 0 0 0);
}

.panel-media.reveal.is-visible img {
  opacity: 1;
  transform: scale(1);
  clip-path: inset(0 0 0 0);
}

@media (prefers-reduced-motion: reduce) {
  .panel-media.reveal img {
    opacity: 1;
    transform: none;
    clip-path: none;
    transition: none;
  }
}

/* Portrait shots (new1 / new2) in the standard wide panel frame. Pull the
   crop up so the head sits near the top with little headroom; the lower
   legs fall outside the frame, which is fine. Each photo frames the head at
   a slightly different height, so they get their own value. */
.panel-media.panel-media-top-new1 img {
  object-position: 50% 52%;
}

.panel-media.panel-media-top-process2 img {
  object-position: 50% 46%;
}

.panel-text .eyebrow {
  margin-bottom: var(--space-1);
}

.panel-text h3 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  margin-bottom: var(--space-2);
  line-height: 1.25;
}

.panel-text p:not(.eyebrow) {
  color: var(--color-text-muted);
  font-size: 1.02rem;
  max-width: 42ch;
}

.panel-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: var(--space-2);
  color: var(--color-accent-dark);
  font-weight: 600;
  font-size: 0.95rem;
}

.panel-link:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .panel,
  .panel.reverse {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .panel-media,
  .panel.reverse .panel-media {
    order: 1;
  }

  .panel-text,
  .panel.reverse .panel-text {
    order: 2;
  }
}
