:root {
  --sage: #9caf88;
  --olive: #636b2f;
  --army: #4b5320;
  --champagne: #f7e7ce;
  --champagne-beige: #dbc4a0;
  --desert-tan: #d2b48c;
  --ink: #263018;
  --paper: #fff8ed;
  --soft: #f4ead8;
  --shadow: 0 24px 70px rgba(38, 48, 24, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 248, 237, 0.82), rgba(255, 248, 237, 0.86)),
    url("../images/sage-floral-background.png") center top / cover fixed no-repeat,
    linear-gradient(135deg, #fffaf1, var(--champagne));
  font-family: Inter, Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 248, 237, 0.4), rgba(255, 248, 237, 0.4)),
    radial-gradient(circle at 20% 16%, rgba(255, 248, 237, 0.52), transparent 24rem),
    radial-gradient(circle at 84% 74%, rgba(247, 231, 206, 0.42), transparent 20rem);
  opacity: 1;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

body.gate-active {
  overflow: hidden;
}

body.gate-active .music-player {
  opacity: 0;
  pointer-events: none;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.social-preview-fallback {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--olive);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.paper-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(247, 231, 206, 0.22), transparent 24rem),
    radial-gradient(circle at 18% 22%, rgba(156, 175, 136, 0.34), transparent 19rem),
    linear-gradient(135deg, #eef4e8, var(--sage) 56%, var(--olive));
  transition: opacity 1.45s ease, visibility 1.45s ease;
  user-select: none;
  -webkit-user-select: none;
}

.paper-gate.opened {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.paper-gate.opening .scratch-zone {
  animation: scratchReveal 1.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.paper-gate.opening .gate-content {
  animation: contentReveal 1.25s ease forwards;
}

.gate-content {
  position: relative;
  z-index: 2;
  width: min(82vw, 540px);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--paper);
  text-shadow: 0 2px 18px rgba(38, 48, 24, 0.22);
}

.gate-content h1,
.hero-panel h2,
.section-heading h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
}

.gate-content h1 {
  margin: 0;
  font-size: clamp(3.1rem, 10vw, 7.4rem);
  font-weight: 600;
  line-height: 0.9;
}

.gate-event {
  margin: 1.25rem 0 0;
  color: var(--champagne);
  font-size: clamp(0.92rem, 2.4vw, 1.18rem);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gate-date {
  margin: 0.75rem 0 2rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--paper);
}

.scratch-zone {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: min(82vw, 540px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  transform: translate(-50%, -50%);
  box-shadow:
    inset 0 0 34px rgba(75, 83, 32, 0.22),
    0 18px 70px rgba(38, 48, 24, 0.22);
}

.scratch-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.scratch-canvas:active {
  cursor: grabbing;
}

.paper-gate.scratching .gate-content {
  animation: invitePulse 1.8s ease-in-out infinite;
}

@keyframes invitePulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.015);
  }
}

@keyframes scratchReveal {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.18);
  }
}

@keyframes contentReveal {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.98);
  }
}

.gate-button,
.rsvp-form button {
  border: 0;
  border-radius: 999px;
  color: #fffdf8;
  background: var(--olive);
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease;
}

.gate-button {
  padding: 0.95rem 1.35rem;
}

.gate-button:hover,
.rsvp-form button:hover {
  background: var(--army);
  transform: translateY(-2px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: rgba(255, 248, 237, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(99, 107, 47, 0.14);
}

.brand {
  display: inline-grid;
  place-items: center;
  width: 3.3rem;
  height: 3.3rem;
  border: 1px solid var(--olive);
  border-radius: 50%;
  color: var(--army);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.03rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.main-nav a {
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  color: var(--army);
  font-size: 0.9rem;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  background: rgba(156, 175, 136, 0.34);
  color: var(--army);
}

.nav-rsvp {
  background: var(--sage);
}

.music-player {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 25;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.music-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 4.45rem;
  min-height: 3.15rem;
  border: 1px solid rgba(99, 107, 47, 0.34);
  border-radius: 999px;
  padding: 0.75rem 0.92rem;
  color: var(--army);
  background: rgba(255, 248, 237, 0.86);
  box-shadow: 0 14px 34px rgba(38, 48, 24, 0.16);
  cursor: pointer;
  font: 700 0.78rem/1 Inter, Arial, sans-serif;
  letter-spacing: 0.04em;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.music-toggle:hover,
.music-toggle:focus-visible {
  border-color: var(--olive);
  background: rgba(156, 175, 136, 0.94);
  color: #fffdf8;
  outline: none;
  transform: translateY(-2px);
}

.music-toggle.is-playing {
  border-color: rgba(75, 83, 32, 0.44);
  background: var(--olive);
  color: #fffdf8;
}

.music-note {
  position: relative;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  line-height: 0.8;
}

.music-note::after {
  content: "";
  position: absolute;
  left: 48%;
  top: -0.17rem;
  width: 0.2rem;
  height: 1.35rem;
  border-radius: 999px;
  background: #d84a37;
  box-shadow: 0 0 0 1px rgba(255, 253, 248, 0.72);
  transform: rotate(-24deg);
  transform-origin: center;
  opacity: 1;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.music-toggle.is-playing .music-note::after {
  opacity: 0;
  transform: rotate(-24deg) scaleY(0.35);
}

.music-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.16rem;
  width: 1rem;
  height: 0.85rem;
}

.music-bars span {
  width: 0.18rem;
  height: 0.36rem;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.7;
  transform-origin: bottom;
}

.music-toggle.is-playing .music-bars span {
  animation: musicBars 1s ease-in-out infinite;
}

.music-toggle.is-playing .music-bars span:nth-child(2) {
  animation-delay: 0.18s;
}

.music-toggle.is-playing .music-bars span:nth-child(3) {
  animation-delay: 0.34s;
}

@keyframes musicBars {
  0%,
  100% {
    transform: scaleY(0.55);
  }

  50% {
    transform: scaleY(1.55);
  }
}

.hero {
  min-height: calc(100vh - 75px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: stretch;
}

.hero-photo {
  min-height: 680px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(38, 48, 24, 0.18), rgba(38, 48, 24, 0.03) 52%, rgba(38, 48, 24, 0.2)),
    url("../images/couple-main.jfif") center / cover no-repeat,
    linear-gradient(135deg, var(--sage), var(--champagne-beige));
}

.hero-panel {
  position: relative;
  overflow: hidden;
  align-self: center;
  padding: clamp(2rem, 6vw, 5rem);
}

.hero-panel::before {
  display: none;
}

.hero-panel > * {
  position: relative;
  z-index: 1;
}

.hero-eyebrow span {
  white-space: nowrap;
}

.hero-panel h2 {
  margin: 0;
  color: var(--army);
  font-size: clamp(4.4rem, 10vw, 8.5rem);
  font-weight: 600;
  line-height: 0.82;
}

.hero-amp {
  display: inline-block;
  font-size: 0.72em;
  line-height: 0.9;
}

.wedding-date {
  margin: 2rem 0;
  color: var(--olive);
  font-size: 1.2rem;
  font-weight: 700;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.countdown div {
  min-height: 88px;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 1rem 0.5rem;
  border: 1px solid rgba(99, 107, 47, 0.18);
  background: rgba(255, 253, 248, 0.62);
}

.countdown strong {
  font-size: clamp(1.35rem, 4vw, 2rem);
}

.countdown span {
  color: var(--olive);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.option-page {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgba(99, 107, 47, 0.16);
  border-bottom: 1px solid rgba(99, 107, 47, 0.16);
  background: var(--paper);
}

.option-page a {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  border-right: 1px solid rgba(99, 107, 47, 0.16);
  color: var(--army);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 700;
}

.option-page span {
  font-family: Inter, Arial, sans-serif;
  color: var(--olive);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
}

.section {
  position: relative;
  z-index: 0;
  overflow: hidden;
  padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 5vw, 4rem);
}

.section::before {
  display: none;
}

.section > * {
  position: relative;
  z-index: 1;
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 2rem;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  color: var(--army);
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.95;
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(2.4rem);
  transition:
    opacity 0.85s ease,
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.entourage-section .section-heading .eyebrow {
  margin: 0;
  color: var(--army);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: none;
}

.entourage-section .section-heading h2 {
  margin-top: 0.85rem;
  color: var(--olive);
  font-family: Inter, Arial, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

.details-grid {
  max-width: 1320px;
  margin: 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.details-grid article,
.entourage-list article,
.faq-list details {
  padding: 1.35rem;
  border: 1px solid rgba(99, 107, 47, 0.16);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.66);
  box-shadow: 0 12px 34px rgba(38, 48, 24, 0.08);
}

.details-grid article {
  display: grid;
  align-content: center;
  min-height: 240px;
  text-align: center;
}

.dress-code-card {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(100%, 820px);
}

.details-grid h3,
.entourage-list h3 {
  margin: 0 0 1rem;
  color: var(--olive);
  font-size: 0.84rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.details-grid p,
.entourage-list p {
  margin: 0.45rem 0;
  font-size: clamp(0.92rem, 1.4vw, 1rem);
  overflow-wrap: anywhere;
}

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

.entourage-combo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.entourage-combo.entourage-wide {
  grid-template-columns: repeat(2, minmax(0, 360px));
  justify-content: center;
  column-gap: 0.75rem;
}

.role-note {
  margin: 0;
  color: var(--olive);
}

.entourage-combo > .role-note {
  grid-column: 1 / -1;
  padding: 1.05rem 1rem 0;
}

.entourage-program {
  max-width: 980px;
  margin: 0 auto;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.25rem;
}

.entourage-card {
  text-align: center;
}

.entourage-subheading {
  grid-column: 1 / -1;
  margin: 1.25rem 0 0.35rem;
  text-align: center;
}

.entourage-subheading h3 {
  margin: 0;
  color: var(--olive);
  font-size: clamp(1.15rem, 2.6vw, 1.55rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.entourage-half {
  grid-column: span 6;
}

.entourage-wide {
  grid-column: 1 / -1;
}

.entourage-third {
  grid-column: span 4;
}

.entourage-wide .name-pair {
  max-width: 720px;
  margin-right: auto;
  margin-left: auto;
}

.entourage-third .name-pair p:first-child {
  grid-column: 2;
}

.entourage-third .name-pair p:nth-child(2) {
  grid-column: 1;
  grid-row: 1;
}

.sponsor-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 720px;
  margin-right: auto;
  margin-left: auto;
}

.role-side {
  padding: 1.35rem;
}

.role-side + .role-side {
  border-left: 0;
}

.role-side h3 {
  font-size: clamp(0.72rem, 1.5vw, 0.84rem);
}

.detail-title,
.detail-time {
  color: var(--army);
  font-weight: 800;
}

.detail-main {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.2rem, 4.4vw, 4.4rem);
  font-weight: 700;
  line-height: 0.95;
  text-transform: uppercase;
}

.detail-place {
  color: var(--army);
  font-weight: 800;
}

.map-link {
  justify-self: center;
  margin-top: 0.8rem;
  border: 1px solid rgba(99, 107, 47, 0.42);
  border-radius: 999px;
  padding: 0.8rem 1.15rem;
  color: var(--army);
  background: rgba(156, 175, 136, 0.22);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.map-link:hover,
.map-link:focus-visible {
  background: var(--olive);
  color: #fffdf8;
  outline: none;
  transform: translateY(-2px);
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.dress-color-helper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.swatch-button {
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid rgba(38, 48, 24, 0.2);
  border-radius: 50%;
  background: var(--swatch);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 253, 248, 0.72);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.swatch-button:hover,
.swatch-button:focus-visible {
  outline: 2px solid rgba(99, 107, 47, 0.36);
  outline-offset: 3px;
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 10px 24px rgba(38, 48, 24, 0.12);
}

.swatch-hint {
  position: relative;
  max-width: 100%;
  padding: 0.58rem 1rem;
  border-radius: 999px;
  color: var(--army);
  background: rgba(255, 248, 237, 0.88);
  border: 1px solid rgba(99, 107, 47, 0.18);
  box-shadow: 0 12px 28px rgba(38, 48, 24, 0.12);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  animation: bubbleHint 2.8s ease-in-out infinite;
}

.swatch-hint::before {
  display: none;
}

@keyframes bubbleHint {
  0%,
  100% {
    opacity: 0.42;
    transform: translateY(0);
  }
  45%,
  65% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.outfit-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(38, 48, 24, 0.42);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.26s ease, visibility 0.26s ease;
}

.outfit-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.outfit-dialog {
  position: relative;
  width: min(92vw, 760px);
  padding: clamp(1.35rem, 2.4vw, 2.1rem);
  border: 1px solid rgba(99, 107, 47, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 248, 237, 0.88), rgba(255, 248, 237, 0.9)),
    url("../images/sage-floral-background.png") center / cover no-repeat;
  box-shadow: var(--shadow);
  text-align: center;
  transform: translateY(0.8rem) scale(0.97);
  transition: transform 0.26s ease;
}

.outfit-modal.open .outfit-dialog {
  transform: translateY(0) scale(1);
}

.outfit-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(99, 107, 47, 0.18);
  border-radius: 50%;
  color: var(--army);
  background: rgba(255, 253, 248, 0.7);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.outfit-dialog h2 {
  margin: 0 0 1rem;
  color: var(--army);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  line-height: 1;
}

.outfit-preview {
  min-height: 260px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 2rem;
  padding: 1.35rem;
  border: 1px solid rgba(99, 107, 47, 0.14);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.52);
}

.dress-sample,
.suit-sample {
  position: relative;
  width: 6.2rem;
  height: 11.5rem;
}

.dress-sample::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 3.2rem;
  height: 3.6rem;
  border-radius: 1.6rem 1.6rem 0.45rem 0.45rem;
  background: var(--outfit-color);
  border: 1px solid rgba(38, 48, 24, 0.16);
  transform: translateX(-50%);
}

.dress-sample::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 6.2rem;
  height: 8.8rem;
  background: var(--outfit-color);
  border: 1px solid rgba(38, 48, 24, 0.16);
  clip-path: polygon(34% 0, 66% 0, 100% 100%, 0 100%);
  transform: translateX(-50%);
}

.suit-sample::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 4.6rem;
  height: 10.8rem;
  border-radius: 1rem 1rem 0.35rem 0.35rem;
  background:
    linear-gradient(90deg, rgba(38, 48, 24, 0.16), transparent 42%, rgba(38, 48, 24, 0.12)),
    var(--outfit-color);
  border: 1px solid rgba(38, 48, 24, 0.16);
  transform: translateX(-50%);
}

.suit-sample::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0.8rem;
  width: 1rem;
  height: 8.8rem;
  background: rgba(255, 253, 248, 0.7);
  clip-path: polygon(50% 0, 100% 18%, 65% 100%, 35% 100%, 0 18%);
  transform: translateX(-50%);
}

.outfit-note {
  margin: 1rem 0 0;
  color: var(--olive);
  font-weight: 700;
}

.entourage-section {
  background: linear-gradient(180deg, rgba(156, 175, 136, 0.16), rgba(247, 231, 206, 0.42));
}

.gallery-carousel {
  position: relative;
  min-height: clamp(520px, 48vw, 720px);
  display: grid;
  place-items: center;
  overflow: hidden;
  perspective: 1200px;
}

.gallery-stage {
  position: relative;
  width: min(100%, 1420px);
  min-height: clamp(500px, 44vw, 680px);
  transform-style: preserve-3d;
}

.gallery-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(62vw, 680px);
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: end start;
  padding: 1.1rem;
  border: 1px solid rgba(247, 231, 206, 0.72);
  border-radius: 8px;
  color: var(--paper);
  background:
    linear-gradient(180deg, transparent 36%, rgba(38, 48, 24, 0.72)),
    var(--image, linear-gradient(135deg, var(--sage), var(--olive))) center / cover no-repeat,
    linear-gradient(135deg, var(--sage), var(--olive));
  box-shadow: 0 28px 60px rgba(38, 48, 24, 0.28);
  opacity: 0;
  transform: translate(-50%, -50%) translateX(var(--x, 0)) translateZ(var(--z, 0)) rotateY(var(--rotate, 0)) scale(var(--scale, 0.72));
  transition:
    transform 0.72s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.42s ease,
    filter 0.42s ease;
  filter: saturate(0.86) brightness(0.88);
  overflow: hidden;
}

.outfit-photo {
  display: none;
  width: 100%;
  max-height: min(62vh, 620px);
  border-radius: 8px;
  object-fit: contain;
  background: rgba(255, 248, 237, 0.72);
}

.outfit-preview.has-photo {
  min-height: auto;
  align-items: center;
  padding: clamp(0.75rem, 1.8vw, 1.15rem);
}

.outfit-preview.has-photo .outfit-photo {
  display: block;
}

.outfit-preview.has-photo .dress-sample,
.outfit-preview.has-photo .suit-sample {
  display: none;
}

.gallery-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 26%;
  background: linear-gradient(180deg, transparent, rgba(38, 48, 24, 0.28));
  pointer-events: none;
}

.gallery-slide span {
  position: relative;
  z-index: 1;
  font-weight: 800;
}

.gallery-slide.is-active {
  --x: 0;
  --z: 130px;
  --rotate: 0deg;
  --scale: 1;
  z-index: 5;
  opacity: 1;
  filter: saturate(1) brightness(1);
}

.gallery-slide.is-prev {
  --x: -68%;
  --z: -120px;
  --rotate: 47deg;
  --scale: 0.78;
  z-index: 3;
  opacity: 0.78;
}

.gallery-slide.is-next {
  --x: 68%;
  --z: -120px;
  --rotate: -47deg;
  --scale: 0.78;
  z-index: 3;
  opacity: 0.78;
}

.gallery-slide.is-far-prev {
  --x: -112%;
  --z: -260px;
  --rotate: 64deg;
  --scale: 0.58;
  z-index: 1;
  opacity: 0.36;
}

.gallery-slide.is-far-next {
  --x: 112%;
  --z: -260px;
  --rotate: -64deg;
  --scale: 0.58;
  z-index: 1;
  opacity: 0.36;
}

.gallery-placeholder {
  --image: linear-gradient(135deg, rgba(156, 175, 136, 0.84), rgba(75, 83, 32, 0.82));
}

.gallery-slide:nth-child(3) {
  --image: linear-gradient(135deg, rgba(219, 196, 160, 0.9), rgba(99, 107, 47, 0.82));
}

.gallery-slide:nth-child(4) {
  --image: linear-gradient(135deg, rgba(210, 180, 140, 0.9), rgba(75, 83, 32, 0.84));
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 8;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(99, 107, 47, 0.22);
  border-radius: 50%;
  color: var(--army);
  background: rgba(255, 248, 237, 0.78);
  box-shadow: 0 14px 32px rgba(38, 48, 24, 0.14);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.gallery-arrow:hover,
.gallery-arrow:focus-visible {
  background: var(--sage);
  transform: translateY(-50%) scale(1.06);
}

.gallery-arrow-prev {
  left: clamp(1rem, 7vw, 8rem);
}

.gallery-arrow-next {
  right: clamp(1rem, 7vw, 8rem);
}

.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 900px;
  margin: 0 auto;
}

.faq-list summary {
  cursor: pointer;
  color: var(--army);
  font-weight: 800;
}

.faq-list p {
  margin: 0.85rem 0 0;
  color: #495238;
}

.rsvp-section {
  display: grid;
  place-items: center;
  min-height: 420px;
  background:
    linear-gradient(rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.56)),
    url("../images/sage-floral-background.png") center / cover no-repeat,
    #050604;
  color: #fffdf8;
}

.rsvp-cta {
  width: min(100%, 980px);
  text-align: center;
}

.rsvp-cta .eyebrow {
  color: var(--champagne-beige);
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  letter-spacing: 0.32em;
}

.rsvp-cta h2 {
  margin: 0;
  color: #fffdf8;
  font-family: Inter, Arial, sans-serif;
  font-size: clamp(2.25rem, 7vw, 5.6rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.05;
  text-transform: uppercase;
}

.rsvp-cta p {
  margin: 1.55rem auto 2.4rem;
  color: rgba(255, 253, 248, 0.72);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.rsvp-cta strong {
  color: var(--champagne-beige);
}

.rsvp-open-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  min-width: 190px;
  min-height: 58px;
  border: 1px solid var(--champagne-beige);
  color: var(--champagne-beige);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.rsvp-open-button:hover,
.rsvp-open-button:focus-visible {
  background: var(--champagne-beige);
  color: #050604;
  transform: translateY(-2px);
}

.rsvp-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(5, 6, 4, 0.66);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.34s ease, visibility 0.34s ease;
}

.rsvp-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.rsvp-dialog {
  position: relative;
  width: min(94vw, 620px);
  max-height: min(88vh, 640px);
  overflow: auto;
  padding: clamp(1.3rem, 4vw, 2rem);
  border: 1px solid rgba(219, 196, 160, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 248, 237, 0.9), rgba(255, 248, 237, 0.94)),
    url("../images/sage-floral-background.png") center / cover no-repeat;
  box-shadow: var(--shadow);
  text-align: center;
  opacity: 0;
  transform: translateY(1.4rem) scale(0.92);
  transition:
    opacity 0.26s ease,
    transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.rsvp-modal.open .rsvp-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.rsvp-modal.submitted .rsvp-dialog {
  display: grid;
  place-items: center;
  min-height: min(70vh, 390px);
  overflow: hidden;
}

.rsvp-modal.submitted .rsvp-form,
.rsvp-form[hidden] {
  display: none;
}

.rsvp-dialog h2 {
  margin: 0 0 1.4rem;
  color: var(--army);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.1rem, 7vw, 3.4rem);
}

.rsvp-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(99, 107, 47, 0.18);
  border-radius: 50%;
  color: var(--army);
  background: rgba(255, 253, 248, 0.76);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.rsvp-modal.submitted .rsvp-close {
  display: none;
}

.rsvp-thank-you {
  display: grid;
  justify-items: center;
  gap: 1.2rem;
  padding: clamp(1rem, 5vw, 2.5rem) 0;
  animation: rsvpThanksIn 0.56s ease both;
}

.rsvp-thank-you[hidden] {
  display: none;
}

.rsvp-thank-you h2 {
  margin: 0;
}

.rsvp-done-button {
  min-width: 8rem;
  padding: 1rem 1.5rem;
  background: var(--olive);
  color: var(--paper);
}

.rsvp-modal.sending .rsvp-form {
  pointer-events: none;
  animation: rsvpFormOut 0.42s ease both;
}

@keyframes rsvpFormOut {
  from {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }

  to {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(-0.8rem);
  }
}

@keyframes rsvpThanksIn {
  from {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(0.8rem);
  }

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

.rsvp-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 460px;
  margin: 0 auto;
}

.rsvp-form label {
  display: grid;
  gap: 0.5rem;
  color: var(--olive);
  font-weight: 700;
}

.rsvp-form .full {
  grid-column: 1 / -1;
}

.additional-guests {
  display: grid;
  gap: 0.65rem;
}

.guest-name-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 0.55rem;
}

.add-guest-button,
.remove-guest-button {
  border: 1px solid rgba(99, 107, 47, 0.22);
  color: var(--army);
  background: rgba(255, 253, 248, 0.72);
}

.add-guest-button {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.add-guest-button span {
  display: grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--olive);
  color: var(--paper);
  line-height: 1;
}

.add-guest-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.remove-guest-button {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  margin-top: 0.22rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.invitee-field {
  position: relative;
  display: grid;
  gap: 0.35rem;
  z-index: 5;
}

.invitee-menu {
  position: static;
  z-index: 20;
  display: none;
  max-height: 12rem;
  overflow-y: auto;
  border: 1px solid rgba(99, 107, 47, 0.22);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 0 18px 44px rgba(38, 48, 24, 0.14);
  text-align: left;
}

.invitee-status {
  display: block;
  min-height: 0;
  margin: 0;
  color: rgba(99, 107, 47, 0.82);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
}

.invitee-menu.open {
  display: block;
}

.invitee-option {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(99, 107, 47, 0.1);
  padding: 0.8rem 0.95rem;
  color: var(--army);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: left;
}

.invitee-option:hover,
.invitee-option:focus-visible {
  outline: none;
  background: rgba(156, 175, 136, 0.22);
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;
  border: 1px solid rgba(99, 107, 47, 0.24);
  border-radius: 8px;
  padding: 0.95rem 1rem;
  color: var(--army);
  background: rgba(255, 248, 237, 0.64);
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 253, 248, 0.54);
}

.rsvp-form input::placeholder,
.rsvp-form textarea::placeholder {
  color: rgba(38, 48, 24, 0.5);
}

.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
  outline: 2px solid rgba(99, 107, 47, 0.38);
  outline-offset: 2px;
  background: rgba(255, 253, 248, 0.78);
}

.rsvp-form textarea {
  resize: vertical;
}

.rsvp-form button {
  justify-self: center;
  padding: 1rem 1.5rem;
  background: var(--olive);
  color: var(--paper);
}

.rsvp-form .add-guest-button,
.rsvp-form .remove-guest-button {
  padding: 0;
  color: var(--army);
  background: rgba(255, 253, 248, 0.72);
}

.rsvp-form .add-guest-button {
  padding: 0.65rem 1rem;
}

.rsvp-modal.submitted .rsvp-form,
.rsvp-form[hidden] {
  display: none !important;
}

.form-status {
  align-self: center;
  min-height: 1.4rem;
  margin: 0;
  color: var(--army);
  font-weight: 700;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem clamp(1rem, 5vw, 4rem);
  background: var(--champagne);
  color: var(--army);
  font-weight: 700;
}

@media (max-width: 900px) {
  .site-header {
    align-items: center;
    padding: 0.7rem 0.85rem;
  }

  .main-nav {
    display: flex;
    flex: 1;
    justify-content: flex-end;
    gap: 0.2rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .main-nav a {
    flex: 0 0 auto;
    padding: 0.55rem 0.72rem;
    font-size: 0.78rem;
  }

  .nav-rsvp {
    padding-right: 0.82rem;
    padding-left: 0.82rem;
  }


  .hero {
    grid-template-columns: 1fr;
  }

  .hero-photo {
    min-height: 62vh;
  }

  .hero-panel {
    padding-top: 3rem;
    text-align: center;
  }

  .section,
  .section-heading,
  .details-grid article,
  .entourage-list article,
  .faq-list,
  .rsvp-form label,
  .form-status,
  .site-footer {
    text-align: center;
  }

  .section-heading {
    margin-right: auto;
    margin-left: auto;
  }

  .swatches {
    justify-content: center;
  }

  .faq-list {
    margin-right: auto;
    margin-left: auto;
  }

  .rsvp-form button {
    justify-self: center;
  }

  .option-page,
  .details-grid,
  .entourage-list,
  .faq-list,
  .rsvp-form {
    grid-template-columns: 1fr;
  }

  .entourage-program {
    max-width: 720px;
    grid-template-columns: 1fr;
  }

  .entourage-half,
  .entourage-wide,
  .entourage-third {
    grid-column: 1 / -1;
  }

  .gallery-slide {
    width: min(72vw, 420px);
  }
}

@media (min-width: 700px) and (max-width: 900px) {
  .details-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .details-grid article {
    min-height: 220px;
    padding: 1.15rem;
  }

  .dress-code-card {
    grid-column: 1 / -1;
  }

  .detail-main {
    font-size: clamp(1.7rem, 4vw, 2.65rem);
  }
}

@media (max-width: 560px) {
  .site-header {
    gap: 0.7rem;
    padding: 0.48rem 0.55rem 0.48rem 0.68rem;
  }

  .brand {
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 2.5rem;
    font-size: 0.76rem;
  }

  .main-nav {
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: clamp(0.22rem, 1.45vw, 0.5rem);
    overflow-x: visible;
    padding-bottom: 0;
  }

  .main-nav a {
    min-width: 0;
    padding: 0.42rem 0.16rem;
    font-size: clamp(0.52rem, 2.05vw, 0.62rem);
    line-height: 1;
    white-space: nowrap;
  }

  .nav-rsvp {
    padding-right: 0.48rem;
    padding-left: 0.48rem;
  }

  .gate-content {
    padding: 2rem 1rem;
  }

  .outfit-dialog {
    width: min(92vw, 430px);
    padding: 1.25rem;
  }

  .outfit-dialog h2 {
    font-size: clamp(2.05rem, 9vw, 3rem);
  }

  .outfit-photo {
    max-height: 58vh;
  }

  .details-section {
    padding-right: 0;
    padding-left: 0;
  }

  .details-section .section-heading {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .details-section .section-heading .eyebrow {
    margin-bottom: 0;
    font-size: clamp(0.9rem, 4vw, 1.08rem);
    letter-spacing: 0.18em;
  }

  .details-section .section-heading h2 {
    display: none;
  }

  .details-grid {
    gap: 0;
    max-width: none;
  }

  .details-grid .event-detail-card {
    position: relative;
    min-height: auto;
    border: 0;
    border-radius: 0;
    border-bottom: 1px solid rgba(99, 107, 47, 0.16);
    padding: 1.15rem 1.05rem 1.15rem 3.55rem;
    background: rgba(255, 253, 248, 0.58);
    box-shadow: none;
    color: var(--ink);
    text-align: left;
  }

  .details-grid .event-detail-card::before {
    content: "◇";
    position: absolute;
    left: 1.25rem;
    top: 1.35rem;
    color: var(--olive);
    font-size: 1.05rem;
    line-height: 1;
  }

  .details-grid .event-detail-card:first-child::before {
    content: "∞";
    letter-spacing: -0.18em;
  }

  .details-grid .map-detail-card::before {
    content: "✦";
    font-size: 0.92rem;
  }

  .details-grid .event-detail-card h3 {
    margin-bottom: 0.42rem;
    color: var(--olive);
    font-size: 0.58rem;
    letter-spacing: 0.2em;
  }

  .details-grid .event-detail-card p {
    margin: 0.18rem 0;
    color: rgba(38, 48, 24, 0.76);
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .details-grid .event-detail-card .detail-main {
    margin: 0 0 0.28rem;
    color: var(--army);
    font-family: Inter, Arial, sans-serif;
    font-size: clamp(1.45rem, 7vw, 2.12rem);
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.12;
  }

  .details-grid .event-detail-card .detail-place,
  .details-grid .event-detail-card .detail-time {
    color: var(--army);
    font-weight: 600;
  }

  .details-grid .event-detail-card .detail-time {
    margin-top: 0.35rem;
  }

  .details-grid .event-detail-card .map-link {
    justify-self: start;
    border-color: rgba(99, 107, 47, 0.42);
    border-radius: 4px;
    padding: 0.62rem 0.85rem;
    color: var(--army);
    background: rgba(156, 175, 136, 0.16);
    font-size: 0.62rem;
  }

  .details-grid .event-detail-card .map-link:hover,
  .details-grid .event-detail-card .map-link:focus-visible {
    background: var(--olive);
    color: #fffdf8;
  }

  .details-grid .dress-code-card {
    width: auto;
    margin: 1rem;
    border-radius: 8px;
  }

  .countdown {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
    width: min(100%, 430px);
    margin-right: auto;
    margin-left: auto;
  }

  .countdown div {
    min-height: 64px;
    padding: 0.7rem 0.25rem;
  }

  .countdown strong {
    font-size: clamp(1.05rem, 6vw, 1.55rem);
  }

  .countdown span {
    font-size: 0.62rem;
  }

  .hero-eyebrow {
    max-width: 22rem;
    margin-right: auto;
    margin-left: auto;
    font-size: clamp(0.62rem, 2.7vw, 0.72rem);
    line-height: 1.55;
    letter-spacing: 0.12em;
   }

  .name-pair {
    display: block;
    max-width: 22rem;
    margin-right: auto;
    margin-left: auto;
  }

  .entourage-list p {
    font-size: clamp(0.94rem, 4vw, 1.06rem);
    line-height: 1.35;
    overflow-wrap: normal;
  }

  .name-pair p + p {
    margin-top: 0.45rem;
  }

  .entourage-wide .name-pair + .name-pair {
    margin-top: 0.62rem;
  }

  .sponsor-columns {
    display: block;
    max-width: 22rem;
  }

  .sponsor-column + .sponsor-column {
    margin-top: 1.3rem;
    padding-top: 0.2rem;
  }

  .entourage-program {
    max-width: min(100%, 420px);
    gap: 0;
  }

  .entourage-list article {
    padding: 1.55rem 0.75rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .entourage-card + .entourage-card {
    border-top: 1px solid rgba(99, 107, 47, 0.18);
  }

  .entourage-subheading {
    margin: 2.25rem 0 -1.1rem;
  }

  .entourage-subheading + .entourage-combo {
    margin-top: 0;
    padding-top: 0;
  }

  .entourage-subheading h3 {
    font-size: clamp(0.9rem, 4.4vw, 1.08rem);
    letter-spacing: 0.18em;
  }

  .entourage-list h3 {
    margin-bottom: 0.85rem;
    font-size: clamp(0.9rem, 4.4vw, 1.08rem);
    letter-spacing: 0.18em;
    line-height: 1.2;
  }

  .entourage-combo {
    display: block;
    padding: 0;
    overflow: visible;
  }

  .entourage-combo > .role-note {
    padding: 0 0 0.8rem;
    font-size: clamp(0.9rem, 3.8vw, 1rem);
  }

  .role-side {
    padding: 0;
  }

  .role-side p {
    font-size: clamp(0.84rem, 3.55vw, 0.98rem);
    margin-top: 0.18rem;
    margin-bottom: 0.18rem;
    overflow-wrap: anywhere;
  }

  .role-side + .role-side {
    margin-top: 1.05rem;
    padding-top: 0.2rem;
    border-left: 0;
  }

  .role-side h3 {
    margin-bottom: 0.35rem;
    font-size: clamp(0.82rem, 3.8vw, 0.98rem);
    letter-spacing: 0.16em;
  }

  .entourage-third .role-note {
    margin-top: -0.35rem;
    margin-bottom: 0.15rem;
    font-size: clamp(0.86rem, 3.5vw, 0.96rem);
  }

  .entourage-third h3 {
    margin-bottom: 0.45rem;
  }

  .entourage-third .name-pair {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .entourage-third .name-pair p:first-child {
    order: 2;
    margin-top: -0.22rem;
    padding-top: 0;
  }

  .entourage-third .name-pair p:nth-child(2) {
    order: 1;
  }

  .entourage-third .name-pair p + p {
    margin-top: 0;
  }

  .entourage-third .name-pair p {
    width: 100%;
    margin: 0;
    line-height: 1.25;
    text-align: center;
  }

  .gallery-carousel {
    min-height: 320px;
  }

  .gallery-stage {
    min-height: 300px;
  }

  .gallery-slide {
    width: min(74vw, 330px);
  }

  .gallery-slide.is-prev,
  .gallery-slide.is-next {
    opacity: 0.52;
  }

  .gallery-slide.is-far-prev,
  .gallery-slide.is-far-next {
    opacity: 0;
  }

  .gallery-arrow {
    width: 2.65rem;
    height: 2.65rem;
    font-size: 1.7rem;
  }

  .site-footer {
    flex-direction: column;
  }
}
