/* Engagement-photo and design-fix styles. Loaded after the inline page styles, so equal specificity wins by order. */

/* Registry: one Gifts feature (Task 3) */
.section .cards {
  grid-template-columns: 1fr;
  max-width: var(--wide);
}
@media (min-width: 60rem) {
  .section .cards .gift {
    flex-direction: row;
  }
  main .section .cards .gift > img {
    flex: 1 1 55%;
    width: 55%;
    min-width: 0;
    aspect-ratio: auto;
    height: 30rem;
  }
  .section .cards .gift-text {
    flex: 1 1 45%;
    justify-content: center;
    padding: 3rem;
  }
}
/* Task 4 carry-over: the page's `.gift p{flex:1}` stretched the copy and pushed the button to the bottom.
   Heading, copy, and button now sit together, centered beside the photo. */
.section .cards .gift p {
  flex: none;
}
.section .cards .gift .btn {
  margin-top: .75rem;
}

/* ===== Task 4: focal points =====
   Photos carry style="--pos:<desktop>;--pos-m:<phone>". No --pos-m means the desktop value is used on phones too. */
main img[style*="--pos"] {
  object-position: var(--pos, 50% 50%);
}
@media (max-width: 49.99rem) {
  main img[style*="--pos"] {
    object-position: var(--pos-m, var(--pos, 50% 50%));
  }
}

/* ===== Task 4: the no-shade rule =====
   Sections marked .people show the couple. Their photo is never under a black fade: the shade is hidden and the
   text sits on the section's own solid black (all these sections already have background-color: var(--black)).
   Venue-only heroes (Wedding, Travel, FAQ, Registry ring, home venue) keep their shade. */
.page-hero.people > .shade,
.moment-wide.people > .wide-shade,
.closing.people > .shade,
.closing.people > .shade-close {
  display: none;
}

/* Our Story hero: the /rsvp/ pattern. Phones: photo on top, text on black beneath.
   50rem and up: text on black at left, photo unshaded in its own column at right. The column is wider than
   /rsvp/'s because this is a landscape photo; a 2:3 column would cut one of the two of them out. */
.page-hero.people {
  display: grid;
  align-items: stretch;
  min-height: 0;
}
.page-hero.people > picture {
  display: block;
  position: relative;
  inset: auto;
  z-index: 0;
  aspect-ratio: 4 / 5;
}
.page-hero.people > picture > img {
  display: block;
  position: relative;
  inset: auto;
  z-index: 0;
  width: 100%;
  height: 100%;
}
.page-hero.people > .text {
  padding-block: 2.75rem clamp(2.5rem, 6vw, 4rem);
}
@media (min-width: 50rem) {
  .page-hero.people {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    min-height: clamp(24rem, 62vh, 40rem);
    min-height: clamp(24rem, 62svh, 40rem);
  }
  .page-hero.people > picture {
    aspect-ratio: auto;
    height: 100%;
  }
  .page-hero.people > .text {
    order: -1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-block: clamp(3.5rem, 6vw, 5rem);
  }
}
/* Task 5 fix: from 50rem to 62rem the 1:1.5 columns made the photo column taller than wide, which cut Rob's
   head at its left edge and Breanna's shoulder at its right. A wider photo column, with the row as tall as the
   words need, keeps the column landscape (about 1.2:1 at 820) so both of them sit inside the frame. */
@media (min-width: 50rem) and (max-width: 61.99rem) {
  .page-hero.people {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.75fr);
    min-height: 0;
  }
}

/* Our Story wide moments: full-bleed photo, then the heading and text on a black band beneath, at every width. */
.moment-wide.people {
  display: block;
  min-height: 0;
}
.timeline > .moment-wide.people > img {
  display: block;
  position: relative;
  inset: auto;
  z-index: 0;
  height: clamp(22rem, 85vh, 52rem);
  height: clamp(22rem, 85svh, 52rem);
}
.moment-wide.people > .wide-text {
  padding-block: clamp(2.5rem, 6vw, 4rem) clamp(3rem, 7vw, 5rem);
}

/* Closings (home and Our Story): generic version, kept simple so Task 5 can override it per page.
   Photo on top, unshaded; the closing text on black beneath. */
.closing.people {
  display: block;
  min-height: 0;
}
.closing.people > img[src] {
  display: block;
  position: relative;
  inset: auto;
  z-index: 0;
  height: clamp(22rem, 85vh, 52rem);
  height: clamp(22rem, 85svh, 52rem);
}
/* The page's closing img rule (0,3,1) sets object-position, so a closing photo with a focal point needs a stronger selector. */
.closing.people > img[style*="--pos"] {
  object-position: var(--pos, 50% 50%);
}
.closing.people > .closing-text {
  padding-block: clamp(2.75rem, 6vw, 4.5rem) clamp(3.5rem, 7vw, 5rem);
}

@media (max-width: 49.99rem) {
  .timeline > .moment-wide.people > img,
  .closing.people > img[src] {
    height: auto;
    aspect-ratio: 4 / 5;
  }
  .closing.people > img[style*="--pos"] {
    object-position: var(--pos-m, var(--pos, 50% 50%));
  }
}

/* ===== Task 5: the new photos ===== */

/* The Wedding dress photo and the Travel split photo: the page rules (0,3,1) set object-position,
   so the focal points need a selector of equal weight, later in the cascade. */
.dress-wrap > img[src][style*="--pos"],
.split > img[src][style*="--pos"] {
  object-position: var(--pos, 50% 50%);
}
@media (max-width: 49.99rem) {
  .dress-wrap > img[src][style*="--pos"],
  .split > img[src][style*="--pos"] {
    object-position: var(--pos-m, var(--pos, 50% 50%));
  }
}

/* Our Story closing (.beside): below 62rem it keeps the generic closing above (photo, then the words on black);
   from 50rem to 62rem the photo shows whole, at its own 3:2, so neither of them is cropped.
   62rem and up: the photo fills the section and the words sit over the hedge on the right. Breanna's arm and
   side reach about 59% across, so the warm scrim is fully transparent until 61% and the words start near 65%:
   neither the words nor the scrim touch either of them. Narrower than 62rem, that right-hand strip is too
   small for the headline, which is why those widths use the band beneath. */
@media (min-width: 50rem) and (max-width: 61.99rem) {
  .closing.people.beside > img[src] {
    height: auto;
    aspect-ratio: 3 / 2;
  }
}
@media (min-width: 62rem) {
  .closing.people.beside {
    display: grid;
    grid-template-columns: 61% minmax(0, 1fr);
    /* The words sit a little below center, where the hedge is. */
    grid-template-rows: 1fr auto .6fr;
    position: relative;
    height: clamp(36rem, 62vw, 56rem);
  }
  .closing.people.beside h2 {
    max-width: 14ch;
    font-size: clamp(2.4rem, 4.2vw, 4rem);
    /* The light end of the gilt only: the page's darkest gold stop measures under 3:1 against the bright
       garden even with the scrim, so the headline runs from white into --gold-light. */
    --gilt: linear-gradient(100deg, var(--white) 0%, var(--gold-light) 40%, var(--gold-light) 100%);
  }
  .closing.people.beside > img[src] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }
  .closing.people.beside > .closing-text {
    grid-column: 2;
    grid-row: 2;
    position: relative;
    z-index: 1;
    width: auto;
    margin: 0;
    padding: 1.5rem clamp(1.5rem, 3vw, 3rem) 1.5rem 4rem;
    justify-items: start;
    gap: 1.75rem;
  }
  /* The scrim starts at this block's left edge (61%) at zero and is full only where the words begin (4rem in). */
  .closing.people.beside > .closing-text::before {
    content: "";
    position: absolute;
    inset: -4.5rem 0;
    z-index: -1;
    background-color: rgb(26 15 8 / .55);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 4rem), linear-gradient(to bottom, transparent, #000 6rem, #000 calc(100% - 6rem), transparent);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent, #000 4rem), linear-gradient(to bottom, transparent, #000 6rem, #000 calc(100% - 6rem), transparent);
    mask-composite: intersect;
    pointer-events: none;
  }
}

/* Shared by the home closing and the home hero (Task 6): the ivory ground, the feathered ivory veil behind words
   set over a photo, and the veil's feathered edges (6rem at the sides, 3.5rem top and bottom). */
:root {
  --ivory: rgb(250 247 240);
  --veil: rgb(250 247 240 / .82);
  --veil-mask-x: linear-gradient(to right, transparent, #000 6rem, #000 calc(100% - 6rem), transparent);
  --veil-mask-y: linear-gradient(to bottom, transparent, #000 3.5rem, #000 calc(100% - 3.5rem), transparent);
}

/* Home closing (.ivory): the light tokens on an ivory ground. The layout marks .closing (and .hero) dark;
   `inherit` takes each token back from <main>, which keeps the :root (light) values, so no value is copied.
   The home hero restores the same list on desktop (Task 6, below). */
.closing.people.ivory {
  --fg: inherit;
  --fg-dim: inherit;
  --accent: inherit;
  --accent-hi: inherit;
  --line: inherit;
  --gilt: inherit;
  --btn-bg: inherit;
  --btn-fg: inherit;
  --btn-shadow: inherit;
  --btn2-shadow: inherit;
  background-color: var(--ivory);
}
.closing.people.ivory h2 {
  font-size: clamp(2.4rem, 4.4vw, 4rem);
  line-height: 1;
  max-width: 13ch;
  margin-inline: auto;
}
.closing.people.ivory p {
  max-width: 30ch;
  margin: 1rem auto 1.75rem;
}
@media (min-width: 50rem) {
  .closing.people.ivory h2 {
    max-width: 20ch;
    /* The two darker stops of the light gilt: over the veiled stone, the lightest stop (#9c7624) measures
       just under 3:1 against the column shadows. */
    --gilt: linear-gradient(100deg, var(--gold-deep) 0%, #7a5814 100%);
  }
  .closing.people.ivory p {
    max-width: 44ch;
    margin: .85rem auto 1.4rem;
  }
}
.closing.people.ivory > .closing-text {
  position: relative;
  z-index: 1;
}
/* Phones: the words on the ivory ground first, then the tall colonnade with the two of them at its foot.
   The ground fades softly into the top of the stonework, far above them. */
@media (max-width: 49.99rem) {
  .closing.people.ivory {
    display: flex;
    flex-direction: column;
  }
  .closing.people.ivory > .closing-text {
    order: -1;
    /* The page centers the closing's children (align-items: center); stretch this one so its fade spans the
       full width of the photo below. */
    align-self: stretch;
    width: auto;
    margin: 0;
    padding: 3.5rem var(--gutter) 1.5rem;
  }
  .closing.people.ivory > .closing-text::after {
    content: "";
    position: absolute;
    inset: 100% 0 auto;
    height: 5rem;
    background-image: linear-gradient(var(--ivory), rgb(250 247 240 / 0));
    pointer-events: none;
  }
  .closing.people.ivory > img[src] {
    aspect-ratio: 3 / 5;
  }
}
/* 50rem and up: the photo fills the section, anchored at its foot so the two of them stand at the bottom center.
   The words sit in the upper part on a feathered ivory veil that ends well above their heads. */
@media (min-width: 50rem) {
  .closing.people.ivory {
    position: relative;
    height: clamp(40rem, 66.667vw, 60rem);
  }
  .closing.people.ivory > img[src] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }
  .closing.people.ivory > .closing-text {
    width: fit-content;
    max-width: min(100% - 2 * var(--gutter), 46rem);
    margin: clamp(1.5rem, 3.5vw, 3.5rem) auto 0;
    padding: 1.75rem 3rem 2rem;
  }
  /* The veil: also used behind the home hero's words on photos 6 and 9 (Task 6). */
  .closing.people.ivory > .closing-text::before,
  .hero > .hero-text::before {
    content: "";
    position: absolute;
    inset: -3rem -4rem;
    z-index: -1;
    background-color: var(--veil);
    -webkit-mask-image: var(--veil-mask-x), var(--veil-mask-y);
    -webkit-mask-composite: source-in;
    mask-image: var(--veil-mask-x), var(--veil-mask-y);
    mask-composite: intersect;
    pointer-events: none;
  }
}

/* ===== Task 6: the home hero with rotating photos =====
   Markup: .hero > .hero-stage (the photo area: two .hero-slides sets and the pause button), then .hero-text.
   The "wide" set shows from 50rem up and on a phone turned sideways, the "tall" set everywhere else (engagement.js
   runs only the set on screen).
   Every query here is in min-/max- form (browsers before Safari 16.4 and Chrome 104 drop range syntax), and each
   pair of neighbours meets at N and N - 0.01rem (px values ending in .99 are rounded to whole px in Chrome, so the
   steps are in rem). Shapes meet at p/q and a ratio a millionth smaller, so no window under 10,000px tall falls between
   them. Four layouts, which never overlap and leave no gap:
     phones (under 50rem, 30rem tall or more or narrower than 3:2): the photo on top, 50svh tall; the words on the
       black band beneath (dark tokens). This is also the baseline with no media query at all;
     "stacked" (50rem to 62rem and 30rem tall or more; 62rem up and narrower than 11:10): the wide photo shown whole
       at its own 3:2, the words beneath;
     "sky" (62rem up, 11:10 or wider, tall enough for the width): the photo fills the hero and the words sit in the
       open sky of photo 1 (light tokens, no scrim);
     "side" (under 30rem tall and 3:2 or wider, which takes in phones turned sideways; and from 62rem up every window
       the sky does not take): words on black at left, photo whole at right.
   Below 62rem the sky between the columns is too narrow for the names (at 820 wide a full-height crop also cuts
   both faces off), so those widths keep the photo and the words apart. Narrower than 11:10, a photo filling the
   hero shows less than 73% of photo 1's width and cuts Rob (x 17-26%) or Breanna (x 74-84%) at its edges; 11:10
   keeps both faces whole with room to spare (the exact limit is a hero of about 1.02:1).
   The sky's steps (final fix wave): in every window the sky takes, the words, both buttons, and the veil's whole
   painted box end at least 24px above the nearest head or exposed skin on all three wide slides. Measured in a
   browser every 16px of width (5px of height) from 992 to 2560, then checked every 8px; photo 9 sets the limit
   (photo 6 under 1024). Each step is as tall as the tallest need inside it: 1440 needs 868px, 1920 needs 1060px,
   2560 (and wider, by shape) about 1:1.97. So 1440x900, 1920x1080, 1024x768, and 2560x1300 get the sky; 1440x810,
   1680x900, 1600x860, 1920x950, 1366x650, and 1280x720 get the side layout. */

/* The baseline, with no media query at all (a browser that drops every query below still gets a readable hero): the
   phone stack. The photo on top in its own box, the tall set only, and the words beneath it on the hero's black.
   Every layout below sets what it needs back. .hero.hero matches the weight of the page's scoped .hero rule (0,2,0),
   which sets display: flex and a full-window min-height. */
.hero.hero {
  display: block;
  min-height: 0;
}
/* Slides: stacked in the stage; only the active one (and the one fading in over it) is drawn. engagement.js fades
   the incoming slide in on top; the outgoing one is never faded. */
.hero > .hero-stage {
  position: relative;
  z-index: auto;
  height: 50vh;
  height: 50svh;
  overflow: hidden;
  background-color: var(--black);
}
.hero-slides {
  position: absolute;
  inset: 0;
}
.hero-slides > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  visibility: hidden;
}
.hero-slides > img.is-active,
.hero-slides > img.is-entering {
  visibility: visible;
}
.hero-slides > img.is-entering {
  z-index: 1;
}
/* Which set: the tall one by default; the wide one from 50rem up, and on a phone turned sideways (under 30rem tall
   and at least 3:2), which gets the side layout below. engagement.js and the preloads in <head> use the same query. */
.hero-slides[data-set="wide"] {
  display: none;
}
/* Since the full-screen hero (2026-11-20): the wide set in any landscape window, the tall set in any portrait one. */
@media (min-aspect-ratio: 1 / 1) {
  .hero-slides[data-set="wide"] {
    display: block;
  }
  .hero-slides[data-set="tall"] {
    display: none;
  }
}

/* The old dark radial behind the names is gone at every width. */
.hero > .hero-text h1 {
  background: none;
  margin: 0;
  padding: 0;
}
/* The veil (shared rule above) shows only on desktop, behind photos 6 and 9. */
.hero > .hero-text::before {
  display: none;
}

/* Pause button: shown only while the photos rotate (engagement.js adds .is-rotating; never under reduced motion
   or without JavaScript). The site's button vocabulary: square corners, 1.5px border, solid fill, button tokens. */
.hero-pause {
  display: none;
}
.hero.is-rotating .hero-pause {
  display: grid;
  place-items: center;
  position: absolute;
  right: .75rem;
  bottom: .75rem;
  z-index: 3;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1.5px solid var(--btn-bg);
  border-radius: 0;
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  transition: background-color .2s ease-out, color .2s ease-out;
}
.hero.is-rotating .hero-pause:hover {
  background: var(--btn-fg);
  color: var(--btn-bg);
}
/* Pause: two bars. Play (pressed): a triangle. */
.hero.is-rotating .hero-pause::before {
  content: "";
  width: .75rem;
  height: .875rem;
  background: linear-gradient(to right, currentColor 0 34%, transparent 34% 66%, currentColor 66%);
}
.hero.is-rotating .hero-pause[aria-pressed="true"]::before {
  width: .8rem;
  margin-left: .15rem;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

/* Phones (under 50rem, except a phone turned sideways: see the side layout): the baseline stack above, finished. The
   only fade is the bottom 14% of the photo, full width, eased so it is almost clear in its upper half and meets the
   black band without an edge. The centering repeats the page's own phone rules, which are written in range syntax
   that browsers before Safari 16.4 and Chrome 104 drop. */
@media (max-width: 49.99rem) and (min-height: 30rem), (max-width: 49.99rem) and (max-aspect-ratio: 149999 / 100000) {
  .hero > .hero-stage::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    height: 14%;
    background-image: linear-gradient(to top, var(--black) 0%, rgb(0 0 0 / .62) 25%, rgb(0 0 0 / .26) 50%, rgb(0 0 0 / .07) 75%, transparent 100%);
    pointer-events: none;
  }
  .hero > .hero-text {
    margin-top: 0;
    padding-block: 1.1rem 2.5rem;
    text-align: center;
  }
  .hero > .hero-text h1 {
    justify-items: center;
  }
  .hero > .hero-text .name {
    font-size: clamp(2.2rem, 9.6vw, 2.9rem);
  }
  .hero > .hero-text .to-row {
    margin-inline: auto;
  }
  .hero > .hero-text .when {
    margin: .85rem 0 1.1rem;
  }
  .hero > .hero-text .when span {
    margin-top: .3rem;
    font-size: .8rem;
    letter-spacing: .14em;
  }
  .hero > .hero-text .btn-row {
    justify-content: center;
    gap: .75rem;
  }
  .hero > .hero-text .btn {
    padding-inline: 1.15rem;
  }
}

/* "Stacked": the wide photo whole at 3:2, then the words centered on black. From 50rem to 62rem (30rem tall or more),
   and from 62rem up in a window narrower than 11:10 (a 13-inch iPad upright, a portrait monitor): there a photo
   filling the hero would be cut at both sides, and Rob (x 17-26% of photo 1) and Breanna (x 74-84%) with it. */
@media (min-width: 50rem) and (max-width: 61.99rem) and (min-height: 30rem), (min-width: 62rem) and (max-aspect-ratio: 1099999 / 1000000) {
  .hero.hero {
    display: block;
    min-height: 0;
  }
  .hero > .hero-stage {
    position: relative;
    z-index: auto;
    height: auto;
    aspect-ratio: 3 / 2;
  }
  .hero > .hero-text {
    padding-block: 2.5rem 3.5rem;
    text-align: center;
  }
  .hero > .hero-text h1 {
    justify-items: center;
  }
  .hero > .hero-text .name {
    font-size: clamp(3rem, 6.6vw, 4rem);
  }
  .hero > .hero-text .to-row {
    margin-inline: auto;
  }
  .hero > .hero-text .btn-row {
    justify-content: center;
  }
}

/* 62rem and up: the photo fills the hero; the words sit in the open sky between the columns of photo 1, centered
   on x 48% (midway between the two columns) inside x 28-68% and y 5-46%, with no scrim. Light tokens: the names
   in the darker two stops of the light gilt (see .name below), date and venue in black, solid buttons. */
@media (min-width: 62rem) and (max-width: 63.99rem) and (min-height: 46.75rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 64rem) and (max-width: 71.99rem) and (min-height: 45rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 72rem) and (max-width: 79.99rem) and (min-height: 48rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 80rem) and (max-width: 85.365rem) and (min-height: 50rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 85.375rem) and (max-width: 89.99rem) and (min-height: 52rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 90rem) and (max-width: 95.99rem) and (min-height: 54.25rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 96rem) and (max-width: 99.99rem) and (min-height: 55.5rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 100rem) and (max-width: 104.99rem) and (min-height: 57.25rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 105rem) and (max-width: 111.99rem) and (min-height: 59.5rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 112rem) and (max-width: 119.99rem) and (min-height: 63rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 120rem) and (max-width: 127.99rem) and (min-height: 66.25rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 128rem) and (max-width: 135.99rem) and (min-height: 70rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 136rem) and (max-width: 143.99rem) and (min-height: 73.75rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 144rem) and (max-width: 151.99rem) and (min-height: 77.25rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 152rem) and (max-width: 159.99rem) and (min-height: 80.5rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 160rem) and (max-aspect-ratio: 197 / 100) and (min-aspect-ratio: 11 / 10) {
  /* The page's own full-window hero (its min-height in svh, with a vh fallback for browsers without svh). */
  .hero.hero {
    display: flex;
    min-height: calc(100vh - 4.25rem);
    min-height: calc(100svh - 4.25rem);
  }
  /* The photo fills the hero, behind the words. Ivory behind the photo, so the black words and button still read
     while photo 1 loads, or if it fails. */
  .hero > .hero-stage {
    position: absolute;
    inset: 0;
    z-index: -1;
    height: auto;
    background-color: var(--ivory);
  }
  .hero {
    --fg: inherit;
    --fg-dim: inherit;
    --accent: inherit;
    --accent-hi: inherit;
    --line: inherit;
    --gilt: inherit;
    --btn-bg: inherit;
    --btn-fg: inherit;
    --btn-shadow: inherit;
    --btn2-shadow: inherit;
  }
  .hero > .hero-text {
    position: absolute;
    /* The zone is y 5-46%: the block fills it and centers the words in it. Near the threshold the words may run a
       little past 46%; the threshold above keeps them, and the veil, clear of the couple on every slide. */
    top: 5%;
    left: 28%;
    z-index: 1;
    width: 40%;
    min-height: 41%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
  .hero > .hero-text h1 {
    justify-items: center;
  }
  .hero > .hero-text .name {
    /* Capped by height too (7.4svh), which only bites near the threshold: 63px at 1440x900, 58px at 1440x800. */
    font-size: clamp(2rem, min(4.4vw, 7.4vh), 4.5rem);
    font-size: clamp(2rem, min(4.4vw, 7.4svh), 4.5rem);
    /* The light gilt from its middle stop on (#8f6a1f to #7a5814), as in the home closing: over the veiled stone of
       photos 6 and 9 the lightest stop (#9c7624) measures under 3:1 against the darkest stonework behind it. One
       fill on every slide, so the names never change as the photos cross. */
    --gilt: linear-gradient(100deg, var(--gold-deep) 0%, #7a5814 100%);
  }
  .hero > .hero-text .to-row {
    width: min(100%, 15rem);
    margin: .05em auto .12em;
  }
  .hero > .hero-text .to {
    font-size: clamp(1.15rem, min(1.8vw, 3vh), 1.75rem);
    font-size: clamp(1.15rem, min(1.8vw, 3svh), 1.75rem);
  }
  .hero > .hero-text .when {
    margin: clamp(.6rem, 1.2vw, 1.1rem) 0 clamp(.9rem, 1.6vw, 1.5rem);
    font-size: clamp(1.05rem, min(1.45vw, 2.4vh), 1.45rem);
    font-size: clamp(1.05rem, min(1.45vw, 2.4svh), 1.45rem);
    line-height: 1.4;
  }
  .hero > .hero-text .when span {
    margin-top: .3rem;
    color: var(--fg);
    font-size: clamp(.72rem, .85vw, .9rem);
    letter-spacing: .16em;
  }
  .hero > .hero-text .btn-row {
    justify-content: center;
    gap: .75rem;
  }
  .hero > .hero-text .btn {
    padding-inline: clamp(1.15rem, 1.6vw, 1.9rem);
  }
  /* Both buttons solid: black, and ivory with a black rule. Each hovers to the other. */
  .hero > .hero-text .btn-secondary {
    background: var(--ivory);
    color: var(--black);
    border-color: var(--black);
  }
  .hero > .hero-text .btn-secondary:hover,
  .hero > .hero-text .btn-primary:hover {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
  }
  .hero > .hero-text .btn-primary:hover {
    background: var(--ivory);
    color: var(--black);
  }
  .hero.is-rotating .hero-pause {
    right: var(--gutter);
    bottom: 1.25rem;
  }
  /* The veil fades in and out with the slide (1200 ms, like the crossfade). Over the stonework of photos 6 and 9
     the closing's 6rem feather read as a panel, so the hero redefines the shared mask: wider, eased sides. It ends
     at the foot of the buttons (they are solid and need no veil), which keeps it well above the couple's heads. */
  .hero > .hero-text {
    --veil-mask-x: linear-gradient(to right, transparent, rgb(0 0 0 / .12) 2.5rem, rgb(0 0 0 / .4) 5rem, rgb(0 0 0 / .78) 7.5rem, #000 10rem, #000 calc(100% - 10rem), rgb(0 0 0 / .78) calc(100% - 7.5rem), rgb(0 0 0 / .4) calc(100% - 5rem), rgb(0 0 0 / .12) calc(100% - 2.5rem), transparent);
    --veil-mask-y: linear-gradient(to bottom, transparent, rgb(0 0 0 / .4) 1.25rem, rgb(0 0 0 / .8) 2.5rem, #000 3.5rem, #000 calc(100% - 4rem), rgb(0 0 0 / .7) calc(100% - 2.5rem), rgb(0 0 0 / .25) calc(100% - 1.25rem), transparent);
  }
  .hero > .hero-text::before {
    inset: -3.5rem -8rem 0;
    display: block;
    background-color: transparent;
    transition: background-color 1.2s ease-in-out;
  }
  .hero.is-veiled > .hero-text::before {
    background-color: var(--veil);
  }
}

/* "Side": a phone (or any window) turned sideways, under 30rem tall and at least 3:2, and from 62rem up every window
   the sky does not take (the exact complement of its steps): the words on black at left, the photo at right, so the
   names and both buttons fit on the first screen and nothing sits over the couple. Type is sized by height as well as
   width, so the names stay as large as the window allows (about 55px at 1366x650, 34px at 844x390). Under 50rem
   (667x375, 780x360) a 50svh photo on top was a thin band that cut Rob's head; here the photo shows whole. */
@media (max-height: 29.99rem) and (min-aspect-ratio: 3 / 2),
  (min-width: 62rem) and (max-width: 63.99rem) and (max-height: 46.74rem),
  (min-width: 64rem) and (max-width: 71.99rem) and (max-height: 44.99rem),
  (min-width: 72rem) and (max-width: 79.99rem) and (max-height: 47.99rem),
  (min-width: 80rem) and (max-width: 85.365rem) and (max-height: 49.99rem),
  (min-width: 85.375rem) and (max-width: 89.99rem) and (max-height: 51.99rem),
  (min-width: 90rem) and (max-width: 95.99rem) and (max-height: 54.24rem),
  (min-width: 96rem) and (max-width: 99.99rem) and (max-height: 55.49rem),
  (min-width: 100rem) and (max-width: 104.99rem) and (max-height: 57.24rem),
  (min-width: 105rem) and (max-width: 111.99rem) and (max-height: 59.49rem),
  (min-width: 112rem) and (max-width: 119.99rem) and (max-height: 62.99rem),
  (min-width: 120rem) and (max-width: 127.99rem) and (max-height: 66.24rem),
  (min-width: 128rem) and (max-width: 135.99rem) and (max-height: 69.99rem),
  (min-width: 136rem) and (max-width: 143.99rem) and (max-height: 73.74rem),
  (min-width: 144rem) and (max-width: 151.99rem) and (max-height: 77.24rem),
  (min-width: 152rem) and (max-width: 159.99rem) and (max-height: 80.49rem),
  (min-width: 160rem) and (min-aspect-ratio: 1970001 / 1000000) {
  /* The photo is a framed print on the black: the gutter at its right, an even margin above and below. --side-pad is
     in vh only (a custom property cannot fall back), which differs from svh by a few px at most. */
  .hero.hero {
    --side-pad: clamp(1rem, 4vh, 2.5rem);
    min-height: calc(100vh - 4.25rem);
    min-height: calc(100svh - 4.25rem);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    column-gap: clamp(1.5rem, 3vw, 3rem);
    align-items: center;
    padding: var(--side-pad) var(--gutter) var(--side-pad) 0;
  }
  /* The photo whole, at its own 3:2, centered in its column: a cropped column cut Rob or Breanna off the edges of
     photo 1 on windows like 1440x780. It never grows taller than the hero's padded height. */
  .hero > .hero-stage {
    position: relative;
    z-index: auto;
    grid-area: 1 / 2;
    justify-self: center;
    width: min(100%, (100vh - 4.25rem - 2 * var(--side-pad)) * 1.5);
    width: min(100%, (100svh - 4.25rem - 2 * var(--side-pad)) * 1.5);
    height: auto;
    aspect-ratio: 3 / 2;
  }
  .hero > .hero-text {
    grid-area: 1 / 1;
    align-self: center;
    width: auto;
    margin: 0;
    padding: 0 0 0 var(--gutter);
    text-align: center;
  }
  .hero > .hero-text h1 {
    justify-items: center;
  }
  /* .hero.hero: under 50rem the page's own phone rule sets the names at (0,4,0). */
  .hero.hero > .hero-text .name {
    font-size: clamp(1.75rem, min(4vw, 8.6vh), 4rem);
    font-size: clamp(1.75rem, min(4vw, 8.6svh), 4rem);
  }
  .hero > .hero-text .to-row {
    margin-inline: auto;
  }
  .hero > .hero-text .to {
    font-size: clamp(1.1rem, min(1.6vw, 3.4vh), 1.6rem);
    font-size: clamp(1.1rem, min(1.6vw, 3.4svh), 1.6rem);
  }
  .hero > .hero-text .when {
    margin: clamp(.5rem, 1.6vh, 1rem) 0 clamp(.8rem, 2.6vh, 1.5rem);
    margin: clamp(.5rem, 1.6svh, 1rem) 0 clamp(.8rem, 2.6svh, 1.5rem);
    font-size: clamp(1rem, min(1.3vw, 2.7vh), 1.35rem);
    font-size: clamp(1rem, min(1.3vw, 2.7svh), 1.35rem);
    line-height: 1.45;
  }
  .hero > .hero-text .when span {
    margin-top: .15rem;
    font-size: clamp(.7rem, min(.8vw, 1.7vh), .85rem);
    font-size: clamp(.7rem, min(.8vw, 1.7svh), .85rem);
    letter-spacing: .14em;
  }
  .hero > .hero-text .btn-row {
    justify-content: center;
    gap: .6rem;
  }
  .hero > .hero-text .btn {
    min-height: clamp(2.75rem, 7.5vh, 3.25rem);
    min-height: clamp(2.75rem, 7.5svh, 3.25rem);
    padding: .6rem clamp(1rem, 1.5vw, 1.9rem);
  }
}
/* A phone turned sideways (under 50rem): the words take the wider column, so the date runs to two lines and both
   buttons share one row inside the first screen (667x375, 780x360). The photo still shows whole at 3:2. */
@media (max-width: 49.99rem) and (max-height: 29.99rem) and (min-aspect-ratio: 3 / 2) {
  .hero.hero {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  }
}

/* ===== Full-screen hero (2026-11-20, Rob's call: "the pics should be the feature") =====
   Overrides the four layouts above at every size: the rotating photo fills the whole first screen under the header,
   and the names, date, and both buttons sit over its lower part on a dark fade (dark tokens: light gilt, white type,
   gold buttons). The pause button moves to the top right so the words never cover it. Written as .hero.hero so it
   outweighs every rule above, and placed after them. */
.hero.hero {
  --fg: var(--white);
  --fg-dim: #cdd1d6;
  --accent: var(--gold);
  --accent-hi: var(--gold-light);
  --line: #ffffff3d;
  --gilt: linear-gradient(100deg, #f4e4b4 0%, #ddbd6c 45%, #c09a42 100%);
  --btn-bg: var(--gold-light);
  --btn-fg: var(--black);
  --btn-shadow: var(--silver);
  --btn2-shadow: var(--gold);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: calc(100vh - 4.25rem);
  min-height: calc(100svh - 4.25rem);
  padding: 0;
  color: var(--fg);
  background-color: var(--black);
}
.hero.hero > .hero-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* The side layout above centers the stage (justify-self), which shrinks an absolute box to zero width. */
  justify-self: stretch;
  grid-area: auto;
  width: auto;
  height: auto;
  aspect-ratio: auto;
  background-color: var(--black);
}
.hero.hero > .hero-stage::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  height: 78%;
  background-image: linear-gradient(to top, rgb(0 0 0 / .86) 0%, rgb(0 0 0 / .68) 28%, rgb(0 0 0 / .45) 55%, rgb(0 0 0 / .16) 82%, transparent 100%);
  pointer-events: none;
}
/* Portrait windows: the words cover more of the photo, so the fade runs higher and darker behind them. */
/* 66% and darker mid-stops (2026-11-22): the black-and-white columns slide's light stone left the names under 3:1. */
@media (max-aspect-ratio: 999999 / 1000000) {
  .hero.hero > .hero-stage::after {
    height: 66%;
    background-image: linear-gradient(to top, rgb(0 0 0 / .9) 0%, rgb(0 0 0 / .8) 35%, rgb(0 0 0 / .58) 60%, rgb(0 0 0 / .2) 84%, transparent 100%);
  }
}
.hero.hero > .hero-text {
  position: relative;
  z-index: 3;
  inset: auto;
  width: 100%;
  min-height: 0;
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(1.75rem, 6vh, 4rem);
  display: block;
  text-align: center;
}
/* A soft dark glow behind the words, so the light gilt reads over bright sky (photo 1 in short windows) and over
   the gold gown (phones). It replaces the ivory veil the sky layout used. */
.hero.hero > .hero-text::before {
  content: "";
  display: block;
  position: absolute;
  inset: -3rem 0 0;
  z-index: -1;
  /* closest-side: the ellipse reaches clear before the box's edges, so the glow has no visible rim. */
  background: radial-gradient(closest-side at 50% 54%, rgb(0 0 0 / .5) 0%, rgb(0 0 0 / .36) 55%, rgb(0 0 0 / .12) 82%, transparent 100%);
  -webkit-mask-image: none;
  mask-image: none;
  transition: none;
  pointer-events: none;
}
/* Short windows (a phone turned sideways, a 1366x650 laptop): the words reach the upper half of the photo, so the
   fade runs the full height. */
@media (max-height: 42rem) {
  .hero.hero > .hero-stage::after {
    height: 100%;
    background-image: linear-gradient(to top, rgb(0 0 0 / .86) 0%, rgb(0 0 0 / .62) 40%, rgb(0 0 0 / .35) 75%, rgb(0 0 0 / .15) 100%);
  }
}
.hero.hero > .hero-text h1 {
  justify-items: center;
}
.hero.hero > .hero-text .name {
  --gilt: linear-gradient(100deg, #f4e4b4 0%, #ddbd6c 45%, #c09a42 100%);
  font-size: clamp(2.1rem, min(5.6vw, 8.5vh), 5rem);
  font-size: clamp(2.1rem, min(5.6vw, 8.5svh), 5rem);
}
.hero.hero > .hero-text .to-row {
  width: min(100%, 16rem);
  margin: .05em auto .12em;
}
.hero.hero > .hero-text .to {
  font-size: clamp(1.1rem, min(1.9vw, 3.2vh), 1.75rem);
  font-size: clamp(1.1rem, min(1.9vw, 3.2svh), 1.75rem);
}
/* The date is the line guests look for (Rob, 2026-11-22): upright and large, in numerals. It stays under 48px at
   every size, so the "opsz" 24 rule in Task 9 still holds. The venue and arrival lines under it are smaller but in
   full white, a touch larger and less spaced out than before, so they read clearly over the photo. */
.hero.hero > .hero-text .when {
  margin: clamp(.6rem, 2vh, 1.25rem) auto clamp(1rem, 2.8vh, 1.6rem);
  color: var(--white);
  font-size: clamp(1.6rem, min(6.6vw, 4.4vh), 2.4rem);
  font-size: clamp(1.6rem, min(6.6vw, 4.4svh), 2.4rem);
  font-style: normal;
  letter-spacing: .01em;
  line-height: 1.2;
  text-shadow: 0 1px 12px rgb(0 0 0 / .7);
}
.hero.hero > .hero-text .when span {
  margin-top: .45rem;
  color: var(--white);
  font-size: clamp(.82rem, min(1vw, 2vh), 1rem);
  font-size: clamp(.82rem, min(1vw, 2svh), 1rem);
  letter-spacing: .12em;
  line-height: 1.5;
}
/* Narrow phones (under 400px): each detail line stays on one line, so the words do not climb onto the couple. */
@media (max-width: 24.99rem) {
  .hero.hero > .hero-text .when {
    font-size: clamp(1.4rem, 6.6vw, 1.6rem);
  }
  .hero.hero > .hero-text .when span {
    font-size: .76rem;
    letter-spacing: .06em;
  }
}
.hero.hero > .hero-text .btn-row {
  justify-content: center;
  gap: .75rem;
}
.hero.hero > .hero-text .btn {
  min-height: 2.75rem;
  padding-inline: clamp(1.15rem, 1.6vw, 1.9rem);
}
.hero.hero > .hero-text .btn-primary {
  background: var(--gold-light);
  color: var(--black);
  border-color: var(--gold-light);
}
.hero.hero > .hero-text .btn-secondary {
  background: rgb(0 0 0 / .35);
  color: var(--white);
  border-color: var(--white);
}
.hero.hero > .hero-text .btn-primary:hover,
.hero.hero > .hero-text .btn-secondary:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}
/* Narrow phones (under 400px): both buttons on one row (they need 335px at the default padding), so the names stay
   low, off the couple. After the button rules above, so it wins by order. */
@media (max-width: 24.99rem) {
  .hero.hero > .hero-text .btn-row {
    gap: .5rem;
  }
  .hero.hero > .hero-text .btn {
    padding-inline: .9rem;
    letter-spacing: .1em;
  }
}
/* Landscape windows 50rem and wider: on photos 6 and 9 the couple stands mid-frame, so the words keep to a compact
   band at the foot of the photo: both names on one line, the venue and arrival details on one line under the date. */
@media (min-aspect-ratio: 1 / 1) and (min-width: 50rem) {
  .hero.hero > .hero-text h1 {
    display: block;
    line-height: 1.05;
  }
  .hero.hero > .hero-text .name {
    display: inline;
    font-size: clamp(2rem, min(3.7vw, 6.4vh), 4rem);
    font-size: clamp(2rem, min(3.7vw, 6.4svh), 4rem);
  }
  .hero.hero > .hero-text .to-row {
    display: inline;
    width: auto;
    margin: 0 .3em;
  }
  .hero.hero > .hero-text .to-row::before,
  .hero.hero > .hero-text .to-row::after {
    display: none;
  }
  .hero.hero > .hero-text .to {
    display: inline;
    font-size: clamp(1.2rem, min(2.2vw, 3.8vh), 2.3rem);
    font-size: clamp(1.2rem, min(2.2vw, 3.8svh), 2.3rem);
  }
  .hero.hero > .hero-text .when {
    max-width: none;
    margin: clamp(.5rem, 1.4vh, 1rem) auto clamp(.8rem, 2vh, 1.2rem);
    /* 37px at 1440x900; the 2.6rem cap (41.6px) keeps the date under 48px. */
    font-size: clamp(1.6rem, min(2.6vw, 4.4vh), 2.6rem);
    font-size: clamp(1.6rem, min(2.6vw, 4.4svh), 2.6rem);
    line-height: 1.35;
  }
  .hero.hero > .hero-text .when span {
    display: inline;
    white-space: nowrap;
  }
  /* The date is the paragraph's own text; the venue span starts the second line, and the arrival span joins it. */
  .hero.hero > .hero-text .when span:first-of-type::before {
    content: "\A";
    white-space: pre;
  }
  .hero.hero > .hero-text .when span + span::before {
    content: " · ";
  }
  .hero.hero > .hero-text {
    padding-bottom: clamp(1.5rem, 4.5vh, 3rem);
  }
}
/* Home, Hotel DuPont section (2026-11-22): the two dates, side by side, between the lede and the facts. Label in
   small gold capitals, date in Bodoni Moda at up to 2.2rem (35px, so "opsz" 24). */
.venue-dates {
  /* fit-content: from 62rem the exterior photo sits bottom right, and the rules must stop short of it. */
  width: fit-content;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 3rem;
  margin: 0 0 2.25rem;
  padding: 1.25rem 0;
  border-block: 1px solid var(--line);
}
.venue-dates > div {
  display: grid;
  gap: .3rem;
}
.venue-dates dt {
  color: var(--accent-hi);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.venue-dates dd {
  margin: 0;
  color: var(--fg);
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  font-variation-settings: "opsz" 24;
  line-height: 1.15;
}
/* The hero now meets Hotel DuPont directly (the monogram band is gone): fade the venue in from black so the two
   photos do not meet in a hard line. The section's shade, later in the DOM, still paints over it. */
.venue.venue::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: clamp(4rem, 12vh, 8rem);
  background-image: linear-gradient(to bottom, var(--black), transparent);
  pointer-events: none;
}
/* A phone turned sideways (landscape, under 30rem tall): smaller type, so the words stay below Breanna's face on the
   arch slide. 28px names and a 20.8px date keep "opsz" 24. */
@media (min-aspect-ratio: 1 / 1) and (max-height: 30rem) {
  .hero.hero > .hero-text .name {
    font-size: 1.75rem;
  }
  .hero.hero > .hero-text .when {
    margin: .2rem auto .6rem;
    font-size: 1.3rem;
    line-height: 1.3;
  }
  .hero.hero > .hero-text .when span {
    margin-top: .15rem;
  }
  .hero.hero > .hero-text {
    padding-bottom: .9rem;
  }
}
.hero.hero.is-rotating .hero-pause {
  top: 1rem;
  right: var(--gutter);
  bottom: auto;
}

/* ===== Task 7: Engagement gallery (home) =====
   Markup: section.section.gallery > .gallery-head (the h2), .gallery-nav (Previous / Next), .gallery-strip (15 photos).
   A row of prints on a white wall: every photo whole at its own shape (nothing cropped, nothing over it), one
   height for the row, even 1rem gaps. The strip runs to both edges of the window; its first photo starts at the
   page gutter (where the heading starts) and the next one peeks in at the right, so it reads as scrollable.
   Phones: the row height is capped by the screen's width (see --strip-h); wide photos are sized by the width
   instead (so each can be swiped fully into view) and sit centered on the row.
   The section follows the mosaic section on the same white, so it adds no top padding of its own: the gap above
   the heading is that section's bottom padding, the site's usual section rhythm. */
.section.gallery {
  /* Row height: the brief's clamp, but on phones no taller than 1.2 times the width between the gutters, so a
     portrait photo leaves the next one a clear peek (about 74px at 390 wide). Only bites below about 46rem. */
  --strip-h: min(clamp(18rem, 60vh, 34rem), (100vw - 2 * var(--gutter)) * 1.2);
  /* The page gutter as an inset from the window edge: the left edge of .wrap at every width. */
  --edge: max(var(--gutter), (100% - var(--wide)) / 2);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding-top: 0;
}
.gallery-head {
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

/* The strip: a horizontal scroll-snap row, focusable so arrow keys scroll it without JavaScript too. */
.gallery-strip {
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: .375rem var(--edge);
  scroll-padding-inline: var(--edge);
  /* Quiet: a thin track in the site's hairline color. */
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
/* The focus ring sits just inside the strip (outside it would run off both edges of the window); the strip's
   .375rem top and bottom padding keeps it off the photos there. */
.gallery-strip:focus-visible {
  outline-offset: -3px;
}
/* Width comes from height through each photo's width and height attributes, before and after it loads, so
   nothing moves as the lazy photos arrive. The silver ground shows only in the reserved space while one loads. */
.gallery-strip > img {
  flex: none;
  width: auto;
  height: var(--strip-h);
  max-width: none;
  border-radius: 2px;
  background-color: var(--silver-light);
  scroll-snap-align: center;
}
/* Wide photos: as wide as the row height allows, but on narrow screens 1.5rem short of the gutters so the next
   photo still peeks in beside the first one. */
.gallery-strip > img.is-wide {
  width: min(var(--strip-h) * 1.5, 100vw - 2 * var(--gutter) - 1.5rem);
  height: auto;
}

/* Previous / Next: hidden until engagement.js runs (no dead controls without it). The site's secondary-button
   look in a square: 1.5px gold-deep rule, no fill, the hairline-gray rule and dimmed arrow when disabled. */
.gallery-nav {
  display: none;
}
.gallery.is-ready .gallery-nav {
  display: flex;
  gap: .75rem;
}
.gallery-nav button {
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border: 1.5px solid var(--accent);
  border-radius: 0;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: background-color .2s ease-out, color .2s ease-out, border-color .2s ease-out;
}
.gallery-nav button:hover:enabled {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.gallery-nav button:disabled {
  color: var(--fg-dim);
  border-color: var(--line);
  cursor: default;
}
/* Phones: the buttons under the strip, at the right gutter, within reach of a thumb. */
@media (max-width: 49.99rem) {
  .gallery.is-ready .gallery-nav {
    order: 1;
    justify-self: end;
    margin: 1.25rem var(--edge) 0 0;
  }
}
/* 50rem and up: the buttons beside the heading, on the heading's line, at the right gutter. */
@media (min-width: 50rem) {
  .gallery > .gallery-head {
    grid-area: 1 / 1;
  }
  .gallery > .gallery-strip {
    grid-area: 2 / 1;
  }
  .gallery.is-ready .gallery-nav {
    grid-area: 1 / 1;
    justify-self: end;
    align-self: end;
    margin: 0 var(--edge) clamp(1.75rem, 4vw, 3rem) 0;
  }
}

/* ===== Task 8: the /rsvp/ countdown under reduced motion =====
   The page's countdown script renders once, then once a minute (not every second) when reduced motion is asked
   for, so its Seconds unit would sit still and wrong: it is hidden then, and the row reads days, hours, minutes. */
@media (prefers-reduced-motion: reduce) {
  .count > .unit.unit-s {
    display: none;
  }
}

/* ===== Task 8b: /rsvp/ the engraving's entrance, the first screen, and the photo strip =====
   Markup: .dupont-stage (perspective) > .dupont-tilt (what rises and tilts) > img.dupont + .sheen (the mask) > i (the light).
   The resting state is this stylesheet's default: the engraving fully drawn, flat (transform none), crisp. All motion
   is run by initEngraving in engagement.js with the Web Animations API, and only transform and opacity move:
     the entrance, once: .dupont-tilt rises from 22px low, tipped back 26deg at 96%, to flat (1.6s), and one band of
       light crosses the gold lines (1.9s, starting at 0.75s);
     desktop only ((hover: hover) and (pointer: fine)): a tilt toward the pointer (at most 4deg on X, 6deg on Y),
       back to flat when it leaves; a glint when it enters the engraving, at most once every 4s.
   Under reduced motion the script starts none of it, and the inline head script never sets .js-anim. */
.dupont-stage {
  display: block;
  width: min(100%, 38rem);
  margin: 0 0 clamp(1.75rem, 3.5vw, 2.75rem);
  perspective: 1100px;
}
.dupont-tilt {
  display: block;
  position: relative;
  /* The tilt eases toward the pointer; engagement.js removes the inline transform once it is flat again. */
  transition: transform .9s cubic-bezier(.16, 1, .3, 1);
}
.dupont-stage .dupont {
  width: 100%;
  margin: 0;
}
/* Waiting for the entrance: hidden only while .js-anim is set (motion welcome, the head script ran) and the script
   has not yet set the plate down (.is-set). If engagement.js never runs, it shows anyway after 3s (the script's own
   fallback, 2.5s after the page starts loading, comes first). */
.js-anim .dupont-stage:not(.is-set) > .dupont-tilt {
  visibility: hidden;
  animation: dupont-fallback 0s 3s forwards;
}
@keyframes dupont-fallback {
  to {
    visibility: visible;
  }
}
/* The light: a soft band, wider than the art, parked outside it to the left. The engraving itself is the mask
   (engagement.js sets --art to the image the browser chose), so the light falls only on the gold lines. */
.sheen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
  -webkit-mask: var(--art) center / 100% 100% no-repeat;
  mask: var(--art) center / 100% 100% no-repeat;
}
.sheen.is-armed {
  visibility: visible;
}
/* The band is a real child (.sheen > i), so moving it never depends on animating a pseudo-element, and the mask on
   .sheen always stays put over the art. */
.sheen > i {
  display: block;
  position: absolute;
  top: 0;
  bottom: 0;
  left: -50%;
  width: 200%;
  /* Warm white: --gold-light into --white, at 85%. */
  background-image: linear-gradient(100deg, transparent 43%, color-mix(in srgb, color-mix(in srgb, var(--gold-light) 35%, var(--white)) 85%, transparent) 50%, transparent 57%);
  transform: translateX(-50%);
}
@media (prefers-reduced-motion: reduce) {
  .sheen {
    display: none;
  }
}

/* The countdown sits below the reply button at every width. */
.go-hero {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
}

/* Phones (below 52rem, the page's own breakpoint): photo 10 square, then the engraving, "RSVP", the deadline, and the
   button, all on the first screen; the countdown follows. .rsvp-hero (added to the page's hero by
   apply-engagement.mjs) keeps these to /rsvp/. The tablet print below uses photo 10 at 50% 32%; phones (under 36rem)
   get their own focal point after it. */
@media (max-width: 51.99rem) {
  .page-hero.rsvp-hero > picture {
    aspect-ratio: 1 / 1;
  }
  .page-hero.rsvp-hero > picture > img {
    object-position: 50% 32%;
  }
  .page-hero.rsvp-hero > .text {
    padding-top: 1.75rem;
  }
  .dupont-stage {
    width: min(78%, 24rem);
    margin-bottom: 1.1rem;
  }
  .page-hero.rsvp-hero h1 {
    font-size: clamp(2.9rem, 13vw, 4rem);
  }
  .page-hero.rsvp-hero .hero-sub {
    margin-top: .6rem;
  }
  .go-hero {
    margin-top: 1.25rem;
  }
}
/* Portrait tablets (36rem to 52rem): a full-width square was as tall as the screen is wide and pushed the button
   below the fold (1310px at 820x1180), and a full-width frame short enough to keep it on the first screen would cut
   their hands (photo 10 runs from Rob's head at 26% of its height to their hands at 84%). So the photo becomes a
   print: 4:5, 46svh tall, at the text's left gutter, showing rows 5% to 89% of the photo (both faces, all hands). */
@media (min-width: 36rem) and (max-width: 51.99rem) {
  .page-hero.rsvp-hero > picture {
    justify-self: start;
    width: auto;
    height: 46vh;
    height: 46svh;
    aspect-ratio: 4 / 5;
    margin: var(--gutter) 0 0 var(--gutter);
  }
  .page-hero.rsvp-hero > picture > img {
    height: 100%;
    object-fit: cover;
  }
}
/* Phones (under 36rem): the square shows two thirds of photo 10's height. At 50% 58% that is rows 19% to 86%: Rob's
   head (top at 26%), both faces, and all four hands (down to 85%) inside it. */
@media (max-width: 35.99rem) {
  .page-hero.rsvp-hero > picture > img {
    object-position: 50% 58%;
  }
}
/* 52rem and up: the engraving a little smaller, so the button clears a 900px-tall window; on shorter windows the
   engraving, the space above it, and the heading also shrink with the height (the button stays on the first screen
   at 1366x650). The photo column is wider (46%, at most 42rem) and the photo always shows whole at its own 2:3 at
   the top of it: a full-height column cut Rob's and Breanna's shoulders at both its edges at 1440. Where the words
   run taller than the photo, the hero's black continues beneath it. */
@media (min-width: 52rem) {
  .dupont-stage {
    width: min(100%, 34rem, 58vh);
    width: min(100%, 34rem, 58svh);
    margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
  }
  .page-hero.rsvp-hero {
    grid-template-columns: minmax(0, 1fr) minmax(22rem, min(46%, 42rem));
  }
  .page-hero.rsvp-hero > picture {
    height: auto;
    align-self: start;
    aspect-ratio: 2 / 3;
  }
  .page-hero.rsvp-hero > .text {
    padding-top: clamp(2rem, 9vh, 5rem);
    padding-top: clamp(2rem, 9svh, 5rem);
  }
  .page-hero.rsvp-hero h1 {
    font-size: clamp(3.2rem, min(12vw, 15vh), 7.5rem);
    font-size: clamp(3.2rem, min(12vw, 15svh), 7.5rem);
  }
  .go-hero {
    margin-top: clamp(1.25rem, min(3vw, 4vh), 2.25rem);
    margin-top: clamp(1.25rem, min(3vw, 4svh), 2.25rem);
  }
}

/* The strip: four prints below the reply steps. Two columns on phones; four from 52rem, the even ones set 2.5rem
   lower. Each photo whole at its own 2:3, nothing over it; the silver ground shows only while one loads. */
.strip-band {
  padding-top: 0;
}
/* After the deadline the reply steps (open-only) are gone, so the strip follows the hero directly: it takes the
   site's usual section padding back. */
html[data-rsvp="closed"] .strip-band {
  padding-top: clamp(4rem, 10vw, 7.5rem);
}
.strip {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
.strip img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  background-color: var(--silver-light);
}
@media (min-width: 52rem) {
  .strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: start;
  }
  .strip > li:nth-child(even) {
    margin-top: 2.5rem;
  }
}

/* ===== Task 9: optical size for Bodoni Moda (var(--display)) =====
   The page set headings at "opsz" 40 (and the gilt text at 36), which draws hairlines too thin to survive at small
   sizes ("Hotel" read "Ilotel", "FAQ" read "IAQ"). Rule: under 48px rendered, "opsz" 24; 48px and up, "opsz" 40.
   First every display element is small; then each group that reaches 48px says so, at the viewport width where its
   own clamp() or layout crosses 48px (measured in a browser, one px at a time). Sizes, weights, colors, and
   letter-spacing are untouched. The :is() list keeps this at class weight, so later rules below win by order. */
:is(h1, h2, h3, .gilt-text, .name, .to, .when, .num, .time, .footer-names) {
  font-variation-settings: "opsz" 24;
}
.qa summary,
.venue-facts strong,
.unit .n {
  font-variation-settings: "opsz" 24;
}
.steps li::before {
  font-variation-settings: "opsz" 24;
}
@media (max-width: 61.99rem) {
  /* The phone menu panel sets its links in Bodoni Moda at 2.1rem (33.6px); from 62rem the bar uses Figtree. */
  .site-nav a {
    font-variation-settings: "opsz" 24;
  }
}
/* 48px and up at every width: the big step numbers, the page titles, the venue name, the full-bleed chapter titles. */
.num,
main .page-hero h1,
.venue h2,
.wide-text h2 {
  font-variation-settings: "opsz" 40;
}
/* The RSVP title is 12vw, which is under 48px on the narrowest phones (up to 369px wide). */
/* 23.115rem is 369.84px: a px value ending in .99 is rounded to 370px in Chrome. */
@media (max-width: 23.115rem) {
  body .page-hero.rsvp-hero h1 {
    font-variation-settings: "opsz" 24;
  }
}
/* 8vw reaches 48px at 600px: footer names, and the Wedding page's "Hotel DuPont". */
@media (min-width: 600px) {
  .footer-names,
  .where h2 {
    font-variation-settings: "opsz" 40;
  }
}
/* 7vw reaches 48px at 686px: the section headings clamp(2.3rem, 7vw, 4.25rem) and the Travel hotel heading. */
@media (min-width: 686px) {
  .us-head h2,
  .us-head h2 .gilt-text,
  .gallery-head h2,
  section.band-wine h2,
  section.band-plum .narrow h2,
  .main-hotel h2,
  .split-text h2 {
    font-variation-settings: "opsz" 40;
  }
}
/* Our Story's chapter titles: 6vw, at the 50rem layout break. */
@media (min-width: 50rem) {
  .moment-text h2 {
    font-variation-settings: "opsz" 40;
  }
}
/* The Wedding page's "White Tie Optional" card heading reaches 48px at the 60rem break. */
@media (min-width: 60rem) {
  .dress h2 {
    font-variation-settings: "opsz" 40;
  }
}
/* The home names. Their size depends on the window's height as well as its width, so "opsz" 40 needs both, in each
   of the hero's four layouts (queries copied from the layouts above, each step of the sky and the side kept):
   phones (under 50rem, and a phone turned sideways): never 48px: stays 24.
   stacked (50rem to 62rem and 30rem tall or more; 62rem up and narrower than 11:10): clamp(3rem, 6.6vw, 4rem),
     always 48px or more: both of its clauses, unchanged.
   sky: clamp(2rem, min(4.4vw, 7.4svh), 4.5rem): 48px needs width >= 1091px and height >= 649px. Every sky step
     from 64rem up is at least 45rem (720px) tall, so only the width matters: the 64rem step starts at 1091px here,
     and the 62rem step (under 1024px) never reaches 48px.
   side: clamp(1.75rem, min(4vw, 8.6svh), 4rem): 48px needs width >= 1200px and height >= 559px: each side step from
     72rem up, from 1200px and 559px tall. */
@media (min-width: 50rem) and (max-width: 61.99rem) and (min-height: 30rem), (min-width: 62rem) and (max-aspect-ratio: 1099999 / 1000000),
  (min-width: 1091px) and (max-width: 71.99rem) and (min-height: 45rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 72rem) and (max-width: 79.99rem) and (min-height: 48rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 80rem) and (max-width: 85.365rem) and (min-height: 50rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 85.375rem) and (max-width: 89.99rem) and (min-height: 52rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 90rem) and (max-width: 95.99rem) and (min-height: 54.25rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 96rem) and (max-width: 99.99rem) and (min-height: 55.5rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 100rem) and (max-width: 104.99rem) and (min-height: 57.25rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 105rem) and (max-width: 111.99rem) and (min-height: 59.5rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 112rem) and (max-width: 119.99rem) and (min-height: 63rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 120rem) and (max-width: 127.99rem) and (min-height: 66.25rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 128rem) and (max-width: 135.99rem) and (min-height: 70rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 136rem) and (max-width: 143.99rem) and (min-height: 73.75rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 144rem) and (max-width: 151.99rem) and (min-height: 77.25rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 152rem) and (max-width: 159.99rem) and (min-height: 80.5rem) and (min-aspect-ratio: 11 / 10),
  (min-width: 160rem) and (max-aspect-ratio: 197 / 100) and (min-aspect-ratio: 11 / 10),
  (min-width: 1200px) and (max-width: 79.99rem) and (min-height: 559px) and (max-height: 47.99rem),
  (min-width: 80rem) and (max-width: 85.365rem) and (min-height: 559px) and (max-height: 49.99rem),
  (min-width: 85.375rem) and (max-width: 89.99rem) and (min-height: 559px) and (max-height: 51.99rem),
  (min-width: 90rem) and (max-width: 95.99rem) and (min-height: 559px) and (max-height: 54.24rem),
  (min-width: 96rem) and (max-width: 99.99rem) and (min-height: 559px) and (max-height: 55.49rem),
  (min-width: 100rem) and (max-width: 104.99rem) and (min-height: 559px) and (max-height: 57.24rem),
  (min-width: 105rem) and (max-width: 111.99rem) and (min-height: 559px) and (max-height: 59.49rem),
  (min-width: 112rem) and (max-width: 119.99rem) and (min-height: 559px) and (max-height: 62.99rem),
  (min-width: 120rem) and (max-width: 127.99rem) and (min-height: 559px) and (max-height: 66.24rem),
  (min-width: 128rem) and (max-width: 135.99rem) and (min-height: 559px) and (max-height: 69.99rem),
  (min-width: 136rem) and (max-width: 143.99rem) and (min-height: 559px) and (max-height: 73.74rem),
  (min-width: 144rem) and (max-width: 151.99rem) and (min-height: 559px) and (max-height: 77.24rem),
  (min-width: 152rem) and (max-width: 159.99rem) and (min-height: 559px) and (max-height: 80.49rem),
  (min-width: 160rem) and (min-height: 559px) and (min-aspect-ratio: 1970001 / 1000000) {
  .hero .name {
    font-variation-settings: "opsz" 40;
  }
}
/* The home closing: 4.4vw, no height term. */
@media (min-width: 1091px) {
  .closing.ivory h2 {
    font-variation-settings: "opsz" 40;
  }
}
/* Our Story's closing title: big from 37.5rem to 62rem, small in the side-by-side layout, big again from 1143px. */
@media (min-width: 37.5rem) and (max-width: 61.99rem), (min-width: 1143px) {
  .closing.beside h2 {
    font-variation-settings: "opsz" 40;
  }
}
/* The RSVP countdown digits: 4.6vw, 48px at 1043.5px. */
@media (min-width: 1044px) {
  .unit .n {
    font-variation-settings: "opsz" 40;
  }
}

/* ===== Task 9: the floating RSVP bar is out of reach while it is off screen =====
   The bar sits below the window (translated 110%) until the page's script adds .shown. Hidden visibility takes it out
   of the tab order, the click path, and the reading order, with no script of ours involved: if engagement.js never
   loads, .shown still makes the bar visible and usable. Going out, visibility waits for the slide (.3s); coming in,
   it is visible at once. (Reduced motion turns every transition off, so there it switches at once both ways.) */
.sticky-rsvp[data-rsvp-only] {
  transition: transform .3s cubic-bezier(.16, 1, .3, 1), visibility 0s linear .3s;
}
.sticky-rsvp[data-rsvp-only]:not(.shown) {
  visibility: hidden;
}
.sticky-rsvp[data-rsvp-only].shown {
  transition: transform .3s cubic-bezier(.16, 1, .3, 1), visibility 0s;
}

/* ===== Task 9: tap targets =====
   Stand-alone text links were 22 to 26px tall. Links inside a sentence are left alone. */
.tap-link {
  /* Positioned, so the link's absolutely placed "(opens in a new tab)" span stays inside it (a flex container
     otherwise leaves it at the end of the line, past the screen edge on phones). */
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}
