/* barbers.css — the chair spreads: two built by hand, any other active
   barber's built by scripts/barbers-section.js */

.feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (min-width: 900px) {
  .feature {
    grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.1fr);
    gap: clamp(3rem, 6vw, 5rem);
  }
}

/* Desktop: the name and bio start level with the top of the portrait, and
   the portrait stops growing at 560px so the text is not left beside a
   tall empty band. */
@media (min-width: 1024px) {
  .feature { align-items: start; }
  .feature__portrait { max-height: 560px; }
  /* Capped, the flipped portrait keeps the container's right edge. */
  .feature--flip .feature__portrait { justify-self: end; width: min(100%, 560px * 4 / 5); }
}

.feature__portrait {
  position: relative;
  margin: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--ink-3);
  box-shadow: var(--shadow-plate);
}

.feature__portrait picture { height: 100%; }

.feature__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  filter: contrast(1.04) saturate(0.94);
  transition: transform 1.4s var(--ease-curtain);
}
.feature__portrait:hover img { transform: scale(1.025); }

.feature__portrait::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid var(--plate-frame);
  border-radius: 2px;
  pointer-events: none;
  z-index: 1;
}

.feature__body {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.feature__name {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1;
  color: var(--bone);
  margin-bottom: 0.25rem;
}

.feature__body p {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--bone-soft);
  max-width: 52ch;
}

/* Between visible spreads only: a deactivated barber's spread is hidden. */
.feature:not([hidden]) ~ .feature:not([hidden]) {
  margin-top: clamp(3.5rem, 8vw, 6rem);
  padding-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--rule);
}

@media (min-width: 900px) {
  .feature--flip {
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.95fr);
  }
  .feature--flip .feature__portrait { order: 2; }
  .feature--flip .feature__body     { order: 1; }
}

.feature__actions {
  display: flex;
  align-items: center;
  gap: 1rem 1.25rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.feature__hours { color: var(--bone-mute); }

/* A barber added in the app: the title under the name, and without a photo
   the text takes the whole width. */
.feature__body .feature__title { color: var(--gold); font-size: 0.75rem; line-height: 1; margin-top: -0.25rem; }

@media (min-width: 900px) {
  .feature.feature--text { grid-template-columns: minmax(0, 1fr); }
}
