/* ==========================================================
   plan-figure.css — single supporting figure with click-to-enlarge
   Used only by /blog/how-we-built-amm-cosmetic/
   Kept separate from blog.css so the approved case-study styles
   are not modified.
   ========================================================== */

.amm-plan { margin: 2rem 0 2.5rem; }

.amm-plan-heading {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-navy);
  margin: 0 0 0.85rem;
}

.amm-plan-figure { margin: 0; }

/* the trigger is a real <button> so it is keyboard operable by default */
.amm-plan-trigger {
  display: block;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 0;
  border: 1px solid var(--color-grey-mid);
  border-radius: var(--border-radius);
  background: var(--color-grey-light);
  cursor: zoom-in;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.amm-plan-trigger:hover {
  border-color: var(--color-hero-blue);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.amm-plan-trigger:focus-visible {
  outline: 3px solid var(--color-hero-blue);
  outline-offset: 2px;
}

.amm-plan-trigger img {
  display: block;
  width: 100%;
  height: auto;
}

.amm-plan-figure figcaption {
  max-width: 460px;
  margin: 0.7rem auto 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-grey-text);
  text-align: center;
}

.amm-plan-hint {
  display: block;
  margin-top: 0.3rem;
  font-weight: 600;
  color: var(--color-hero-blue);
}

/* ── Single supporting photograph (Eric and Amm) ── */
.amm-photo { margin: 2rem 0 2.5rem; }

.amm-photo img {
  display: block;
  width: 100%;
  max-width: 620px;
  height: auto;
  margin: 0 auto;
  border-radius: var(--border-radius);
}

.amm-photo figcaption {
  max-width: 620px;
  margin: 0.7rem auto 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-grey-text);
  text-align: center;
}

/* ── Enlarged view ── */
body.amm-lightbox-open { overflow: hidden; }

.amm-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.9);
}

/* must beat the display:flex above */
.amm-lightbox[hidden] { display: none; }

.amm-lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}

.amm-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.6rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-black);
  background: var(--color-white);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.amm-lightbox-close:hover { background: var(--color-grey-light); }

.amm-lightbox-close:focus-visible {
  outline: 3px solid var(--color-white);
  outline-offset: 3px;
}

@media (max-width: 560px) {
  .amm-lightbox { padding: 0.5rem; }
  .amm-lightbox-close {
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.55rem 0.9rem;
    font-size: 0.9rem;
  }
}
