@media (max-width: 390px) {
  .envelope-button {
    min-height: 560px;
  }

  .envelope {
    height: 246px;
  }

  .intro-title {
    top: calc(50% + 166px);
  }

  .intro-copy {
    top: calc(50% + 222px);
  }

  .floating-nav {
    width: calc(100% - 0.75rem);
  }

  .floating-nav a {
    padding-inline: 0.25rem;
    font-size: 0.92rem;
  }

  section {
    padding-inline: 0.85rem;
  }

  .hero-copy {
    margin-top: 1.4rem;
  }

  .countdown-wreath {
    gap: 0.35rem;
  }

  .countdown-wreath div {
    box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.55), var(--shadow);
  }

  .gallery-control {
    width: 40px;
    height: 40px;
  }

  .lightbox-arrow {
    top: auto;
    bottom: 1rem;
    transform: none;
  }
}

@media (min-width: 620px) {
  .details-panel {
    grid-template-columns: minmax(210px, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
  }

  .details-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .countdown-wreath {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .story-path article {
    grid-template-columns: 132px minmax(0, 1fr);
    align-items: center;
  }

  .story-path img {
    width: 118px;
    height: 118px;
  }

  .story-path::before {
    left: 58px;
  }

  .outfit-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .hero-section {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: clamp(2rem, 6vw, 5rem);
    padding-inline: clamp(2rem, 6vw, 6rem);
  }

  .hero-image-wrap {
    order: 2;
  }

  .hero-copy {
    order: 1;
    margin: 0;
    text-align: left;
  }

  .hero-text {
    margin-inline: 0;
  }

  .schedule-line {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: start;
    gap: 0;
  }

  .schedule-line::before {
    left: 8%;
    right: 8%;
    top: 22px;
    bottom: auto;
    width: auto;
    height: 1px;
  }

  .schedule-line li {
    padding: 4.2rem 0 0;
    text-align: center;
  }

  .schedule-line li::before {
    left: 50%;
    top: 0;
    transform: translateX(-50%);
  }

  .gallery-stack {
    position: absolute;
    inset: 8% 0 auto auto;
    z-index: 1;
    display: grid;
    gap: 1rem;
    width: 34%;
    pointer-events: none;
  }

  .gallery-stack img {
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 1px solid rgba(199, 154, 54, 0.58);
    padding: 0.35rem;
    background: var(--paper);
    box-shadow: var(--shadow);
    object-fit: cover;
    transform: rotate(4deg);
  }

  .gallery-feature {
    width: 72%;
  }

  .gallery-thumbs {
    width: 72%;
  }

  .masonry-gallery {
    column-count: 3;
    column-gap: 1rem;
  }

  .venue-layout,
  .rsvp-panel {
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
  }

  .outfit-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  section {
    padding-inline: clamp(3rem, 6vw, 6rem);
  }

  .hero-section {
    padding-inline: clamp(4rem, 8vw, 8rem);
  }

  .story-path {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.2rem;
  }

  .story-path::before {
    left: 8%;
    right: 8%;
    top: 64px;
    bottom: auto;
    width: auto;
    height: 1px;
  }

  .story-path article {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    text-align: center;
  }

  .story-path img {
    margin-inline: auto;
  }

  .story-path p {
    margin-bottom: 0;
  }

  .masonry-gallery {
    column-count: 4;
  }

  .outfit-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .hero-section {
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  }

  .hero-image-wrap {
    width: min(38vw, 560px);
  }

  .section-heading h2 {
    max-width: 900px;
    margin-inline: auto;
  }
}

.schedule-line {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.schedule-line::before {
  display: none;
}

.schedule-line li {
  min-height: 150px;
  padding: 1.1rem 1.1rem 1.15rem 4.2rem;
  border: 1px solid rgba(185, 133, 53, 0.45);
  background: var(--paper);
  box-shadow: 0 12px 30px rgba(86, 48, 20, 0.08);
  text-align: left;
}

.schedule-line li::before {
  left: 1rem;
  top: 1.1rem;
  transform: none;
}

@media (min-width: 720px) {
  .story-brief {
    grid-template-columns: minmax(190px, 0.75fr) minmax(0, 1.25fr);
  }
}

/* Final visual polish: warm ivory, champagne, gold, and mocha motif. */
.hero-section::before {
  background:
    linear-gradient(90deg, rgba(73, 39, 18, 0.94), rgba(111, 67, 33, 0.55) 52%, rgba(255, 253, 249, 0.12)),
    linear-gradient(180deg, rgba(93, 51, 22, 0.1), rgba(73, 39, 18, 0.34));
}

.video-story::before {
  background:
    linear-gradient(90deg, rgba(73, 39, 18, 0.78), rgba(111, 67, 33, 0.42), rgba(73, 39, 18, 0.78)),
    linear-gradient(180deg, rgba(255, 253, 249, 0.1), rgba(73, 39, 18, 0.5));
}

.hero-video,
.video-story > video {
  filter: sepia(0.58) saturate(0.72) hue-rotate(335deg);
}

.section-magic::after {
  filter: sepia(0.55) saturate(0.75) hue-rotate(335deg);
}

.photo-story::before,
.final-section::before {
  background:
    linear-gradient(90deg, rgba(73, 39, 18, 0.66), rgba(111, 67, 33, 0.15), rgba(73, 39, 18, 0.66)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(73, 39, 18, 0.45));
}

.gallery-control,
.lightbox-close,
.lightbox-arrow {
  background: rgba(99, 55, 25, 0.92);
}

h1 {
  font-size: clamp(3.65rem, 11vw, 7.1rem);
  line-height: 0.94;
  text-wrap: balance;
}

.section-heading h2 {
  font-size: clamp(2.1rem, 6vw, 4.25rem);
  line-height: 1.08;
  text-wrap: balance;
}

.video-story-copy h2,
.photo-story-copy p {
  max-width: min(900px, 88vw);
  margin-inline: auto;
  font-size: clamp(2.5rem, 7vw, 5.6rem);
  line-height: 1.05;
  text-wrap: balance;
}

.schedule-line {
  grid-template-columns: 1fr;
  gap: 0.85rem;
  width: min(780px, 100%);
}

.schedule-line li {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 0.85rem;
  min-height: 0;
  padding: 1.1rem 1.15rem;
  border-radius: 6px;
  align-items: start;
}

.schedule-line li::before {
  display: none;
}

.schedule-line span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: #fffaf4;
  font-size: 1.05rem;
}

.schedule-line strong {
  display: block;
  color: var(--green);
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  line-height: 1.15;
  overflow-wrap: normal;
}

.schedule-line li p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1rem, 2.4vw, 1.14rem);
  line-height: 1.45;
}

.outfit-columns {
  display: none !important;
}

.outfit-panel {
  max-width: 760px;
  text-align: center;
}

.palette-row {
  margin-bottom: 1rem;
}

.family-scroll > div:nth-of-type(-n + 6) {
  display: none;
}

.family-scroll > .honorees {
  display: block;
  max-width: 1040px;
}

.honorees > h3 {
  margin-bottom: 1.25rem;
}

.honorees-grid,
.sponsors-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.9rem;
}

.honorees-grid article,
.sponsors-card {
  padding: 1.15rem;
  border: 1px solid rgba(185, 133, 53, 0.38);
  background: rgba(255, 253, 249, 0.72);
}

.honorees h4,
.sponsors-card h4 {
  margin: 0 0 0.55rem;
  color: var(--gold);
  font-family: var(--serif);
  font-size: clamp(1.28rem, 3vw, 1.7rem);
}

.honorees p {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  line-height: 1.55;
}

.honorees p + p {
  margin-top: 0.75rem;
}

.sponsors-card {
  margin-top: 0.9rem;
}

.sponsors-list p {
  padding: 0.7rem;
  border: 1px solid rgba(185, 133, 53, 0.22);
  background: rgba(255, 255, 255, 0.46);
}

.countdown-wreath div {
  min-height: clamp(128px, 18vw, 178px);
  aspect-ratio: auto;
  padding: 1rem 0.5rem;
}

.countdown-wreath strong {
  font-size: clamp(2.15rem, 5.3vw, 4.2rem);
  line-height: 1;
}

.countdown-wreath span {
  margin-top: 0.35rem;
  font-size: clamp(0.7rem, 1.7vw, 0.92rem);
  line-height: 1.15;
}

.entourage-list {
  margin-top: 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(185, 133, 53, 0.42);
}

.entourage-list > h4 {
  margin: 0 0 1rem;
  color: var(--gold);
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
}

.entourage-list__lead,
.entourage-list__roles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem 2rem;
}

.entourage-list article {
  padding: 0.2rem 0;
  text-align: center;
}

.entourage-list h5 {
  margin: 0 0 0.35rem;
  color: var(--green);
  font-family: var(--serif);
  font-size: clamp(1.25rem, 3vw, 1.65rem);
}

.entourage-list p {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1rem, 2.5vw, 1.14rem);
  line-height: 1.62;
}

.entourage-list__roles {
  margin-top: 1.3rem;
}

.entourage-list__coordinator {
  margin-top: 1.35rem !important;
  padding-top: 1rem;
  border-top: 1px solid rgba(185, 133, 53, 0.28);
}

/* Print-inspired ceremony and entourage roster. */
.family-section {
  color: var(--ink);
  background: var(--ivory);
}

.family-section::before {
  background:
    radial-gradient(circle at 8% 30%, rgba(242, 222, 192, 0.45), transparent 24%),
    radial-gradient(circle at 92% 76%, rgba(215, 181, 139, 0.26), transparent 27%),
    var(--ivory);
}

.family-section > .section-heading {
  display: none;
}

.family-scroll.premium-panel {
  width: min(1040px, 100%);
  padding: clamp(2.5rem, 7vw, 5.5rem) clamp(1rem, 5vw, 4rem);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.family-scroll > div:not(.invitation-roster) {
  display: none !important;
}

.invitation-roster {
  display: block;
  text-align: center;
}

.invitation-roster > .eyebrow {
  color: var(--gold);
}

.invitation-roster > h3,
.roster-entourage > h3 {
  margin: 0.35rem 0 clamp(2rem, 5vw, 3.5rem);
  color: var(--green);
  font-family: var(--serif);
  font-size: clamp(2.3rem, 6vw, 4.4rem);
  font-weight: 600;
  line-height: 1.05;
}

.roster-ceremony > div {
  margin-bottom: clamp(1.75rem, 4vw, 2.8rem);
}

.invitation-roster h4 {
  margin: 0 0 0.45rem;
  color: var(--green);
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3.5vw, 2.15rem);
  font-weight: 700;
  line-height: 1.1;
}

.invitation-roster p {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.02rem, 2.6vw, 1.35rem);
  line-height: 1.65;
}

.roster-parents {
  max-width: 720px;
  margin: 0 auto clamp(2.6rem, 6vw, 4.2rem) !important;
  color: var(--muted) !important;
  font-size: clamp(1.05rem, 2.8vw, 1.42rem) !important;
}

.roster-sponsors,
.roster-entourage {
  margin-top: clamp(2.8rem, 7vw, 5rem);
  padding-top: clamp(2.2rem, 6vw, 4rem);
  border-top: 1px solid rgba(185, 133, 53, 0.5);
}

.roster-sponsors > h4 {
  margin-bottom: 1.2rem;
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
}

.roster-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 5vw, 4rem);
  text-align: center;
}

.roster-leads,
.roster-roles,
.roster-bottom {
  display: grid;
  gap: clamp(1.6rem, 4vw, 3.2rem);
}

.roster-leads {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: clamp(2.4rem, 5vw, 4rem);
}

.roster-roles {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.roster-bottom {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(640px, 100%);
  margin: clamp(2.5rem, 6vw, 4.5rem) auto 0;
}

@media (max-width: 620px) {
  .roster-columns,
  .roster-leads,
  .roster-roles,
  .roster-bottom {
    grid-template-columns: 1fr;
  }

  .roster-columns {
    gap: 0.1rem;
  }

  .roster-leads,
  .roster-roles,
  .roster-bottom {
    gap: 2rem;
  }
}

/* Source-of-truth: Sage's original single-panel family layout, in Julius & Sharifa's motif. */
.family-section > .section-heading.light {
  display: block !important;
  position: relative;
  z-index: 1;
}

.family-section > .section-heading.light .eyebrow,
.family-section > .section-heading.light h2 {
  color: var(--paper);
}

.family-scroll.premium-panel {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
  padding: clamp(1.8rem, 6vw, 4rem) clamp(1.2rem, 6vw, 4.5rem);
  border: 1px solid rgba(185, 133, 53, 0.48) !important;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 241, 223, 0.98)), var(--paper) !important;
  box-shadow: var(--shadow) !important;
}

.family-scroll > div,
.family-scroll > div:not(.invitation-roster) {
  display: block !important;
  position: relative;
  max-width: 780px;
  margin-inline: auto;
  padding: clamp(1.1rem, 3vw, 1.55rem) 0;
  text-align: center;
}

.family-scroll > div + div::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: min(280px, 62vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(185, 133, 53, 0.86), transparent);
  transform: translateX(-50%);
}

.family-scroll h3 {
  margin: 0 0 0.45rem;
  color: var(--gold);
  font-family: var(--serif);
  font-size: clamp(1.55rem, 4.8vw, 2.35rem);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.family-scroll p {
  margin: 0 0 0.35rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1rem, 2.4vw, 1.23rem);
  line-height: 1.55;
}

@media (max-width: 620px) {
  .family-scroll.premium-panel {
    width: calc(100% - 1.25rem);
    padding: 1.5rem 1rem;
  }
}

/* Restore the original Sage family-panel composition; colors come from this site's motif tokens. */
.family-section {
  color: var(--paper);
  background: var(--green);
}

.family-section::before {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--green) 86%, #000), var(--green)),
    repeating-linear-gradient(128deg, transparent 0 52px, rgba(234, 210, 154, 0.09) 53px 55px, transparent 56px 112px);
}

.family-section > .section-heading {
  display: block;
}

.family-scroll.premium-panel {
  width: min(1120px, 100%);
  padding: clamp(1.8rem, 6vw, 4rem) clamp(1.2rem, 6vw, 4.5rem);
  border: 1px solid rgba(185, 133, 53, 0.48);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(248, 241, 223, 0.96)), var(--paper);
  box-shadow: var(--shadow);
}

.family-scroll > div,
.family-scroll > div:not(.invitation-roster) {
  display: block !important;
  position: relative;
  max-width: 780px;
  margin-inline: auto;
  padding: clamp(1.1rem, 3vw, 1.55rem) 0;
  text-align: center;
}

.family-scroll > div + div::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: min(280px, 62vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(185, 133, 53, 0.86), transparent);
  transform: translateX(-50%);
}

.family-scroll h3 {
  margin: 0 0 0.45rem;
  color: var(--gold);
  font-family: var(--serif);
  font-size: clamp(1.45rem, 4.2vw, 2.1rem);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.family-scroll p {
  margin: 0 0 0.35rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(0.98rem, 2.25vw, 1.2rem);
  line-height: 1.6;
}

.family-watermark {
  display: block;
}

@media (max-width: 620px) {
  .family-scroll.premium-panel {
    width: calc(100% - 1.5rem);
    padding: 1.35rem 1rem;
  }

  .family-scroll > div {
    padding: 1rem 0;
  }
}

/* One compact editorial panel for every entourage role. */
.family-scroll.premium-panel {
  padding: clamp(1.4rem, 4vw, 2.4rem) clamp(0.8rem, 3vw, 1.4rem);
}

.invitation-roster {
  width: min(920px, 100%);
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 5vw, 4rem);
  border: 1px solid rgba(185, 133, 53, 0.48);
  background: linear-gradient(135deg, rgba(255, 253, 249, 0.96), rgba(247, 232, 210, 0.82));
  box-shadow: 0 18px 48px rgba(86, 48, 20, 0.1);
}

.invitation-roster > h3 {
  margin: 0 0 clamp(1.6rem, 4vw, 2.5rem);
  color: var(--green);
  font-size: clamp(2.35rem, 6vw, 4rem);
}

.roster-ceremony > div {
  margin-bottom: clamp(1.2rem, 3vw, 1.8rem);
}

.roster-sponsors,
.roster-entourage {
  margin-top: clamp(1.6rem, 4vw, 2.5rem);
  padding-top: clamp(1.5rem, 4vw, 2.4rem);
}

.roster-sponsors > h4 {
  margin-bottom: 0.8rem;
}

.roster-columns {
  gap: clamp(0.75rem, 3vw, 2.5rem);
}

.roster-leads {
  margin-bottom: clamp(1.6rem, 4vw, 2.5rem);
}

.roster-roles {
  gap: clamp(1.3rem, 3vw, 2.2rem);
}

.roster-bottom {
  margin-top: clamp(1.6rem, 4vw, 2.5rem);
}

.invitation-roster p {
  line-height: 1.5;
}

/* Final entourage layout: one complete roster panel, using the established motif. */
.family-section > .section-heading {
  display: none;
}

.family-scroll.premium-panel {
  width: min(980px, calc(100% - 2rem));
  padding: clamp(1.25rem, 3vw, 2rem) 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.invitation-roster {
  width: 100%;
  padding: clamp(1.75rem, 4vw, 3rem) clamp(1rem, 5vw, 3.5rem);
  border: 1px solid rgba(185, 133, 53, 0.48);
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(255, 253, 249, 0.96), rgba(247, 232, 210, 0.82));
  box-shadow: 0 18px 48px rgba(86, 48, 20, 0.10);
}

.invitation-roster > h3 {
  margin: 0 0 clamp(1.35rem, 3vw, 2rem);
  color: var(--green);
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.roster-ceremony > div {
  margin-bottom: clamp(0.85rem, 2vw, 1.25rem);
}

.invitation-roster h4 {
  margin-bottom: 0.25rem;
  font-size: clamp(1.2rem, 2.7vw, 1.65rem);
}

.invitation-roster p {
  font-size: clamp(0.95rem, 2vw, 1.08rem);
  line-height: 1.55;
}

.roster-sponsors,
.roster-entourage {
  margin-top: clamp(1.15rem, 3vw, 1.75rem);
  padding-top: clamp(1.15rem, 3vw, 1.75rem);
}

.roster-sponsors > h4 {
  margin-bottom: 0.7rem;
  font-size: clamp(1.45rem, 3.2vw, 2rem);
}

.roster-columns {
  gap: clamp(1rem, 4vw, 3.5rem);
}

.roster-leads {
  margin-bottom: clamp(1.25rem, 3vw, 1.8rem);
  gap: clamp(1rem, 3vw, 2rem);
}

.roster-roles {
  gap: clamp(1rem, 3vw, 1.75rem);
}

.roster-bottom {
  margin-top: clamp(1.25rem, 3vw, 1.8rem);
  gap: clamp(1rem, 3vw, 2rem);
}

@media (max-width: 620px) {
  .family-scroll.premium-panel {
    width: min(100% - 1.25rem, 980px);
  }

  .invitation-roster {
    padding: 1.5rem 1rem;
  }

  .roster-ceremony > div {
    margin-bottom: 1.05rem;
  }

  .roster-sponsors,
  .roster-entourage {
    margin-top: 1.3rem;
    padding-top: 1.3rem;
  }

  .roster-leads,
  .roster-roles,
  .roster-bottom {
    gap: 1.3rem;
  }
}
