/* Invitation-specific visual refinements. */
.intro {
  background: transparent;
}

.intro .section-heading h2,
.intro .section-heading .lede {
  color: var(--warm-white);
  text-shadow: 0 2px 18px rgba(0, 0, 0, .48);
}

.intro .section-heading h2 em {
  color: var(--gold-light);
}

.intro .section-heading .eyebrow {
  color: var(--gold-light);
  justify-content: center;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .48);
}

.intro .detail-card {
  border-color: rgba(255, 255, 255, .38);
  background: rgba(255, 253, 250, .82);
  box-shadow: 0 18px 45px rgba(6, 18, 13, .24);
  backdrop-filter: blur(10px);
}

.intro .feature-detail {
  background: rgba(21, 37, 31, .82);
}

/* The treasured photo stays in view through the Dress Code section, then ends. */
.countdown-flow--active {
  background-color: var(--forest);
  background-image: var(--countdown-image), linear-gradient(135deg, #204533, #0e1b17);
  background-size: cover;
  background-position: 30% 14%;
  background-attachment: fixed;
}

.countdown-flow--active .countdown-photo {
  background: transparent;
}

.countdown-flow--active .countdown-section {
  background: transparent;
}

.countdown-flow--active .countdown-photo-overlay {
  display: none;
}

.countdown-flow--active .dress-code {
  background: transparent;
}

.countdown-flow--active .dress-code .two-col {
  display: block;
  max-width: 680px;
  margin-inline: auto;
}

.countdown-flow--active .copy-panel h2,
.countdown-flow--active .copy-panel .lede,
.countdown-flow--active .style-notes strong,
.countdown-flow--active .style-notes div,
.countdown-flow--active .colour-row small {
  color: var(--warm-white);
  text-shadow: 0 2px 16px rgba(0, 0, 0, .48);
}

.countdown-flow--active .copy-panel .eyebrow {
  color: var(--gold-light);
  text-shadow: 0 2px 14px rgba(0, 0, 0, .48);
}

.countdown-flow--active .style-notes {
  border-color: rgba(255, 255, 255, .38);
}

.countdown-flow--active .style-notes div,
.countdown-flow--active .style-notes strong {
  font-size: 1rem;
}

.countdown-flow--active .style-notes i {
  font-size: 1.25rem;
}

.story-so-far {
  background: #f0eadf;
}

.gift-card {
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.gift-card .eyebrow { justify-content: center; }
.gift-card p:not(.eyebrow) { margin-inline: auto; }

.black { background: #0b0b0c; }

.footer-powered {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  margin-top: 1rem;
  color: rgba(246, 227, 181, .82);
  font: 600 .6rem var(--sans);
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}

.footer-powered:hover { color: var(--gold-light); }
.footer-powered i { font-size: .55rem; }

.footer-hosts { margin-top: 1.8rem; }
.footer-hosts p { margin: 0 0 .65rem; color: rgba(255, 255, 255, .55); font: 800 .55rem var(--sans); letter-spacing: .13em; text-transform: uppercase; }
.footer-hosts > div { display: flex; justify-content: center; flex-wrap: wrap; gap: .55rem; }
.footer-hosts a { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem .75rem; border: 1px solid rgba(246, 227, 181, .34); border-radius: var(--radius-pill); color: var(--gold-light); font: 700 .6rem var(--sans); letter-spacing: .04em; text-decoration: none; }
.footer-hosts a:hover { background: rgba(246, 227, 181, .1); }

.guidelines .section-heading {
  margin-inline: auto;
  text-align: center;
}

.guidelines .section-heading .eyebrow {
  justify-content: center;
}

.guidelines {
  position: relative;
  z-index: 2;
}

.guideline-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.rsvp-deadline,
.rsvp-form-note {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--gold);
  font: 800 .66rem/1.5 var(--sans);
  letter-spacing: .05em;
}

.rsvp-deadline { margin: 1.45rem 0 0; text-transform: uppercase; }
.rsvp-form-note { margin: 0; padding-bottom: .95rem; border-bottom: 1px solid var(--line); }
.rsvp-deadline strong,
.rsvp-form-note strong { color: var(--ink); }
.form-row.form-row-three { grid-template-columns: repeat(3, 1fr); }
.additional-guests { padding: 1.2rem; border: 1px solid rgba(198, 154, 75, .36); background: var(--gold-pale); }
.additional-guests.is-empty { display: none; }
.additional-guests-title { margin: 0; color: var(--forest); font: 600 1.55rem var(--serif); }
.additional-guests-copy { margin: .35rem 0 1rem; color: var(--muted); font: .72rem/1.6 var(--sans); }
.additional-guest + .additional-guest { margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid rgba(29, 33, 31, .12); }
.additional-guest > p { margin: 0 0 .85rem; color: var(--gold); font: 800 .58rem var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.rsvp-closed { padding: 2.5rem 1rem; text-align: center; }
.rsvp-closed > i { display: grid; width: 55px; height: 55px; place-items: center; margin: auto; border-radius: 50%; color: var(--forest); background: var(--gold-light); font-size: 1.25rem; }
.rsvp-closed h3 { margin: 1.2rem 0 .5rem; font: 600 2.1rem var(--serif); }
.rsvp-closed p { margin: 0; color: var(--muted); font: .8rem/1.7 var(--sans); }

@media (max-width: 767px) {
  .form-row.form-row-three { grid-template-columns: 1fr; }
  .rsvp-deadline { justify-content: center; text-align: center; }
}

@media (max-width: 767px) {
  .countdown-flow--active {
    background-position: 34% 10%;
  }
}

/* Keep a portrait hero photo gracefully framed instead of zooming it to fill the viewport. */
.hero-flow {
  background-size: cover, cover, cover;
  background-repeat: no-repeat;
  background-position: center 14%, center, center;
}

.hero-content,
.hero-countdown,
.scroll-cue {
  text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: var(--radius-pill);
  padding: .7rem .95rem;
  color: var(--warm-white);
  background: rgba(10, 27, 20, .12);
  font: 800 .6rem/1 var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* The app bar stays available throughout the invitation. */
.topbar {
  position: fixed;
  background: transparent;
}

.menu-toggle i {
  color: var(--gold-light);
  font-size: .9rem;
}

.site-menu {
  position: fixed;
  z-index: 30;
  top: 0;
  right: 0;
  display: flex;
  width: min(410px, 100%);
  min-height: 100svh;
  flex-direction: column;
  padding: 1.6rem clamp(1.5rem, 5vw, 3.5rem) 3rem;
  color: var(--warm-white);
  background: #10271e;
  box-shadow: -18px 0 60px rgba(0, 0, 0, .28);
  opacity: 0;
  pointer-events: none;
  transform: translateX(105%);
  transition: opacity .3s ease, transform .35s cubic-bezier(.2, .75, .25, 1);
}

.menu-open .site-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.menu-open {
  overflow: hidden;
}

.site-menu-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(2.5rem, 8vh, 5rem);
  color: var(--gold-light);
  font: 800 .65rem var(--sans);
  letter-spacing: .13em;
  text-transform: uppercase;
}

.site-menu-heading button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(246, 227, 181, .48);
  border-radius: 50%;
  color: var(--warm-white);
  background: transparent;
}

.site-menu a {
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  padding: .68rem 0;
  color: var(--warm-white);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  font: 500 clamp(1.45rem, 3vw, 2rem)/1.1 var(--serif);
  text-decoration: none;
}

.site-menu a:hover { color: var(--gold-light); }
.site-menu a small { color: var(--gold); font: 800 .56rem var(--sans); letter-spacing: .1em; }

.floating-actions.open .fab-toggle i { transform: none; }

.hero::before,
.hero-photo,
.hero-texture {
  display: none;
}

/* Keep every section inside the viewport, including fixed menu and action controls. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

.topbar,
main,
.site-footer,
.container-xl,
.container {
  min-width: 0;
}

/* Opening view: let Mama's portrait have the entire first screen to itself. */
.hero {
  height: 100svh;
  min-height: 100svh;
}

.hero-content,
.hero-countdown,
.scroll-cue {
  display: none;
}

.cover-introduction {
  max-width: 720px;
  margin: 0 auto clamp(4.5rem, 9vw, 7rem);
  color: var(--warm-white);
  text-align: center;
}

.cover-introduction .eyebrow {
  justify-content: center;
  color: var(--gold-light);
  text-shadow: 0 2px 14px rgba(0, 0, 0, .48);
}

.cover-kicker {
  margin: 0 0 1rem;
  color: var(--gold-light);
  font: italic 1.25rem var(--serif);
  text-shadow: 0 2px 14px rgba(0, 0, 0, .48);
}

.cover-introduction h1 {
  margin: 0;
  color: var(--warm-white);
  font: 500 clamp(3.8rem, 9vw, 7rem)/.82 var(--serif);
  letter-spacing: -.06em;
  text-shadow: 0 3px 20px rgba(0, 0, 0, .52);
}

.cover-subtitle {
  max-width: 550px;
  margin: 1.5rem auto;
  color: rgba(255, 255, 255, .9);
  font: 400 1rem/1.7 var(--sans);
  text-shadow: 0 2px 14px rgba(0, 0, 0, .48);
}

.cover-host {
  color: rgba(255, 255, 255, .8);
  font: .73rem var(--sans);
  text-shadow: 0 2px 14px rgba(0, 0, 0, .48);
}

.cover-host strong { color: var(--gold-light); }

.cover-introduction .btn-gold { margin-top: 2rem; }

.cover-countdown {
  margin-top: 2.25rem;
}

.cover-countdown > p {
  margin: 0 0 .7rem;
  color: var(--gold-light);
  font: 700 .58rem var(--sans);
  letter-spacing: .17em;
  text-transform: uppercase;
}

.cover-countdown .countdown-mini {
  justify-content: center;
}

body:not(.invitation-content-visible) .brand > span:last-child,
body:not(.invitation-content-visible) .menu-toggle > span {
  display: none;
}

@media (max-width: 860px) {
  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .detail-card {
    min-width: 0;
  }
}

@media (max-width: 767px) {
  .topbar {
    width: 100%;
    max-width: 100vw;
    gap: .65rem;
    padding: .95rem .85rem;
  }

  .brand {
    min-width: 0;
    gap: .45rem;
  }

  .brand > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .menu-toggle {
    flex: 0 0 auto;
  }

  .hero-flow {
    background-size: cover, cover, cover;
    background-position: center 10%, center, center;
  }

  .hero-countdown {
    right: auto;
    left: 50%;
    text-align: center;
    transform: translateX(-50%);
  }

  .countdown-mini { justify-content: center; }

  .menu-toggle span { display: none; }
  .menu-toggle { padding: .72rem .78rem; }

  .intro .container-xl {
    padding-inline: 1rem;
  }

  .detail-card {
    padding: 1.55rem 1.15rem;
  }

  .detail-card h3,
  .detail-card p {
    overflow-wrap: anywhere;
  }

  .site-menu {
    width: min(100vw, 410px);
    max-width: 100vw;
    padding-inline: 1.25rem;
  }

  .floating-actions {
    right: .75rem;
    bottom: .75rem;
    max-width: calc(100vw - 1.5rem);
  }

  .fab-menu {
    max-width: 100%;
    align-items: flex-end;
  }

  .fab-menu a {
    min-width: 0;
    justify-content: flex-end;
  }

  .fab-menu span {
    max-width: min(12rem, calc(100vw - 5rem));
    overflow-wrap: anywhere;
    white-space: normal;
    text-align: right;
  }

  .music-button {
    left: .75rem;
    bottom: .75rem;
  }
}

@media (max-width: 360px) {
  .brand > span:last-child {
    max-width: 7.25rem;
  }
}

.ios-photo-layer { display: none; }

/* Safari's fixed backgrounds scroll with their section. Use a sticky photo layer instead. */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 767px) {
    .hero-flow,
    .countdown-flow--active {
      isolation: isolate;
      background-image: none;
    }

    .hero-flow > .ios-photo-layer,
    .countdown-flow--active > .ios-photo-layer {
      position: -webkit-sticky;
      position: sticky;
      z-index: 0;
      top: 0;
      display: block;
      height: 100vh;
      height: 100svh;
      margin-bottom: -100vh;
      margin-bottom: -100svh;
      pointer-events: none;
      background-repeat: no-repeat;
    }

    .hero-flow > .ios-photo-layer {
      background-color: var(--forest);
      background-image: var(--hero-image), linear-gradient(135deg, #17352a, #5f4429);
      background-size: contain, cover;
      background-position: center top, center;
    }

    .countdown-flow--active > .ios-photo-layer {
      background-color: var(--forest);
      background-image: var(--countdown-image), linear-gradient(135deg, #204533, #0e1b17);
      background-size: contain, cover;
      background-position: center top, center;
    }

    .hero-flow > .hero,
    .hero-flow > .intro,
    .countdown-flow--active > section {
      position: relative;
      z-index: 1;
    }
  }
}
