@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700&family=Cormorant+Garamond:wght@300;400;500;600;700&family=Lora:wght@400;500;600;700&family=Cinzel:wght@400;500;600;700&family=Lato:wght@300;400;700&display=swap');

:root {
  /* Layout: one content width, one narrow width, one padding scale */
  --content-width: 1200px;
  --content-width-narrow: 720px;
  --section-padding-x: clamp(20px, 5vw, 60px);
  --section-padding-y: clamp(24px, 5vh, 48px);
  --section-padding-block: clamp(20px, 4vh, 40px);

  --max: 1200px;
  --sage: #9caf88;
  --sage-light: #b8c8a8;
  --sage-dark: #7a9370;
  --pink: #e8b4b8;
  --pink-light: #f4c2c2;
  --pink-dark: #d4959a;
  --orange: #f4a261;
  --orange-light: #f7b77f;
  --orange-dark: #e07a5f;
  --beige: #f5e6d3;
  --beige-light: #f9f0e5;
  --beige-dark: #e8dcc4;
  --ivory: #fafaf7;
  --white: #ffffff;
  --terracotta: #d4a574;
  --charcoal: #2c2c2c;
  --charcoal-light: #4a4a4a;
  --text-color: #2c2c2c;
  --text-light: #654141;
  --border-color: #e5e5e5;
  --shadow: rgba(0, 0, 0, 0.08);
  --shadow-light: rgba(0, 0, 0, 0.04);
  --nav-height: clamp(80px, 4vw, 120px);
  --nav-bottom: clamp(20px, 2vw, 60px);
}

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

html {
  scroll-behavior: smooth;
  /* overflow-x: clip avoids Chrome bug where overflow-x: hidden breaks vertical scroll on some machines */
  overflow-x: clip;
  width: 100%;
}

#envelope-landing {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Lighter sage to match section backgrounds (body gradient uses #a5b298) */
  background-color: #a5b298;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden; /* Prevent scrolling on landing page */
  transition:
    background-color 400ms ease,
    opacity 1000ms ease;
}

#envelope-landing:focus,
.svg-envelope:focus {
  outline: none;
}

#envelope-landing,
#envelope-landing * {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
#center-tap-target {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.5) !important; /* RED for debugging - very visible */
  border: 4px solid rgba(255, 0, 0, 0.8);
  z-index: 100000;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  pointer-events: all;
}

/* removed unused #tap-catcher (replaced by #center-tap-target) */
#envelope-landing.hidden {
  pointer-events: none;
  opacity: 0;
  transition: opacity 1000ms ease;
}

.envelope-stage {
  position: relative;
  width: min(92vw, 900px);
  height: min(78vh, 680px);
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px; /* for 3D flap rotation */
  overflow: visible; /* Ensure envelope is visible when zooming */
}

/* Start envelope smaller */
.envelope-stage .svg-envelope {
  transform: scale(0.75);
  transition:
    transform 2000ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 1500ms ease;
}

.envelope {
  position: relative;
  width: 100%;
  height: 100%;
  transform-origin: center bottom;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.svg-envelope {
  width: 100%;
  height: 100%;
}
.svg-envelope,
.svg-envelope * {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: auto;
}

/* Animate top flap for SVG */
.svg-envelope #flap {
  transform-origin: 150px 0px;
  transform-box: fill-box;
  transition: transform 700ms cubic-bezier(0.15, 0.85, 0.15, 1);
}
@keyframes flapOpen {
  0% {
    transform: rotateX(0deg);
  }
  80% {
    transform: rotateX(-195deg);
  }
  100% {
    transform: rotateX(-180deg);
  }
}
.envelope.open #flap {
  animation: flapOpen 1800ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Animate calligraphy to move up and center */
.svg-envelope #calligraphy {
  transform-origin: center center;
  transition:
    transform 2000ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 1500ms ease;
}

@keyframes calligraphyMove {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(0, -80px) scale(1.2);
    opacity: 0.9;
  }
}

.envelope.open #calligraphy {
  animation: calligraphyMove 2000ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Zoom and fade the whole envelope as it opens */
.svg-envelope {
  transform-style: preserve-3d;
  transform-origin: 50% 60%; /* Center on the E&S initials (y=120 in 200px height = 60%) */
  transition:
    transform 2000ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 1500ms ease;
}
.envelope.open.svg-envelope {
  transform: scale(2.5); /* Zoom in towards the center/initials */
  opacity: 0;
}

.envelope .pocket {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #fff4e1 0%, #fec89a 100%);
  border: 2px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
}

.envelope .flap {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 55%;
  background: linear-gradient(135deg, #a5b298 0%, #fff4e1 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: 50% 0%;
  transition: transform 900ms cubic-bezier(0.2, 0.8, 0.2, 1);
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}

.envelope .side-left,
.envelope .side-right,
.envelope .bottom {
  position: absolute;
  background: #fff4e1;
}

.envelope .side-left {
  left: 0;
  top: 0;
  bottom: 0;
  width: 50%;
  clip-path: polygon(0 0, 50% 50%, 0 100%);
  background: linear-gradient(135deg, #fff4e1 0%, #fec89a 80%);
}

.envelope .side-right {
  right: 0;
  top: 0;
  bottom: 0;
  width: 50%;
  clip-path: polygon(100% 0, 50% 50%, 100% 100%);
  background: linear-gradient(225deg, #fff4e1 0%, #fec89a 80%);
}

.envelope .bottom {
  left: 0;
  right: 0;
  bottom: 0;
  height: 55%;
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
  background: linear-gradient(180deg, #fff4e1 0%, #fec89a 90%);
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}

.envelope.open .flap {
  transform: rotateX(180deg);
  backface-visibility: hidden;
}

.envelope .letter {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 8%;
  bottom: 8%;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: grid;
  place-items: center;
  padding: 24px;
  transform-origin: bottom center;
  transition:
    transform 900ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 600ms ease;
}

.envelope.open .letter {
  transform: translateY(-40%) scale(0.96);
  opacity: 0;
}

.envelope .initials {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 8vw, 3.8rem);
  color: var(--charcoal);
  letter-spacing: 6px;
}

.envelope .subtext {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 3px;
  color: var(--text-light);
  margin-top: 6px;
  text-transform: uppercase;
}

.envelope .open-invite {
  position: absolute;
  left: 50%;
  bottom: -72px;
  transform: translateX(-50%);
  padding: 14px 26px;
  border: 2px solid var(--charcoal);
  background: rgba(255, 255, 255, 0.8);
  color: var(--charcoal);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
  border-radius: 6px;
  touch-action: manipulation;
}

.envelope .open-invite:hover {
  transform: translateX(-50%) translateY(-2px);
  background: #fff;
}

/* Birds */
body {
  font-family:
    'Lato',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  line-height: 1.8;
  color: var(--text-color);
  background: linear-gradient(
    180deg,
    #fff4e1 0%,
    #a5b298 5%,
    #fff4e1 10%,
    #fec89a 15%,
    #fff4e1 20%,
    #b56959 25%,
    #fff4e1 30%,
    #a5b298 35%,
    #fff4e1 40%,
    #fec89a 45%,
    #fff4e1 50%,
    #b56959 55%,
    #fff4e1 60%,
    #a5b298 65%,
    #fff4e1 70%,
    #fec89a 75%,
    #fff4e1 80%,
    #b56959 85%,
    #fff4e1 90%,
    #a5b298 95%,
    #fff4e1 100%
  );
  background-size: 100% 2000vh;
  background-repeat: no-repeat;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* overflow-x: clip avoids Chrome bug where overflow-x: hidden breaks vertical scroll on some machines */
  overflow-x: clip;
  padding-top: var(--nav-height);
  padding-bottom: var(--nav-bottom);
  width: 100%;
  max-width: 100vw;
  position: relative;
  min-height: 100dvh;
  overscroll-behavior-y: none;
}

/* Navigation */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease,
    padding 0.3s ease;
  overflow-x: hidden;
  /* Force own compositor layer so Chrome mobile doesn’t hide nav when address bar hides on scroll */
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.nav-container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: clamp(12px, 2vh, 20px) var(--section-padding-x);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: clamp(8px, 1.5vw, 16px);
  transition: padding 0.3s ease;
}

.main-nav.scrolled .nav-container {
  padding: clamp(6px, 1vh, 10px) var(--section-padding-x);
}

.main-nav.scrolled .nav-menu {
  margin-top: clamp(2px, 0.5vw, 6px);
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1rem, 3.5vw, 1.5rem);
  font-weight: 400;
  color: var(--charcoal);
  text-decoration: none;
  letter-spacing: clamp(0.5px, 0.3vw, 2px);
  transition: color 0.3s ease;
}

.nav-logo:hover {
  color: var(--sage-dark);
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: clamp(14px, 2.5vw, 50px);
  margin: 0;
  padding: 0;
  justify-content: center;
}

.nav-link {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(0.65rem, 1.8vw, 0.9rem);
  font-weight: 400;
  color: var(--text-color);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: clamp(0.3px, 0.2vw, 1.5px);
  position: relative;
  transition: color 0.3s ease;
  padding: clamp(2px, 0.5vw, 5px) 0;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

/* Only .active shows highlight; focus/active must not look like a second highlight (fixes mobile stuck tab) */
.nav-link:focus {
  outline: none;
}
.nav-link:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 2px;
}
.nav-link:active:not(.active) {
  color: var(--text-color);
}
.nav-link:active:not(.active)::after {
  width: 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--sage);
  transition: width 0.3s ease;
}

/* Only .active shows highlight; hover alone must not (else clicked tab stays highlighted when pointer hasn’t moved after scroll) */
.nav-link:hover:not(.active) {
  color: var(--text-color);
}
.nav-link:hover:not(.active)::after {
  width: 0;
}
.nav-link.active,
.nav-link.active:hover {
  color: var(--sage-dark);
}
.nav-link.active::after,
.nav-link.active:hover::after {
  width: 100%;
}

/* Hero Section — fluid; no breakpoints */
.hero {
  min-height: calc(100dvh - clamp(80px, 10vw, 120px));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-image:
    linear-gradient(rgba(44, 44, 44, 0.4), rgba(156, 175, 136, 0.2)), url('assets/hero.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  background-color: var(--sage-dark);
  color: white;
  position: relative;
  padding: clamp(60px, 12vh, 120px) var(--section-padding-x);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(244, 162, 97, 0.1) 0%,
    rgba(156, 175, 136, 0.15) 50%,
    rgba(232, 180, 184, 0.1) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero-content > p {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
  margin: 0 0 50px 0;
  font-weight: 300;
  letter-spacing: 4px;
  color: rgba(255, 255, 255, 0.95);
  text-transform: uppercase;
}

.hero-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: 5.5rem;
  font-weight: 400;
  margin: 0;
  letter-spacing: 3px;
  color: white;
  line-height: 1.3;
}

.hero-content h1 br {
  display: block;
  content: '';
  margin: 12px 0;
}

/* Decorative Knot */
.decorative-knot {
  position: absolute;
  width: 120px;
  height: 120px;
  opacity: 0.15;
  z-index: 0;
}

.decorative-knot-top-left {
  top: 40px;
  left: 40px;
  transform: rotate(-15deg);
}

.decorative-knot-top-right {
  top: 40px;
  right: 40px;
  transform: rotate(15deg);
}

.decorative-knot-bottom-left {
  bottom: 40px;
  left: 40px;
  transform: rotate(15deg);
}

.decorative-knot-bottom-right {
  bottom: 40px;
  right: 40px;
  transform: rotate(-15deg);
}

.hero-small {
  padding: clamp(80px, 15vh, 160px) var(--section-padding-x) clamp(60px, 12vh, 120px);
  text-align: center;
  background: transparent;
  color: var(--charcoal);
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.hero-small h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 10vw, 4.5rem);
  font-weight: 400;
  margin: 0 0 24px 0;
  letter-spacing: 3px;
  color: var(--charcoal);
}

.hero-small > .hero-content > p {
  font-size: 1.1rem;
  margin: 0 0 20px 0;
  font-weight: 300;
  letter-spacing: 2px;
  color: var(--text-light);
  text-transform: uppercase;
  font-family: 'Montserrat', sans-serif;
}

.wedding-date {
  font-size: 1rem;
  color: var(--text-light);
  font-style: italic;
  letter-spacing: 2px;
  margin-top: 12px;
  font-weight: 300;
}

/* Fullscreen Sections — one padding scale, no special cases */
.fullscreen-section {
  min-height: calc(100dvh - var(--nav-height) - var(--nav-bottom));
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: var(--section-padding-block) var(--section-padding-x);
  overflow: hidden;
  overflow-x: hidden;
  opacity: 1;
  scroll-margin-top: clamp(80px, 10vh, 120px);
  width: 100%;
  max-width: 100%;
  transition:
    background-color 0.6s ease,
    background-image 0.6s ease;
}

.section-content {
  max-width: var(--content-width);
  width: 100%;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
  padding: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}

.section-content > h2,
.section-content > .divider {
  position: relative;
  z-index: 3;
}

.section-details {
  background: transparent;
  overflow: visible;
  height: auto;
  min-height: 100vh;
}

.section-schedule {
  background: transparent;
  min-height: 100vh;
}

.section-registry {
  background: transparent;
  overflow: visible;
}

.section-registry .registry-intro {
  margin-bottom: 60px;
}

.registry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: clamp(24px, 4vw, 40px);
  margin-top: var(--section-padding-y);
  margin-bottom: var(--section-padding-y);
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
}

.registry-item {
  background-color: var(--white);
  padding: var(--section-padding-y) clamp(12px, 3vw, 24px);
  border: 1px solid var(--beige-dark);
  border-top: 4px solid var(--sage);
  transition: all 0.4s ease;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  text-align: left;
}

.registry-item:nth-child(3n + 2) {
  border-top-color: var(--pink);
}

.registry-item:nth-child(3n + 3) {
  border-top-color: var(--orange);
}

.registry-item h3 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.25rem, 3.5vw, 1.6rem);
  margin: 0 0 clamp(16px, 2.5vh, 24px) 0;
  color: var(--charcoal);
  font-weight: 400;
  letter-spacing: 1px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: clamp(6px, 1vw, 8px);
}

.registry-item h3 .registry-title {
  flex: 0 0 auto;
}

.registry-item h3 .registry-currency {
  flex: 0 0 auto;
  font-size: 0.9em;
  font-weight: 300;
  color: var(--text-light);
}

.registry-details {
  margin: 0 0 24px 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 10px;
  align-items: baseline;
}

.registry-details dt {
  font-weight: 600;
  color: var(--charcoal);
  font-size: clamp(0.9rem, 2vw, 0.95rem);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.registry-details dd {
  margin: 0;
  color: var(--text-light);
  font-size: clamp(0.85rem, 2vw, 0.9rem);
  line-height: 1.5;
  font-weight: 300;
}

.copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 1.5em;
}

.copy-value {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-copy-small {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  font-size: clamp(0.55rem, 1.5vw, 0.65rem);
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid var(--beige-dark);
  background: transparent;
  color: var(--charcoal);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy-small:hover {
  background-color: var(--beige-light);
  border-color: var(--sage);
}

.btn-copy-small.copied {
  background-color: var(--sage);
  color: white;
  border-color: var(--sage);
  animation: copyFeedback 0.3s ease;
}

@keyframes copyFeedback {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

.registry-bank-address {
  display: none;
}

section[data-show-registry-address='true'] .registry-bank-address {
  display: block;
}

.section-travel {
  background: transparent;
  overflow: visible;
  height: auto;
  min-height: 100vh;
  align-items: flex-start;
}

/* Decorative Lines */
.decorative-line {
  position: absolute;
  border: none;
  border-top: 1px solid;
  opacity: 0.2;
  z-index: 0;
}

.decorative-line-horizontal {
  width: 200px;
  height: 0;
  border-top-color: var(--sage);
}

.decorative-line-vertical {
  width: 0;
  height: 200px;
  border-left: 1px solid var(--pink);
  border-top: none;
}

/* Decorative Divider */
.divider {
  width: 120px;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--sage) 20%,
    var(--pink) 50%,
    var(--orange) 80%,
    transparent 100%
  );
  margin: 20px auto clamp(30px, 5vh, 50px);
  position: relative;
}

.divider::before,
.divider::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage);
}

.divider::before {
  left: -25px;
  background: var(--pink);
}

.divider::after {
  right: -25px;
  background: var(--orange);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 16px 48px;
  border-radius: 0;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.4s ease;
  border: 2px solid;
  cursor: pointer;
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: 'Montserrat', sans-serif;
}

.btn-hero {
  background-color: var(--sage);
  color: white;
  border-color: var(--sage);
  box-shadow: 0 4px 15px rgba(156, 175, 136, 0.3);
  padding: 12px 32px;
  font-size: 0.8rem;
  letter-spacing: 1.5px;
}

.btn-hero:hover {
  background-color: var(--sage-dark);
  border-color: var(--sage-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(156, 175, 136, 0.4);
}

.btn-submit {
  background-color: var(--charcoal);
  color: white;
  border-color: var(--charcoal);
  width: 100%;
  padding: 18px;
  font-size: 0.9rem;
}

.btn-submit:hover {
  background-color: var(--sage-dark);
  border-color: var(--sage-dark);
  transform: translateY(-2px);
}

/* Sections */
.section-content > h2,
.section > h2 {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.5rem, 5vw, 3.5rem) !important;
  margin: clamp(8px, 1.5vh, 10px) 0 clamp(16px, 2.5vh, 20px) 0;
  color: var(--charcoal);
  font-weight: 500 !important;
  text-align: center;
  letter-spacing: clamp(1.5px, 0.4vw, 4px);
  position: relative;
  text-shadow:
    0 2px 8px rgba(255, 255, 255, 0.9),
    0 1px 3px rgba(0, 0, 0, 0.1);
  z-index: 2;
  text-transform: uppercase;
}

.section-content > h2::before,
.section > h2::before {
  content: '❋';
  position: absolute;
  left: clamp(-2.5rem, -8vw, -50px);
  top: 50%;
  transform: translateY(-50%);
  color: var(--pink);
  font-size: clamp(0.4rem, 2.5vw, 1.5rem);
  opacity: 0.6;
}

.section-content > h2::after,
.section > h2::after {
  content: '❋';
  position: absolute;
  right: clamp(-2.5rem, -8vw, -50px);
  top: 50%;
  transform: translateY(-50%);
  color: var(--orange);
  font-size: clamp(0.4rem, 2.5vw, 1.5rem);
  opacity: 0.6;
}

.section .intro {
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  margin-bottom: clamp(60px, 10vh, 120px) !important;
  margin-top: 0;
  text-align: center;
  color: var(--text-light);
  font-weight: 300;
  max-width: min(var(--content-width-narrow), 92%);
  margin-left: auto;
  margin-right: auto;
  line-height: 1.9;
  letter-spacing: 0.5px;
  padding-bottom: var(--section-padding-y) !important;
}

/* Details Section — same centering and width scale as rest */
.details {
  background-color: var(--white);
  padding: var(--section-padding-y) var(--section-padding-x);
  margin: var(--section-padding-block) 0;
  text-align: center;
  position: relative;
  border: 1px solid var(--beige-dark);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  max-width: min(var(--content-width-narrow), 92%);
  margin-left: auto;
  margin-right: auto;
}

.details::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--sage), var(--pink), var(--orange), var(--sage));
  z-index: -1;
  opacity: 0.3;
  border-radius: 2px;
}

.details p {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  margin: clamp(12px, 2.5vh, 24px) 0;
  line-height: 1.4;
  color: var(--text-color);
  font-weight: 400;
  letter-spacing: 0.5px;
}

.details p br {
  /* <strong> is already display:block; the <br> is redundant and adds extra gap */
  display: none;
}

.details strong {
  font-family: 'Cinzel', serif;
  font-weight: 500;
  color: var(--sage-dark);
  letter-spacing: clamp(2px, 0.4vw, 3px);
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  text-transform: uppercase;
  display: block;
  margin-bottom: 2px;
  font-style: normal;
}

.details a {
  color: var(--charcoal);
  text-decoration: none;
  border-bottom: 1px solid var(--sage);
  padding-bottom: 3px;
  transition: all 0.3s ease;
  font-weight: 400;
  font-style: italic;
}

.details a:hover {
  border-bottom-color: var(--orange);
  color: var(--orange-dark);
  border-bottom-width: 2px;
}

/* Schedule — fluid; no breakpoints */
.schedule-timeline {
  --schedule-show-icons: none;
  --schedule-img-col: clamp(36px, 6vw, 48px);
  --schedule-spine: clamp(88px, 12vw, 114px);
  --schedule-gap: clamp(50px, 4.5vw, 140px);
  max-width: min(960px, 100%);
  margin: 0 auto;
  padding: 0 var(--section-padding-x);
  padding-bottom: var(--section-padding-y);
  position: relative;
}

/* Vertical line through spine center (order: left | img | spine | right) */
.schedule-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--sage) 0%, var(--pink) 50%, var(--orange) 100%);
  opacity: 0.35;
}

.schedule-row {
  position: relative;
  display: grid;
  /* Keep timeline line centered at 50% and center spine on it */
  grid-template-columns: 1fr 1fr;
  column-gap: 0;
  align-items: stretch;
  margin-bottom: clamp(28px, 5vh, 56px);
  min-height: 2em;
}

/* Image column: between left content and spine (left of the circles) */
.schedule-row-img {
  position: absolute;
  top: 50%;
  /* Center of image sits left of the centered spine */
  left: calc(50% - var(--schedule-img-col));
  transform: translate(-50%, -50%);
  width: var(--schedule-img-col);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0;
  min-width: 0;
  pointer-events: none;
}

.schedule-row-img img {
  width: clamp(28px, 6vw, 40px);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}

.schedule-row:last-child {
  margin-bottom: 0;
}

/* Spine (center): full row height; dot at exact row midpoint, time to its right */
.schedule-spine {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: var(--schedule-spine);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.schedule-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--sage);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--sage);
}

.schedule-dot-pink {
  background: var(--pink);
  box-shadow: 0 0 0 2px var(--pink);
}

.schedule-dot-orange {
  background: var(--orange);
  box-shadow: 0 0 0 2px var(--orange);
}

.schedule-dot-red {
  background: var(--terracotta);
  box-shadow: 0 0 0 2px var(--terracotta);
}

.schedule-spine .schedule-time {
  position: absolute;
  top: 50%;
  left: calc(50% + 11px);
  transform: translateY(-50%);
  margin: 0;
}

.schedule-time {
  font-family: 'Cinzel', serif;
  font-size: clamp(1rem, 3vw, 1.5rem);
  font-weight: 500;
  color: var(--charcoal);
  white-space: nowrap;
}

.schedule-left {
  text-align: right;
  padding-right: calc(var(--section-padding-x) + var(--schedule-gap));
  min-width: 0;
}

.schedule-right {
  text-align: left;
  padding-left: calc(var(--section-padding-x) + var(--schedule-gap));
  min-width: 0;
}

.schedule-card {
  display: inline-flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  max-width: 100%;
}

.schedule-left .schedule-card {
  flex-direction: row-reverse;
  text-align: right;
}

.schedule-icon {
  display: var(--schedule-show-icons, none);
  flex-shrink: 0;
  font-size: clamp(1.1rem, 3vw, 1.55rem);
  line-height: 1.2;
}

.schedule-title {
  font-family: 'Montserrat', sans-serif !important;
  font-size: clamp(0.75rem, 2.2vw, 1.2rem) !important;
  font-weight: 600 !important;
  color: var(--charcoal) !important;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  line-height: 1.25;
}

.schedule-location {
  font-size: clamp(0.68rem, 1.8vw, 1.05rem);
  color: var(--text-light);
  font-weight: 400;
  letter-spacing: 0.3px;
  line-height: 1.3;
  margin-top: 2px;
}

.schedule-location a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.schedule-location a:hover {
  color: var(--sage);
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: clamp(32px, 4vw, 40px);
  margin-top: clamp(48px, 8vh, 80px) !important;
  margin-bottom: clamp(48px, 8vh, 80px);
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
}

.info-item {
  background-color: var(--white);
  padding: var(--section-padding-y) var(--section-padding-x);
  border: 1px solid var(--beige-dark);
  border-top: 4px solid var(--sage);
  transition: all 0.4s ease;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.info-item:nth-child(3n + 2) {
  border-top-color: var(--pink);
}

.info-item:nth-child(3n + 3) {
  border-top-color: var(--orange);
}

.info-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.info-icon {
  font-size: 2.5rem;
  margin-bottom: 24px;
  opacity: 0.8;
  display: block;
}

.info-item h3 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.25rem, 3.5vw, 1.6rem);
  margin: 0 0 clamp(12px, 2vh, 20px) 0;
  color: var(--charcoal);
  font-weight: 400;
  letter-spacing: 1px;
}

.info-item p {
  margin: 0;
  line-height: 2;
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 0.3px;
}

.closing {
  text-align: center;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--text-light);
  font-style: italic;
  margin-top: clamp(48px, 8vh, 80px);
  padding-top: var(--section-padding-y);
  border-top: 2px solid var(--beige-dark);
  font-weight: 300;
  line-height: 2;
  max-width: min(var(--content-width-narrow), 92%);
  margin-left: auto;
  margin-right: auto;
  font-family: 'Playfair Display', serif;
}

/* RSVP Form */
.rsvp-section {
  max-width: min(var(--content-width-narrow), 92%);
  margin: 0 auto;
}

.rsvp-form {
  background-color: transparent;
  padding: 0;
}

.form-group {
  margin-bottom: 40px;
}

.form-group label {
  display: block;
  margin-bottom: 12px;
  font-weight: 400;
  color: var(--charcoal);
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: 'Montserrat', sans-serif;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 0;
  border: none;
  border-bottom: 2px solid var(--beige-dark);
  border-radius: 0;
  font-size: 1rem;
  font-family: 'Lato', sans-serif;
  transition: all 0.3s ease;
  background-color: transparent;
  color: var(--charcoal);
  font-weight: 300;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-bottom-color: var(--sage);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.9;
  border: 2px solid var(--beige-dark);
  padding: 14px;
  border-radius: 0;
}

.form-group textarea:focus {
  border-color: var(--sage);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  padding-right: 30px;
}

.form-group .email-optional,
.email-group .email-optional,
.email-optional {
  color: #000000 !important;
}

.back-link {
  text-align: center;
  margin-top: 60px;
}

.back-link a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 300;
  transition: all 0.3s ease;
  letter-spacing: 2px;
  font-size: 0.85rem;
  text-transform: uppercase;
  font-family: 'Montserrat', sans-serif;
}

.back-link a:hover {
  color: var(--sage-dark);
}

/* Footer */
.footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100vw;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  overflow-x: hidden;
}

.footer-container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: clamp(12px, 2vh, 16px) var(--section-padding-x);
  padding-bottom: calc(clamp(12px, 2vh, 16px) + env(safe-area-inset-bottom));
  text-align: center;
  transition: padding 0.3s ease;
}

.footer.scrolled .footer-container {
  padding-top: clamp(8px, 1.5vh, 10px);
  padding-bottom: calc(clamp(8px, 1.5vh, 10px) + env(safe-area-inset-bottom));
}

.footer p {
  margin: 0;
  font-size: clamp(0.7rem, 1.2vw, 0.9rem);
  letter-spacing: 3px;
  font-weight: 300;
  font-family: 'Playfair Display', serif;
  text-transform: uppercase;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Animation Classes */
.animate-on-scroll {
  opacity: 0;
  transition:
    opacity 0.8s ease 0.2s,
    transform 0.8s ease 0.2s;
}

.animate-on-scroll.fade-in-up {
  transform: translateY(30px);
}

.animate-on-scroll.fade-in-left {
  transform: translateX(-30px);
}

.animate-on-scroll.fade-in-right {
  transform: translateX(30px);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translate(0) !important;
}

/* Ensure headings are always visible */
.section h2,
.section h2.animate-on-scroll {
  opacity: 1 !important;
  transform: none !important;
}

.main-nav.scrolled .nav-container {
  padding: clamp(6px, 1vh, 10px) var(--section-padding-x);
}

.main-nav.scrolled .nav-menu {
  margin-top: clamp(2px, 0.5vw, 6px);
}

/* Mobile nav: center logo, tabs below */
@media (max-width: 640px) {
  .nav-container {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
  }

  .nav-logo {
    margin-bottom: clamp(6px, 1.5vw, 10px);
  }

  .main-nav.scrolled .nav-logo {
    margin-bottom: 2px;
  }

  .nav-menu {
    width: 100%;
    justify-content: center;
    margin-top: 0;
  }
}
