/* jonnyandemmaforever.com styles */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
}

body {
  font-family: system-ui, sans-serif;
  overflow-x: hidden;
}

/* Fewer single-word last lines where supported (Chromium; no effect elsewhere) */
p,
h1,
h2,
h3,
h4,
h5,
h6,
li,
figcaption,
blockquote,
td,
th,
dt,
dd {
  text-wrap: pretty;
}

/* Display titles: keep default wrapping (widow script skips these too) */
.story-pagehead__title,
.stay-page-title,
.party-title,
.qa-page-title,
.registry-title,
.things-intro-heading,
.things-section-title,
.section-primary-title,
.section-secondary-title,
.error-title {
  text-wrap: wrap;
}

.banner {
  width: 100%;
  min-width: 100%;
  height: 100vh;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  /* Darken photo slightly, then image (JPEG fallback / WebP via image-set) */
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.34)),
    url("banner.jpg");
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.34)),
    image-set(
      url("banner.webp") type("image/webp"),
      url("banner.jpg") type("image/jpeg")
    );
  background-size: cover, cover;
  background-repeat: no-repeat, no-repeat;
  background-attachment: scroll;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Vertical % ↑ = frame shifts down (more of lower photo visible) */
  background-position: center 29%, center 29%;
}

.banner-logo {
  max-width: 80%;
  max-height: 80vh;
  width: auto;
  height: auto;
  display: block;
  margin-top: -8vh;
}

/* Top nav bar – logo left, links right; background fades in on scroll */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 2.5rem;
  background: transparent;
  backdrop-filter: none;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.nav.nav--scrolled {
  background: #414F39;
  backdrop-filter: none;
}

.nav-logo {
  display: block;
  line-height: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

.nav-logo img {
  display: block;
  height: 4rem;
  width: auto;
  margin: 0;
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
}

.nav-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.35rem;
}

.nav a {
  cursor: pointer !important;
}

.nav-links a {
  position: relative;
  z-index: 1;
  font-family: "Aboreto", serif;
  color: #fff;
  text-decoration: none;
  font-size: 1.02rem;
  letter-spacing: 0.015em;
  transition: opacity 0.2s;
  cursor: pointer !important;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: #fff;
  transition: width 0.3s ease;
  pointer-events: none;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover {
  opacity: 0.85;
  cursor: pointer !important;
}

/* Menu panel wraps links (inline on wide screens, overlay on small) */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.nav-rsvp {
  flex-shrink: 0;
  display: inline-block;
  padding: 0.5rem 1.25rem;
  font-family: "Aboreto", serif;
  font-size: 0.88rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  line-height: 1.2;
  color: #414f39;
  background-color: #fbf7ef;
  background-image: linear-gradient(
    to bottom,
    #fbf7ef 0%,
    #fbf7ef 50%,
    #414f39 50%,
    #414f39 100%
  );
  background-size: 100% 200%;
  background-position: 0 0;
  background-repeat: no-repeat;
  border: 1px solid #fff;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition:
    background-position 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.35s ease;
}

.nav-rsvp:hover {
  background-position: 0 100%;
  color: #fbf7ef;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.nav-rsvp:active {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
  transition-duration: 0.15s;
}

.nav-rsvp:focus-visible {
  outline: 2px solid #fbf7ef;
  outline-offset: 3px;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  z-index: 1002;
  flex-shrink: 0;
}

.hamburger:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.hamburger__bar {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition:
    transform 0.38s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav.open .hamburger__bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav.open .hamburger__bar:nth-child(2) {
  opacity: 0;
}

.nav.open .hamburger__bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 64rem) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 1001;
    padding-top: calc(5.5rem + env(safe-area-inset-top, 0px));
    padding-right: max(1.75rem, env(safe-area-inset-right, 0px));
    padding-bottom: max(2rem, env(safe-area-inset-bottom, 0px));
    padding-left: max(1.75rem, env(safe-area-inset-left, 0px));
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    background: rgba(65, 79, 57, 0.98);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-0.6rem);
    transition:
      opacity 0.38s cubic-bezier(0.4, 0, 0.2, 1),
      transform 0.38s cubic-bezier(0.4, 0, 0.2, 1),
      visibility 0s linear 0.38s;
  }

  /* Until this class is set (after first paint), skip transitions so a delayed
     visibility rule cannot flash the overlay on load or at the breakpoint. */
  .nav:not(.nav--menu-anim-ready) .nav-menu {
    transition: none;
  }

  .nav.open .nav-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition:
      opacity 0.38s cubic-bezier(0.4, 0, 0.2, 1),
      transform 0.38s cubic-bezier(0.4, 0, 0.2, 1),
      visibility 0s linear 0s;
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 1.75rem;
  }

  .nav-links a {
    font-size: 1.35rem;
    opacity: 0;
    transform: translateY(0.4rem);
    transition:
      opacity 0.32s cubic-bezier(0.4, 0, 0.2, 1),
      transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav.open .nav-links a {
    opacity: 1;
    transform: translateY(0);
  }

  /* nth-of-type: HTML comments inside .nav-links count for :nth-child but not for link order */
  .nav.open .nav-links a:nth-of-type(1) {
    transition-delay: 0.05s;
  }

  .nav.open .nav-links a:nth-of-type(2) {
    transition-delay: 0.09s;
  }

  .nav.open .nav-links a:nth-of-type(3) {
    transition-delay: 0.13s;
  }

  .nav.open .nav-links a:nth-of-type(4) {
    transition-delay: 0.17s;
  }

  .nav.open .nav-links a:nth-of-type(5) {
    transition-delay: 0.21s;
  }

  .nav.open .nav-links a:nth-of-type(6) {
    transition-delay: 0.25s;
  }

  .nav.open .nav-links a:nth-of-type(7) {
    transition-delay: 0.29s;
  }

  .nav-links a::after {
    bottom: -6px;
  }

  .nav-rsvp {
    align-self: center;
    margin-top: 0.35rem;
    padding: 0.65rem 1.5rem;
    font-size: 0.95rem;
    opacity: 0;
    transform: translateY(0.4rem);
    transition:
      opacity 0.32s cubic-bezier(0.4, 0, 0.2, 1),
      transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav.open .nav-rsvp {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.37s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hamburger__bar {
    transition: none;
  }

  .nav-rsvp {
    transition: none;
  }

  .nav-rsvp:hover {
    background-position: 0 100%;
    color: #fbf7ef;
  }

  .section-secondary-btn {
    transition: none;
  }

  .section-secondary-btn:hover {
    background-position: 0 100%;
    color: #414f39;
  }

  @media (max-width: 64rem) {
    .nav-menu {
      transition: none;
      transform: none;
    }

    .nav.open .nav-menu {
      transition: none;
      transform: none;
    }

    .nav-links a {
      opacity: 1;
      transform: none;
      transition: none;
    }

    .nav.open .nav-links a {
      transition: none;
    }

    .nav-rsvp {
      opacity: 1;
      transform: none;
      transition: none;
    }

    .nav.open .nav-rsvp {
      transition: none;
    }
  }
}

main {
  padding: 0;
}

body.page-home {
  --home-section-height: 80vh;
  /* Pause after element is “in view” before text reveal runs */
  --home-reveal-delay: 0.38s;
  /* How long the scroll-in fade/slide takes once it starts */
  --home-reveal-duration: 1.4s;
}

/* ----- Home: hero logo load-in + text scroll reveals (photos unchanged) ----- */
@keyframes home-banner-logo-in {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(0.85rem);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

body.page-home .banner-logo {
  animation: home-banner-logo-in 1.65s cubic-bezier(0.22, 1, 0.36, 1) 0.52s both;
}

body.page-home [data-home-reveal] {
  opacity: 0;
  transform: translateY(1.35rem);
  transition:
    opacity var(--home-reveal-duration) cubic-bezier(0.22, 1, 0.36, 1),
    transform var(--home-reveal-duration) cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

body.page-home [data-home-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
  transition-delay: var(--home-reveal-delay);
}

@media (prefers-reduced-motion: reduce) {
  body.page-home .banner-logo {
    animation: none;
  }

  body.page-home [data-home-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }
}

.section-primary {
  background-color: #fbf7ef;
  background-image:
    url("green-leaves.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  min-height: 50vh;
  padding: 12rem 2rem 12rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

body.page-home .section-primary {
  height: var(--home-section-height);
  min-height: var(--home-section-height);
  max-height: var(--home-section-height);
  padding: clamp(1.25rem, 3vh, 2.5rem) 2rem;
  overflow-x: hidden;
  overflow-y: auto;
}

.section-primary-title {
  font-family: "Instrument Serif", serif;
  font-size: clamp(3.1rem, 14vw, 5.75rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.05em;
  line-height: 0.88;
  margin: 0;
  margin-bottom: clamp(0.5rem, 1.5vw, 1rem);
  text-align: center;
  color: #1a1a1a;
}

.section-primary-date {
  font-family: "Luxurious Script", cursive;
  font-size: clamp(1.95rem, 6vw, 3rem);
  font-weight: 400;
  margin: 0.5rem 0 0;
  text-align: center;
  color: #1a1a1a;
}

.section-secondary {
  display: flex;
  flex-direction: row;
  background-color: #414F39;
  width: 100%;
  min-height: 50vh;
  box-sizing: border-box;
}

/* Image on the left, text on the right (same colors & typography as .section-secondary) */
.section-secondary--flip {
  flex-direction: row-reverse;
}

.section-secondary--reception {
  background-color: #414F39; /* #b38698 */
}

/* Welcome + reception panels (home): brown from nail tone in photo-primary */
.section-secondary--brown {
  background-color: #46352a;
}

.section-secondary--brown .section-secondary-title,
.section-secondary--brown .section-secondary-subtitle,
.section-secondary--brown .section-secondary-detail {
  color: #fff;
}

.section-secondary--brown .section-secondary-btn {
  color: #fff;
  border-color: #fff;
  background-image: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 50%,
    #fff 50%,
    #fff 100%
  );
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.section-secondary--brown .section-secondary-btn:hover {
  color: #3d2c24;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.section-secondary--brown .section-secondary-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.section-secondary-content {
  width: 50%;
  flex-shrink: 0;
  padding: 10rem 2rem 10rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
}

.section-secondary-text {
  text-align: center;
  max-width: 28rem;
}

.section-secondary-title {
  font-family: "Instrument Serif", serif;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 0.88;
  margin: 0;
  margin-top: 3rem;
  margin-bottom: clamp(0.5rem, 1.5vw, 1rem);
  text-align: center;
  color: #fbf7ef;
}

.section-secondary-subtitle {
  font-family: "Luxurious Script", cursive;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 400;
  margin: 0.5rem 0 0;
  text-align: center;
  color: #fbf7ef;
}

.section-secondary-detail {
  font-family: "Aboreto", serif;
  font-size: clamp(0.75rem, 2vw, 1.1rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin: 1.25rem 0 0;
  text-align: center;
  color: #fbf7ef;
}

.section-secondary-btn {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.75rem 1.75rem;
  font-family: "Aboreto", serif;
  font-size: 0.9rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-align: center;
  color: #fbf7ef;
  background-color: transparent;
  background-image: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 50%,
    #fff 50%,
    #fff 100%
  );
  background-size: 100% 200%;
  background-position: 0 0;
  background-repeat: no-repeat;
  border: 1px solid #fff;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition:
    background-position 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.35s ease;
}

.section-secondary-btn:hover {
  background-position: 0 100%;
  color: #414f39;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.section-secondary-btn:active {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
  transition-duration: 0.15s;
}

.section-secondary-btn:focus-visible {
  outline: 2px solid #fbf7ef;
  outline-offset: 3px;
}

.section-secondary-image {
  width: 50%;
  flex-shrink: 0;
  min-height: 50vh;
  overflow: hidden;
}

.section-secondary-image img {
  width: 100%;
  height: 100%;
  min-height: 50vh;
  object-fit: cover;
  object-position: center;
  display: block;
}

body.page-home .section-secondary,
body.page-home .section-secondary--flip {
  min-height: 0;
  height: var(--home-section-height);
  max-height: var(--home-section-height);
  overflow: hidden;
}

body.page-home .section-secondary-content {
  min-height: 0;
  padding: clamp(1.25rem, 3vh, 2.5rem) 2rem;
  overflow-x: hidden;
  overflow-y: auto;
  align-self: stretch;
}

body.page-home .section-secondary-title {
  margin-top: 0;
}

body.page-home .section-secondary-image {
  min-height: 0;
  align-self: stretch;
}

body.page-home .section-secondary-image img {
  min-height: 0;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Reception (hand-holding): favor upper portion of portrait crop */
body.page-home .section-secondary-image--crop-up img {
  object-position: center 72%;
}

@media (max-width: 52rem) {
  .section-secondary,
  .section-secondary--flip {
    flex-direction: column;
  }

  .section-secondary-content,
  .section-secondary-image {
    width: 100%;
    min-height: 0;
  }

  .section-secondary-content {
    padding: 6rem 2rem 6rem;
  }

  .section-secondary-image img {
    min-height: 42vh;
  }

  .section-secondary-title {
    margin-top: 0;
    font-size: clamp(3.1rem, 14vw, 4.75rem);
  }

  .section-secondary-subtitle {
    font-size: clamp(1.95rem, 6vw, 3rem);
  }

  .section-secondary-detail {
    font-size: clamp(0.92rem, 2.85vw, 1.28rem);
  }

  .section-secondary-btn {
    font-size: clamp(1rem, 2.5vw, 1.12rem);
    padding: 0.85rem 1.9rem;
  }

  /* Stacked layout: text band and photo band share the same fixed height */
  body.page-home .section-secondary,
  body.page-home .section-secondary--flip {
    height: calc(2 * var(--home-section-height));
    min-height: calc(2 * var(--home-section-height));
    max-height: none;
    overflow: hidden;
  }

  body.page-home .section-secondary-content {
    flex: 0 0 var(--home-section-height);
    min-height: var(--home-section-height);
    max-height: var(--home-section-height);
    padding: clamp(1.25rem, 3vh, 2.5rem) 2rem;
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
  }

  body.page-home .section-secondary-image {
    flex: 0 0 var(--home-section-height);
    flex-shrink: 0;
    min-height: var(--home-section-height);
    max-height: var(--home-section-height);
    height: var(--home-section-height);
    overflow: hidden;
  }

  body.page-home .section-secondary-image img {
    min-height: 0;
    height: 100%;
  }

  body.page-home .section-secondary-image--crop-up img {
    object-position: center 42%;
  }

  /* Ceremony / reception copy: gentler reveal when the section is stacked (same motion, longer). */
  body.page-home .section-secondary-content[data-home-reveal] {
    --home-reveal-duration: 1.95s;
    --home-reveal-delay: 0.52s;
  }
}

@media (max-width: 36rem) {
  .section-secondary-content {
    padding-left: max(1.5rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.5rem, env(safe-area-inset-right, 0px));
  }
}

.section-countdown {
  background-color: #fbf7ef;
  width: 100%;
  padding: 8rem 2rem 10rem;
  box-sizing: border-box;
  text-align: center;
}

.countdown {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1.25rem, 4vw, 2.5rem);
  margin-top: 3rem;
  max-width: 44rem;
  margin-left: auto;
  margin-right: auto;
}

.countdown__unit {
  flex: 1 1 5.5rem;
  min-width: 4.5rem;
  max-width: 9rem;
}

.countdown__value {
  display: block;
  font-family: "Instrument Serif", serif;
  font-size: clamp(5rem, 12vw, 7rem);
  font-weight: 400;
  line-height: 1;
  color: #414F39;
  letter-spacing: -0.02em;
}

.countdown__label {
  display: block;
  font-family: "Aboreto", serif;
  font-size: clamp(.8rem, 3vw, 1.2rem);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin-top: 0.65rem;
  color: rgba(26, 26, 26, 0.65);
}

/* Narrow viewports: 2×2 grid — Days/Hours, then Minutes/Seconds with roomy gaps */
@media (max-width: 48rem) {
  .section-countdown {
    padding-top: clamp(2.25rem, 7vw, 4rem);
    padding-bottom: clamp(3.25rem, 9vw, 6.5rem);
  }

  .countdown {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(2.25rem, 8vw, 3.75rem) clamp(1.75rem, 6vw, 3rem);
    max-width: min(30rem, 100%);
    margin-top: clamp(1rem, 3.5vw, 1.75rem);
  }

  .countdown__unit {
    flex: unset;
    min-width: 0;
    max-width: none;
  }
}

.section-home-tertiary {
  background-color: #fbf7ef;
  width: 100%;
  padding: clamp(6rem, 12vw, 10rem) 2rem clamp(4rem, 4vw, 6rem);
  box-sizing: border-box;
}

.section-home-tertiary__inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(4rem, 6vw, 6rem);
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
}

.section-home-tertiary__text {
  flex: 1 1 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
}

.section-home-tertiary__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: clamp(0.85rem, 2vw, 1.15rem);
  max-width: 26rem;
  text-align: right;
}

.section-home-tertiary__lead {
  margin: 0;
  font-family: "Aboreto", serif;
  font-size: clamp(.9rem, 1.75vw, 1.2rem);
  font-weight: 400;
  font-style: normal;
  line-height: 1.65;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #2b2118;
}

.section-home-tertiary__link {
  position: relative;
  display: inline-block;
  z-index: 1;
  font-family: "Aboreto", serif;
  font-size: clamp(1.2rem, 2vw, 1.3rem);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.08em;
  color: #414f39;
  text-decoration: none;
  transition: opacity 0.2s;
}

.section-home-tertiary__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: #414f39;
  transition: width 0.3s ease;
  pointer-events: none;
}

.section-home-tertiary__link:hover::after,
.section-home-tertiary__link:focus-visible::after {
  width: 100%;
}

.section-home-tertiary__link:hover {
  opacity: 0.85;
}

.section-home-tertiary__link:focus-visible {
  outline: 2px solid #414f39;
  outline-offset: 4px;
}

.section-home-tertiary__figure {
  /* Nudge right like translateX, but margin + narrower basis = same total width → no overflow */
  --tertiary-photo-nudge: clamp(0.65rem, 1.85vw, 1.35rem);
  flex: 0 0 calc(56% - var(--tertiary-photo-nudge));
  max-width: calc(56% - var(--tertiary-photo-nudge));
  min-width: 0;
  margin: 0;
  margin-inline-start: var(--tertiary-photo-nudge);
}

.section-home-tertiary__img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 40rem) {
  .section-home-tertiary__inner {
    flex-direction: column;
    gap: clamp(1.75rem, 5vw, 2.5rem);
  }

  .section-home-tertiary__text {
    justify-content: center;
  }

  .section-home-tertiary__copy {
    align-items: center;
    text-align: center;
    margin-bottom: clamp(5rem, 5vw, 7rem);
  }

  .section-home-tertiary__figure {
    flex: 0 1 auto;
    align-self: center;
    width: 100%;
    max-width: min(100%, 36rem);
    margin-inline-start: 0;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Home: footer sits under cream countdown — avoid white body showing through */
body.page-home .site-footer {
  background-color: #fbf7ef;
}

/* Site footer — names | date on one row; only text is linked to home */
.site-footer {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.35rem;
  background-color: transparent;
  color: #2b2118;
  padding: 1rem 1.25rem 1.5rem;
  box-sizing: border-box;
}

.site-footer__link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.site-footer__link:hover {
  opacity: 0.82;
}

.site-footer__link:focus-visible {
  outline: 2px solid #2b2118;
  outline-offset: 3px;
}

.site-footer__names {
  font-family: "Luxurious Script", cursive;
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 400;
  margin: 0;
  color: #2b2118;
  line-height: 1.2;
  text-align: center;
}

.site-footer__rule {
  width: 1px;
  height: 1.5rem;
  flex-shrink: 0;
  align-self: center;
  margin: 0;
  background: #2b2118;
  opacity: 0.35;
}

.site-footer__date {
  font-family: "Instrument Serif", serif;
  font-size: clamp(0.82rem, 1.9vw, 1.05rem);
  font-weight: 400;
  letter-spacing: 0.22em;
  margin: 0;
  padding-left: 0.28em;
  color: #2b2118;
  text-align: center; 
}

/* Phones: notch / home-indicator safe areas + less extreme vertical padding on home */
@media (max-width: 36rem) {
  .nav {
    padding-top: max(0.5rem, env(safe-area-inset-top, 0px));
    padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
    padding-bottom: 0.5rem;
    padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
  }

  .banner-logo {
    max-width: 92%;
    max-height: 86vh;
    margin-top: -6vh;
  }

  .section-primary {
    padding-top: clamp(4rem, 14vw, 7rem);
    padding-bottom: clamp(4rem, 14vw, 7rem);
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }

  body.page-home .section-primary {
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }

  .section-countdown {
    padding-top: clamp(1.75rem, 5vw, 3rem);
    padding-bottom: clamp(4rem, 14vw, 7rem);
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }

  .countdown {
    margin-top: clamp(0.75rem, 3vw, 1.35rem);
  }

  .section-home-tertiary {
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }

  .site-footer {
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  }
}