/* ----------------------------------
   PALETTE / VARIABLES
   ---------------------------------- */
:root {
  --bg-offwhite: #fdfbf6;
  --text-navy: #0b1124;
  --accent-gold: #c2a26a;
  --accent-gold-light: rgba(194, 162, 106, 0.4);
  --max-width-text: 850px;
  --section-pad-y: clamp(4rem, 2vw + 3rem, 6rem);

  --blur-bg: rgba(194, 190, 182, 0.6);

  --mobile-header-h: 68px;
  --desktop-header-h: 64px;
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background-color: var(--bg-offwhite);
  color: var(--text-navy);
  font-family: "Cormorant Garamond", serif;
  line-height: 1.55;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.2;
  font-weight: 500;
  color: var(--text-navy);
  letter-spacing: 0.05em;
}

.script-accent {
  font-family: "Great Vibes", cursive;
  color: var(--accent-gold);
  font-weight: 400;
  letter-spacing: 0;
}

.page-shell {
  width: min(1400px, 100%);
  margin-inline: auto;
  padding-inline: clamp(1rem, 2vw, 2.5rem);
}

/* ----------------------------------
   MOBILE HEADER BAR
   ---------------------------------- */
.mobile-header-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;

  background: var(--blur-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border-radius: 0 0 4px 4px;
  padding-inline: 1rem;

  height: var(--mobile-header-h);
  display: flex;
  align-items: center;
}
.mobile-header-bar.menu-open {
  border-bottom: 1px solid rgba(194,162,106,0.4);
  border-radius: 0;
}

.mobile-header-inner {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}

.mobile-header-names {
  font-size: 1.05rem;
  letter-spacing: 0.32em;
  font-weight: 500;
  color: #fff;
  text-transform: uppercase;
  line-height: 1.2;
  text-shadow:
    0 2px 6px rgba(0,0,0,0.6),
    0 0 2px rgba(255,255,255,0.4);
}

.hamburger-btn {
  background: rgba(11,17,36,0.05);
  border: 1px solid var(--accent-gold);
  border-radius: 4px;
  padding: 0.6rem 0.7rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  row-gap: 5px;
  align-items: center;
  justify-content: center;
  appearance: none;
  outline: none;
}
.hamburger-line {
  width: 22px;
  height: 2px;
  background-color: var(--accent-gold);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
/* animate hamburger -> X */
.hamburger-btn.open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-btn.open .hamburger-line:nth-child(2) {
  opacity: 0;
}
.hamburger-btn.open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* dropdown nav panel (mobile) */
.mobile-nav-panel {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--mobile-header-h);
  bottom: 0;

  background: rgba(12, 12, 12, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border-top: 1px solid rgba(194,162,106,0.12);

  grid-template-columns: 1fr;
  gap: 0.5rem;

  padding: 0.6rem 1rem 1rem;

  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  transform: translateY(-6px) !important;
  pointer-events: none !important;

  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 9998;
}
.mobile-nav-panel.open {
  display: grid !important;
  visibility: visible !important;
  transform: none !important;
  height: calc(100vh - var(--mobile-header-h)) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}
.mobile-nav-link {
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.3em;
  font-size: 0.95rem;
  text-transform: uppercase;
  font-weight: 400;
  line-height: 1.5;
  display: block;
  text-align: right;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 0.5rem;
}
.mobile-nav-link:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.mobile-nav-link:hover {
  color: var(--accent-gold);
}

/* hide mobile header + panel on desktop */
@media (min-width: 1100px) {
  .mobile-header-bar,
  .mobile-nav-panel {
    display: none !important;
  }
}

/* ----------------------------------
   DESKTOP TOP NAV
   ---------------------------------- */
.desktop-header-bar {
  display: none;
}

@media (min-width: 1100px) {
  .desktop-header-bar {
    position: sticky;
    top: 0;
    z-index: 9000;
    background: var(--bg-offwhite);
    border-bottom: 1px solid var(--accent-gold-light);
    height: var(--desktop-header-h);

    display: flex;
    align-items: center; /* vertically center bar content */
  }

  .desktop-header-inner {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* left | center | right */
    align-items: center;                 /* vertical centering */
    column-gap: 1rem;
  }

  /* LEFT column */
  .desktop-brand {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
  }

  .desktop-brand-names {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.9rem;
    color: var(--text-navy);
    white-space: nowrap;
  }

  .desktop-brand-date {
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    color: var(--accent-gold);
    white-space: nowrap;
  }

  /* CENTER column */
  .desktop-nav-links {
    display: flex;
    align-items: center;    /* vertical center of each link */
    justify-content: center;
    gap: 1.25rem;

    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.8rem;
    white-space: nowrap;
    line-height: 1;
  }

  .desktop-nav-links a {
    color: var(--text-navy);
    text-decoration: none;
    line-height: 1;
  }

  .desktop-nav-links a:hover {
    color: var(--accent-gold);
  }

  /* RIGHT column (spacer/empty) */
  .desktop-header-spacer { }
}

/* ----------------------------------
   HEADER / HERO
   ---------------------------------- */
header.site-header {
  position: relative;
  background: transparent;
  padding-top: 0;
  padding-bottom: 0;
}

.nav-layout {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  row-gap: 1rem;
}

/* kill old side nav */
.side-nav {
  display: none !important;
}

/* hero container */
.hero-visual {
  position: relative;
  width: 100%;
  border-radius: 0;
  overflow: hidden;

  /* mobile hero = single bg image */
  background-image: url("images/image1.jpg");
  background-size: cover;
  background-position: center;

  min-height: 60vh;

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  /* bleed full width on mobile */
  margin-inline: calc(-1 * clamp(1rem, 2vw, 2.5rem));
  margin-bottom: 1.5rem;
}

/* warm overlay on mobile hero */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(194, 162, 106, 0.28);
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1;
}

/* hero text block */
.hero-block {
  position: relative;
  z-index: 3; /* above overlay / marquee overlay */
  padding: 4rem 1rem 2rem;
  max-width: 90%;

  display: flex;
  flex-direction: column;
  align-items: center;
}

/* text styling on mobile */
.hero-block .wedding-brand-line,
.hero-block .couple-names,
.hero-block .wedding-date-loc {
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

.wedding-brand-line {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  font-weight: 400;
  text-transform: uppercase;
  font-style: normal;
  margin-bottom: 1rem;
  white-space: nowrap;
}

.couple-names {
  font-size: clamp(2.2rem, 2vw + 1.7rem, 3.4rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.1;
}

.wedding-date-loc {
  margin-top: 1rem;
  font-style: italic;
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.07em;
  line-height: 1.4;
}

/* ----------------------------------
   DESKTOP HERO MARQUEE
   ---------------------------------- */
.hero-marquee-wrapper {
  display: none; /* hidden on mobile */
}

@media (min-width: 900px) {
  .hero-visual {
    /* desktop hero tweaks */
    background-image: none;      /* no single bg anymore (we use marquee imgs) */
    background-color: #000;
    margin-inline: 0;
    margin-bottom: 2rem;
    min-height: 70vh;
  }

  /* we don't need the mobile warm overlay on desktop */
  .hero-overlay {
    display: none;
  }

  /* wrapper that masks the scrolling content */
  .hero-marquee-wrapper {
    display: block;
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1; /* under text (z=3), over bg */
  }

  /* giant horizontal track that slides to the left forever */
  .hero-marquee-track {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    height: 100%;
    width: max-content;
    animation: wedding-marquee 90s linear infinite;
  }

  @keyframes wedding-marquee {
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(-50%);
    }
  }

  .hero-marquee-group {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 1.5rem;
    padding: 0 0.75rem;
  }

  .hero-marquee-group img {
    flex: 0 0 auto;
    height: 70vh;
    width: 50vh; /* set width relative to height for better proportions */
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  }

  /* dark veil so text reads clearly */
  .hero-marquee-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 2;
    pointer-events: none;
  }

  /* desktop text look still white, with stronger shadow */
  .hero-block {
    padding: 0 1rem;
    max-width: 1000px;
    text-align: center;
  }

  .hero-block .wedding-brand-line,
  .hero-block .couple-names,
  .hero-block .wedding-date-loc {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  }

  .wedding-brand-line {
    font-size: 0.7rem;
    letter-spacing: 0.5em;
    margin-bottom: 1.5rem;
  }

  .couple-names {
    font-size: clamp(2.4rem, 0.6vw + 2rem, 3rem);
    line-height: 1.2;
    font-weight: 500;
    letter-spacing: 0.07em;
  }

  .wedding-date-loc {
    font-size: 1rem;
    line-height: 1.4;
    margin-top: 1rem;
    color: var(--bg-offwhite);
  }
}

/* Monogram below hero (desktop only) */
.monogram-wrapper {
  display: none;
  justify-content: center;
  align-items: flex-start;
}
.monogram {
  font-size: clamp(5rem, 4vw + 3rem, 9rem);
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  line-height: 0.8;
  letter-spacing: 0.03em;
  color: rgba(11, 17, 36, 0.9);
}
@media (min-width: 900px) {
  .monogram-wrapper {
    display: flex;
  }
}

/* Countdown Timer */
.countdown-wrapper {
  width: 100%;
  padding: 3rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.countdown-inner {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.countdown-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  padding: 1rem;
  background: var(--bg-offwhite);
  border: 1px solid var(--accent-gold-light);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(194, 162, 106, 0.1);
}

.countdown-block .count {
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 500;
  color: var(--text-navy);
  line-height: 1;
  margin-bottom: 0.5rem;
  font-family: "Cormorant Garamond", serif;
}

.countdown-block .label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-gold);
}

@media (min-width: 768px) {
  .countdown-inner {
    gap: 2rem;
  }
  
  .countdown-block {
    min-width: 100px;
  }
}

/* ----------------------------------
   STORY SECTION
   ---------------------------------- */
section.story-section {
  position: relative;
  /* tighter vertical padding just for story section */
  padding-top: clamp(1.5rem, 1.5vw + 1rem, 2.5rem);
  padding-bottom: clamp(1.5rem, 1.5vw + 1rem, 2.5rem);
  background-color: var(--bg-offwhite);
  overflow: hidden;
  text-align: center;
}

/* subtle paper texture */
section.story-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle at 20% 20%,
    rgba(0, 0, 0, 0.03) 0%,
    transparent 60%
  );
  opacity: 0.4;
  pointer-events: none;
}

.leaf-shadows {
  position: absolute;
  inset: 0;
  background-image: url("images/leaf-shadows.png");
  background-size: cover;
  background-position: center;
  opacity: 0.18;
  filter: blur(6px);
  pointer-events: none;
  animation: sway 12s ease-in-out infinite alternate;
}
@keyframes sway {
  0% { transform: translate(-10px, -5px) scale(1.02); }
  100% { transform: translate(10px, 5px) scale(1.04); }
}

.story-inner {
  position: relative;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1rem;
  z-index: 1;
  display: grid;
  gap: 1.25rem; /* tighter spacing within story section */
}

.story-heading {
  text-align: center;
  margin-bottom: 0.75rem;
}

.story-heading h2,
.rsvp-inner h2 {
  font-size: clamp(2.2rem, 0.6vw + 1.6rem, 2.7rem);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.story-heading .script-accent {
  display: block;
  font-size: clamp(1.7rem, 0.5vw + 1.2rem, 2.1rem);
  line-height: 1.1;
  margin-top: 0.5rem;
  font-weight: 400;
}

.story-slider-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0.5rem auto;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
  padding-bottom: 1.2rem; /* Space for pagination (reduced) */
}

.story-slider {
  display: flex;
  transition: transform 0.3s ease-out;
  min-height: 600px; /* Reduced fixed height */
  will-change: transform;
}

.story-slide {
  flex: 0 0 100%;
  width: 100%;
  padding: 1rem 2rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
}

.story-intro,
.story-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 2rem;
}

.story-image-full {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.story-image-full img {
  max-width: 100%;
  height: 500px; /* Reduced height for portrait images */
  width: auto; /* Allow natural width for portrait images */
  object-fit: contain; /* Preserve aspect ratio */
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Navigation Arrows */
.story-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--accent-gold);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-navy);
  font-size: 1.2rem;
  z-index: 2;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.story-nav:hover {
  background: var(--accent-gold);
  color: white;
  box-shadow: 0 4px 12px rgba(194,162,106,0.3);
}

.story-nav.prev {
  left: 1.5rem;
}

.story-nav.next {
  right: 1.5rem;
}

/* Pagination Dots */
.story-pagination {
  position: absolute;
  bottom: 0.25rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  z-index: 2;
  padding: 0.25rem;
  background: linear-gradient(to top, rgba(253,251,246,0.9), transparent);
}

.pagination-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(194, 162, 106, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(194, 162, 106, 0.2);
}

.pagination-dot:hover {
  background: rgba(194, 162, 106, 0.5);
}

.pagination-dot.active {
  background: var(--accent-gold);
  transform: scale(1.2);
  border-color: var(--accent-gold);
}

.pagination-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(194, 162, 106, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-dot.active {
  background: var(--accent-gold);
  transform: scale(1.2);
}

.story-text-content {
  display: grid;
  gap: 1.5rem;
}

.story-text {
  font-style: italic;
  font-weight: 300;
  font-size: 1.15rem;
  line-height: 1.8;
  letter-spacing: 0.03em;
  color: var(--text-navy);
}

.story-text p + p {
  margin-top: 1rem;
}

.story-text em {
  color: var(--accent-gold);
  font-style: normal;
  font-weight: 500;
}

.story-hashtag {
  margin-top: 0.75rem;
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--text-navy);
}

/* ----------------------------------
   DETAILS
   ---------------------------------- */
section.details-section {
  background-color: var(--bg-offwhite);
  padding-top: var(--section-pad-y);
  padding-bottom: var(--section-pad-y);
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 1rem;
  position: relative;
}
@media (min-width: 900px) {
  .details-grid {
    grid-template-columns: minmax(280px, 1fr) minmax(300px, 1fr);
    gap: 3rem;
  }
}

.details-left-art {
  max-width: 266.86px;  /* Exact width of the floral illustration */
  margin: 0 auto;
}

.details-left-heading {
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: clamp(1.5rem, 1vw + 1rem, 2rem);
  font-weight: 500;
  line-height: 1.4;
  margin-top: 2rem;
  text-align: center;
  width: 100%;
}

.details-right-block {
  text-align: center;
}

@media (min-width: 900px) {
  .details-left-art {
    margin-left: 0;
    margin:auto;
    padding-right: 0px;;
  }
  .details-right-block {
    text-align: left;
  }
}

.details-right-block h3 {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: none;
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
  text-align: center;
}

.details-right-block .detail-line {
  font-style: italic;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  line-height: 1.8;
  color: var(--text-navy);
  text-align: center;
}

.details-right-block + .details-right-block {
  border-top: 1px solid var(--accent-gold-light);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  text-align: center;
}

.where-block {
  border-top: 1px solid var(--accent-gold-light);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  text-align: center;
}

@media (min-width: 900px) {
  .details-right-block h3,
  .details-right-block .detail-line,
  .details-right-block + .details-right-block,
  .where-block {
    text-align: center;
  }
}

/* ----------------------------------
   LOCATIONS
   ---------------------------------- */
/* Additions for RSVP button loading state */
.locations-section {
  background-color: var(--bg-offwhite);
  padding-top: var(--section-pad-y);
  padding-bottom: var(--section-pad-y);
  border-top: 1px solid var(--accent-gold-light);
  border-bottom: 1px solid var(--accent-gold-light);
}

.locations-heading {
  text-align: center;
  margin-bottom: 2.5rem;
}
.locations-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 0.5vw + 1.5rem, 2.5rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-navy);
  line-height: 1.2;
  text-transform: uppercase;
}
.locations-subtitle {
  font-size: clamp(1.4rem, 0.4vw + 1rem, 1.8rem);
  line-height: 1.1;
  margin-top: 0.25rem;
  font-weight: 400;
  color: var(--accent-gold);
  font-family: "Great Vibes", cursive;
}

.locations-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 900px) {
  .locations-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

.location-card {
  background-color: #ffffff;
  border: 1px solid var(--accent-gold-light);
  border-radius: 6px;
  box-shadow:
    0 12px 30px rgba(11, 17, 36, 0.05),
    0 2px 4px rgba(11, 17, 36, 0.07);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.location-text {
  padding: 1.5rem 1.5rem 1rem;
  color: var(--text-navy);
}
.location-label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
}
.location-name {
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  line-height: 1.3;
  color: var(--text-navy);
}
.location-address {
  margin-top: 0.5rem;
  font-style: italic;
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--text-navy);
}
.map-wrapper {
  width: 100%;
  aspect-ratio: 16 / 10;
  background-color: #ccc;
  border-top: 1px solid var(--accent-gold-light);
}
.map-frame {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ----------------------------------
   GALLERY
   ---------------------------------- */
section.gallery-section {
  background-color: var(--bg-offwhite);
  padding-top: var(--section-pad-y);
  padding-bottom: var(--section-pad-y);
}
.gallery-heading {
  text-align: center;
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.5em;
  font-size: 0.9rem;
  color: var(--accent-gold);
  font-weight: 500;
}
.masonry {
  /* Switch from CSS columns to CSS grid for aligned rows */
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  max-width: 1000px;
  margin-inline: auto;
  padding-inline: 1rem;
}
@media (min-width: 768px) {
  .masonry {
    grid-template-columns: repeat(3, 1fr);
  }
}
.masonry-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  background-color: #fff;
  /* Give every tile a consistent shape so rows line up */
  aspect-ratio: 3 / 4; /* tweak to taste (e.g., 4/5 or 1/1) */
}
.masonry-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover; /* crop to fill the fixed tile */
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}
.masonry-item:hover img {
  filter: grayscale(0%);
}

/* Center the lone last item in the gallery */
/* 3-column layout: place single remainder in middle column */
@media (min-width: 768px) {
  .masonry > .masonry-item:last-child:nth-child(3n + 1) {
    grid-column: 2; /* middle column */
  }
}
/* 2-column layout: make single remainder span both for symmetry */
@media (max-width: 767.98px) {
  .masonry > .masonry-item:last-child:nth-child(2n + 1) {
    grid-column: 1 / -1; /* full width looks centered */
    justify-self: center;
  }
}

/* ----------------------------------
   RSVP
   ---------------------------------- */
section.rsvp-section {
  background-color: var(--bg-offwhite);
  padding-top: var(--section-pad-y);
  padding-bottom: var(--section-pad-y);
  border-top: 1px solid var(--accent-gold-light);
}
.rsvp-inner {
  max-width: 500px;
  margin-inline: auto;
  padding-inline: 1rem;
  text-align: center;
}
.rsvp-inner h2 {
  font-size: clamp(2.2rem, 0.6vw + 1.6rem, 2.7rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.rsvp-inner p {
  font-style: italic;
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.7;
  letter-spacing: 0.03em;
  color: var(--text-navy);
  margin-bottom: 2rem;
}
form#rsvpForm {
  display: grid;
  gap: 1rem;
  text-align: left;
}
label {
  font-size: 0.9rem;
  font-style: italic;
  letter-spacing: 0.05em;
  color: var(--text-navy);
  display: block;
  margin-bottom: 0.3rem;
}
input,
select,
textarea {
  width: 100%;
  font-family: "Cormorant Garamond", serif;
  background-color: #fff;
  color: var(--text-navy);
  padding: 0.75rem 0.75rem;
  border-radius: 4px;
  border: 1px solid rgba(11,17,36,0.2);
  font-size: 1rem;
  letter-spacing: 0.03em;
  outline: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px rgba(194, 162, 106, 0.25);
}
.btn-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}
@media (min-width: 480px) {
  .btn-row {
    flex-direction: row;
    justify-content: space-between;
  }
}
button {
  cursor: pointer;
  appearance: none;
  border: 1px solid var(--accent-gold);
  background-color: var(--text-navy);
  color: var(--bg-offwhite);
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  padding: 0.9rem 1.2rem;
  text-transform: uppercase;
  line-height: 1;
  border-radius: 4px;
  transition: all 0.2s ease;
}
button.alt {
  background-color: transparent;
  color: var(--text-navy);
}
button:hover {
  filter: brightness(1.1);
}
.thanks-msg {
  text-align: center;
  font-style: italic;
  color: var(--accent-gold);
  margin-top: 1rem;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  display: none;
}

/* ----------------------------------
   FOOTER
   ---------------------------------- */
footer.site-footer {
  text-align: center;
  padding: 3rem 1rem;
  background-color: var(--bg-offwhite);
  font-style: italic;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--text-navy);
  border-top: 1px solid var(--accent-gold-light);
}
footer.site-footer a {
  color: var(--accent-gold);
  text-decoration: none;
}

/* ===========================
   MODAL (RSVP thank you)
   =========================== */
.modal-open {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11,17,36,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 10000;
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  width: min(520px, 95vw);
  background: var(--bg-offwhite);
  border: 1px solid var(--accent-gold-light);
  border-radius: 10px;
  box-shadow: 0 30px 60px rgba(11,17,36,0.25), 0 2px 8px rgba(11,17,36,0.2);
  padding: 1.25rem 1.25rem 1rem;
  position: relative;
  animation: softFade 0.3s ease;
  text-align: center;
}
.modal h3 {
  margin: 0 0 0.5rem;
  letter-spacing: 0.12em;
}
.modal p {
  font-style: italic;
  color: var(--text-navy);
  margin: 0 0 1rem;
}
.modal-close {
  position: absolute;
  right: 0.5rem;
  top: 0.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--accent-gold);
  background: transparent;
  color: var(--text-navy);
  font-size: 1.1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.btn-row.center {
  justify-content: center;
}

/* ========== GLOBAL SMOOTH SCROLL base ========== */
html {
  scroll-behavior: smooth; /* fallback smooth; JS does offset math */
}

/* ========== ANIMATION KEYFRAMES ========== */

/* fade up for sections */
@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(24px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* subtle pulse for buttons when clicked */
@keyframes goldPulse {
  0% {
    box-shadow: 0 0 0 rgba(194,162,106,0.0);
  }
  50% {
    box-shadow: 0 0 16px 4px rgba(194,162,106,0.6),
                0 0 42px 12px rgba(194,162,106,0.25);
  }
  100% {
    box-shadow: 0 0 0 rgba(194,162,106,0.0);
  }
}

/* menu panel slide-down */
@keyframes panelDown {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* hero text / brand fade on initial load */
@keyframes softFade {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ========== REVEAL-ON-SCROLL helper classes ========== */

/* start hidden */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  will-change: opacity, transform;
}

/* becomes visible once in viewport */
.reveal-on-scroll.visible {
  animation: fadeUp 0.8s ease forwards;
}

/* hero / name fade-in on load */
.fade-on-load {
  opacity: 0;
  transform: translateY(10px) scale(0.98);
}
.fade-on-load.loaded {
  animation: softFade 1s ease forwards;
}

/* ========== MOBILE MENU PANEL OPEN ANIMATION ========== */

.mobile-nav-panel {
  /* existing styles... */
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.mobile-nav-panel.open {
  animation: panelDown 0.3s ease both;
}

/* give mobile menu links a gentle hover highlight */
.mobile-nav-link {
  position: relative;
  transition: color 0.2s ease;
}
.mobile-nav-link:hover {
  color: var(--accent-gold);
}
.mobile-nav-link:hover::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -2px;
  left: auto;
  width: 40%;
  height: 1px;
  background-color: var(--accent-gold);
  box-shadow: 0 0 6px rgba(194,162,106,0.7);
}

/* ========== DESKTOP NAV HOVER ANIMATION ========== */

@media (min-width: 900px) {
  .desktop-nav-links a {
    position: relative;
    padding-bottom: 4px;
  }

  .desktop-nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 1px;
    width: 0%;
    background-color: var(--accent-gold);
    box-shadow: 0 0 6px rgba(194,162,106,0.7);
    transition: width 0.25s ease;
  }

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

/* ========== BUTTON GLOW / HOVER FEEDBACK ========== */

.btn-animated {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: color 0.2s ease, background-color 0.2s ease,
              box-shadow 0.2s ease, border-color 0.2s ease;
}

/* default primary button is navy bg with gold border (you already had) */
.btn-animated:hover {
  filter: brightness(1.08);
  box-shadow: 0 10px 18px rgba(11,17,36,0.3),
              0 0 12px rgba(194,162,106,0.4);
}

/* alt button (transparent bg) */
button.alt.btn-animated {
  background-color: transparent;
  color: var(--text-navy);
}
button.alt.btn-animated:hover {
  background-color: rgba(194,162,106,0.07);
  box-shadow: 0 10px 18px rgba(11,17,36,0.15),
              0 0 10px rgba(194,162,106,0.5);
}

/* active click state flash */
.btn-active {
  animation: goldPulse 0.4s ease;
  border-color: var(--accent-gold) !important;
  box-shadow: 0 0 12px rgba(194,162,106,0.7),
              0 0 36px rgba(194,162,106,0.3);
}

/* ========== RSVP SUBMIT: LOADING SPINNER ========== */
.btn-animated:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor; /* match text color */
  border-top-color: transparent;
  animation: btnspin 0.8s linear infinite;
  opacity: 0; /* hidden by default */
  transform: translateZ(0);
}

/* Hide spinner footprint when not loading */
.btn-animated:not(.loading) .btn-spinner {
  width: 0;
  margin: 0;
  border-width: 0;
  padding: 0;
}

.btn-animated.loading .btn-spinner {
  opacity: 1;
  margin-right: 8px;
}

@keyframes btnspin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ========== THANK YOU MESSAGE APPEAR ANIMATION ========== */
.thanks-msg {
  opacity: 0;
  transition: opacity 0.4s ease;
}
.thanks-msg[style*="display: block"] {
  /* when we set display: block in JS, it shows immediately;
     this next trick gives us fade-in after layout tick: */
  animation: softFade 0.6s ease forwards;
}

/* ========== LITTLE POLISHES ========== */

/* click/tap feedback on inputs */
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px rgba(194, 162, 106, 0.25),
              0 0 18px rgba(194,162,106,0.4);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

/* hero-block text glow on hover (desktop only, subtle flex) */
@media (min-width: 900px) {
  .hero-block {
    transition: text-shadow 0.3s ease, transform 0.3s ease;
  }
  .hero-block:hover {
    text-shadow: 0 3px 10px rgba(0,0,0,0.8),
                 0 0 10px rgba(255,255,255,0.3);
    transform: translateY(-2px);
  }
}

/* cards pop slightly on hover (locations cards etc.) */
.location-card,
.masonry-item,
.story-image {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.location-card:hover,
.masonry-item:hover,
.story-image:hover {
  transform: translateY(-3px);
  box-shadow:
    0 18px 32px rgba(11,17,36,0.12),
    0 4px 8px rgba(11,17,36,0.18);
}
