@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,500&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --primary: #35513f;
  --primary-dark: #273d30;
  --bg: #faf6f5;
  --surface: #ffffff;
  --text: #2d3d32;
  --muted: #5f7062;
  --accent: #9ab69d;
  --accent-dark: #7c9d83;
  --blush: #f4cad9;
  --blush-deep: #e8b4c4;
  --radius: 16px;
  --shadow: 0 12px 36px rgba(45, 61, 50, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background: #ffffff;
  color: var(--text);
  line-height: 1.6;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  overflow-y: auto;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 16%, rgba(244,202,217,0.18), transparent 30%),
    radial-gradient(circle at 88% 78%, rgba(154,182,157,0.14), transparent 34%);
}

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

/* ===== Header ===== */
header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  padding: 20px 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.5);
  transition: 0.5s;
  z-index: 1300;
}
header.scrolled {
  background: #ffffff;
  box-shadow: 0 0 50px rgba(0,0,0,0.15);
}
.logo {
  font-family: 'Great Vibes', cursive;
  font-size: 40px;
  color: var(--text);
  letter-spacing: 2px;
  font-weight: 400;
  text-decoration: none;
}
.menu-toggle {
  display: none;
  background: none; border: none;
  color: var(--text);
  font-size: 2em;
  cursor: pointer;
  transition: 0.5s;
}
.nav { display: flex; list-style: none; }
.nav li { margin: 0 20px; list-style: none; }
.nav li a {
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
  font-weight: 350;
  padding: 10px 12px;
  font-size: 0.85rem;
  border-radius: 999px;
}
.nav li a:hover {
  color: var(--primary-dark);
  background: rgba(53, 81, 63, 0.08);
}
.nav li a.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 8px 20px rgba(39, 61, 48, 0.28);
  font-weight: 600;
}

/* ===== Banner ===== */
.banner {
  position: relative;
  width: 100%;
  height: 100vh;
  padding: 0 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  transition: 0.5s;
}
.banner::after {
  position: absolute;
  content: '';
  top: 0; left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(250,246,245,0.5);
}

/* ===== Hero background override (use first photo, hide numbers) ===== */
.banner {
  /* use the first hero image as the full-bleed background */
  background-image: url('../images/hero-1.webp');
  background-size: cover;
  background-position: 18% center;
  background-repeat: no-repeat;
  /* color adjustments: slightly desaturate and warm the image */
  filter: saturate(0.85) brightness(0.96) contrast(1.03) hue-rotate(-6deg);
}

.banner::before {
  position: absolute;
  content: '';
  inset: 0;
  /* gentle tint to harmonize with the site color palette and reduce numeric visibility */
  background: linear-gradient(90deg, rgba(255,255,255,0.0) 0%, rgba(250,246,245,0.35) 55%, rgba(250,246,245,0.65) 100%);
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1050;
}

/* Responsive background position for banner across all viewports */
@media (max-width: 1280px) {
  .banner { background-position: 20% center; }
}

@media (max-width: 991px) {
  .banner { background-position: 22% center; }
}

@media (max-width: 767px) {
  .banner {
    background-position: center center;
    background-size: cover;
  }
  .scroll-ring {
    bottom: 16px;
    width: min(220px, 32vw);
    height: min(180px, 30vw);
  }
  .scroll-ring text { font-size: clamp(10px, 2vw, 14px); letter-spacing: 0.1em; }
}

@media (max-width: 600px) {
  .banner {
    background-position: center center;
    background-size: cover;
  }
  .scroll-ring {
    bottom: 12px;
    width: min(180px, 40vw);
    height: min(150px, 38vw);
  }
  .scroll-ring text { font-size: clamp(10px, 2.4vw, 13px); }
}

@media (max-width: 480px) {
  .banner {
    background-position: 52% center;
    background-size: cover;
  }
}

@media (max-width: 360px) {
  .banner {
    background-position: 54% center;
    background-size: cover;
  }
}

.hero-content {
  position: relative;
  width: 60vw;
  z-index: 1100;
  text-align: center;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
/* push the text lower so the couple's faces in the photo remain visible */
  padding-top: 34vh;
}
.hero-content h1 {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(3.4rem, 8.6vw, 6.4rem);
  font-weight: 400;
  color: #1f2b24;
  line-height: 1.05;
  margin-bottom: 0.3rem;
  text-shadow:
    0 1px 2px rgba(0,0,0,0.28),
    0 2px 8px rgba(0,0,0,0.18),
    0 0 14px rgba(255,255,255,0.95),
    0 0 30px rgba(255,255,255,0.75);
}
.hero-content .amp {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1.35rem, 3.3vw, 2.2rem);
  display: block;
  color: #27402f;
  text-shadow:
    0 1px 2px rgba(0,0,0,0.28),
    0 2px 8px rgba(0,0,0,0.18),
    0 0 14px rgba(255,255,255,0.95),
    0 0 30px rgba(255,255,255,0.75);
}
.hero-content p {
  font-family: 'Great Vibes', cursive;
  font-weight: 200;
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  letter-spacing: 1px;
  color: #3d4d41;
  text-shadow:
    0 1px 2px rgba(0,0,0,0.28),
    0 2px 8px rgba(0,0,0,0.18),
    0 0 14px rgba(255,255,255,0.95),
    0 0 30px rgba(255,255,255,0.75);
}
@media (min-width: 992px) {
  .banner {
    justify-content: flex-start;
    padding-left: min(200px, 16vw);
  }
  .hero-content {
    width: min(40vw, 550px);
    text-align: left;
    padding-top: 5vh;
    margin-left: 9vw;
  }
}

.share {
  position: absolute;
  bottom: 50px;
  left: 50px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  z-index: 1200;
}
.share::before {
  display: none;
}
.share p {
  writing-mode: vertical-rl;
  text-transform: uppercase;
  font-weight: 300;
  letter-spacing: 1px;
  color: var(--muted);
  font-size: 0.75rem;
}
.share a {
  text-decoration: none;
  color: var(--muted);
}
.share a svg { font-size: 1.8em; }

.scroll-ring {
  position: absolute;
  bottom: 2vmin;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: min(280px, 28vw);
  height: min(220px, 22vw);
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55), 0 24px 48px rgba(0, 0, 0, 0.16);
}
.scroll-ring svg {
  position: absolute;
  z-index: 1100;
  font-family: 'Great Vibes', cursive;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  transform-origin: center;
  animation: spin 10s linear infinite;
  filter: drop-shadow(0 0 12px rgba(0, 0, 0, 0.18));
}
.scroll-ring text {
  fill: rgba(20, 34, 28, 0.98);
  font-size: clamp(12px, 1.1vw, 16px);
  letter-spacing: 0.12em;
  stroke: rgba(255, 255, 255, 0.8);
  stroke-width: 0.7;
  paint-order: stroke;
}
@keyframes spin {
  from { transform: rotateZ(0); }
  to { transform: rotateZ(360deg); }
}
.scroll-ring .move-down {
  position: absolute;
  text-decoration: none;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: blink 1s linear infinite;
  pointer-events: auto;
}
.scroll-ring .move-down svg { width: 3.5em; height: 3.5em; position: static; animation: none; }
@keyframes blink {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== Sections General ===== */
section {
  overflow: hidden;
  padding: 80px 60px;
}
section h1 {
  font-family: 'Great Vibes', cursive;
  font-weight: 400;
  font-size: clamp(2rem, 6vw, 4rem);
  letter-spacing: 1px;
  text-align: center;
  margin-bottom: 40px;
}
section h2 {
  font-family: 'Great Vibes', cursive;
  font-weight: 400;
  font-size: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
}
section h2::after {
  content: '';
  display: block;
  width: 92px;
  height: 2px;
  margin: 0.35rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(53,81,63,0.5), transparent);
}
.section-sub {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  font-style: italic;
  font-weight: 300;
  letter-spacing: 1px;
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

#events,
#moments,
#details,
#attire,
#program,
#entourage-photos,
#faq,
#rsvp {
  background: linear-gradient(160deg, rgba(255,255,255,0.96), rgba(250,246,245,0.92));
  border: 1px solid rgba(154,182,157,0.12);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(45,61,50,0.07);
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto 30px;
}

/* ===== Countdown ===== */
.countdown-wrap {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  max-width: 500px;
  margin: 60px auto 0;
  position: relative;
  z-index: 10;
  text-align: center;
}
.countdown-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  max-width: 320px;
  margin: 0 auto;
}
.countdown-cell {
  background: linear-gradient(180deg, #faf6f5, #f5f0ec);
  border: 1px solid rgba(154,182,157,0.2);
  border-radius: 12px;
  padding: 0.7rem 0.3rem;
}
.countdown-cell span {
  display: block;
  font-size: 1.6rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.countdown-cell small {
  display: block;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.15rem;
}
.countdown-cell.seconds { background: linear-gradient(180deg, rgba(244,202,217,0.25), rgba(244,202,217,0.1)); }

audio#wedding-audio { display: none; }

/* ===== Events ===== */
.events-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(min(280px, 100%), 1fr));
  gap: 1.5rem;
  max-width: 820px;
  margin: 0 auto;
  align-items: stretch;
}
.event-card {
  background: var(--surface);
  border: 1px solid rgba(154,182,157,0.15);
  border-radius: calc(var(--radius) + 6px);
  padding: 0;
  overflow: hidden;
  box-shadow: 0 16px 45px rgba(45,61,50,0.08);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
}
.event-card:hover { transform: translateY(-6px); box-shadow: 0 22px 50px rgba(45,61,50,0.12); border-color: rgba(154,182,157,0.25); }
.event-card-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 240px;
  overflow: hidden;
}
.event-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s;
}
.event-card:hover .event-card-media img {
  transform: scale(1.05);
}
.event-card-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.9rem;
  margin-bottom: 1rem;
}
.event-card-header svg { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; }
.event-card h3 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin: 0;
}
.event-time {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}
.event-venue { font-size: 1rem; font-weight: 600; margin-bottom: 0.15rem; }
.event-addr { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.2rem; line-height: 1.6; }
.event-card-actions {
  margin-top: auto;
  padding: 1rem 1.5rem 1.5rem;
}
.event-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
}
.event-action:hover,
.event-action:focus {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(201,160,108,0.35);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}
.event-note {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(154,182,157,0.08);
  border-radius: 10px;
  font-style: italic;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== 3D Photo Cards (matching test folder) ===== */
.photo-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.photo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(45, 61, 50, 0.12);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.photo-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(45, 61, 50, 0.18);
}
.photo-card .card-img {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  flex-shrink: 0;
}
.photo-card .card-img::after {
  position: absolute;
  content: '';
  inset: 0;
  background: linear-gradient(135deg, rgba(201, 160, 108, 0.08) 0%, rgba(154, 182, 157, 0.12) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.photo-card:hover .card-img::after {
  opacity: 1;
}
.photo-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.photo-card .card-img img.moment-photo-upright {
  transform: rotate(-90deg) scale(1.18);
  object-position: center;
}
.photo-card:hover .card-img img {
  transform: scale(1.08);
}
.photo-card:hover .card-img img.moment-photo-upright {
  transform: rotate(-90deg) scale(1.26);
}
.photo-card .card-body {
  position: relative;
  padding: 32px 28px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
}
.photo-card .card-body h3 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.3rem, 4vw, 1.6rem);
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px 0;
  letter-spacing: -0.5px;
}
.photo-card .card-body p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
  opacity: 0.85;
  transition: opacity 0.4s ease, color 0.4s ease;
}
.photo-card:hover .card-body p {
  opacity: 1;
  color: var(--text);
}

/* ===== Details ===== */
.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
  max-width: 720px;
  margin: 0 auto;
}
.detail-chip {
  background: var(--surface);
  border: 1px solid rgba(154,182,157,0.12);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  transition: transform 0.25s, box-shadow 0.25s;
}
.detail-chip:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(45,61,50,0.06); }
.detail-chip svg {
  width: 20px; height: 20px;
  color: var(--primary); flex-shrink: 0;
  margin-top: 0.1rem;
}
.detail-chip h4 { font-size: 0.78rem; font-weight: 600; margin-bottom: 0.15rem; }
.detail-chip p { font-size: 0.78rem; color: var(--muted); line-height: 1.45; }

/* ===== Inner Pages ===== */
.page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1080px;
  margin: 0 auto;
}
.page-card {
  background: var(--surface);
  border: 1px solid rgba(154, 182, 157, 0.15);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.page-card-media {
  overflow: hidden;
  border-radius: 18px;
  margin-bottom: 1.4rem;
}
.page-card-media img {
  width: 100%;
  display: block;
  object-fit: cover;
  height: clamp(180px, 25vw, 260px);
}
.page-card-media img.attire-zoomable {
  cursor: zoom-in;
}
.story-book {
  display: grid;
  grid-template-columns: minmax(320px, 1.1fr) minmax(320px, 1fr);
  gap: 2rem;
  align-items: stretch;
  max-width: 1140px;
  margin: 0 auto;
  min-height: 560px;
}
.story-book-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.story-book-photo {
  width: 100%;
  min-height: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}
.story-book-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.story-book-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 2.5rem;
  background: var(--surface);
}
.story-book-copy::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/tree-bg.webp') center center / contain no-repeat;
  opacity: 0.12;
  pointer-events: none;
}
.story-book-copy > * {
  position: relative;
  z-index: 1;
}
.story-book-copy h3 {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(3rem, 5vw, 4.2rem);
  margin-bottom: 1rem;
  color: var(--text);
  line-height: 1.05;
}
.story-book-copy p {
  font-size: clamp(1rem, 1.1vw, 1.05rem);
  color: var(--muted);
  line-height: 1.9;
  max-width: 42rem;
}
@media (max-width: 991px) {
  .story-book {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .story-book-panel {
    min-height: auto;
  }
  .story-book-photo {
    aspect-ratio: 4 / 3;
  }
  .program-timelines {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .story-book {
    gap: 1.2rem;
  }
  .story-book-copy {
    padding: 2rem 1.5rem;
  }
  .story-book-copy h3 {
    font-size: 2.6rem;
  }
  .program-shell,
  .program-panel,
  .program-entourage {
    border-radius: 20px;
    padding: 1.2rem;
  }
  .program-list li {
    grid-template-columns: 1fr;
  }
  .program-list time {
    margin-bottom: 0.2rem;
  }
}

.page-card h3 {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2rem, 2.5vw, 2.6rem);
  margin-bottom: 1rem;
  color: var(--text);
}
.page-card p,
.page-card li {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.8;
}
.page-card strong { color: var(--text); }

.program-section {
  position: relative;
  padding: 2.5rem 0 4rem;
  overflow: hidden;
}
.program-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(201, 160, 108, 0.08), transparent 30%),
              radial-gradient(circle at bottom right, rgba(201, 160, 108, 0.06), transparent 28%);
  pointer-events: none;
}

.program-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.program-intro {
  margin: 0 auto 2rem;
  padding: 2.2rem 1.2rem 1.4rem;
  text-align: center;
  max-width: 760px;
}

.program-intro .eyebrow {
  display: inline-flex;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.34em;
  font-size: 0.68rem;
  color: var(--primary-dark);
  font-weight: 600;
  margin-bottom: 0.9rem;
}

.program-intro h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 2.9rem);
  letter-spacing: 0.01em;
  margin-bottom: 0.7rem;
  color: var(--text);
}

.program-intro p {
  margin: 0 auto;
  max-width: 42rem;
  color: var(--muted);
  line-height: 1.8;
}

.program-date {
  display: inline-block;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(201, 160, 108, 0.35);
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.73rem;
  font-weight: 600;
}

.program-timelines {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.9rem, 2vw, 1.5rem);
  margin-bottom: 1.25rem;
}

.program-panel,
.program-entourage {
  position: relative;
  background: #fffdf9;
  border: 1px solid rgba(201, 160, 108, 0.2);
  border-radius: 28px;
  padding: clamp(1.15rem, 2.2vw, 1.9rem);
  box-shadow: 0 10px 28px rgba(78, 61, 45, 0.06);
}

.program-panel h3,
.program-entourage h3 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.45rem, 2.2vw, 1.95rem);
  color: var(--text);
  margin: 0 0 1.25rem;
  text-align: center;
}

.program-panel h3 {
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(201, 160, 108, 0.28);
}

.program-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
}

.program-list li {
  display: grid;
  grid-template-columns: clamp(88px, 18vw, 112px) minmax(0, 1fr);
  gap: clamp(0.8rem, 1.8vw, 1.1rem);
  align-items: start;
  padding: clamp(0.95rem, 1.6vw, 1.2rem) 0;
  border-bottom: 1px solid rgba(201, 160, 108, 0.16);
}

.program-list li:last-child {
  border-bottom: none;
}

.program-list time {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: clamp(0.95rem, 1.2vw, 1.08rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--primary-dark);
  margin: 0;
  white-space: nowrap;
}

.program-list p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.06rem);
  line-height: 1.68;
}

@media (max-width: 1100px) {
  .program-panel {
    border-radius: 24px;
  }
}

@media (max-width: 767px) {
  .program-panel {
    border-radius: 22px;
    padding: 1.15rem;
  }
  .program-panel h3 {
    margin-bottom: 0.95rem;
    padding-bottom: 0.75rem;
  }
  .program-list li {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
  .program-list time {
    font-size: 1rem;
  }
  .program-list p {
    line-height: 1.62;
  }
}

@media (max-width: 420px) {
  .program-panel {
    border-radius: 18px;
    padding: 1rem;
  }
  .program-list li {
    padding: 0.8rem 0;
  }
  .program-list p {
    font-size: 0.98rem;
  }
}

.entourage-list {
  display: grid;
  gap: 0.9rem;
}

.program-entourage {
  margin-top: 1.4rem;
  border-radius: 10px;
  border: 1px solid rgba(186, 139, 79, 0.42);
  background: #fffefb;
  padding: 3.4rem 2.1rem 3.2rem;
  box-shadow: 0 14px 38px rgba(92, 69, 42, 0.09);
  overflow: hidden;
}

.program-entourage::before,
.program-entourage::after {
  content: '';
  position: absolute;
  top: 94px;
  bottom: 94px;
  width: 1px;
  background: linear-gradient(180deg, rgba(186, 139, 79, 0.1), rgba(186, 139, 79, 0.55), rgba(186, 139, 79, 0.1));
  pointer-events: none;
}

.program-entourage::before {
  left: 24px;
}

.program-entourage::after {
  right: 24px;
}

.program-entourage h3 {
  margin: 1.7rem 0 1.3rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2f2f2f;
}

.entourage-corner {
  position: absolute;
  width: 96px;
  height: 96px;
  opacity: 0.75;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23ba8b4f' stroke-width='2.1' stroke-linecap='round'%3E%3Cpath d='M8 92V44C8 24 24 8 44 8h48'/%3E%3Cpath d='M20 80V44c0-13 11-24 24-24h36'/%3E%3Cpath d='M36 8c0 7-6 13-13 13'/%3E%3Cpath d='M8 36c7 0 13 6 13 13'/%3E%3C/g%3E%3C/svg%3E");
}

.corner-tl {
  top: 14px;
  left: 14px;
}

.corner-tr {
  top: 14px;
  right: 14px;
  transform: scaleX(-1);
}

.corner-bl {
  bottom: 14px;
  left: 14px;
  transform: scaleY(-1);
}

.corner-br {
  bottom: 14px;
  right: 14px;
  transform: scale(-1);
}

.entourage-divider {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(320px, 58%);
  height: 16px;
  pointer-events: none;
  z-index: 0;
}

.entourage-divider::before,
.entourage-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.entourage-divider::before {
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(186, 139, 79, 0), rgba(186, 139, 79, 0.85), rgba(186, 139, 79, 0));
}

.entourage-divider::after {
  left: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 35%, #f4e3c7 0%, #ba8b4f 68%);
  box-shadow: 0 0 0 6px #fffefb;
}

.entourage-divider.top {
  top: 18px;
}

.entourage-divider.bottom {
  bottom: 26px;
}

.program-entourage > h3,
.program-entourage > .entourage-list {
  position: relative;
  z-index: 2;
}

.entourage-group {
  padding: 0.7rem 0.7rem;
  border-radius: 10px;
  background: transparent;
  border: none;
  text-align: center;
}

.entourage-group h4 {
  margin: 0 0 0.8rem;
  font-family: 'Playfair Display', serif;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #2f2f2f;
}

.entourage-group ul {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: grid;
  gap: 0.25rem;
  justify-items: center;
}

.entourage-group li {
  width: min(100%, 34rem);
  margin: 0;
  color: #232323;
  font-family: 'Playfair Display', serif;
  font-size: 0.92rem;
  line-height: 1.55;
  font-style: italic;
  padding: 0.1rem 0;
}

.family-honors h4 {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.95rem;
}

.entourage-parents-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
  align-items: start;
}

.entourage-grandparent {
  margin: 0.9rem auto 0;
  width: min(100%, 26rem);
}

.sponsor-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.sponsor-column {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sponsor-column li {
  width: 100%;
}

.secondary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.sponsor-role {
  margin: 0 0 0.45rem;
  color: #76552f;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 700;
}

.wedding-roster {
  margin-top: 0.35rem;
}

.wedding-party-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
  margin-bottom: 1rem;
}

.wedding-party-main {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 1.2rem;
}

.party-role {
  text-align: center;
}

.party-role h5 {
  margin: 0 0 0.5rem;
  font-family: 'Playfair Display', serif;
  font-size: 0.92rem;
  font-style: italic;
  font-weight: 700;
  color: #2b2b2b;
}

.party-role ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.2rem;
}

.party-role li {
  width: 100%;
}

.party-role-center {
  display: grid;
  gap: 0.8rem;
}

.party-subrole h5 {
  margin-bottom: 0.25rem;
}

.couple {
  margin-bottom: 0.25rem;
}

.entourage-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.entourage-person {
  padding: 0.2rem;
}

.entourage-role {
  margin: 0;
  color: #76552f;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  font-weight: 700;
}

.entourage-name {
  margin: 0.35rem 0 0;
  color: #222;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.98rem;
  font-weight: 700;
}

@media (min-width: 900px) {
  .entourage-list {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    grid-template-areas:
      "couple couple"
      "family family"
      "principal principal"
      "secondary secondary"
      "roster roster";
    gap: 1.5rem;
    align-items: start;
  }
  .family-honors {
    grid-area: family;
    width: min(100%, 58rem);
    justify-self: center;
  }
  .principal-sponsors {
    grid-area: principal;
    width: min(100%, 58rem);
    justify-self: center;
  }
  .couple {
    grid-area: couple;
    justify-self: center;
    width: min(100%, 46rem);
  }
  .secondary-sponsors {
    grid-area: secondary;
    width: min(100%, 58rem);
    justify-self: center;
  }
  .wedding-roster {
    grid-area: roster;
    width: min(100%, 58rem);
    justify-self: center;
  }
}

@media (max-width: 640px) {
  .program-shell {
    padding: 0 1rem;
  }
  .program-intro {
    padding: 1.5rem 0.3rem 1rem;
    margin-bottom: 1.4rem;
  }
  .program-intro .eyebrow {
    letter-spacing: 0.26em;
  }
  .program-intro h2 {
    font-size: clamp(1.9rem, 8vw, 2.2rem);
  }
  .program-panel h3,
  .program-entourage h3 {
    font-size: 1.2rem;
  }
  .program-entourage {
    padding: 2.9rem 1.15rem 2.8rem;
  }
  .program-entourage::before,
  .program-entourage::after {
    top: 86px;
    bottom: 86px;
  }
  .entourage-corner {
    width: 64px;
    height: 64px;
  }
  .entourage-divider {
    width: min(230px, 66%);
  }
  .sponsor-columns,
  .secondary-grid,
  .wedding-party-main,
  .wedding-party-top {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  .entourage-pair,
  .principal-sponsors ul,
  .secondary-sponsors ul {
    grid-template-columns: 1fr;
    column-gap: 0;
  }
  .entourage-role {
    letter-spacing: 0.12em;
  }
  .entourage-group {
    padding: 0.75rem 0.5rem;
  }
  .party-role h5 {
    font-size: 0.88rem;
  }
  .entourage-group li {
    width: 100%;
  }
}
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 0.8rem;
}
.faq-list details {
  background: var(--surface);
  border: 1px solid rgba(154, 182, 157, 0.15);
  border-radius: 14px;
  padding: 1rem 1.1rem;
}
.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  list-style: none;
  outline: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list details p {
  margin-top: 0.75rem;
  color: var(--muted);
  line-height: 1.8;
}
.faq-list details[open] {
  background: rgba(154, 182, 157, 0.06);
}

/* ===== Gallery ===== */
.gallery-actions {
  display: flex;
  justify-content: center;
  margin: 0.2rem 0 1rem;
}
.gallery-open-btn {
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.2rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(39, 61, 48, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gallery-open-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(39, 61, 48, 0.35);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.8rem;
  max-width: 860px;
  margin: 0 auto;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 1;
  cursor: default;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  background: #f5efe8;
}

.gallery-marquee {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 0 auto;
  padding: 1rem 0;
  contain: layout paint;
}
.gallery-track {
  display: flex;
  gap: 0.8rem;
  width: max-content;
  animation: marquee 32s linear infinite;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}
.gallery-marquee.reduced-motion .gallery-track,
.gallery-marquee.is-paused .gallery-track {
  animation: none;
  transform: none;
}
.gallery-marquee .gallery-item {
  min-width: 160px;
  max-width: 220px;
  flex: 0 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  contain: layout paint;
}
.gallery-marquee .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f5efe8;
}
@media (max-width: 768px) {
  .gallery-marquee .gallery-item {
    min-width: 140px;
    max-width: 180px;
  }
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

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

/* Reverse marquee helper */
.gallery-marquee.reverse .gallery-track {
  animation-name: marqueeReverse;
}

/* Slight variation for second row speed */
.gallery-marquee.reverse .gallery-track {
  animation-duration: 36s;
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  background: rgba(0,0,0,0.88);
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  object-fit: contain;
  transform: scale(0.92);
  transition: transform 0.3s;
}
.lightbox.open img { transform: scale(1); }
.lightbox-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none; border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  opacity: 0.7;
  transition: 0.2s;
}
.lightbox-close:hover { opacity: 1; }

/* Lightbox navigation and thumbnail strip */
.lightbox-view { max-width: 90vw; max-height: 80vh; display: grid; place-items: center; }
.lightbox .lightbox-view img { max-width: 100%; max-height: 80vh; border-radius: 8px; object-fit: contain; transition: opacity 220ms ease-in-out; opacity: 1; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.45); color: #fff; border: none; padding: 12px 14px; font-size: 1.6rem; cursor: pointer; border-radius: 6px; z-index: 2010; }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-thumbs { position: absolute; left: 0; right: 0; bottom: 0.6rem; display: flex; gap: 0.5rem; padding: 0.4rem 0.6rem; overflow-x: auto; justify-content: center; align-items: center; z-index: 2010; }
.lightbox-thumbs .thumb { width: 72px; height: 48px; flex: 0 0 auto; border-radius: 6px; overflow: hidden; border: 2px solid transparent; cursor: pointer; }
.lightbox-thumbs .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lightbox-thumbs .thumb.active { border-color: var(--accent); }
.lightbox .lightbox-nav[disabled] { opacity: 0.35; pointer-events: none; }
.lightbox.is-standalone .lightbox-nav,
.lightbox.is-standalone .lightbox-thumbs {
  display: none;
}
.lightbox.is-entourage .lightbox-thumbs {
  display: none;
}

.lightbox-counter {
  position: absolute;
  bottom: 0.8rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  z-index: 2010;
  white-space: nowrap;
  user-select: none;
}

/* ===== RSVP ===== */
.rsvp-card {
  background: var(--surface);
  border: 1px solid rgba(154,182,157,0.15);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  max-width: 520px;
  margin: 0 auto;
}
.rsvp-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 600;
  text-align: center;
}
.rsvp-card .rsvp-sub {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.2rem;
}
.rsvp-lock-pill {
  display: inline-block;
  margin: 0 auto 0.9rem;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  background: rgba(201, 160, 108, 0.14);
  border: 1px solid rgba(201, 160, 108, 0.24);
  color: var(--primary-dark);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.rsvp-help {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.2rem;
  line-height: 1.7;
}
.rsvp-loading {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 1rem 0 0.5rem;
}
.rsvp-edit-warning {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(179, 71, 106, 0.28);
  border-radius: 12px;
  background: rgba(232, 180, 196, 0.16);
  color: #8e3150;
  font-size: 0.84rem;
  line-height: 1.6;
  text-align: center;
}
.rsvp-edit-warning strong { display: block; margin-bottom: 0.15rem; }
.rsvp-update-policy {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
  text-align: center;
}
.invite-party-card {
  margin: 1rem 0 1.25rem;
  padding: 1rem;
  border: 1px solid rgba(154,182,157,0.18);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(250,246,245,0.96), #fff);
}
.invite-party-label {
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-dark);
  margin-bottom: 0.8rem;
}
.invite-party-list {
  display: grid;
  gap: 0.7rem;
}
.invite-party-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  justify-content: space-between;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(154,182,157,0.16);
  box-shadow: 0 4px 14px rgba(45,61,50,0.04);
}
.invite-party-row.is-checked {
  border-color: rgba(154,182,157,0.45);
  background: rgba(154,182,157,0.08);
}
.invite-party-person {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.invite-party-name {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.invite-party-note {
  font-size: 0.72rem;
  color: var(--muted);
}
.invite-party-toggle {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent-dark);
  flex: 0 0 auto;
}
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid rgba(154,182,157,0.25);
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(154,182,157,0.15);
}
.form-group textarea { resize: vertical; min-height: 60px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}
.btn-primary {
  width: 100%;
  padding: 0.85rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(201,160,108,0.35); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.6; cursor: default; transform: none; }
.feedback {
  text-align: center;
  font-size: 0.85rem;
  margin-top: 1rem;
  padding: 0.6rem;
  border-radius: 8px;
  display: none;
}
.feedback.show { display: block; }
.feedback.success { background: rgba(154,182,157,0.15); color: var(--accent-dark); }
.feedback.error { background: rgba(232,180,196,0.2); color: #b3476a; }

/* ===== RSVP Done State (already submitted) ===== */
.rsvp-done-card {
  margin: 1rem 0 0.5rem;
  padding: 1.5rem 1.25rem;
  border: 1px solid rgba(154,182,157,0.25);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(154,182,157,0.1), #fff);
  text-align: center;
}
.rsvp-done-card .rsvp-done-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin-bottom: 0.9rem;
  border-radius: 50%;
  background: rgba(154,182,157,0.18);
  color: var(--accent-dark);
}
.rsvp-done-card h3 {
  margin-bottom: 0.4rem;
}
.rsvp-done-card .rsvp-sub {
  margin-bottom: 0.6rem;
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(34px) scale(0.985);
  filter: blur(4px);
  transition: opacity 0.75s cubic-bezier(0.22,1,0.36,1), transform 0.75s cubic-bezier(0.22,1,0.36,1), filter 0.75s cubic-bezier(0.22,1,0.36,1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.visible { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }

/* ===== Footer ===== */
footer {
  text-align: center;
  padding: 2rem 1.5rem 2.5rem;
  color: var(--muted);
  font-size: 0.8rem;
}
footer .footer-names {
  font-family: 'Great Vibes', cursive;
  font-size: 1.5rem;
  color: var(--text);
  font-weight: 400;
}
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 auto 2.5rem;
  width: min(200px, 60%);
}
.ornament-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.ornament-gem { width: 6px; height: 6px; border-radius: 50%; background: var(--blush-deep); }

/* ===== Mobile ===== */

/* Large desktop: keep nav comfortable at 1200px+ */
@media (max-width: 1280px) and (min-width: 992px) {
  header { padding: 18px 48px; }
  .nav li { margin: 0 12px; }
  .banner { background-position: 46% center; }
}

/* Tablet landscape & small laptops */
@media (max-width: 991px) {
  header { padding: 15px 24px; }
  .logo { font-size: 28px; }
  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 66px;
    right: 16px;
    width: min(260px, calc(100vw - 32px));
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(154, 182, 157, 0.18);
    border-radius: 20px;
    padding: 1rem 1.25rem;
    box-shadow: 0 20px 60px rgba(45, 61, 50, 0.14);
    z-index: 1500;
    backdrop-filter: blur(12px);
  }
  .nav.open li { margin: 0.4rem 0; }
  .nav.open li a { display: block; padding: 8px 12px; }
  .menu-toggle { display: block; }
  .banner {
    padding: 0 24px;
    background-position: 56% center;
    background-size: cover;
  }
.hero-content { width: 70vw; padding-top: 28vh; }
  .hero-content h1 { font-size: clamp(2.4rem, 6.4vw, 3.6rem); }
  .hero-content .amp { font-size: clamp(1.3rem, 3.8vw, 1.9rem); }
  .hero-content p { font-size: clamp(1.02rem, 2.6vw, 1.28rem); }
  section { padding: 60px 28px; }
  #events,
  #moments,
  #details,
  #attire,
  #program,
  #faq,
  #rsvp {
    width: calc(100% - 26px);
    border-radius: 20px;
    margin-bottom: 22px;
  }
  .photo-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-card { width: 100%; max-width: none; }
  .photo-card:hover { transform: none; }
  .photo-card:hover .card-img { transform: none; }
  .photo-card .card-img { height: 250px; }
  .rsvp-card { margin: 0 auto; }
  .countdown-wrap { margin: -50px auto 0; }
}

/* Tablet portrait */
@media (max-width: 767px) {
  body { font-size: 17px; }
  header { padding: 12px 18px; }
  .logo { font-size: 24px; }
  .nav.open { top: 58px; }
  #countdown {
    text-align: center;
  }
  #countdown .countdown-wrap,
  #countdown .countdown-grid {
    margin-left: auto;
    margin-right: auto;
  }
  .banner {
    padding: 0 16px;
    background-position: center center;
    background-size: cover;
    filter: saturate(0.92) brightness(0.98) contrast(1.02);
  }
  .banner::after { background: rgba(250,246,245,0.22); }
  .banner::before {
    background: linear-gradient(180deg, rgba(250,246,245,0.08) 0%, rgba(250,246,245,0.18) 55%, rgba(250,246,245,0.24) 100%);
    mix-blend-mode: normal;
  }
.hero-content { width: 88vw; padding-top: 24vh; }
  .hero-content h1 { font-size: clamp(2.3rem, 8.2vw, 3.1rem); }
  .hero-content .amp { font-size: clamp(1.15rem, 4.4vw, 1.65rem); }
  .hero-content p { font-size: clamp(1.05rem, 4.2vw, 1.28rem); }
  #events,
  #moments,
  #details,
  #attire,
  #program,
  #faq,
  #rsvp {
    width: calc(100% - 18px);
    border-radius: 18px;
    margin-bottom: 18px;
  }
  .scroll-ring { width: 180px; height: 160px; bottom: 16px; }
  .scroll-ring svg { max-width: 22vmin; }
  .scroll-ring .move-down svg { width: 2em; height: 2em; }
  section { padding: 50px 18px; }
  .events-grid { grid-template-columns: 1fr; }
  .photo-cards { grid-template-columns: 1fr; }
  .photo-card {
    width: 100%;
    max-width: 100%;
  }
  .photo-card:hover { transform: translateY(-4px); }
  .photo-card:hover .card-img img { transform: none; }
  .photo-card .card-img {
    height: auto;
    aspect-ratio: 4 / 3;
    background: #f4f4f4;
  }
  .photo-card .card-img img {
    object-fit: contain;
    object-position: center;
    transform: none;
  }
  .photo-card .card-img img.moment-photo-upright {
    transform: rotate(-90deg);
  }
  .photo-card:hover .card-img img.moment-photo-upright {
    transform: rotate(-90deg);
  }
  .photo-card .card-body { padding: 24px 20px; }
  .photo-card .card-body h3 { font-size: 1.5rem; margin-bottom: 10px; }
  .photo-card .card-body p { font-size: 1rem; line-height: 1.75; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .countdown-wrap { margin: -45px 16px 0; padding: 1.4rem; }
  .countdown-grid { max-width: 280px; }
  .lightbox-nav { padding: 10px 12px; font-size: 1.3rem; }
  .lightbox-thumbs .thumb { width: 60px; height: 40px; }

  #rsvp .section-sub {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
  #rsvp #rsvp-locked-state {
    text-align: center;
  }
  #rsvp #rsvp-locked-state .rsvp-sub,
  #rsvp #rsvp-locked-state .rsvp-help {
    margin-left: auto;
    margin-right: auto;
    max-width: 34ch;
  }
}

/* Large phones */
@media (max-width: 600px) {
  .banner { background-position: 52% center; }
.hero-content { width: 90vw; padding-top: 23vh; }
  .hero-content h1 { font-size: clamp(2.15rem, 9.4vw, 2.85rem); }
  .hero-content .amp { font-size: clamp(1.08rem, 4.8vw, 1.5rem); }
  .hero-content p { font-size: clamp(1rem, 4.6vw, 1.2rem); }
  .events-grid { grid-template-columns: 1fr; }
  .details-grid { grid-template-columns: 1fr; }
  .page-grid { grid-template-columns: 1fr; }
  .rsvp-card { padding: 1.5rem 1.2rem; }
}

/* Small phones */
@media (max-width: 480px) {
  body { font-size: 17px; }
  header { padding: 10px 14px; }
  .logo { font-size: 20px; }
  .nav.open { top: 52px; right: 12px; }
  .banner { background-position: 54% center; }
.hero-content { width: 92vw; padding-top: 21vh; }
  .hero-content h1 { font-size: clamp(2.05rem, 10.5vw, 2.6rem); }
  .hero-content .amp { font-size: clamp(1.05rem, 5.2vw, 1.38rem); }
  .hero-content p { font-size: clamp(1rem, 4.8vw, 1.16rem); }
  section { padding: 40px 14px; }
  .gallery-grid { gap: 0.5rem; }
  .countdown-wrap { padding: 1.1rem; margin: -30px 12px 0; }
  .countdown-grid { gap: 0.4rem; }
  .countdown-cell span { font-size: 1.3rem; }
  .photo-card { max-width: 100%; min-height: 340px; }
  .photo-card .card-img { height: auto; aspect-ratio: 4 / 3; }
  .event-card-media { min-height: 180px; }
  .scroll-ring { width: 130px; height: 120px; bottom: 8px; }
  .scroll-ring svg { width: 100%; max-width: 100%; }
  .scroll-ring text { font-size: clamp(10px, 3.2vw, 12px); }
  .lightbox img { max-width: 98vw; max-height: 80vh; }
  .lightbox-prev { left: 0.4rem; }
  .lightbox-next { right: 0.4rem; }
  .lightbox-thumbs { display: none; }
}

/* Very small: 320px */
@media (max-width: 360px) {
  .logo { font-size: 17px; }
.hero-content { padding-top: 19vh; }
  .hero-content h1 { font-size: clamp(1.95rem, 11.2vw, 2.35rem); }
  .hero-content .amp { font-size: clamp(1rem, 5.8vw, 1.26rem); }
  .hero-content p { font-size: clamp(0.98rem, 5.2vw, 1.1rem); }
  section { padding: 36px 12px; }
  section h2 { font-size: clamp(2rem, 10vw, 2.5rem); }
  .countdown-grid { grid-template-columns: repeat(2, 1fr); max-width: 220px; }
  .photo-cards { gap: 1rem; }
  .nav.open { width: calc(100vw - 24px); right: 12px; }
}

/* ===== Entourage Photo Book (photo 1..5 = pages 1..5) ===== */
#entourage-photos {
  scroll-margin-top: 80px;
}

.book-viewer {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
}

/* ---- Book Container ---- */
.book {
  position: relative;
  width: 100%;
  max-width: 620px;
  margin: 0 auto 1rem;
  /* Responsive height: min between aspect-ratio and viewport-aware clamp */
  height: clamp(420px, 72vh, 780px);
  perspective: 1800px;
  -webkit-perspective: 1800px;
  border-radius: 4px;
  background: #f5f0ea;
  overflow: visible;
  touch-action: pan-y;
  isolation: isolate;
}

@supports (aspect-ratio: 1) {
  .book {
    aspect-ratio: 16 / 20;
    height: auto;
  }
}

/* ---- Photo Pages (each photo is a single page/leaf) ---- */
.photo-page {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transform-origin: left center;
  -webkit-transform-origin: left center;
  transition: transform 1250ms cubic-bezier(0.16, 0.72, 0.28, 1), box-shadow 1250ms cubic-bezier(0.16, 0.72, 0.28, 1);
  border-radius: 4px;
  visibility: hidden;
  /* Faces handle their own visibility so both directions show the full turn. */
  backface-visibility: visible;
  -webkit-backface-visibility: visible;
  will-change: auto;
  overflow: hidden;
}

.photo-page.visible {
  visibility: visible;
}

.photo-page.above {
  box-shadow: 8px 3px 22px rgba(48, 38, 30, 0.16);
}

.photo-page.flipped {
  transform: rotateY(-180deg);
  box-shadow: -8px 3px 22px rgba(48, 38, 30, 0.13);
}

.photo-page.turning {
  z-index: 20 !important;
  will-change: transform;
}

.page-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 4px;
  overflow: hidden;
  background: #fffefb;
}

.page-front {
  z-index: 2;
  cursor: zoom-in;
}

.page-front {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f0ea;
}

.page-front img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #f5f0ea;
}

.page-back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, #f5f0ea, #efe8e0);
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-back-num {
  font-family: 'Playfair Display', serif;
  font-size: 3.2rem;
  font-weight: 600;
  color: var(--primary);
  opacity: 0.4;
}

/* subtle page shading near the spine */
.page-front::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent 18%, transparent 72%, rgba(30, 24, 18, 0.11));
  pointer-events: none;
}

.page-back::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(270deg, rgba(255, 255, 255, 0.2), transparent 24%, transparent 72%, rgba(30, 24, 18, 0.12));
  pointer-events: none;
}

/* ---- Decorative Book Elements ---- */
.book-edge {
  position: absolute;
  left: 0;
  right: 0;
  height: 10px;
  pointer-events: none;
  z-index: 30;
}

.book-edge-top {
  top: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), transparent);
  border-radius: 4px 4px 0 0;
}

.book-edge-bottom {
  bottom: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.06), transparent);
  border-radius: 0 0 4px 4px;
}

.book-right-edge {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 8px;
  pointer-events: none;
  z-index: 30;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.04));
  border-radius: 0 4px 4px 0;
}

/* ---- Zoom hint ---- */
.book-zoom-hint {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 1.2rem auto 0;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: rgba(154, 182, 157, 0.12);
  border: 1px solid rgba(154, 182, 157, 0.28);
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  width: fit-content;
  max-width: calc(100vw - 2rem);
  cursor: default;
  user-select: none;
  white-space: normal;
  text-align: center;
  justify-content: center;
}

.book-zoom-hint svg {
  flex: 0 0 auto;
  animation: zoom-hint-pulse 1.6s ease-in-out infinite;
}

.book-zoom-hint span {
  min-width: 0;
}

@keyframes zoom-hint-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

/* ---- Controls ---- */
.book-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.book-nav {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(154, 182, 157, 0.3);
  background: var(--surface);
  color: var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(45, 61, 50, 0.06);
}

.book-nav:hover {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 8px 24px rgba(39, 61, 48, 0.22);
  transform: translateY(-2px);
}

.book-nav:active {
  transform: translateY(0);
}

.book-nav:disabled {
  opacity: 0.3;
  cursor: default;
  transform: none !important;
  box-shadow: none !important;
}

.book-page-info {
  display: flex;
  align-items: center;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.05em;
  user-select: none;
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
  .book {
    max-width: 460px;
  }
  .book-nav {
    width: 42px;
    height: 42px;
  }
  .book-controls {
    gap: 1.2rem;
  }
}

@media (max-width: 480px) {
  .book {
    max-width: 340px;
  }
  .book-nav {
    width: 38px;
    height: 38px;
  }
  .book-nav svg {
    width: 20px;
    height: 20px;
  }
  .book-controls {
    gap: 1rem;
  }
  .book-page-info {
    font-size: 0.9rem;
  }
  .book-zoom-hint {
    margin-top: 1rem;
    padding: 0.5rem 0.8rem;
    font-size: 0.72rem;
    line-height: 1.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .photo-card, .photo-card .card-img { transition: none; }
  .photo-card:hover { transform: none; }
  .photo-card:hover .card-img { transform: none; }
  .scroll-ring svg { animation: none; }
  .scroll-ring .move-down { animation: none; }
  .hero-content { transition: none; }
  .book-zoom-hint svg { animation: none; }
  .photo-page {
    transition: none !important;
  }
}
