/* =============================================
   WEDDING SITE — STYLES
   Theme: Jade Green + Cream + Gold
   Font: Ovo (Google Fonts)
   Layout: Full-viewport sections with scroll-snap
   ============================================= */

/* ================================
   1. CSS Custom Properties
   ================================ */
:root {
  /* Core Palette */
  --cream: #E7E3D8;
  --cream-dark: #D8D3C5;
  --jade: #4F6537;
  --jade-dark: #152520;
  --jade-light: #67834A;
  --jade-pale: rgba(79, 101, 55, 0.1);
  --wine: #572D2F;

  /* Typography */
  --text-primary: var(--jade-dark);
  --text-secondary: var(--jade);

  /* Layout & Utility */
  --radius-sm: 8px;
  --shadow-md: 0 4px 20px rgba(21, 37, 32, 0.08);
  --shadow-lg: 0 8px 40px rgba(21, 37, 32, 0.12);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Background art — replace with your artwork PNG */
  --bg-art: url('assets/wedding-art.png');
  --bg-art-resp: url('assets/wedding-art-resp.png');
}

/* ================================
   2. Reset & Base
   ================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  overscroll-behavior-y: none;
  font-size: 16px;
  scrollbar-color: rgba(87, 61, 56, 0.4) transparent;
  scrollbar-width: thin;
}

/* On mobile, use proximity snap instead of mandatory — this gives a gentle
   catch-all without aggressively fighting the JS snap controller */
@media (max-width: 768px) {
  html {
    scroll-snap-type: y proximity;
  }
}

body {
  font-family: 'Ovo', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-primary);
  background-color: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Page loading gate: hide content until background art is loaded */
body.is-loading {
  opacity: 0;
}

body.is-loaded {
  opacity: 1;
  transition: opacity 0.6s ease;
}

::selection {
  background-color: var(--jade-pale);
  color: var(--jade);
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(87, 61, 56, 0.35);
  border-radius: 999px;
  transition: background var(--transition);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(87, 61, 56, 0.75);
}

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

a {
  color: var(--jade);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--jade-dark);
}

/* ================================
   3. Typography (Ovo throughout)
   ================================ */
h1,
h2,
h3,
h4 {
  font-family: 'Ovo', Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  color: var(--jade-dark);
  margin-bottom: 0.4em;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 400;
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  color: var(--text-primary);
}

p {
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

/* ================================
   4. Layout — Full-viewport sections
   ================================ */
.section {
  height: 100vh;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  overflow: hidden;
  /* Background art support — sections are layered on top */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.section--cream,
.section--white,
.section--jade-pale {
  background-color: #E7E3D8;
  position: relative;
  z-index: 2;
}

.section--cream h2 {
  color: #152520;
}

.section--cream .section-header p,
#the-wedding .section-header p {
  color: var(--jade);
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.55;
}

@media (min-width: 769px) {
  #the-wedding .section-header p {
    white-space: nowrap;
    max-width: none;
  }

  .wedding-subtitle-br {
    display: none;
  }
}


.section--dark {
  background-color: #152520;
  color: #E7E3D8;
  position: relative;
  z-index: 2;
}

#thank-you.section--dark {
  background-color: transparent;
  z-index: 1;
}

.section--dark h2 {
  color: #E7E3D8;
}

.section--dark p {
  color: #E7E3D8;
  opacity: 0.9;
}

/* Moss background */
.section--moss {
  background-color: #4F6537;
  color: #E7E3D8;
  position: relative;
  z-index: 2;
}

.section--moss h2,
.section--moss h3 {
  color: #E7E3D8;
}

.section--moss p {
  color: #E7E3D8;
}

.section--moss .section-header p {
  color: rgba(231, 227, 216, 0.8);
}


/* Wedding details on moss bg */
.section--moss .wedding-detail-icon svg {
  stroke: #E7E3D8;
}



.section--moss .wedding-detail-info h3 {
  color: rgba(231, 227, 216, 0.85);
}

.section--moss .wedding-detail-info p {
  color: #E7E3D8;
}

/* Forest background */
.section--forest {
  background-color: #152520;
  color: #E7E3D8;
  position: relative;
  z-index: 2;
}

.section--forest h2 {
  color: #E7E3D8;
}

.section--forest h3 {
  color: #E7E3D8;
}

.section--forest p {
  color: #E7E3D8;
}

.section--forest .section-header p {
  color: rgba(231, 227, 216, 0.8);
}


/* Wine background */
.section--wine {
  background-color: var(--wine);
  color: #E7E3D8;
  position: relative;
  z-index: 2;
}

.section--wine h2,
.section--wine h3 {
  color: #E7E3D8;
}

.section--wine p {
  color: #E7E3D8;
}

.section--wine .section-header p {
  color: rgba(231, 227, 216, 0.85);
}


/* Image-backed sections */
.section--bg-art {
  position: relative;
  overflow: hidden;
}

/* ================================
   Global Animated Background Canvas
   ("Moving into sections with bg eases into position")
   ================================ */
.global-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.global-bg-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: calc(100vw / 0.7467);
  /* Matches 896/1200 aspect ratio: full image height */
  min-height: 100vh;
  background-image: var(--bg-art);
  background-size: 100% 100%;
  background-position: center top;
  background-repeat: no-repeat;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  transform-origin: center center;
}

@media (max-width: 768px) {
  .global-bg-inner {
    background-image: var(--bg-art-resp);
  }
}

/* ================================
   6A. Back To Top Control
   ================================ */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1000;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--jade);
  background: var(--cream);
  border: 1px solid rgba(21, 37, 32, 0.2);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition), background-color var(--transition);
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  color: var(--cream);
  background: var(--jade);
  transform: translateY(-3px);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.section-header {
  text-align: center;
  margin-bottom: 36px;
  flex-shrink: 0;
}

.section-header h2 {
  margin-bottom: 8px;
}

.section-header p {
  font-size: 1rem;
  color: var(--text-secondary);
  font-style: normal;
  margin-top: 4px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* ================================
   5. Dividers & Spacing
   ================================ */
.ornament {
  display: none !important;
}

body.hide-story #our-story,
body.hide-story .portal-nav a[href="#our-story"] {
  display: none !important;
}

/* ================================
   6. Hero Section
   ================================ */
.hero {
  background-color: transparent;
  text-align: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background-image:
    radial-gradient(circle at 25% 25%, rgba(79, 101, 55, 0.02) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(87, 61, 56, 0.02) 0%, transparent 50%);
  animation: heroFloat 20s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes heroFloat {

  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }

  33% {
    transform: translate(2%, -1%) rotate(0.5deg);
  }

  66% {
    transform: translate(-1%, 1%) rotate(-0.5deg);
  }
}

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

.hero-subtitle {
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  font-style: normal;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.hero-names {
  font-size: clamp(3rem, 10vw, 5.5rem);
  color: var(--jade-dark);
  line-height: 1.1;
  margin-bottom: 4px;
}

.hero-names .name {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-names .ampersand {
  display: block;
  font-style: normal;
  font-size: 0.5em;
  color: var(--wine);
  margin: 2px 0;
}

.hero-date {
  font-size: clamp(1.05rem, 1.35vw, 1.25rem);
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  margin-top: 14px;
}

/* Countdown */
.countdown {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.countdown-item {
  padding: 16px 14px;
  min-width: 80px;
  text-align: center;
}

.countdown-number {
  display: block;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 400;
  color: var(--jade);
  /* Moss Green #4F6537 */
  line-height: 1;
}

.countdown-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--wine);
  margin-top: 6px;
}

/* ================================
   6B. Navigation Portal Section
   ================================ */
.portal-section {
  background-color: transparent;
  text-align: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.portal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 600px;
  width: 100%;
  position: relative;
  z-index: 2;
}

.portal-names {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--jade-dark);
  margin-bottom: 4px;
  font-weight: 400;
  white-space: nowrap;
}

.portal-names .name {
  display: inline;
}

.portal-ampersand {
  font-size: 1.1em;
  color: var(--wine);
  font-weight: 400;
  font-style: normal;
}

.portal-date {
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--jade);
  margin-bottom: 14px;
  font-style: normal;
  white-space: nowrap;
}

#portalDateYear::before {
  content: ' ';
}

.portal-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: clamp(28px, 3.8vh, 36px);
  width: 100%;
}

.portal-link {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  font-size: clamp(1.25rem, 1.8vw, 1.68rem);
  color: var(--jade-dark);
  text-decoration: none;
  letter-spacing: 0.07em;
  padding: 5px 14px;
  position: relative;
  transition: all var(--transition);
}

.portal-link-num {
  font-size: 0.80rem;
  letter-spacing: 0.15em;
  color: var(--jade);
  opacity: 0.8;
}

.portal-link-title {
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.95em;
}

.portal-link-title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background-color: var(--jade);
  transition: width var(--transition);
}

.portal-link:hover {
  color: var(--jade);
  letter-spacing: 0.1em;
}

.portal-link:hover .portal-link-title::after {
  width: 100%;
}

.portal-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: var(--wine);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0;
  line-height: 1;
  align-self: center;
  transform: translateY(-1px);
}

.portal-live-badge::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--wine);
  box-shadow: 0 0 5px rgba(87, 61, 56, 0.45);
  animation: liveDotPulse 1.4s ease-in-out infinite;
}

@keyframes liveDotPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 6px rgba(87, 61, 56, 0.55);
  }

  50% {
    opacity: 0.38;
    transform: scale(0.82);
    box-shadow: 0 0 2px rgba(87, 61, 56, 0.15);
  }
}

button.portal-link,
.portal-link-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-align: left;
}

@media (min-width: 769px) {
  .portal-content {
    position: relative;
    top: clamp(-60px, -7vh, -36px);
    max-width: 680px;
  }

  .portal-names {
    font-size: clamp(2.02rem, 3.4vw, 3.14rem);
    gap: 15px;
    margin-bottom: 5px;
  }

  .portal-date {
    font-size: clamp(1.50rem, 1.6vw, 1.95rem);
    margin-bottom: 15px;
  }

  .portal-nav {
    gap: clamp(11px, 1.3vh, 16px);
    margin-top: clamp(26px, 3.5vh, 34px);
  }

  .portal-link {
    font-size: clamp(1.47rem, 1.9vw, 1.97rem);
    gap: 15px;
    padding: 5px 15px;
  }

  .portal-link-num {
    font-size: 0.94rem;
  }

  .portal-live-badge {
    font-size: 0.96rem;
  }
}

/* ================================
   7. Our Story — Right-aligned on bg art
   ================================ */
#our-story {
  position: relative;
  overflow: hidden;
  background-color: transparent;
  z-index: 1;
}

#our-story .section-header,
#our-story .story-layout {
  position: relative;
  z-index: 2;
}

.story-layout {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  max-width: 1100px;
  flex: 1;
  min-height: 0;
}

.story-text-area {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 48px;
  position: relative;
  width: 50%;
  max-width: 550px;
}

.story-slider {
  display: grid !important;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  width: 100%;
  position: relative;
}

.story-slide {
  grid-column: 1 / -1 !important;
  grid-row: 1 / -1 !important;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
}

.story-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

#our-story .section-header {
  max-width: 1100px;
  width: 100%;
  text-align: right;
  padding-right: 48px;
  margin-top: clamp(64px, 12vh, 120px);
  margin-bottom: 16px;
}

#our-story .section-header h2 {
  color: var(--cream);
}

.story-slide h3 {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: var(--cream);
  font-style: normal;
  margin-bottom: 16px;
}

.story-slide p {
  font-size: 1.05rem;
  color: #F4F1EA;
  line-height: 1.75;
  margin: 0;
  max-width: none;
  text-align: left;
}

/* Story dots */
.story-dots {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.story-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--jade);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
}

.story-dot:hover {
  background: rgba(79, 101, 55, 0.35);
  border-color: var(--jade);
}

.story-dot.active {
  background: var(--jade);
  border-color: var(--jade);
  transform: scale(1.3);
}

/* ================================
   8. The Wedding
   ================================ */
.wedding-layout {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  box-sizing: border-box;
}

.wedding-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.wedding-detail-card {
  padding: 0;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  border: none !important;
  border-bottom: none !important;
}

.wedding-detail-card:first-child,
.wedding-detail-card:last-child {
  border: none !important;
  border-bottom: none !important;
}

.wedding-detail-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.wedding-detail-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--jade);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wedding-detail-info {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
}

.wedding-detail-info h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  margin-bottom: 5px;
  font-weight: 400;
}

.wedding-detail-info p {
  font-size: 1.05rem;
  color: var(--text-primary);
  margin: 0;
  text-align: left;
  line-height: 1.45;
}

.wedding-detail-primary,
#the-wedding .wedding-detail-primary {
  display: inline-block;
  font-size: 1.15rem;
  color: var(--wine);
  margin-bottom: 0;
  font-weight: 400;
}

.venue-location-link {
  display: inline-block;
  margin-top: 5px;
  line-height: inherit;
  font-size: 1.05rem;
  font-family: inherit;
  color: var(--jade);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: color var(--transition), text-decoration-color var(--transition);
}

.venue-location-link:hover {
  color: var(--jade-dark);
  text-decoration-color: var(--jade-dark);
}

.section--moss .venue-location-link {
  color: #E7E3D8;
  text-decoration-color: rgba(231, 227, 216, 0.6);
}

.section--moss .venue-location-link:hover {
  color: #FFFFFF;
  text-decoration-color: #FFFFFF;
}

/* Wedding Scripture Verse */
.wedding-verse {
  margin-top: 36px;
  text-align: center;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  padding-top: 30px;
}

.wedding-verse::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1rem;
  height: 1rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234F6537'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") no-repeat center / contain;
}

.wedding-verse blockquote {
  font-family: 'Ovo', Georgia, serif;
  font-style: normal;
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--jade-dark);
  margin: 0 0 3px 0;
  letter-spacing: 0.01em;
}

.wedding-verse cite {
  display: inline-block;
  font-family: 'Ovo', Georgia, serif;
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--jade);
  font-weight: 400;
  opacity: 0.85;
}

/* Livestream Default */
.livestream-container {
  display: none;
}

/* ================================
   8B. The Wedding - Livestream Active Layout
   ================================ */
#the-wedding.has-livestream .wedding-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: center;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

#the-wedding.has-livestream .wedding-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#the-wedding.has-livestream .wedding-detail-card:first-child {
  border-bottom: none !important;
  padding-bottom: 0;
}

#the-wedding.has-livestream #weddingVerse {
  display: none !important;
}

#the-wedding.has-livestream .livestream-container {
  display: block;
  margin-top: 0;
  text-align: left;
  width: 100%;
}

.livestream-card {
  width: 100%;
}

.livestream-title {
  font-size: 1.15rem;
  color: var(--wine);
  margin-bottom: 2px;
  line-height: 1.3;
  font-weight: 400;
  font-style: normal;
}

.livestream-desc {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-style: normal;
  font-size: 0.92rem;
  line-height: 1.45;
}

.livestream-embed {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: 100%;
  background: #152520;
  box-shadow: 0 4px 20px rgba(21, 37, 32, 0.12);
}

.livestream-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ================================
   9. RSVP Form
   ================================ */
.rsvp-form {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.form-group {
  margin-bottom: 24px;
  position: relative;
}

.form-group label {
  display: block;
  font-size: 0.90rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="tel"],
.form-group textarea {
  width: 100%;
  padding: 6px 0 8px 0;
  font-family: 'Ovo', Georgia, serif;
  font-size: 1.10rem;
  color: var(--text-primary);
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--cream-dark);
  outline: none;
  transition: border-color var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  font-size: 1.05rem;
  color: var(--cream-dark);
  opacity: 0.75;
}

.form-group input:focus,
.form-group textarea:focus {
  border-bottom-color: var(--jade);
}

.form-group textarea {
  resize: none;
  min-height: 60px;
  line-height: 1.6;
}

/* Radio pill buttons */
.radio-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 36px;
  margin-top: 6px;
}

.radio-pill {
  flex: 0 0 auto;
}

.radio-pill input {
  display: none;
}

.radio-pill label {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 25px;
  text-align: left;
  padding: 8px 12px;
  min-height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: 'Ovo', Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.35;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(231, 227, 216, 0.55);
  transition: all var(--transition);
  margin: 0;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.radio-pill label .radio-text-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  line-height: 1.32;
  gap: 0;
  min-width: 0;
  max-width: 100%;
}

.radio-pill label .radio-adverb {
  white-space: nowrap;
  display: block;
}

.radio-pill label .radio-action-bold {
  letter-spacing: 0.04em;
  font-weight: 700;
  display: block;
}

.radio-pill label::before {
  content: '';
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid rgba(231, 227, 216, 0.4);
  background: transparent;
  flex-shrink: 0;
  transition: all var(--transition);
}

.radio-pill label:hover {
  color: rgba(231, 227, 216, 0.85);
}

.radio-pill label:hover::before {
  border-color: #E7E3D8;
}

.radio-pill input:checked+label {
  border: none !important;
  color: #E7E3D8 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

.radio-pill input:checked+label::before {
  background: #E7E3D8;
  border-color: #E7E3D8;
  box-shadow: 0 0 6px rgba(231, 227, 216, 0.6);
}

.radio-pill input:checked+label span {
  color: #E7E3D8 !important;
}

.radio-action-bold {
  font-weight: 700;
  letter-spacing: 0.08em;
  display: inline-block;
  margin-top: 2px;
}

/* Guest count (conditional) */
.form-group--guests {
  max-height: 0;
  overflow: hidden;
  margin-bottom: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
}

.form-group--guests.visible {
  max-height: 120px;
  opacity: 1;
  margin-bottom: 20px;
}

/* Guest count plus/minus stepper */
.guest-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 8px;
  padding: 4px 0 8px;
  border: none;
}

.guest-stepper input[type="number"] {
  width: 50px;
  text-align: center;
  font-family: 'Ovo', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--text-primary);
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  outline: none;
  padding: 0;
  margin: 0;
  -moz-appearance: textfield;
  appearance: textfield;
}

.guest-stepper input[type="number"]::-webkit-outer-spin-button,
.guest-stepper input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.stepper-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--jade);
  background: transparent;
  color: var(--jade);
  font-family: 'Ovo', Georgia, serif;
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
  padding: 0;
}

.stepper-btn:hover:not(:disabled) {
  background: var(--jade);
  color: var(--cream);
}

.stepper-btn:active:not(:disabled) {
  transform: scale(0.92);
}

.stepper-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  border-color: var(--cream-dark);
  color: var(--cream-dark);
}

/* Submit button (Forest Green on Moss bg) */
.btn-submit {
  display: block;
  width: 100%;
  padding: 14px 28px;
  font-family: 'Ovo', Georgia, serif;
  font-size: 1.05rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #E7E3D8;
  background-color: #152520;
  /* Forest Green */
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-submit:hover {
  background-color: #1E352D;
  color: #FFFFFF;
  transform: translateY(-2px);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(calc(100% + 40px));
  opacity: 0;
  visibility: hidden;
  background: var(--jade-dark);
  color: var(--cream);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: 'Ovo', Georgia, serif;
  font-size: 0.95rem;
  line-height: 1.35;
  box-shadow: var(--shadow-lg);
  z-index: 3000;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, visibility 0.4s;
  text-align: center;
  max-width: 90%;
  pointer-events: none;
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

.toast.error {
  background: var(--wine);
}

/* ================================
   10. Registry
   ================================ */
#registry .section-header {
  margin-bottom: clamp(20px, 3vh, 26px);
}

#registry.section--forest h2,
#registry .section-header h2 {
  color: var(--cream);
  /* Cream #E7E3D8 */
  margin-bottom: 8px;
}

#registry.section--forest .section-header p,
#registry .section-header p,
#registryHeadlineDisplay {
  color: var(--jade);
  /* Moss Green */
  font-size: 1.05rem;
  line-height: 1.52;
  text-align: center;
  margin: 0 auto;
}

.registry-message {
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
}

.registry-message p,
.section--forest .registry-message p,
#registryMessageDisplay {
  font-weight: 400;
  font-size: 1.02rem;
  line-height: 1.62;
  color: rgba(231, 227, 216, 0.82);
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0 auto;
}

@media (min-width: 769px) {
  #registryMessageDisplay,
  .registry-message p {
    font-size: 1.1rem;
  }
}

/* Registry button (Moss Green on Forest bg) */
.btn-registry,
.section--forest .btn-registry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 0;
  padding: 12px 26px;
  font-family: 'Ovo', Georgia, serif;
  font-size: 1.00rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #E7E3D8;
  background-color: var(--jade);
  /* Moss Green */
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-registry:hover,
.section--forest .btn-registry:hover {
  background-color: #5D7741;
  color: #FFFFFF;
  transform: translateY(-2px);
}

/* Registry "Details" Expander Button */
.registry-expander-wrap {
  text-align: center;
  margin-top: 18px;
}

.btn-registry-expander {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.btn-registry-expander .expander-chevron {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  vertical-align: middle;
}

.btn-registry-expander[aria-expanded="true"] .expander-chevron {
  transform: rotate(180deg);
}

/* Registry Card Box (Revealed when Details expander clicked) */
.registry-card-box[hidden] {
  display: none !important;
}

.registry-card-box {
  width: 100%;
  max-width: 440px;
  margin: 14px auto 0 auto;
  padding: 16px 20px 14px 20px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(231, 227, 216, 0.12);
  border-radius: 6px;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: registryBoxFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes registryBoxFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.registry-card-prompt {
  font-size: 0.94rem;
  font-family: 'Ovo', Georgia, serif;
  color: #E7E3D8;
  letter-spacing: 0.03em;
  margin: 0 0 10px 0;
  font-style: normal;
}

/* Registry direct contact text ("or please contact us directly") */
.registry-direct-contact {
  margin-top: 8px;
  margin-bottom: 0;
  font-size: 0.84rem;
  font-style: italic;
  color: rgba(231, 227, 216, 0.65);
  letter-spacing: 0.02em;
}

/* Registry Email Request Form */
.registry-email-form {
  margin-top: 0;
  width: 100%;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.registry-form-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.registry-input-group {
  width: 100%;
}

.registry-input {
  width: 100%;
  padding: 6px 0 8px 0;
  font-family: 'Ovo', Georgia, serif;
  font-size: 1.05rem;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid rgba(231, 227, 216, 0.35);
  border-radius: 0;
  color: #E7E3D8;
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
  text-align: left;
  transition: border-bottom-color var(--transition);
}

.registry-input::placeholder {
  color: rgba(231, 227, 216, 0.5);
  font-family: 'Ovo', Georgia, serif;
  font-size: 0.95rem;
}

.registry-input:focus,
.registry-input:focus-visible,
#registryGuestEmail:focus,
#registryGuestEmail:focus-visible,
#registryGuestName:focus,
#registryGuestName:focus-visible {
  outline: none !important;
  outline-width: 0 !important;
  outline-style: none !important;
  outline-color: transparent !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  border-bottom-color: #E7E3D8;
  background: transparent;
}

.btn-registry-submit {
  margin-top: 12px;
  width: 100%;
  padding: 12px 20px;
  font-size: 1.00rem;
}

.btn-registry-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s ease;
}

.btn-registry-submit:hover .btn-registry-icon {
  transform: translateX(3px) translateY(-3px);
}

.registry-form-status {
  font-size: 0.95rem;
  line-height: 1.6;
  transition: opacity 0.3s ease;
}

.registry-form-status:empty {
  display: none;
  margin: 0;
  min-height: 0;
}

.registry-form-status:not(:empty) {
  margin-top: 10px;
  min-height: 1.4em;
}

.registry-form-status.is-success {
  color: #A3C986;
}

.registry-form-status.is-error {
  color: #E58C84;
}

/* ================================
   10B. Section Popups (The Wedding, RSVP, Registry)
   Form factor: Popup overlays
   Look: 100% identical to original sections
   ================================ */
.section-popup {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  height: var(--visual-viewport-h, 100dvh);
  background: rgba(21, 37, 32, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  overflow-y: auto;
}

.section-popup.has-keyboard-open {
  align-items: flex-start;
  padding-top: 12px;
  padding-bottom: 12px;
}

.section-popup:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.section-popup-card {
  position: relative;
  width: 100%;
  max-width: 860px;
  max-height: 92vh;
  max-height: calc(var(--visual-viewport-h, 92vh) - 36px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scroll-padding-bottom: 28px;
  scroll-behavior: smooth;
  border-radius: 4px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  margin: auto;
  scroll-snap-align: none;
  scroll-snap-stop: normal;
}

.section-popup.has-keyboard-open .section-popup-card {
  max-height: calc(var(--visual-viewport-h, 100dvh) - 24px);
  margin-top: auto;
  margin-bottom: auto;
}

.section-popup-card .section-header {
  width: 100%;
}

.section-popup-card .container {
  width: 100%;
}

.section-popup-card::-webkit-scrollbar {
  width: 6px;
}

.section-popup-card::-webkit-scrollbar-track {
  background: transparent;
}

.section-popup-card::-webkit-scrollbar-thumb {
  background: rgba(231, 227, 216, 0.22);
  border-radius: 3px;
}

.section-popup-card::-webkit-scrollbar-thumb:hover {
  background: rgba(231, 227, 216, 0.4);
}

.section-popup-card {
  scrollbar-width: thin;
  scrollbar-color: rgba(231, 227, 216, 0.22) transparent;
}

.section-popup:not([hidden]) .section-popup-card {
  transform: translateY(0) scale(1);
}

.section-popup-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 38px;
  height: 38px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #152520;
  opacity: 0.65;
  transition: all var(--transition);
  z-index: 25;
}

.section-popup-close:hover {
  background: transparent;
  opacity: 1;
  transform: scale(1.12);
}

.section-popup-close--light {
  color: #E7E3D8;
  background: transparent;
}

.section-popup-close--light:hover {
  background: transparent;
  opacity: 1;
  transform: scale(1.12);
}

/* ================================
   11. Thank You / Footer
   ================================ */
.thankyou-content {
  text-align: right;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding-right: 48px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.thankyou-content h2,
.thankyou-content p {
  max-width: 550px;
  width: 100%;
}

.thankyou-content h2 {
  color: #152520;
  /* Forest Green */
  margin: 0 0 16px 0;
  text-align: right;
}

.section--dark .thankyou-content p,
.thankyou-content p {
  color: #152520;
  /* Forest Green */
  font-size: 1.05rem;
  line-height: 1.75;
  opacity: 1;
  margin: 0 0 16px 0;
  text-align: right;
}

.thankyou-signoff {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  margin: 0 0 16px 0;
}

#thankYouClosing {
  font-size: 1.05rem;
  line-height: 1.25;
  color: var(--jade);
  text-transform: none;
}

.section--dark .thankyou-names,
.thankyou-names {
  font-size: 1.25em;
  color: #152520;
  font-weight: 400;
  /* Forest Green */
  letter-spacing: normal;
  line-height: 1.25;
  display: inline-block;
  margin-top: 0;
  text-align: right;
  text-transform: none;
}

.thankyou-mobile-break {
  display: none;
}

/* ================================
   Thank You Slider & Pagination
   Single-cell CSS Grid: All slides share the same grid cell
   so the slider height automatically locks to the MAX of the
   slides across all screens, keeping pointers & signoff stationary.
   ================================ */
.thankyou-slider {
  position: relative;
  width: 100%;
  display: grid !important;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  align-items: flex-start;
  justify-items: center;
  min-height: 110px;
}

.thankyou-slide {
  grid-column: 1 / -1 !important;
  grid-row: 1 / -1 !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
}

.thankyou-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.thankyou-slide-text {
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* Pagination: Arrows + Dots */
.thankyou-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  position: relative;
  z-index: 2;
  user-select: none;
  margin: 18px auto 16px auto;
}

.thankyou-dots {
  display: flex;
  align-items: center;
  gap: 10px;
}

.thankyou-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--wine);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
}

.thankyou-dot:hover {
  background: rgba(87, 61, 56, 0.3);
  border-color: var(--wine);
}

.thankyou-dot.active {
  background: var(--wine);
  border-color: var(--wine);
  transform: scale(1.3);
}

/* Pagination Navigation Arrows */
.thankyou-arrow {
  background: transparent;
  border: none;
  color: var(--wine);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition);
  opacity: 0.7;
  line-height: 1;
}

.thankyou-arrow:hover {
  opacity: 1;
  transform: scale(1.15);
  background: rgba(87, 61, 56, 0.08);
}

.thankyou-arrow:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 2px;
}

.thankyou-arrow svg {
  display: block;
}

/* ================================
   12. Scroll Animations
   ================================ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger children */
.stagger>*:nth-child(1) {
  transition-delay: 0s;
}

.stagger>*:nth-child(2) {
  transition-delay: 0.1s;
}

.stagger>*:nth-child(3) {
  transition-delay: 0.15s;
}

.stagger>*:nth-child(4) {
  transition-delay: 0.2s;
}

/* Subtle section-to-section transition choreography */
.section>* {
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.section:not(.is-active)>* {
  opacity: 0.45;
  transform: translateY(14px);
}

.section.is-active>* {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .section>* {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* ================================
   Focus Visible — Keyboard accessibility
   ================================ */
:focus-visible {
  outline: 2px solid var(--jade);
  outline-offset: 3px;
  border-radius: 2px;
}

.section--moss :focus-visible,
.section--forest :focus-visible {
  outline-color: #E7E3D8;
}

.portal-link:focus-visible .portal-link-title::after {
  width: 100%;
}

.story-dot:focus-visible {
  outline-offset: 4px;
}

.section-popup-close:focus-visible {
  outline-offset: 2px;
  border-radius: 4px;
}

/* ================================
   13. RSVP on Forest / Moss overrides
   ================================ */
#rsvp.section--moss .section-header h2 {
  color: #E7E3D8;
}

#rsvp.section--moss .section-header p,
#rsvpDeadlineDisplay {
  color: #152520;
  /* Forest Green */
  font-weight: 400;
}

.section--moss .rsvp-form label,
.section--moss .form-group label,
.section--forest .rsvp-form label,
.section--forest .form-group label {
  color: rgba(231, 227, 216, 0.85);
}

.section--forest .form-group input[type="text"],
.section--forest .form-group input[type="number"],
.section--forest .form-group input[type="tel"],
.section--forest .form-group textarea,
.section--moss .form-group input[type="text"],
.section--moss .form-group input[type="number"],
.section--moss .form-group input[type="tel"],
.section--moss .form-group textarea {
  color: #E7E3D8;
  border-bottom-color: rgba(231, 227, 216, 0.35);
}

.section--forest .form-group input:focus,
.section--forest .form-group textarea:focus,
.section--moss .form-group input:focus,
.section--moss .form-group textarea:focus {
  border-bottom-color: #E7E3D8;
}

.section--forest .form-group input::placeholder,
.section--forest .form-group textarea::placeholder,
.section--moss .form-group input::placeholder,
.section--moss .form-group textarea::placeholder {
  color: rgba(231, 227, 216, 0.45);
}

.section--forest .radio-pill label,
.section--moss .radio-pill label {
  border: none;
  background: transparent;
  color: rgba(231, 227, 216, 0.5);
}

.section--forest .radio-pill label:hover,
.section--moss .radio-pill label:hover {
  border: none;
  background: transparent;
  color: #E7E3D8;
}

.section--moss .radio-pill input:checked+label,
.section--forest .radio-pill input:checked+label {
  background: transparent !important;
  color: #E7E3D8 !important;
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
}

.section--moss .radio-pill input:checked+label span,
.section--forest .radio-pill input:checked+label span {
  color: #E7E3D8 !important;
}

.section--forest .guest-stepper,
.section--moss .guest-stepper {
  border: none;
}

.section--forest .guest-stepper input[type="number"],
.section--moss .guest-stepper input[type="number"] {
  color: #E7E3D8;
}

.section--forest .stepper-btn,
.section--moss .stepper-btn {
  border-color: rgba(231, 227, 216, 0.5);
  color: #E7E3D8;
}

.section--forest .stepper-btn:hover:not(:disabled) {
  background: #E7E3D8;
  color: #152520;
}

.section--moss .stepper-btn:hover:not(:disabled) {
  background: #E7E3D8;
  color: var(--jade);
}

.section--moss .btn-submit,
.section--moss .btn-registry {
  color: #E7E3D8;
  background-color: #152520;
  /* Forest Green on Moss bg */
  border: none;
}

.section--moss .btn-submit:hover,
.section--moss .btn-registry:hover {
  background-color: #1E352D;
  color: #FFFFFF;
  transform: translateY(-2px);
}

.section--forest .btn-submit,
.section--forest .btn-registry {
  color: #E7E3D8;
  background-color: var(--jade);
  /* Moss Green on Forest bg */
  border: none;
}

.section--forest .btn-submit:hover,
.section--forest .btn-registry:hover {
  background-color: #5D7741;
  color: #FFFFFF;
  transform: translateY(-2px);
}

/* ================================
   14. Thank You on bg art
   ================================ */
#thank-you {
  position: relative;
  overflow: hidden;
  background-color: transparent;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 24px;
}

#thank-you .thankyou-content {
  position: relative;
  z-index: 2;
}

/* Wide (Desktop): Thank You Card (Portrait orientation, matching The Wedding popup design, positioned right) */
@media (min-width: 769px) {
  #thank-you {
    justify-content: center;
    align-items: flex-end;
    padding: 40px clamp(40px, 7vw, 120px);
    position: relative;
  }

  /* No dark gradient overlay on desktop — artwork stays clear behind the card */
  #thank-you::before {
    display: none;
  }

  #thank-you .thankyou-card {
    --thankyou-card-bg-image: url('bg.png');
    --thankyou-card-bg-opacity: 0.88;
    --thankyou-card-img-opacity: 0.45;
    background-color: rgba(231, 227, 216, var(--thankyou-card-bg-opacity));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 4px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.25);
    padding: clamp(56px, 7.5vh, 72px) clamp(34px, 3.2vw, 44px);
    width: 100%;
    max-width: 440px;
    min-height: clamp(480px, 58vh, 520px);
    max-height: 84vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 2;
    margin-left: auto;
    margin-right: clamp(40px, 5vw, 90px);
  }

  #thank-you .thankyou-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--thankyou-card-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: var(--thankyou-card-img-opacity);
    border-radius: inherit;
    pointer-events: none;
    z-index: 1;
  }

  #thank-you .section-header {
    width: 100%;
    max-width: 280px;
    text-align: center;
    padding: 0;
    margin-top: 0;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0;
    border-bottom: none;
    position: relative;
    z-index: 2;
  }

  #thank-you .section-header::after {
    content: '';
    display: block;
    width: 1rem;
    height: 1rem;
    margin: clamp(18px, 2.5vh, 22px) auto;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23572D2F'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") no-repeat center / contain;
  }

  #thank-you .section-header h2,
  #thank-you h2 {
    color: var(--jade) !important;
    text-align: center !important;
    font-size: clamp(1.3rem, 1.8vw, 1.65rem) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.14em !important;
    font-weight: 400 !important;
    margin: 0 auto !important;
    line-height: 1.2 !important;
  }

  #thank-you .thankyou-layout {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100%;
    flex: none;
    min-height: 0;
    position: relative;
    z-index: 2;
    margin: 0 auto;
  }

  #thank-you .thankyou-text-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: none;
    padding: 0;
    position: relative;
    width: 100%;
    max-width: none;
    text-align: center;
  }

  .thankyou-msg-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
  }

  #thank-you .thankyou-slider {
    flex: none;
    display: grid !important;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    align-items: flex-start;
    justify-items: center;
    width: 100%;
    min-height: 0;
    margin: 0 auto;
  }

  #thank-you .thankyou-slide-text,
  #thank-you #thankYouMessage {
    font-size: 1.125rem;
    line-height: 1.70;
    color: #152520 !important;
    /* Forest Green */
    opacity: 0.95;
    margin: 0 auto !important;
    padding: 0 10px;
    text-align: center !important;
    max-width: 340px;
  }

  #thank-you .thankyou-pagination {
    margin: clamp(20px, 2.8vh, 26px) auto 0 auto;
  }

  #thank-you .thankyou-signoff {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center !important;
    margin: clamp(20px, 2.8vh, 26px) auto 0 auto;
    padding-top: 0;
    border-top: none;
    width: 100%;
    max-width: 280px;
    gap: 8px;
  }

  #thank-you #thankYouClosing {
    font-size: 1.05rem;
    line-height: 1.25;
    text-align: center !important;
    color: var(--jade) !important;
    /* Moss Green */
    font-style: normal !important;
    text-transform: none !important;
    /* Small letters */
    letter-spacing: normal;
  }

  #thank-you .thankyou-names {
    color: #152520 !important;
    /* Forest Green */
    text-align: center !important;
    display: inline-block;
    font-size: clamp(1.18rem, 1.35vw, 1.28rem) !important;
    letter-spacing: normal;
    line-height: 1.25;
    text-transform: none !important;
  }

  #thank-you .thankyou-mobile-break {
    display: none;
  }

  #thank-you .thankyou-ampersand {
    color: var(--wine);
    /* Wine */
    font-style: normal;
  }
}

/* ================================
   15. Responsive
   ================================ */
@media (max-width: 768px) {
  .back-to-top {
    right: 30px;
    bottom: 30px;
    width: 48px;
    height: 48px;
  }

  .back-to-top svg {
    width: 23px;
    height: 23px;
  }

  .section {
    padding: 32px 20px;
  }

  /* First three sections: positioned higher up with comfortable top breathing room */
  .hero {
    justify-content: flex-start;
    padding-top: clamp(68px, 14vh, 105px);
  }

  .hero-content {
    width: 100%;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }

  .portal-section {
    justify-content: flex-start;
    padding-top: clamp(64px, 13vh, 96px);
  }

  .section-header {
    margin-bottom: 24px;
  }

  .section-header p {
    font-size: 1.05rem;
  }

  .wedding-subtitle-br {
    display: inline;
  }

  #the-wedding .section-header p {
    max-width: 290px;
    white-space: normal;
  }

  .hero-names {
    font-size: clamp(2.4rem, 12vw, 3.5rem);
  }

  .hero-date,
  .portal-date {
    font-size: 1.15rem;
  }

  .portal-date {
    width: auto;
    margin-left: auto;
    margin-right: auto;
  }

  .portal-link {
    font-size: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0;
    column-gap: 12px;
  }

  .portal-link-title {
    font-size: 1em;
  }

  .portal-live-badge {
    flex-basis: 100%;
    width: 100%;
    justify-content: center;
    margin-top: 4px;
    line-height: 1;
    transform: none;
    font-size: 0.76rem;
    gap: 6px;
  }

  .portal-nav {
    gap: 10px;
    margin-top: clamp(16px, 3.5vh, 24px);
    transform: none;
  }

  body.hide-story .portal-nav {
    margin-top: clamp(28px, 6.5vh, 32px);
  }

  .countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(100%, 340px);
    gap: 4px;
    margin-left: auto;
    margin-right: auto;
    align-items: start;
  }

  .countdown-item {
    min-width: 0;
    padding: 12px 2px;
  }

  .countdown-item:nth-child(4) {
    display: block;
  }

  .countdown-number {
    color: var(--jade);
  }

  .countdown-label {
    color: var(--wine);
  }

  /* Mobile background canvas with generous bleed so pan never clips */
  .global-bg-inner {
    width: 210vw;
    left: -60vw;
    top: -25%;
    height: 150%;
    background-position: center center;
    background-size: cover;
    transform-origin: center center;
  }

  #our-story {
    justify-content: flex-start;
    padding-top: clamp(52px, 11vh, 82px);
  }

  #our-story .section-header {
    margin: 0 auto 28px;
    padding-right: 0;
    text-align: center;
  }

  #our-story .story-layout,
  #thank-you .thankyou-layout {
    margin-top: 0;
  }

  #our-story .section-header h2 {
    text-align: center;
    color: var(--jade);
  }



  .story-layout {
    justify-content: center;
    align-items: flex-start;
    flex: none;
    margin-top: 0;
  }

  .story-text-area {
    width: 100%;
    max-width: none;
    padding: 0 16px;
    justify-content: flex-start;
  }

  .story-slide h3 {
    margin-bottom: 0;
    font-size: 1.25rem;
    color: #152520;
    /* Forest Green */
  }

  .story-slide.active {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .story-slide p {
    font-size: 1.05rem;
    line-height: 1.52;
    color: #152520;
    padding-top: 14px;
  }

  .story-dots {
    margin-top: 16px;
  }

  /* Thank You: content padding adjustment */
  #thank-you {
    padding: 32px 20px;
  }

  /* Wedding popup mobile layout: harmonious vertical rhythm consistent with other popups */
  #the-wedding .section-header {
    margin-bottom: clamp(20px, 3.5vh, 28px);
  }

  #the-wedding .container {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  #the-wedding .wedding-layout {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  .section-popup-card .section-header p,
  .section-popup-card .wedding-detail-info p,
  .section-popup-card .wedding-verse blockquote,
  .section-popup-card .livestream-desc,
  .section-popup-card .registry-message p,
  .section-popup-card .bank-detail-value {
    font-size: 1rem;
  }

  .wedding-details {
    grid-template-columns: 1fr;
    gap: clamp(20px, 3.5vh, 26px);
  }

  .wedding-detail-card,
  .wedding-detail-card:first-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
  }

  #the-wedding.has-livestream .wedding-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .wedding-verse {
    margin-top: clamp(22px, 3.5vh, 28px);
    padding-top: 36px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .wedding-detail-info p,
  .section-popup-card .wedding-detail-info p,
  #weddingScheduleDisplay,
  #weddingVenueDisplay {
    font-size: 1.05rem;
    line-height: 1.40;
  }

  .wedding-verse blockquote,
  .section-popup-card .wedding-verse blockquote {
    font-size: 1rem;
    line-height: 1.52;
    margin: 0 0 3px 0;
  }

  /* RSVP: spaced out gracefully from the center */
  #rsvp {
    justify-content: center;
  }

  #rsvp .section-header {
    margin-bottom: 28px;
  }

  .rsvp-form {
    padding: 0;
    width: 100%;
  }

  .rsvp-form .form-group {
    margin-bottom: clamp(24px, 3.5vh, 32px);
  }

  .rsvp-form .btn-submit {
    margin-top: clamp(20px, 3.5vh, 28px);
    padding: clamp(14px, 2.2vh, 18px) 34px;
  }

  /* Registry on mobile: comfortable, elegant, harmonious proportions consistent with other popups */
  #registry,
  #registry.section-popup-card {
    justify-content: flex-start;
    max-height: calc(var(--visual-viewport-h, 100dvh) - 36px);
    scroll-padding-bottom: 28px;
  }

  #registry .section-header {
    margin-bottom: clamp(18px, 3vh, 24px);
  }

  #registry .section-header h2 {
    margin-bottom: 8px;
    font-size: 1.70rem;
  }

  #registry .section-header p,
  #registryHeadlineDisplay {
    color: var(--jade);
    /* Moss Green */
    font-size: 1.05rem;
    line-height: 1.52;
    text-align: center;
    margin: 0 auto;
  }

  #registry .registry-message {
    padding: 0 4px;
    max-width: 320px;
    margin: 0 auto;
  }

  #registryMessageDisplay {
    margin: 0 auto;
    line-height: 1.48;
    font-size: 1.00rem;
  }

  .registry-expander-wrap {
    margin-top: 18px;
    text-align: center;
  }

  .btn-registry {
    margin-top: 0;
    padding: 12px 26px;
    font-size: 1.00rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .registry-card-box {
    margin: 16px auto 0 auto;
    padding: 16px 18px 14px 18px;
    max-width: 100%;
  }

  .registry-card-prompt {
    font-size: 0.94rem;
    margin: 0 0 10px 0;
  }

  .registry-form-fields {
    gap: 14px;
  }

  .registry-input {
    padding: 4px 0 8px 0;
    font-size: 1.05rem;
    line-height: 1.4;
    color: #E7E3D8;
    background: transparent;
    border: none;
    border-bottom: 1.5px solid rgba(231, 227, 216, 0.35);
    border-radius: 0;
    outline: none;
    box-sizing: border-box;
    width: 100%;
    transition: border-bottom-color 0.2s ease;
  }

  .registry-input::placeholder {
    font-size: 1.00rem;
  }

  .btn-registry-submit {
    margin-top: 14px;
    margin-bottom: 0;
    padding: 13px 28px;
    font-size: 1.00rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .registry-direct-contact {
    margin-top: 10px;
    font-size: 0.84rem;
  }



  .thankyou-card {
    background: transparent;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
    width: 100%;
    max-width: 100%;
  }

  #thank-you .thankyou-card::before {
    display: none;
  }

  /* Thank You on mobile: centered header, left-aligned message & signature like Our Story */
  #thank-you {
    justify-content: flex-start;
    padding-top: clamp(56px, 12vh, 90px);
    padding-bottom: 36px;
    padding-left: clamp(36px, 10vw, 56px);
    padding-right: clamp(36px, 10vw, 56px);
  }

  #thank-you .section-header {
    text-align: center;
    padding: 0;
    margin: 0 auto;
    width: 100%;
    max-width: 280px;
    border-bottom: none;
    position: relative;
    z-index: 4;
  }

  #thank-you .section-header::after {
    content: '';
    display: block;
    width: 1rem;
    height: 1rem;
    margin: 14px auto 14px auto;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23572D2F'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") no-repeat center / contain;
    position: relative;
    z-index: 5;
  }

  #thank-you .section-header h2,
  #thank-you h2 {
    text-align: center;
    margin: 0 auto 0 auto;
    font-size: 1.70rem;
    color: var(--jade) !important;
    /* Moss Green in responsive */
  }

  .thankyou-layout {
    justify-content: center;
    width: 100%;
    max-width: 395px;
    margin: 0 auto;
    flex: none;
    display: flex;
  }

  .thankyou-text-area {
    width: 100%;
    max-width: none;
    padding: 0 clamp(8px, 2.5vw, 14px);
    justify-content: flex-start;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
  }

  .thankyou-msg-box,
  #thank-you .thankyou-msg-box {
    background: transparent;
    background-image: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  #thank-you .thankyou-msg-box::before {
    display: none;
  }

  #thank-you .thankyou-slider,
  #thank-you .thankyou-pagination {
    position: relative;
    z-index: 2;
  }

  #thank-you .thankyou-slider,
  .thankyou-slider {
    display: grid !important;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    align-items: flex-start;
    justify-items: center;
    width: 100%;
    min-height: 0 !important;
    margin: 0 auto;
  }

  .thankyou-slide-text,
  .thankyou-text-area p,
  #thank-you p,
  #thankYouMessage {
    text-align: center;
    margin: 0 auto !important;
    padding-bottom: 0 !important;
    width: 100%;
    max-width: 100%;
    font-size: 1.125rem;
    line-height: 1.52;
    color: #152520 !important;
    /* Forest Green in responsive */
    opacity: 1;
    box-sizing: border-box;
  }

  #thank-you .thankyou-pagination,
  .thankyou-pagination {
    margin: 14px auto 0 auto !important;
  }

  .thankyou-signoff,
  #thank-you .thankyou-signoff {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 5px;
    margin: 14px auto 0 auto !important;
    padding-top: 0;
    border-top: none;
    width: 100%;
    max-width: 280px;
  }

  #thank-you #thankYouClosing {
    font-size: 1.05rem;
    line-height: 1.25;
    text-align: center;
    display: inline-block;
    color: var(--jade) !important;
    /* Moss Green in responsive */
    text-transform: none !important;
    letter-spacing: normal;
  }

  .thankyou-names,
  #thank-you .thankyou-names,
  #thank-you .thankyou-names span:not(.thankyou-ampersand) {
    text-align: center;
    display: inline-block;
    font-size: 1.25rem;
    color: #152520 !important;
    /* Forest Green in responsive */
    line-height: 1.25;
    text-transform: none !important;
    letter-spacing: normal;
  }

  #thank-you .thankyou-names span.thankyou-ampersand,
  #thank-you .thankyou-names .thankyou-ampersand,
  #thank-you .thankyou-ampersand,
  .thankyou-ampersand {
    color: var(--wine) !important;
    font-style: normal;
  }

  .thankyou-mobile-break {
    display: none;
  }



  /* Responsive Section Popups: uniform margins on all sides */
  .section-popup {
    padding: 28px;
  }

  .section-popup-card {
    max-height: calc(var(--visual-viewport-h, 100dvh) - 56px);
    scroll-padding-bottom: 24px;
    padding: 40px 24px;
    border-radius: 4px;
  }

  .section-popup-close {
    top: 14px;
    right: 18px;
    width: 34px;
    height: 34px;
    font-size: 1.6rem;
  }
}

@media (max-width: 600px) {

  .section-popup {
    padding: clamp(16px, 4vw, 24px);
  }

  /* Unified, comfortable, airy mobile spacing for all popup cards */
  .section-popup-card,
  #the-wedding.section-popup-card,
  #rsvp.section-popup-card,
  #registry.section-popup-card {
    padding: 38px clamp(24px, 6vw, 30px);
    max-height: calc(var(--visual-viewport-h, 100dvh) - 36px);
    scroll-padding-bottom: 30px;
    justify-content: flex-start;
  }

  /* Keyboard open state on mobile */
  .section-popup.has-keyboard-open {
    padding: 10px 14px !important;
    align-items: flex-start !important;
  }

  .section-popup.has-keyboard-open #rsvp.section-popup-card,
  .section-popup.has-keyboard-open #registry.section-popup-card,
  .section-popup.has-keyboard-open .section-popup-card {
    max-height: calc(var(--visual-viewport-h, 100dvh) - 20px) !important;
    padding-top: 36px !important;
    padding-bottom: 28px !important;
    margin-top: auto !important;
    margin-bottom: auto !important;
  }

  #rsvp .section-header {
    margin-bottom: 28px;
  }

  #rsvp .section-header h2 {
    margin-bottom: 10px;
    font-size: 1.70rem;
  }

  #rsvp .section-header p {
    font-size: 1.05rem;
    line-height: 1.52;
    margin: 0;
  }

  .rsvp-form {
    padding: 0;
    width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Airy 30px spacing between field groups */
  #rsvp .form-group,
  .rsvp-form .form-group {
    margin-bottom: 30px;
  }

  /* Clear, comfortable, readable label typography */
  #rsvp .form-group label,
  .rsvp-form .form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.92rem;
    letter-spacing: 0.10em;
    line-height: 1.3;
    text-transform: uppercase;
    color: rgba(231, 227, 216, 0.85);
  }

  #rsvp .form-group input[type="text"],
  #rsvp .form-group input[type="tel"],
  .rsvp-form input[type="text"],
  .rsvp-form input[type="tel"] {
    padding: 4px 0 10px 0;
    font-size: 1.10rem;
    line-height: 1.4;
    color: #E7E3D8;
    background: transparent;
    border: none;
    border-bottom: 1.5px solid rgba(231, 227, 216, 0.35);
    border-radius: 0;
    outline: none;
    box-sizing: border-box;
    width: 100%;
    transition: border-bottom-color 0.2s ease;
  }

  #rsvp .form-group input[type="text"]:focus,
  #rsvp .form-group input[type="tel"]:focus,
  .rsvp-form input[type="text"]:focus,
  .rsvp-form input[type="tel"]:focus {
    border-bottom-color: rgba(231, 227, 216, 0.9);
  }

  #rsvp .form-group input::placeholder,
  #rsvp .form-group textarea::placeholder,
  .rsvp-form input::placeholder,
  .rsvp-form textarea::placeholder {
    font-size: 1.02rem;
  }

  #rsvp .form-group textarea,
  .rsvp-form textarea {
    padding: 4px 0 10px 0;
    font-size: 1.06rem;
    min-height: 70px;
    height: 70px;
    line-height: 1.5;
    color: #E7E3D8;
    background: transparent;
    border: none;
    border-bottom: 1.5px solid rgba(231, 227, 216, 0.35);
    border-radius: 0;
    resize: none;
    outline: none;
    box-sizing: border-box;
    width: 100%;
    transition: min-height 0.25s ease, height 0.25s ease;
  }

  #rsvp .form-group textarea:focus,
  .rsvp-form textarea:focus {
    min-height: 85px;
    height: auto;
  }

  /* Attending field group: generous breathing room matching the form */
  #rsvp .form-group:has(.radio-group),
  .rsvp-form .form-group:has(.radio-group),
  #rsvp .form-group--attending,
  .rsvp-form .form-group--attending {
    margin-bottom: 30px;
  }

  #rsvp .form-group:has(.radio-group)>label,
  .rsvp-form .form-group:has(.radio-group)>label,
  #rsvp .form-group--attending>label,
  .rsvp-form .form-group--attending>label {
    margin-bottom: 6px;
    font-size: 0.94rem;
  }

  /* Side-by-side attending buttons left-aligned with form fields */
  #rsvp .radio-group,
  .rsvp-form .radio-group {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: flex-start;
    align-items: center;
    gap: 16px;
    margin-top: 2px;
    margin-bottom: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .radio-pill {
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  #rsvp .radio-pill label,
  .rsvp-form .radio-pill label {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    margin: 0;
    padding: 8px 10px;
    min-height: auto;
    gap: 16px;
    font-size: 1.05rem;
    line-height: 1.4;
    letter-spacing: 0.04em;
    text-align: left;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
  }

  #rsvp .radio-pill label .radio-text-wrap,
  .rsvp-form .radio-pill label .radio-text-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    line-height: 1.32;
    gap: 0;
    min-width: 0;
    max-width: 100%;
  }

  #rsvp .radio-pill label .radio-adverb,
  .rsvp-form .radio-pill label .radio-adverb {
    white-space: nowrap;
    display: block;
  }

  #rsvp .radio-action-bold,
  .rsvp-form .radio-action-bold {
    letter-spacing: 0.04em;
    font-weight: 700;
    display: block;
  }

  /* Guest section: completely removed when hidden to avoid phantom gap */
  #rsvp .form-group--guests:not(.visible),
  .rsvp-form .form-group--guests:not(.visible) {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
  }

  /* Guest stepper: comfortably spaced below the label */
  #rsvp .form-group--guests.visible,
  .rsvp-form .form-group--guests.visible {
    display: block;
    margin-bottom: 30px;
    padding: 0;
  }

  #rsvp .form-group--guests.visible label,
  .rsvp-form .form-group--guests.visible label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.94rem;
    letter-spacing: 0.10em;
    line-height: 1.3;
    text-align: left;
  }

  #rsvp .guest-stepper,
  .rsvp-form .guest-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 6px;
    margin-bottom: 4px;
    padding: 8px 0;
    gap: 28px;
  }

  .stepper-btn {
    width: 38px;
    height: 38px;
    font-size: 1.35rem;
    border: 1.5px solid rgba(231, 227, 216, 0.5);
    color: #E7E3D8;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .stepper-btn:hover:not(:disabled),
  .stepper-btn:active:not(:disabled) {
    background: #E7E3D8;
    color: var(--jade);
  }

  .guest-stepper input[type="number"] {
    font-size: 1.3rem;
    width: 36px;
    color: #E7E3D8;
    text-align: center;
  }

  /* Submit button: generous top and bottom margins */
  #rsvp .btn-submit,
  .rsvp-form .btn-submit {
    margin-top: 20px;
    margin-bottom: 0;
    padding: 16px 36px;
    font-size: 1.05rem;
    letter-spacing: 0.15em;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: clamp(52px, 10.5vh, 80px);
  }

  .portal-section {
    padding-top: clamp(52px, 10.5vh, 80px);
  }

  #our-story {
    padding-top: clamp(42px, 9vh, 64px);
  }

  #thank-you {
    padding-top: clamp(42px, 9vh, 64px);
  }

  .thankyou-slide-text,
  .thankyou-text-area p,
  #thank-you p,
  #thankYouMessage {
    font-size: 1.125rem;
    line-height: 1.52;
    margin: 0 auto !important;
  }

  .countdown-item {
    min-width: 60px;
    padding: 10px 8px;
  }

  .countdown-number {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.7rem;
  }

  /* Comfortable, airy padding on mobile popups */
  .section-popup {
    padding: clamp(16px, 4vw, 20px);
  }

  /* Unified mobile padding across all popup cards */
  .section-popup-card,
  #the-wedding.section-popup-card,
  #rsvp.section-popup-card,
  #registry.section-popup-card {
    max-height: calc(var(--visual-viewport-h, 100dvh) - 24px);
    scroll-padding-bottom: 24px;
    padding: 32px clamp(24px, 6vw, 28px);
    border-radius: 4px;
  }

  #the-wedding .section-header p {
    max-width: 270px;
    font-size: 0.92rem;
  }
}