:root {
  --burgundy: #6f1d2c;
  --ivory: #fff9ef;
  --metallic-gold: #c9a24b;
  --brass: #a77a34;
  --dusty-rose: #d9a7a5;
  --deep-text: #241617;
  --muted-text: #766768;
  --border-color: rgba(111, 29, 44, 0.16);
  --background-color: #fffaf3;
  --white: #ffffff;
  --shadow: 0 18px 55px rgba(57, 24, 24, 0.12);
  --radius: 8px;
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.55s;
  animation-timing-function: ease;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--deep-text);
  background: var(--background-color);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  line-height: 1.7;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

:focus-visible {
  outline: 3px solid rgba(201, 162, 75, 0.75);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 249, 239, 0.2);
  background: rgba(111, 29, 44, 0.92);
  color: var(--ivory);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-logo {
  display: block;
  height: 40px;
  width: auto;
}

.nav-toggle {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 249, 239, 0.35);
  border-radius: 50%;
  color: var(--ivory);
  background: transparent;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  width: 19px;
  height: 2px;
  display: block;
  background: currentColor;
  content: "";
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle span::before {
  transform: translateY(-7px);
}

.nav-toggle span::after {
  transform: translateY(5px);
}

.menu-open .nav-toggle span {
  background: transparent;
}

.menu-open .nav-toggle span::before {
  background: var(--ivory);
  transform: translateY(2px) rotate(45deg);
}

.menu-open .nav-toggle span::after {
  background: var(--ivory);
  transform: translateY(0) rotate(-45deg);
}

.nav-links {
  position: fixed;
  inset: 74px 0 auto 0;
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 22px 24px 28px;
  border-bottom: 1px solid rgba(255, 249, 239, 0.16);
  background: rgba(62, 18, 28, 0.98);
}

.menu-open .nav-links {
  display: flex;
}

.nav-links a {
  padding: 10px 0;
  color: rgba(255, 249, 239, 0.86);
  font-size: 0.94rem;
  font-weight: 650;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--metallic-gold);
}

.nav-links .rsvp-link,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 750;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nav-links .rsvp-link,
.btn-primary {
  background: var(--metallic-gold);
  color: #2b1116;
}

.nav-links .rsvp-link:hover,
.nav-links .rsvp-link.active {
  color: var(--ivory);
}

.btn-secondary {
  border-color: rgba(255, 249, 239, 0.55);
  color: var(--ivory);
  background: rgba(255, 249, 239, 0.08);
}

.btn-outline {
  border-color: var(--border-color);
  color: var(--burgundy);
  background: transparent;
}

.btn:hover,
.nav-links .rsvp-link:hover {
  transform: translateY(-2px);
}

.hero-inner,
.section,
.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--metallic-gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  line-height: 1.02;
}

.page-hero {
  padding: 84px 0 54px;
  color: var(--ivory);
  background:
    linear-gradient(135deg, rgba(76, 18, 31, 0.96), rgba(111, 29, 44, 0.82)),
    var(--hero-image) center/cover no-repeat;
}

.page-hero p {
  max-width: 740px;
  margin: 18px 0 0;
  color: rgba(255, 249, 239, 0.88);
}

.page-hero h1 {
  font-size: clamp(3rem, 14vw, 6rem);
}

.section {
  padding: 72px 0;
}

.section-narrow {
  max-width: 860px;
}

.section-title {
  margin-bottom: 28px;
}

.section-title h2 {
  color: var(--burgundy);
  font-size: clamp(2.4rem, 9vw, 4.6rem);
}

.section-title p {
  max-width: 700px;
  margin: 12px 0 0;
  color: var(--muted-text);
}

.gold-divider {
  width: 88px;
  height: 1px;
  margin: 22px 0;
  background: linear-gradient(90deg, var(--metallic-gold), transparent);
}

.grid {
  display: grid;
  gap: 18px;
}

.grid-2,
.grid-3 {
  grid-template-columns: 1fr;
}

.card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.card-pad {
  padding: 24px;
}

.card h3 {
  color: var(--burgundy);
  font-size: 1.8rem;
}

.card p {
  color: var(--muted-text);
}

.story-body {
  max-width: 820px;
  margin: 0 auto;
  color: #3a2829;
  font-size: 1.05rem;
}

.story-body p {
  margin: 0 0 22px;
}

.story-callout {
  margin: 34px 0;
  padding: 26px;
  border-left: 4px solid var(--metallic-gold);
  background: #fff;
  color: var(--burgundy);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.7rem;
  line-height: 1.2;
  box-shadow: var(--shadow);
}

.details-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.details-list li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.details-list span:first-child {
  color: var(--muted-text);
}

.info-grid {
  margin-top: 8px;
}

.info-item {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border-color);
}

.info-item p:last-child {
  color: var(--muted-text);
  margin: 0;
}

.gallery-grid {
  column-count: 1;
  column-gap: 14px;
}

.gallery-item {
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: transparent;
  cursor: zoom-in;
  break-inside: avoid;
  box-shadow: 0 12px 38px rgba(57, 24, 24, 0.12);
}

.gallery-item img {
  width: 100%;
  height: auto;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.035);
  filter: saturate(1.08);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 70px 16px 28px;
  background: rgba(25, 10, 14, 0.92);
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: min(100%, 1120px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox button {
  position: absolute;
  border: 1px solid rgba(255, 249, 239, 0.28);
  border-radius: 50%;
  color: var(--ivory);
  background: rgba(255, 249, 239, 0.1);
  cursor: pointer;
}

.lightbox-close {
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  width: 44px;
  height: 44px;
}

.lightbox-prev {
  left: 14px;
}

.lightbox-next {
  right: 14px;
}

/* Our Story page: scattered photo pile + "Open Gallery" trigger */
.story-gallery-head {
  text-align: center;
}

.story-gallery-head h2 {
  margin-top: 6px;
}

.story-gallery-head .gold-divider {
  margin-left: auto;
  margin-right: auto;
}

.story-gallery-head .btn {
  margin-top: 20px;
}

.story-scatter {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 56px auto 12px;
  height: clamp(460px, 62vw, 620px);
}

.story-polaroid {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: var(--z);
  width: clamp(64px, 17%, 150px);
  padding: 8px 8px 24px;
  border: 0;
  border-radius: 3px;
  background: var(--white);
  box-shadow: 0 14px 30px rgba(20, 6, 10, 0.28);
  cursor: pointer;
  transform: rotate(var(--r));
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.story-polaroid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 1px;
}

.story-polaroid:hover,
.story-polaroid:focus-visible {
  transform: rotate(var(--r)) scale(1.14) translateY(-4px);
  box-shadow: 0 24px 46px rgba(20, 6, 10, 0.42);
  z-index: 20;
}

/* In-page photo viewer (triggered by "Open Gallery" and by clicking any
   scattered photo). Same visual language as the .lightbox component, with
   an added bottom filmstrip of thumbnails to browse the full gallery. */
.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 70px 0 0;
  background: rgba(10, 4, 6, 0.95);
}

.photo-viewer.open {
  display: flex;
}

.photo-viewer-title {
  flex: 0 0 auto;
  margin: 0 0 12px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1rem, 2.4vw, 1.6rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--metallic-gold);
  text-align: center;
  min-height: 1.2em;
}

.photo-viewer-stage {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 70px;
}

.photo-viewer-stage img {
  max-width: min(100%, 1120px);
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}

.photo-viewer button {
  position: absolute;
  border: 1px solid rgba(255, 249, 239, 0.28);
  border-radius: 50%;
  color: var(--ivory);
  background: rgba(255, 249, 239, 0.1);
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s ease;
}

.photo-viewer button:hover {
  background: rgba(255, 249, 239, 0.22);
}

.photo-viewer-close {
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  font-size: 1.4rem;
  line-height: 1;
}

.photo-viewer-prev,
.photo-viewer-next {
  top: 45%;
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
  line-height: 1;
}

.photo-viewer-prev {
  left: 16px;
}

.photo-viewer-next {
  right: 16px;
}

.photo-viewer-strip {
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  background: rgba(0, 0, 0, 0.32);
}

.viewer-thumb {
  flex: 0 0 auto;
  width: 74px;
  height: 74px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.viewer-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.viewer-thumb:hover {
  opacity: 0.85;
}

.viewer-thumb.active {
  opacity: 1;
  border-color: var(--metallic-gold);
  transform: translateY(-3px);
}

@media (max-width: 640px) {
  .photo-viewer-stage {
    padding: 0 54px;
  }

  .photo-viewer-prev,
  .photo-viewer-next {
    width: 40px;
    height: 40px;
  }

  .viewer-thumb {
    width: 58px;
    height: 58px;
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 120;
  padding: 12px 18px;
  border-radius: 999px;
  color: var(--ivory);
  background: var(--burgundy);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.account-number {
  font-size: 1.35rem;
  font-weight: 850;
  color: var(--burgundy);
}

.gift-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 0;
  border: 0;
  color: var(--burgundy);
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-weight: 800;
}

.faq-question::after {
  content: "+";
  color: var(--metallic-gold);
  font-size: 1.4rem;
}

.faq-item.open .faq-question::after {
  content: "-";
}

.faq-answer {
  display: none;
  padding: 0 0 22px;
  color: var(--muted-text);
}

.faq-item.open .faq-answer {
  display: block;
}

.rsvp-frame {
  min-height: 620px;
  overflow: hidden;
}

.rsvp-frame iframe {
  width: 100%;
  min-height: 620px;
  border: 0;
  background: var(--white);
}

.rsvp-closed .rsvp-frame {
  display: none;
}

.closed-banner {
  display: none;
  padding: 24px;
  border: 1px solid rgba(111, 29, 44, 0.24);
  border-radius: var(--radius);
  color: var(--burgundy);
  background: rgba(217, 167, 165, 0.2);
  font-weight: 800;
}

.rsvp-closed .closed-banner {
  display: block;
}

.site-footer {
  padding: 44px 0;
  color: rgba(255, 249, 239, 0.86);
  background: #38111b;
}

.footer-inner {
  display: grid;
  gap: 20px;
}

.footer-inner strong {
  display: block;
  color: var(--metallic-gold);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.8rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 620px) {
  .gallery-grid {
    column-count: 2;
  }
}

@media (min-width: 860px) {
  .nav-toggle {
    display: none;
  }

  .nav-links {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .nav-links a {
    padding: 0;
  }

  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gallery-grid {
    column-count: 3;
  }

  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

@media (min-width: 1180px) {
  .gallery-grid {
    column-count: 4;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .site-header {
    transition: none;
  }

  .envelope-gate {
    transition: none;
  }

  .marquee-track,
  .gallery-marquee-row {
    animation: none;
  }
}

/* Envelope entrance gate */
html.gate-active,
html.gate-active body {
  height: 100%;
  overflow: hidden;
}

.envelope-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  height: 100vh;
  height: 100svh;
  width: 100vw;
  overflow: hidden;
  background-color: var(--burgundy);
  color: var(--ivory);
  cursor: pointer;
  transition: opacity 0.6s ease;
}

.envelope-gate::before {
  content: "";
  position: absolute;
  inset: -24px;
  z-index: 0;
  background-image: url('../assets/background_texture.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(7px);
  transform: scale(1.04);
}

.envelope-gate::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(58, 16, 26, 0.45);
}

.envelope-gate[hidden] {
  display: none;
}

.envelope-gate.is-leaving {
  opacity: 0;
  pointer-events: none;
}

.envelope-gate-inner {
  position: relative;
  z-index: 2;
  margin: auto;
  width: min(99vw, 2250px);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(4px, 0.6vh, 10px) 16px;
  text-align: center;
}

.envelope-gate-inner:focus-visible {
  outline: 2px solid var(--metallic-gold);
  outline-offset: 6px;
}

.envelope-eyebrow,
.envelope-cta {
  font-family: "Times New Roman", Times, serif;
}

.envelope-eyebrow {
  margin: 0 0 clamp(0px, 0.3vh, 4px);
  color: var(--metallic-gold);
  font-size: clamp(1.8rem, 4.6vh, 3.4rem);
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.envelope-visual {
  flex-shrink: 0;
  width: min(100vmin, 2200px);
  height: auto;
  max-width: 100%;
}

.envelope-cta {
  margin: clamp(4px, 1vh, 16px) 0 0;
  font-size: clamp(0.75rem, 2vh, 1.4rem);
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 249, 239, 0.78);
}

/* Homepage: intro hero (envelope + invite) */
.intro-hero {
  overflow: hidden;
  padding: 72px 0;
  background: var(--burgundy);
}

.intro-hero-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(300px, 44vw, 540px);
}

.intro-envelope {
  width: min(560px, 62vw);
  height: auto;
}

.intro-invite {
  position: absolute;
  top: 36%;
  left: 68%;
  transform: translate(-50%, -50%);
  width: min(280px, 30vw);
  height: auto;
  filter: drop-shadow(0 18px 32px rgba(20, 6, 10, 0.35));
}

/* Homepage: elegant countdown */
.countdown-section {
  position: relative;
  overflow: hidden;
  padding: 72px 0;
  background: var(--ivory);
}

.countdown-flower {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  max-width: none;
}

.countdown-flower--bouquet {
  top: -8%;
  right: -5%;
  width: clamp(150px, 22vw, 320px);
}

.countdown-flower--rose {
  bottom: -8%;
  left: -5%;
  width: clamp(130px, 18vw, 260px);
}

.countdown-inner {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  text-align: center;
}

.countdown-eyebrow {
  margin: 0 0 24px;
  color: var(--metallic-gold);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.countdown-elegant {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2.4vw, 30px);
  flex-wrap: wrap;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 64px;
}

.countdown-unit strong {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  line-height: 1;
  color: var(--burgundy);
}

.countdown-unit span {
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-text);
}

.countdown-divider {
  align-self: center;
  width: 1px;
  height: clamp(38px, 6vw, 60px);
  background: linear-gradient(180deg, transparent, var(--metallic-gold), transparent);
}

/* Homepage: RSVP plaque + love story */
.rsvp-story-grid {
  gap: 24px;
}

.rsvp-plaque {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 260px;
  padding: 40px 24px;
  border: 1px solid rgba(201, 162, 75, 0.55);
  border-radius: var(--radius);
  background: linear-gradient(160deg, #4c1220, var(--burgundy) 60%, #5c1725);
  color: var(--ivory);
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rsvp-plaque:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 60px rgba(57, 24, 24, 0.22);
}

.rsvp-plaque-line {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 249, 239, 0.72);
}

.rsvp-plaque-word {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 3.6rem);
  letter-spacing: 0.06em;
  color: var(--metallic-gold);
}

.love-story-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-height: 260px;
  padding: 18px 18px 24px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.love-story-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 60px rgba(57, 24, 24, 0.16);
}

.love-story-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px);
}

.love-story-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.love-story-caption {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--burgundy);
}

/* Homepage: full-bleed marquee sections */
.section-bleed {
  padding: 72px 0;
  overflow: hidden;
}

.details-marquee {
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 26px 0;
  background: var(--burgundy);
  cursor: pointer;
}

.marquee-track {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
  animation: marquee-scroll 26s linear infinite;
  will-change: transform;
}

.details-marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-track span {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.4rem, 3.4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--metallic-gold);
}

.marquee-track span.dot {
  color: rgba(201, 162, 75, 0.45);
  font-size: 1rem;
}

.details-marquee:hover .marquee-track span:not(.dot):hover {
  color: var(--ivory);
  text-decoration: underline;
}

.gallery-marquee {
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 40px 0 48px;
  background: var(--burgundy);
  cursor: pointer;
}

.gallery-marquee-label {
  margin: 0 0 24px;
  color: var(--metallic-gold);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  text-align: center;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gallery-marquee-row {
  display: flex;
  width: max-content;
  gap: 14px;
  margin-bottom: 14px;
  animation: marquee-scroll 42s linear infinite;
  will-change: transform;
}

.gallery-marquee-row--reverse {
  animation-direction: reverse;
}

.gallery-marquee-row:has(img:hover) {
  animation-play-state: paused;
}

.gallery-marquee-row img {
  width: clamp(120px, 16vw, 200px);
  height: clamp(120px, 16vw, 200px);
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(20, 6, 10, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-marquee-row img:hover {
  position: relative;
  z-index: 2;
  transform: scale(1.12);
  box-shadow: 0 18px 40px rgba(20, 6, 10, 0.45);
}

@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 420px) {
  .countdown-divider {
    display: none;
  }
}

@media (min-width: 860px) {
  .rsvp-story-grid {
    gap: 32px;
  }
}

/* Welcome page: single-viewport alternative homepage design */
body.welcome-page {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.welcome-page .site-header {
  flex: 0 0 auto;
}

.welcome-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.welcome-hero {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  position: relative;
  background: var(--burgundy);
  color: var(--ivory);
}

.welcome-hero::before {
  content: "";
  position: absolute;
  inset: -20px;
  z-index: 0;
  background-image: url('../assets/background_texture.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.16;
  filter: blur(2px);
}

.welcome-hero-flower {
  position: absolute;
  z-index: 0;
  bottom: -8%;
  left: -3%;
  width: clamp(90px, 16vw, 220px);
  max-width: none;
  opacity: 0.22;
  pointer-events: none;
}

/* Large central bouquet: bridges the gap between the text column and the
   card cluster on wide screens so the middle of the hero never reads as
   empty. Hidden on the narrow single-column stack, where there's no gap
   to bridge. */
.welcome-hero-bouquet {
  display: none;
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  max-width: none;
  opacity: 0.4;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-6deg);
}

.welcome-hero-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  max-width: min(1600px, 96%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.8vh, 20px);
  padding: clamp(6px, 2.2vh, 24px) clamp(14px, 4vw, 28px);
}

.welcome-hero-left,
.welcome-hero-right {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.8vh, 20px);
  width: 100%;
}

.welcome-hero-left {
  text-align: center;
}

.welcome-logo {
  width: clamp(28px, min(10vw, 5vh), 56px);
  height: auto;
}

.welcome-logo-divider {
  display: none;
  width: clamp(36px, min(6vw, 5vh), 84px);
  height: 2px;
  background: linear-gradient(90deg, var(--metallic-gold), transparent);
}

.welcome-copy p {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: clamp(0.78rem, min(3.9vw, 1.7vh), 1.25rem);
  line-height: 1.26;
  color: var(--ivory);
}

.welcome-rsvp-btn {
  padding: clamp(7px, min(2.2vw, 1.1vh), 15px) clamp(16px, min(3.2vw, 2.6vh), 34px);
  min-height: 0;
  font-size: clamp(0.68rem, min(2.2vw, 1.1vh), 1rem);
}

.welcome-details-pad {
  position: relative;
  display: block;
  max-width: clamp(190px, min(60vw, 22vh), 330px);
  padding: clamp(6px, min(1.7vw, 1.05vh), 13px) clamp(14px, min(2.4vw, 2vh), 28px);
  clip-path: polygon(4% 0%, 96% 0%, 100% 18%, 100% 82%, 96% 100%, 4% 100%, 0% 82%, 0% 18%);
  background: linear-gradient(160deg, rgba(255, 249, 239, 0.14), rgba(255, 249, 239, 0.05));
  color: rgba(255, 249, 239, 0.9);
  font-size: clamp(0.6rem, min(1.8vw, 0.95vh), 0.8rem);
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, background 0.2s ease;
}

.welcome-details-pad::before {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(4% 0%, 96% 0%, 100% 18%, 100% 82%, 96% 100%, 4% 100%, 0% 82%, 0% 18%);
  border: 1px solid rgba(201, 162, 75, 0.55);
  pointer-events: none;
}

.welcome-details-pad:hover {
  transform: translateY(-2px);
  background: linear-gradient(160deg, rgba(255, 249, 239, 0.22), rgba(255, 249, 239, 0.08));
}

/* Hidden only on the most cramped short-viewport phones (see compact
   media query below) to guarantee zero scroll on every device. */
.welcome-hero--hide-pad {
  display: block;
}

.welcome-cluster {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: clamp(15px, 7.5vh, 50px);
}

.welcome-invite {
  position: relative;
  z-index: 1;
  width: auto;
  height: clamp(76px, min(36vw, 27vh), 210px);
  transform: rotate(4deg);
  filter: drop-shadow(0 18px 32px rgba(20, 6, 10, 0.45));
}

.welcome-story {
  position: absolute;
  z-index: 2;
  left: -6%;
  bottom: -23%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(3px, 0.8vh, 8px);
  padding: clamp(4px, 1vh, 10px) clamp(4px, 1vh, 10px) clamp(6px, 1.2vh, 12px);
  background: var(--white);
  border-radius: calc(var(--radius) - 2px);
  box-shadow: 0 16px 34px rgba(20, 6, 10, 0.4);
  transform: rotate(-6deg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.welcome-story:hover {
  transform: rotate(-6deg) translateY(-3px);
  box-shadow: 0 20px 40px rgba(20, 6, 10, 0.48);
}

.welcome-story-photo {
  display: block;
  width: clamp(58px, min(13vw, 16vh), 155px);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 2px;
}

.welcome-story-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

.welcome-story-caption {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: clamp(0.54rem, min(1.4vw, 1.2vh), 0.95rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--burgundy);
}

/* Tier 1 (mobile, stacked layout): the polaroid needs a deeper drop than
   on desktop to clear the invite's printed date line, since the invite
   is proportionally much smaller here and the polaroid takes up a
   bigger share of its height. Confirmed against the margin-bottom
   overhang reserve on .welcome-cluster across common phone sizes. */
@media (max-width: 699.98px) {
  .welcome-story {
    bottom: -30%;
  }
}

/* --- Tier 2: two-column layout, width >= 700px --- */
@media (min-width: 700px) {
  .welcome-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(16px, 3.4vw, 56px);
    padding: clamp(6px, 2.2vh, 24px) clamp(18px, 4vw, 50px);
  }

  .welcome-hero-bouquet {
    display: block;
    width: clamp(220px, 30vw, 560px);
  }

  .welcome-hero-left,
  .welcome-hero-right {
    height: 100%;
    align-items: flex-start;
    text-align: left;
  }

  .welcome-hero-right {
    align-items: center;
  }

  .welcome-logo-divider {
    display: block;
  }

  .welcome-cluster {
    margin-bottom: 0;
  }

  /* Roomy: height >= 480px (typical laptops, tablets, desktops) */
  .welcome-logo {
    width: clamp(34px, min(6.5vw, 7.5vh), 92px);
  }

  .welcome-copy p {
    font-size: clamp(1rem, min(2.6vw, 3vh), 2.6rem);
    line-height: 1.22;
  }

  .welcome-rsvp-btn {
    padding: clamp(8px, min(1.8vw, 1.4vh), 20px) clamp(20px, min(3.6vw, 3vh), 40px);
    font-size: clamp(0.8rem, min(1.9vw, 1.6vh), 1.35rem);
  }

  .welcome-details-pad {
    max-width: clamp(200px, min(30vw, 24vh), 400px);
    padding: clamp(8px, min(1.8vw, 1.5vh), 20px) clamp(16px, min(2.6vw, 2.2vh), 32px);
    font-size: clamp(0.62rem, min(1.4vw, 1.2vh), 1rem);
  }

  .welcome-invite {
    height: clamp(150px, min(42vw, 50vh), 580px);
  }

  .welcome-story-photo {
    width: clamp(74px, min(16vw, 22vh), 250px);
  }
}

/* Tier 2, compact: width >= 700px but height < 480px (landscape phones,
   short browser windows) — pull back from "roomy" sizing to stay safe. */
@media (min-width: 700px) and (max-height: 479px) {
  .welcome-logo {
    width: clamp(28px, min(5vw, 5.5vh), 60px);
  }

  .welcome-copy p {
    font-size: clamp(0.75rem, min(1.8vw, 1.9vh), 1.3rem);
    line-height: 1.26;
  }

  .welcome-rsvp-btn {
    padding: clamp(5px, min(1.2vw, 0.9vh), 12px) clamp(16px, min(3.2vw, 2.6vh), 34px);
    font-size: clamp(0.62rem, min(1.3vw, 1.1vh), 0.9rem);
  }

  .welcome-details-pad {
    max-width: clamp(170px, min(24vw, 16vh), 300px);
    padding: clamp(5px, min(1.2vw, 1vh), 12px) clamp(14px, min(2.4vw, 2vh), 28px);
    font-size: clamp(0.52rem, min(1.1vw, 0.85vh), 0.72rem);
  }

  .welcome-invite {
    height: clamp(90px, min(26vw, 32vh), 260px);
  }

  .welcome-story-photo {
    width: clamp(48px, min(11vw, 14vh), 130px);
  }
}

/* Tier 1, compact: width < 700px AND height < 620px — landscape phones and
   short/squarish resized browser windows. Drop the details pad and pull
   back from the enlarged default sizing rather than shrink everything
   past legibility. */
@media (max-width: 699.98px) and (max-height: 619.98px) {
  .welcome-hero-inner {
    gap: clamp(2px, 0.6vh, 8px);
  }

  .welcome-hero-left,
  .welcome-hero-right {
    gap: clamp(2px, 0.6vh, 8px);
  }

  .welcome-logo {
    width: clamp(20px, min(8vw, 4.2vh), 40px);
  }

  .welcome-copy p {
    font-size: clamp(0.62rem, min(3.2vw, 1.4vh), 0.95rem);
  }

  .welcome-rsvp-btn {
    padding: clamp(3px, min(1.8vw, 0.8vh), 9px) clamp(16px, min(3.2vw, 2.6vh), 34px);
    font-size: clamp(0.58rem, min(1.8vw, 0.9vh), 0.8rem);
  }

  .welcome-invite {
    height: clamp(52px, min(28vw, 20vh), 140px);
  }

  .welcome-story-photo {
    width: clamp(48px, min(11vw, 14vh), 130px);
  }

  .welcome-hero--hide-pad {
    display: none;
  }
}

.welcome-countdown {
  flex: 0 0 auto;
  position: relative;
  overflow: hidden;
  background: var(--ivory);
  min-height: clamp(42px, 15vh, 190px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(6px, 1.4vh, 18px) clamp(16px, 4vw, 56px);
}

.welcome-countdown-flower {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  max-width: none;
}

.welcome-countdown-flower--bouquet {
  top: -12%;
  right: -4%;
  width: clamp(90px, 14vh, 200px);
}

.welcome-countdown-flower--rose {
  bottom: -14%;
  left: -4%;
  width: clamp(80px, 12vh, 170px);
}

.welcome-countdown-inner {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  text-align: center;
}

.welcome-countdown-inner .countdown-eyebrow {
  margin: 0 0 clamp(4px, 1vh, 14px);
  font-size: clamp(0.6rem, 1.3vh, 0.8rem);
}

.welcome-countdown-inner .countdown-unit strong {
  font-size: clamp(1.4rem, 4.6vh, 2.6rem);
}

.welcome-countdown-inner .countdown-unit span {
  font-size: clamp(0.5rem, 0.85vh, 0.7rem);
}

.welcome-countdown-inner .countdown-divider {
  height: clamp(22px, 4vh, 36px);
}
