/* ============================================================
   MineGenome - product page
   Builds on shared tokens + patterns in styles.css / facecapture.css.
   Grounds: photo hero, white (the face), pit (round record, CTA),
   sediment (across a heading).
   ============================================================ */

/* ---------- Hero: the shared full-bleed .page-hero ----------
   Background via a modifier class (no inline styles - CSP). Heavier fade on
   the left than the shared scrim: the photo is mostly dark, but the tablet's
   light olive and white toolbar bands cross the left half. Same values as
   /mineworks; full-frame below 900px, where the copy spans the width. */
.page-hero__bg--minegenome{background-image:url(../images/hero-minegenome.webp)}
.page-hero--minegenome:after{background:linear-gradient(90deg,#101418e6 0%,#101418d4 38%,#10141899 58%,#10141833 82%,#10141814 100%),linear-gradient(#10141800 45%,#1014186b)}
@media (width<=900px){.page-hero--minegenome:after{background:linear-gradient(90deg,#101418eb 0%,#101418d9 55%,#101418a6 100%),linear-gradient(#10141800 45%,#1014186b)}}
/* Keeps "as-built" from breaking at its hyphen in the H1. */
.mg-nowrap{white-space:nowrap}
/* Same spacing as the /mineworks hero buttons (.mw-hero-actions). */
.mg-hero__actions{flex-wrap:wrap;gap:.8rem;margin-top:2rem;display:flex}

.fc-subnav__brand--minegenome{--lockup-w:176px}

/* Fixed 88px header + the 86px sticky .fc-subnav */
#the-face,#round-record,#heading{scroll-margin-top:180px}
@media (width<=640px){#the-face,#round-record,#heading{scroll-margin-top:100px}}

.mg-lead{color:var(--slate);font-size:var(--fs-lead);line-height:1.65;margin-top:1.1rem}
.mg-label{font-family:var(--font-mono);letter-spacing:.14em;text-transform:uppercase;color:var(--olive-text);margin-bottom:.6rem;font-size:.7rem;font-weight:500;display:block}

/* ---------- Two-column split: copy and image ----------
   Desktop: copy left, image right (or image first with --media-first).
   Below 900px both stack, in source order. */
.mg-split{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(2rem,5vw,4.5rem);align-items:center;display:grid}
@media (width<=900px){.mg-split{grid-template-columns:1fr}}
.mg-split__media img{width:100%;height:auto;display:block}

/* ---------- The face ---------- */
.mg-face{background:var(--white)}

/* ---------- The round record: dark ground ---------- */
.mg-record{background:var(--ground-pit)}
.mg-record .eyebrow{color:var(--sage)}
.mg-record h2{color:var(--white)}
.mg-record .section-head p{color:#ffffffc7;font-size:var(--fs-lead);line-height:1.65;margin-top:1.1rem}

.mg-rr{border-top:0}
.mg-rr__head{border-bottom:1px solid #ffffff2e;justify-content:space-between;align-items:baseline;gap:1rem;padding-bottom:.9rem;display:flex}
.mg-rr__round{font-family:var(--font-display);color:var(--white);letter-spacing:.04em;font-size:1.05rem;font-weight:700}
.mg-rr__survey{font-family:var(--font-mono);letter-spacing:.14em;color:#ffffffa6;font-size:.7rem;font-weight:500}
.mg-rr__cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:1.1rem;margin-top:1.4rem;display:grid}
@media (width<=760px){.mg-rr__cards{grid-template-columns:1fr}}
.mg-rr__card{border:1px solid #ffffff2e;padding:1.3rem 1.3rem 1.4rem}
.mg-rr__card svg{color:var(--sage);width:24px;height:24px;margin-bottom:1rem;display:block}
.mg-rr__card h3{color:var(--white);margin:0 0 .4rem;font-size:1.1rem}
.mg-rr__card p{color:#ffffffbf;margin:0;font-size:.95rem;line-height:1.55}
.mg-rr__seq{flex-wrap:wrap;align-items:center;gap:.6rem;margin-top:1.8rem;display:flex}
.mg-rr__n{font-family:var(--font-mono);color:#ffffff99;letter-spacing:.06em;font-size:.95rem;font-weight:500}
.mg-rr__n--current{color:var(--sage);font-weight:700}
.mg-rr__rule{background:#ffffff47;width:clamp(1.5rem,5vw,3rem);height:1px;display:block}
.mg-rr__rule--current{background:var(--sage)}
.mg-rr__caption{font-family:var(--font-mono);letter-spacing:.08em;color:#ffffffa6;margin:.9rem 0 0;font-size:.75rem}

/* ---------- Across a heading: sediment ground, white cards ---------- */
.mg-heading{background:var(--ground-sediment)}
.mg-hcards{grid-template-columns:repeat(3,minmax(0,1fr));gap:1.4rem;display:grid}
@media (width<=900px){.mg-hcards{grid-template-columns:1fr}}
.mg-hcard{background:var(--white);border:1px solid var(--line);flex-direction:column;display:flex}
.mg-hcard__media{aspect-ratio:16/10;background:var(--ground-void);overflow:hidden}
.mg-hcard__media img,.mg-hcard__media video{object-fit:cover;width:100%;height:100%;display:block}
/* A chart, not a photo: shown whole on white rather than cropped. */
.mg-hcard__media--chart{background:var(--white);border-bottom:1px solid var(--line)}
.mg-hcard__media--chart img{object-fit:contain;padding:.6rem}
.mg-hcard__body{padding:1.4rem 1.4rem 1.6rem}
.mg-hcard h3{margin:0 0 .5rem;font-size:1.1rem;line-height:1.3}
.mg-hcard p{color:var(--slate);margin:0;font-size:.95rem;line-height:1.6}
/* Labeled stand-in until a real scan image exists for the slot. */
.mg-placeholder{background:var(--stone-100);border-bottom:1px solid var(--line);justify-content:center;align-items:center;padding:1rem;display:flex}
/* Tablet: one card per row, so set the image beside the text rather than
   letting a full-width 16:10 image run 600px tall. */
@media (561px<=width<=900px){
  .mg-hcard{flex-direction:row}
  .mg-hcard__media{aspect-ratio:auto;flex:0 0 40%;min-height:220px}
  .mg-hcard__body{align-self:center}
  .mg-placeholder{border-bottom:0;border-right:1px solid var(--line)}
}
.mg-placeholder span{font-family:var(--font-mono);letter-spacing:.14em;color:var(--stone-600);text-align:center;font-size:.7rem;font-weight:500}
.mg-heading__close{border-top:1px solid var(--stone-400);color:var(--ink);max-width:880px;margin-top:clamp(2.2rem,4vw,3rem);padding-top:1.6rem;font-size:clamp(1.15rem,1.9vw,1.4rem);line-height:1.5}

/* ---------- Closing CTA: dark ground, left-aligned ---------- */
.mg-cta{background:var(--ground-pit)}
.mg-cta__inner{max-width:720px}
.mg-cta h2{color:var(--white);font-size:var(--fs-h2)}
.mg-cta p{color:#ffffffc7;font-size:var(--fs-lead);line-height:1.6;margin:1rem 0 2rem}

/* ---------- Heading cards: click to enlarge ----------
   Each card's media is a button that opens #mgLightbox, the shared
   .fc-lightbox overlay (css/facecapture.css). */
.mg-zoom{cursor:zoom-in;background:none;border:0;width:100%;height:100%;padding:0;display:block}
.mg-zoom:focus-visible{outline:2px solid var(--olive);outline-offset:-2px}
/* Opens with the site's considered motion (320ms, --ease), the same timing as
   the video lightbox: the backdrop fades in and the image settles up from a
   slight scale. Global reduced-motion rules in styles.css switch both off. */
#mgLightbox{display:flex;opacity:0;visibility:hidden;transition:opacity var(--motion-considered),visibility var(--motion-considered)}
/* Visible at once on open (so focus can move in); on close it stays visible
   until the fade ends. */
#mgLightbox.is-open{opacity:1;visibility:visible;transition:opacity var(--motion-considered),visibility 0s}
.mg-lightbox__stage{opacity:0;transform:scale(.96);transition:opacity var(--motion-considered),transform var(--motion-considered)}
#mgLightbox.is-open .mg-lightbox__stage{opacity:1;transform:none}
.mg-lightbox__stage img,.mg-lightbox__stage video{border-radius:var(--radius-lg);object-fit:contain;width:auto;max-width:min(72vw,900px);height:auto;max-height:72vh;display:block;box-shadow:0 24px 80px #0000008c}
.mg-lightbox__stage .mg-lightbox__chart{background:var(--white);padding:1rem}
.mg-lightbox__stage video{width:min(72vw,900px);background:#0f1018}
@media (width<=760px){.mg-lightbox__stage img,.mg-lightbox__stage video{max-width:92vw}.mg-lightbox__stage video{width:92vw}}
