/* ============================================
   Hara Clinic — Dark-forward Overrides
   Bold, high contrast, warm
   ============================================ */

[data-brand="clinic"] .hero {
  background-color: var(--dark);
}

[data-brand="clinic"] .section--alt {
  background-color: var(--gray);
}

[data-brand="clinic"] .section--accent {
  background-color: var(--dark);
  border-top: 1px solid rgba(193, 194, 176, 0.1);
}

[data-brand="clinic"] .btn--primary {
  background: var(--ivory);
  color: var(--dark);
  border-color: var(--ivory);
}

[data-brand="clinic"] .btn--primary:hover {
  background: var(--stone);
  border-color: var(--stone);
}

[data-brand="clinic"] .btn--outline {
  color: var(--ivory);
  border-color: rgba(241, 235, 223, 0.4);
}

[data-brand="clinic"] .btn--outline:hover {
  background: var(--ivory);
  color: var(--dark);
  border-color: var(--ivory);
}

/* Clinic service cards: glass on dark */
[data-brand="clinic"] .glass-card {
  background: rgba(91, 97, 83, 0.3);
  border-color: rgba(193, 194, 176, 0.12);
}

[data-brand="clinic"] .glass-card:hover {
  background: rgba(91, 97, 83, 0.45);
}

/* ============================================
   Clinic home hero — cinema (full-bleed editorial)
   Neo as the bed; warm directional scrim for legibility;
   character-select doctor strip at the bottom.
   ============================================ */

[data-brand="clinic"] .hero--cinema {
  position: relative;
  background-color: var(--dark);
  overflow: hidden;
  isolation: isolate;
  min-height: clamp(640px, 92vh, 880px);
  /* Horizontal padding aligns with where a centered 1200px container would sit
     so .hero__content + .doctor-strip line up with the rest of the page grid */
  padding-top: 160px;
  padding-bottom: var(--space-3xl);
  padding-left: max(var(--container-padding), calc((100vw - var(--container-max)) / 2));
  padding-right: max(var(--container-padding), calc((100vw - var(--container-max)) / 2));
}

/* Crossfading photo stack — character-select mechanic */
.hero__cinema-photos {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero__cinema-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: var(--photo-pos, 50% 40%);
  transform: var(--photo-transform-base, scale(1)) var(--photo-transform-desktop, scale(1));
  transform-origin: center center;
  opacity: 0;
  transition: opacity 600ms var(--ease-out);
  will-change: opacity;
}

.hero__cinema-photo.is-active {
  opacity: 1;
}

/* Directional scrim — heavy warm-dark on the left for text legibility, fades to clear on the right
   so the focal interaction stays alive. Two layers stacked for depth. */
.hero__cinema-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  transition: background 600ms var(--ease-out);
  background:
    linear-gradient(
      95deg,
      rgba(20, 25, 18, 0.92) 0%,
      rgba(20, 25, 18, 0.78) 22%,
      rgba(20, 25, 18, 0.45) 42%,
      rgba(20, 25, 18, 0.12) 62%,
      rgba(20, 25, 18, 0) 80%
    ),
    linear-gradient(
      to bottom,
      rgba(20, 25, 18, 0.35) 0%,
      rgba(20, 25, 18, 0) 30%,
      rgba(20, 25, 18, 0) 60%,
      rgba(20, 25, 18, 0.55) 100%
    );
}

/* Group photo state — busier composition needs a more even scrim across the whole frame */
.hero__cinema-scrim.is-group {
  background:
    linear-gradient(
      95deg,
      rgba(20, 25, 18, 0.85) 0%,
      rgba(20, 25, 18, 0.6) 35%,
      rgba(20, 25, 18, 0.35) 65%,
      rgba(20, 25, 18, 0.25) 100%
    ),
    linear-gradient(
      to bottom,
      rgba(20, 25, 18, 0.4) 0%,
      rgba(20, 25, 18, 0.15) 30%,
      rgba(20, 25, 18, 0.15) 60%,
      rgba(20, 25, 18, 0.65) 100%
    );
}

[data-brand="clinic"] .hero--cinema .hero__content {
  position: relative;
  z-index: 2;
  max-width: 580px;
  margin-right: auto;
}

/* Sharper drop-shadow on the title against the photo bg */
[data-brand="clinic"] .hero--cinema .hero__title {
  text-shadow: 0 2px 24px rgba(20, 25, 18, 0.55);
}

/* ============================================
   Character-select doctor strip
   ============================================ */

.doctor-strip {
  position: absolute;
  z-index: 3;
  bottom: var(--space-2xl);
  right: max(var(--container-padding), calc((100vw - var(--container-max)) / 2));
  padding: var(--space-md) var(--space-lg);
  background: rgba(20, 25, 18, 0.55);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border: 1px solid rgba(241, 235, 223, 0.14);
  border-radius: 12px;
  box-shadow:
    0 12px 32px rgba(20, 25, 18, 0.4),
    0 24px 60px rgba(88, 70, 50, 0.22);
}

.doctor-strip__current {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 var(--space-sm) 4px;
  min-height: 36px;
}

.doctor-strip__current-eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(241, 235, 223, 0.5);
}

.doctor-strip__current-name {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--ivory);
  letter-spacing: 0.01em;
  transition: opacity 200ms var(--ease-out);
}

.doctor-strip__row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.doctor-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--ivory);
  transition: transform var(--duration-base) var(--ease-out);
  cursor: pointer;
}

.doctor-chip:hover {
  transform: translateY(-3px);
}

.doctor-chip__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-size: cover;
  background-position: center 30%;
  border: 2px solid rgba(241, 235, 223, 0.22);
  transition: border-color var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out);
  box-shadow: 0 4px 12px rgba(20, 25, 18, 0.45);
}

.doctor-chip:hover .doctor-chip__avatar,
.doctor-chip:focus-visible .doctor-chip__avatar {
  border-color: var(--ivory);
  box-shadow:
    0 6px 16px rgba(20, 25, 18, 0.55),
    0 0 0 4px rgba(241, 235, 223, 0.08);
}

/* Selected state — bright ring + subtle scale to read as "active character" */
.doctor-chip.is-selected .doctor-chip__avatar {
  border-color: var(--ivory);
  transform: scale(1.06);
  box-shadow:
    0 8px 20px rgba(20, 25, 18, 0.6),
    0 0 0 3px rgba(241, 235, 223, 0.18),
    0 0 24px rgba(241, 235, 223, 0.12);
}

.doctor-chip.is-selected .doctor-chip__name {
  color: var(--ivory);
}

.doctor-chip__name {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(241, 235, 223, 0.85);
  white-space: nowrap;
}

.doctor-chip:hover .doctor-chip__name {
  color: var(--ivory);
}

/* "+N more →" pill — sits at the end of the strip */
.doctor-chip--more {
  flex-direction: row;
  gap: 6px;
  padding: 8px 14px;
  height: 48px;
  align-self: flex-start;
  margin-top: 0;
  border: 1px solid rgba(241, 235, 223, 0.22);
  border-radius: 24px;
  background: rgba(241, 235, 223, 0.04);
  transition: background var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out);
}

.doctor-chip--more:hover,
.doctor-chip--more.is-selected {
  background: rgba(241, 235, 223, 0.1);
  border-color: var(--ivory);
}

.doctor-chip--more.is-selected {
  box-shadow:
    0 6px 18px rgba(20, 25, 18, 0.5),
    0 0 24px rgba(241, 235, 223, 0.1);
}

.doctor-chip__more-text {
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  font-weight: 500;
  white-space: nowrap;
  color: var(--ivory);
}

.doctor-chip__more-arrow {
  display: inline-block;
  transition: transform var(--duration-base) var(--ease-out);
  color: var(--ivory);
}

.doctor-chip--more:hover .doctor-chip__more-arrow {
  transform: translateX(3px);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
  [data-brand="clinic"] .hero--cinema {
    /* Pull bg toward the warm doctor face on tighter widths */
    background-position: 55% 30%;
    min-height: clamp(620px, 86vh, 780px);
  }

  [data-brand="clinic"] .hero--cinema .hero__content {
    max-width: 520px;
  }
}

@media (max-width: 768px) {
  [data-brand="clinic"] .hero--cinema {
    background-position: 62% 25%;
    min-height: 100vh;
    padding-top: 120px;
    padding-bottom: 200px; /* reserve space for the strip below content */
  }

  /* Mobile face anchors: portrait crop locks the landscape photo to cover-by-
     height, so background-position Y is a no-op once vertical overflow is 0.
     --photo-transform-mobile carries the per-doctor zoom + translateY needed
     to lift the face above the headline, composed on top of the always-on
     base transform (Neo's scaleX(-1) mirror). */
  .hero__cinema-photo {
    background-position: var(--photo-pos-mobile, var(--photo-pos, 50% 30%));
    transform: var(--photo-transform-base, scale(1)) var(--photo-transform-mobile, scale(1));
  }

  /* Heavier vertical scrim on mobile — photo dominates less, text legibility wins */
  .hero__cinema-scrim {
    background:
      linear-gradient(
        to bottom,
        rgba(20, 25, 18, 0.82) 0%,
        rgba(20, 25, 18, 0.58) 30%,
        rgba(20, 25, 18, 0.4) 55%,
        rgba(20, 25, 18, 0.78) 100%
      );
  }

  [data-brand="clinic"] .hero--cinema .hero__content {
    margin-left: 0;
    max-width: none;
  }

  .doctor-strip {
    left: var(--container-padding);
    right: var(--container-padding);
    bottom: var(--space-lg);
    padding: var(--space-sm) var(--space-md);
  }

  .doctor-strip__row {
    gap: var(--space-sm);
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

  .doctor-strip__row::-webkit-scrollbar {
    display: none;
  }

  .doctor-chip__avatar {
    width: 48px;
    height: 48px;
  }

  .doctor-chip--more {
    height: 48px;
    padding: 8px 14px;
    flex-shrink: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__cinema-photo,
  .hero__cinema-scrim,
  .doctor-chip,
  .doctor-chip:hover,
  .doctor-chip__avatar,
  .doctor-chip--more,
  .doctor-chip--more:hover,
  .doctor-chip__more-arrow,
  .doctor-chip--more:hover .doctor-chip__more-arrow {
    transition: none;
  }

  .doctor-chip:hover,
  .doctor-chip--more:hover {
    transform: none;
  }

  /* Keep the selected ring + scale (it's the indicator, not motion) */
}
