/* Parsons Smile Center — Before/After Smile Gallery + accessible lightbox.
   Feature-specific styles kept out of the verbatim theme.css. Reuses theme
   design tokens (--gold, --ink, --ease, fonts …). */

/* ============================ GRID ============================ */
.ba-section .entry-content { max-width: 680px; margin: 0 auto; }
.ba-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin-top: 56px;
}
@media (max-width: 880px) { .ba-grid { grid-template-columns: 1fr; gap: 30px; } }

/* ============================ CARD ============================ */
.ba-card { position: relative; }
.ba-card-trigger {
  display: block; width: 100%; text-align: left;
  margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.ba-card-trigger:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 4px; }

.ba-pair {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
  overflow: hidden; border-radius: 3px;
  background: var(--ink, #14100d);
  box-shadow: var(--shadow);
}
.ba-half { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 5; background: var(--cream, #f3ece0); }
.ba-half img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .9s var(--ease, ease); }
.ba-card-trigger:hover .ba-half img,
.ba-card-trigger:focus-visible .ba-half img { transform: scale(1.045); }

/* gold seam between before / after */
.ba-pair::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px;
  transform: translateX(-50%); z-index: 3; pointer-events: none;
  background: linear-gradient(var(--gold-light, #d8b878), var(--gold, #b8924c));
}

.ba-tag {
  position: absolute; top: 12px; left: 12px; z-index: 4;
  font-family: var(--font-caps, sans-serif); font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ivory, #faf6ec); background: rgba(20,16,13,.6);
  padding: 6px 11px; border-radius: 2px; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.ba-tag-after { left: auto; right: 12px; color: #2a200f; background: var(--gold-grad-soft, linear-gradient(120deg, #e6c87f, #b8924c)); }

.ba-zoom {
  position: absolute; z-index: 5; top: 50%; left: 50%;
  width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%;
  color: var(--ivory, #faf6ec); background: rgba(20,16,13,.5);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; transform: translate(-50%, -50%) scale(.82);
  transition: opacity .4s var(--ease, ease), transform .4s var(--ease, ease);
}
.ba-zoom svg { width: 22px; height: 22px; }
.ba-card-trigger:hover .ba-zoom,
.ba-card-trigger:focus-visible .ba-zoom { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.ba-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 16px; }
.ba-treatment { font-family: var(--font-display, serif); font-size: 21px; line-height: 1.2; color: var(--ink, #14100d); }
.ba-view { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-family: var(--font-caps, sans-serif); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-deep, #8a6a2f); }
.ba-view svg { width: 15px; height: 15px; transition: transform .4s var(--ease, ease); }
.ba-card-trigger:hover .ba-view svg { transform: translateX(4px); }

/* "Sample" ribbon for placeholder cases */
.ba-sample {
  position: absolute; top: 14px; right: 14px; z-index: 6;
  font-family: var(--font-caps, sans-serif); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase;
  background: #8a1c1c; color: #fff; padding: 5px 10px; border-radius: 2px; box-shadow: var(--shadow-sm);
}

/* Notes */
.ba-disclaimer { text-align: center; font-size: 13px; color: #8a1c1c; background: rgba(138,28,28,.06); border: 1px solid rgba(138,28,28,.2); padding: 12px 18px; border-radius: 3px; margin: 0 auto; max-width: 660px; }
.ba-consent { text-align: center; font-size: 12.5px; color: var(--ink-soft, #6b6257); margin-top: 36px; }
.ba-empty { text-align: center; color: var(--ink-soft, #6b6257); }

/* ============================ SINGLE CASE ============================ */
.ba-single { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
@media (max-width: 720px) { .ba-single { grid-template-columns: 1fr; } }
.ba-single-half { margin: 0; }
.ba-single-half .frame { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 3px; box-shadow: var(--shadow); }
.ba-single-half .frame img { width: 100%; height: 100%; object-fit: cover; }
.ba-single-half figcaption { margin-top: 14px; }
.ba-single-body { max-width: 660px; margin: 50px auto 0; text-align: center; }
.ba-single-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 42px; }

/* ============================ LIGHTBOX ============================ */
.ba-lightbox { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 4vh 4vw; }
.ba-lightbox[hidden] { display: none; }
.ba-lb-backdrop { position: absolute; inset: 0; background: rgba(12,9,7,.86); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .4s var(--ease, ease); }
.ba-lb-dialog {
  position: relative; z-index: 1; width: min(1040px, 100%); max-height: 92vh; overflow: auto;
  background: var(--ivory, #faf6ec); border-radius: 4px; box-shadow: 0 40px 120px rgba(0,0,0,.5);
  padding: clamp(20px, 4vw, 44px);
  opacity: 0; transform: translateY(18px) scale(.985);
  transition: opacity .5s var(--ease, ease), transform .5s var(--ease, ease);
}
.ba-lightbox.open .ba-lb-backdrop { opacity: 1; }
.ba-lightbox.open .ba-lb-dialog { opacity: 1; transform: none; }
.ba-lb-close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--hair-strong, #d8cdba); background: var(--ivory, #faf6ec); color: var(--ink, #14100d); cursor: pointer; transition: background .3s var(--ease, ease), color .3s var(--ease, ease); }
.ba-lb-close:hover { background: var(--ink, #14100d); color: var(--ivory, #faf6ec); }
.ba-lb-close svg { width: 20px; height: 20px; }
.ba-lb-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .ba-lb-pair { grid-template-columns: 1fr; } }
.ba-lb-half { margin: 0; position: relative; }
.ba-lb-half img { width: 100%; height: auto; display: block; border-radius: 3px; background: var(--cream, #f3ece0); }
.ba-lb-half figcaption { position: absolute; top: 12px; left: 12px; }
.ba-lb-meta { margin-top: 26px; text-align: center; }
.ba-lb-treatment { font-family: var(--font-display, serif); font-size: clamp(24px, 3vw, 34px); color: var(--ink, #14100d); margin: 0; }
.ba-lb-desc { margin: 12px auto 0; max-width: 640px; color: var(--ink-soft, #6b6257); line-height: 1.7; }
.ba-lb-sample { margin-top: 14px; font-size: 12.5px; color: #8a1c1c; }
.ba-lb-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 18px; font-family: var(--font-caps, sans-serif); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-deep, #8a6a2f); }
.ba-lb-link svg { width: 15px; height: 15px; }
html.ba-lock { overflow: hidden; }

/* ============================ REDUCED MOTION ============================ */
@media (prefers-reduced-motion: reduce) {
  .ba-half img,
  .ba-zoom,
  .ba-view svg,
  .ba-lb-backdrop,
  .ba-lb-dialog { transition: none !important; }
  .ba-lb-dialog { transform: none; }
}
