/* Emerald Grande Wedding Invitation Stylesheet */

@font-face {
  font-family: "Bickham Script Pro 3";
  src: url("/templates/emerald/fonts/bickham-script-pro-3-regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --emerald-deep: #092c20;
  --emerald-rich: #0e3b2b;
  --emerald-accent: #17533d;
  --gold-primary: #c5a059;
  --gold-light: #e5cd96;
  --gold-dark: #8c6f32;
  --cream-paper: #fbf9f4;
  --cream-soft: #f4eee2;
  --ink-charcoal: #192620;
  --ink-muted: #53655c;
}

.emerald-site {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  background-color: var(--cream-paper);
  color: var(--ink-charcoal);
  font-family: "Cormorant Garamond", Georgia, serif;
  overflow-x: hidden;
  user-select: none;
}

/* ================= ENVELOPE OVERLAY ================= */
.emerald-envelope-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  z-index: 100;
  pointer-events: auto;
  overflow: hidden;
  background: transparent;
}

.emerald-door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.5%;
  height: 100%;
  overflow: hidden;
  transition: transform 3s cubic-bezier(0.45, 0, 0.2, 1);
  will-change: transform;
}

.emerald-door-left {
  left: 0;
  z-index: 5;
  box-shadow: 8px 0 24px rgba(0, 0, 0, 0.25);
  overflow: visible;
}

.emerald-door-right {
  right: 0;
  z-index: 1;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.25);
}

.emerald-door-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.emerald-door-left .emerald-door-img {
  object-position: right center;
}

.emerald-door-right .emerald-door-img {
  object-position: left center;
}

/* When opening: doors part left and right, moving all the way off-screen */
.emerald-envelope-overlay.is-opening .emerald-door-left {
  transform: translateX(calc(-100% - clamp(180px, 30vw, 260px)));
}

.emerald-envelope-overlay.is-opening .emerald-door-right {
  transform: translateX(calc(100% + 40px));
}

/* Wax Seal Interaction - Physically attached to the right edge of left door */
.emerald-seal-wrap {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translate(50%, -50%);
  z-index: 10;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  outline: none;
  background: none;
  border: none;
  padding: 0;
}

.emerald-seal-btn {
  position: relative;
  width: clamp(195px, 44vw, 265px);
  height: clamp(195px, 44vw, 265px);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s ease;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.42));
}

.emerald-seal-btn:hover {
  transform: scale(1.06);
  filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.52));
}

.emerald-seal-btn:active {
  transform: scale(0.95);
}

.emerald-seal-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Curved 'Tap to Open' Gold Text Arched Around the Top of the Wax Seal */
.emerald-seal-curved-svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 142%;
  height: 142%;
  pointer-events: none;
  overflow: visible;
  z-index: 5;
  transition: opacity 0.22s ease-out;
}

.emerald-seal-curved-text {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 400;
  font-size: 13.5px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  fill: rgba(232, 213, 163, 0.95);
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.7));
  animation: emeraldCurvedPulse 3s ease-in-out infinite;
}

@keyframes emeraldCurvedPulse {
  0%, 100% {
    opacity: 0.88;
    fill: rgba(232, 213, 163, 0.88);
  }
  50% {
    opacity: 1;
    fill: #fdf5df;
    filter: drop-shadow(0 0 8px rgba(232, 213, 163, 0.8)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.75));
  }
}

/* Stacked Overlapping Wax Seal Monogram Initials */
.emerald-seal-monogram {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 58%;
  height: 58%;
  pointer-events: none;
  z-index: 4;
  user-select: none;
}

.emerald-seal-initial {
  position: absolute;
  font-family: "Bodoni Moda", "Didot", "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-style: normal;
  font-size: clamp(56px, 11vw, 76px);
  line-height: 0.85;
  color: #e5cd96;
  text-shadow:
    0 1px 1px rgba(255, 255, 255, 0.45),
    0 -1px 2px rgba(20, 4, 8, 0.75),
    0 2px 5px rgba(15, 3, 6, 0.7);
  letter-spacing: -0.04em;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

/* Pair: one drifted top-left, other drifted bottom-right, overlapping */
.emerald-seal-monogram.has-pair .emerald-seal-initial-top {
  top: 38%;
  left: 37%;
  transform: translate(-50%, -50%);
  z-index: 1;
  opacity: 0.95;
}

.emerald-seal-monogram.has-pair .emerald-seal-initial-bottom {
  top: 61%;
  left: 63%;
  transform: translate(-50%, -50%);
  z-index: 2;
  opacity: 0.98;
}

.emerald-seal-btn:hover .emerald-seal-monogram.has-pair .emerald-seal-initial-top {
  transform: translate(-52%, -52%) scale(1.03);
}

.emerald-seal-btn:hover .emerald-seal-monogram.has-pair .emerald-seal-initial-bottom {
  transform: translate(-48%, -48%) scale(1.03);
}

/* Single initial: centered in seal basin */
.emerald-seal-monogram.is-single .emerald-seal-initial-top {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(52px, 9vw, 72px);
  z-index: 1;
}

.emerald-seal-btn:hover .emerald-seal-monogram.is-single .emerald-seal-initial-top {
  transform: translate(-50%, -50%) scale(1.04);
}

/* When opening: text disappears immediately, seal rides with left door */
.emerald-envelope-overlay.is-opening .emerald-seal-curved-svg {
  opacity: 0 !important;
}

/* ================= INVITATION STAGE: TILED BOTANICAL PATTERN ================= */
.emerald-stage {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #faf7ef;
  /* Floral wallpaper pattern as the full background */
  background-image: var(--emerald-floral-bg, url("/templates/emerald-custom/floral-pattern.jpg"));
  background-repeat: repeat;
  background-position: center top;
  /* Mobile: 1 tile wide filling 100% width, stacked vertically downwards */
  background-size: 100% auto;
  overflow: visible;
  padding: clamp(50px, 7vh, 80px) 16px clamp(110px, 15vh, 160px);
  box-sizing: border-box;
}

.emerald-stage,
.emerald-countdown-section,
.emerald-closing-pattern {
  background-size: 100% auto;
}

/* Bigger screens: add more tiles horizontally */
@media (min-width: 521px) and (max-width: 840px) {
  .emerald-stage,
  .emerald-countdown-section,
  .emerald-closing-pattern {
    background-size: calc(100% / 2) auto !important; /* 2 tiles across */
  }
}

@media (min-width: 841px) and (max-width: 1200px) {
  .emerald-stage,
  .emerald-countdown-section,
  .emerald-closing-pattern {
    background-size: calc(100% / 3) auto !important; /* 3 tiles across */
  }
}

@media (min-width: 1201px) and (max-width: 1600px) {
  .emerald-stage,
  .emerald-countdown-section,
  .emerald-closing-pattern {
    background-size: calc(100% / 4) auto !important; /* 4 tiles across (Laptop / Desktop) */
  }
}

@media (min-width: 1601px) and (max-width: 2100px) {
  .emerald-stage,
  .emerald-countdown-section,
  .emerald-closing-pattern {
    background-size: calc(100% / 5) auto !important; /* 5 tiles across */
  }
}

@media (min-width: 2101px) {
  .emerald-stage,
  .emerald-countdown-section,
  .emerald-closing-pattern {
    background-size: calc(100% / 6) auto !important; /* 6 tiles across on ultrawide */
  }
}

/* ================= HERO INVITATION CARD & TEXT ================= */
.emerald-hero-content {
  position: relative;
  z-index: 18; /* Sits naturally between envelope-back (z: 10) and envelope-front (z: 25) */
  width: 100%;
  max-width: 100%;
  text-align: center;
  padding: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
  pointer-events: auto;
  transform-origin: center center;
  will-change: transform;
}

.emerald-hero-content.emerald-hero-pending {
  visibility: hidden;
  opacity: 0;
  transform: translate3d(0, var(--card-pocket-y, 300px), 0) scale(0.52);
}

.emerald-hero-content.is-revealed {
  visibility: visible;
  opacity: 1;
}

.emerald-hero-content.is-revealed.is-opening-anim {
  animation: emeraldCardEmerge 1.8s cubic-bezier(0.2, 0.9, 0.28, 1) forwards;
}

.emerald-hero-content.is-revealed:not(.is-opening-anim) {
  transform: translate3d(0, var(--scroll-slide-y, 0px), 0) scale(var(--scroll-scale, 1));
}

.emerald-hero-content.is-inside-pocket {
  z-index: 18 !important;
}

.emerald-scroll-indicator {
  opacity: calc(1 - var(--scroll-p, 0) * 3.5);
  transition: opacity 0.15s ease-out;
}

@keyframes emeraldCardEmerge {
  0% {
    /* Directly inside envelope pocket between back & front */
    transform: translate3d(0, var(--card-pocket-y, 300px), 0) scale(0.52);
    opacity: 0.95;
    z-index: 18;
  }
  100% {
    /* Seamless, continuous glide into its centered full-size place */
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
    z-index: 18;
  }
}

/* Embossed Scalloped Card floating on the floral wallpaper */
.emerald-card-wrapper {
  position: relative;
  width: min(92vw, 460px);
  max-width: 100%;
  margin: 0 auto;
  contain: layout;
  container-type: inline-size;
  display: flex;
  justify-content: center;
  align-items: center;
  filter: 
    drop-shadow(0 4px 8px rgba(10, 28, 20, 0.15))
    drop-shadow(0 16px 28px rgba(8, 26, 18, 0.22))
    drop-shadow(0 32px 56px rgba(6, 20, 14, 0.28));
}

/* ================= SEAM ENVELOPE (BRIDGING TOP STAGE & COUNTDOWN) ================= */
.emerald-seam-envelope-layer {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 42%);
  width: min(86vw, 420px);
  max-width: 440px;
  pointer-events: none;
  user-select: none;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.emerald-seam-envelope-back-wrap {
  z-index: 10;
  filter: drop-shadow(0 24px 48px rgba(8, 28, 20, 0.45));
}

.emerald-seam-envelope-front-wrap {
  z-index: 25;
  filter: drop-shadow(0 -4px 16px rgba(8, 28, 20, 0.22));
}

/* Flower tucked inside the seam envelope pocket on the right */
.emerald-seam-envelope-flower-wrap {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 42%);
  width: min(86vw, 420px);
  max-width: 440px;
  aspect-ratio: 890 / 1024;
  pointer-events: none;
  user-select: none;
  z-index: 22;
}

.emerald-seam-envelope-flower-right {
  position: absolute;
  top: 4%;
  right: -4%;
  width: 48%;
  height: auto;
  display: block;
  transform: rotate(5deg);
  transform-origin: bottom center;
  filter: drop-shadow(2px 10px 20px rgba(10, 32, 20, 0.28));
}

.emerald-seam-envelope-img {
  width: 100%;
  height: auto;
  display: block;
}

.emerald-card-bg-img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  user-select: none;
  pointer-events: none;
}

.emerald-card-inner-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Centered within the embossed arch with expanded horizontal room for larger text */
  padding: 21% 14% 17%;
  box-sizing: border-box;
  text-align: center;
  z-index: 2;
}

/* Card inner typography - bigger and bolder */
.emerald-card-inner-text .emerald-hero-eyebrow {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(10px, 3.1vw, 13.5px);
  font-size: clamp(10px, 3.3cqi, 14px);
  letter-spacing: 0.22em;
  line-height: 1.45;
  text-transform: uppercase;
  color: #17382a;
  margin: 0 0 clamp(6px, 2.2cqi, 12px);
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.4);
}

/* Unified Luxury Gold Foil Shine Animation for Camille, &, and Antoine */
@keyframes emeraldNameShine {
  0% {
    background-position: 220% center;
  }
  100% {
    background-position: -220% center;
  }
}

.emerald-card-inner-text .emerald-hero-name-one,
.emerald-card-inner-text .emerald-hero-name-two {
  font-family: "Playfair Display", "Cormorant Garamond", Georgia, serif;
  font-size: clamp(26px, 8.5vw, 46px);
  font-size: clamp(26px, 10cqi, 48px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
  width: 100%;
  color: #07261a;
  background: linear-gradient(
    115deg,
    #07261a 0%,
    #07261a 32%,
    #c5a059 47%,
    #fff6dd 52%,
    #c5a059 57%,
    #07261a 72%,
    #07261a 100%
  );
  background-size: 260% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: emeraldNameShine 4.5s ease-in-out infinite;
  text-shadow: none;
}

.emerald-card-inner-text .emerald-hero-and-wrap {
  position: relative;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: clamp(2px, 0.8cqi, 8px) auto;
  width: 100%;
}

.emerald-card-inner-text .emerald-hero-and {
  position: relative;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(30px, 9.5vw, 52px);
  font-size: clamp(30px, 11cqi, 54px);
  line-height: 1;
  transform: none !important;
  color: #07261a;
  background: linear-gradient(
    115deg,
    #07261a 0%,
    #07261a 32%,
    #c5a059 47%,
    #fff6dd 52%,
    #c5a059 57%,
    #07261a 72%,
    #07261a 100%
  );
  background-size: 260% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: emeraldNameShine 4.5s ease-in-out infinite;
  text-shadow: none;
}

.emerald-card-inner-text .emerald-hero-invite {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(9.5px, 2.7vw, 13px);
  font-size: clamp(9.5px, 2.9cqi, 13px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1a3c2e;
  line-height: 1.6;
  margin: clamp(8px, 2.4cqi, 14px) 0 0;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.4);
}

/* Ornate Gold Dividers */
.emerald-ornate-divider {
  width: clamp(140px, 32vw, 190px);
  margin-left: auto;
  margin-right: auto;
  display: block;
}

.emerald-ornate-top {
  margin-bottom: 0.75rem;
  animation: bwLuxurySmallReveal 1.7s cubic-bezier(0.22, 1, 0.36, 1) 100ms both;
}

.emerald-ornate-bottom {
  margin-top: 1.15rem;
  margin-bottom: 1.25rem;
  animation: bwLuxurySmallReveal 1.7s cubic-bezier(0.22, 1, 0.36, 1) 900ms both;
}

.emerald-ornate-divider-img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 5px rgba(184, 150, 88, 0.2));
}

.emerald-hero-eyebrow {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(0.8rem, 2.4vw, 1rem);
  letter-spacing: 0.28em;
  line-height: 1.6;
  text-transform: uppercase;
  color: #1a3c2c;
  margin-bottom: 0.65rem;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.95), 0 0 10px rgba(254, 251, 245, 0.95);
  animation: bwLuxurySmallReveal 1.7s cubic-bezier(0.22, 1, 0.36, 1) 200ms both;
}

.emerald-hero-name-one,
.emerald-hero-name-two {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.65rem, 6.5vw, 4.25rem);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #07261a;
  background: linear-gradient(
    115deg,
    #07261a 0%,
    #07261a 32%,
    #c5a059 47%,
    #fff6dd 52%,
    #c5a059 57%,
    #07261a 72%,
    #07261a 100%
  );
  background-size: 260% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
  overflow-wrap: anywhere;
  width: 100%;
  animation: emeraldNameShine 4.5s ease-in-out infinite;
  text-shadow: none;
}

/* Flourish 'and' with long sweeping curved lines */
.emerald-hero-and-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: -0.2rem auto;
  width: 100%;
  animation: bwHandwritingReveal 2s cubic-bezier(0.22, 1, 0.36, 1) 480ms both;
}

.emerald-hero-and-flourish {
  width: clamp(190px, 58vw, 290px);
  max-width: 90%;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(184, 150, 88, 0.22));
}

.emerald-hero-invite {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(0.85rem, 2.5vw, 1.1rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #1a3c2c;
  line-height: 1.8;
  margin-top: 1.05rem;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.95), 0 0 10px rgba(254, 251, 245, 0.95);
  animation: bwLuxurySmallReveal 1.7s cubic-bezier(0.22, 1, 0.36, 1) 780ms both;
}

/* Scroll indicator with gold vertical stem and diamond star arrow */
.emerald-scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0.25rem auto 0;
  animation: bwLuxurySmallReveal 1.7s cubic-bezier(0.22, 1, 0.36, 1) 1000ms both;
}

.emerald-scroll-label {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(0.64rem, 2vw, 0.74rem);
  font-weight: 600;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: #1a3c2c;
  margin-bottom: 0.35rem;
}

.emerald-scroll-arrow-img {
  width: 13px;
  height: 38px;
  display: block;
  animation: emeraldScrollBounce 2.2s ease-in-out infinite;
}

@keyframes emeraldScrollBounce {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.85;
  }
  50% {
    transform: translateY(6px);
    opacity: 1;
  }
}

.emerald-hero-date-section {
  margin-top: 1.5rem;
  width: 100%;
}

.emerald-hero-date {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.08rem, 3.2vw, 1.4rem);
  font-weight: 600;
  color: var(--emerald-deep);
  line-height: 1.55;
  letter-spacing: 0.04em;
  margin-top: 0;
  animation: bwLuxurySmallReveal 1.7s cubic-bezier(0.22, 1, 0.36, 1) 1100ms both;
}

.emerald-slot-digit-window {
  display: inline-block;
  overflow: hidden;
  height: 1.18em;
  line-height: 1.18em;
  width: 0.62em;
  vertical-align: -0.12em;
  font-variant-numeric: tabular-nums;
  position: relative;
}

.emerald-slot-digit-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.emerald-slot-digit-cell {
  display: block;
  width: 100%;
  text-align: center;
  height: 1.18em;
  line-height: 1.18em;
}

.emerald-slot-text {
  display: inline;
}

.emerald-hero-venue {
  margin-top: 0.8rem;
  animation: bwLuxurySmallReveal 1.7s cubic-bezier(0.22, 1, 0.36, 1) 1120ms both;
}

.emerald-hero-venue-name {
  font-family: "Bodoni Moda", serif;
  font-size: clamp(1.05rem, 3.2vw, 1.3rem);
  font-weight: 600;
  color: var(--emerald-deep);
  letter-spacing: 0.04em;
}

.emerald-hero-venue-location {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.92rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 4px;
}

.emerald-hero-rsvp-wrap {
  margin-top: 2rem;
  animation: bwLuxurySmallReveal 1.7s cubic-bezier(0.22, 1, 0.36, 1) 1240ms both;
}

/* Keyframe animations matching Burgundy */
@keyframes bwLuxurySmallReveal {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(4px);
    letter-spacing: 0.28em;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    letter-spacing: 0.2em;
  }
}

@keyframes bwLuxuryNameReveal {
  from {
    opacity: 0;
    transform: translateY(22px);
    filter: blur(6px);
    letter-spacing: 0.12em;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    letter-spacing: 0.04em;
  }
}

@keyframes bwHandwritingReveal {
  from {
    opacity: 0;
    clip-path: inset(-80% 100% -80% -30%);
    transform: translateY(8px);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    clip-path: inset(-80% -30% -80% -30%);
    transform: translateY(0);
    filter: blur(0);
  }
}

.bw-word {
  display: inline-block;
  white-space: nowrap;
}

.bw-letter {
  display: inline-block;
  animation: bwLetterReveal 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes bwLetterReveal {
  from {
    opacity: 0;
    transform: translateY(8px);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.bw-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;
}

.emerald-divider {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
  margin: 1.25rem auto 0.95rem;
  animation: bwLuxurySmallReveal 1.7s cubic-bezier(0.22, 1, 0.36, 1) 920ms both;
}

.emerald-rsvp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #717540;
  color: #fbf9f4;
  padding: 14px 34px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(90, 94, 45, 0.28);
  transition: all 0.3s ease;
  border: 1px solid rgba(197, 160, 89, 0.4);
  cursor: pointer;
  text-decoration: none;
}

.emerald-rsvp-btn:hover {
  transform: translateY(-2px);
  background: #5d6132;
  box-shadow: 0 12px 26px rgba(90, 94, 45, 0.36);
  border-color: var(--gold-light);
}

.emerald-rsvp-deadline {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 12px;
}

/* Modal for RSVP Reply */
.emerald-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 44, 32, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.emerald-modal-dialog {
  background: #ffffff;
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  padding: 36px 30px;
  position: relative;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(197, 160, 89, 0.35);
  text-align: center;
}

/* ================= ROUND SOUND TOGGLE BUTTON ================= */
.emerald-sound-btn {
  position: fixed;
  top: clamp(14px, 2.5vh, 22px);
  right: clamp(14px, 2.5vw, 24px);
  z-index: 150;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(197, 160, 89, 0.45);
  background: rgba(255, 255, 255, 0.88);
  color: #092c20;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(197, 160, 89, 0.2);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: none;
}

.emerald-sound-btn:hover {
  transform: scale(1.08);
  background: #ffffff;
  border-color: rgba(197, 160, 89, 0.85);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18), 0 3px 8px rgba(197, 160, 89, 0.35);
  color: #8c6f32;
}

.emerald-sound-btn:active {
  transform: scale(0.93);
}

/* Keep the invitation within the floral frame at every viewport width. */
.emerald-hero-content .bw-word {
  display: inline !important;
  white-space: normal !important;
}

.emerald-hero-and-wrap {
  gap: 0.7rem;
  max-width: 320px;
  margin: 0.3rem auto 0.5rem;
}



.emerald-hero-and {
  font-family: "Pinyon Script", cursive;
  font-kerning: normal;
  font-feature-settings: "liga" 1, "calt" 1;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--gold-dark);
}

.emerald-scroll-indicator {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  margin: clamp(6px, 1.2vh, 14px) auto 0;
  z-index: 38;
  width: max-content;
  max-width: 80%;
  text-decoration: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: none;
}

.emerald-scroll-indicator:focus-visible {
  outline: 2px solid var(--gold-dark);
  outline-offset: 6px;
}

.emerald-details {
  position: relative;
  z-index: 38;
  width: min(60%, 640px);
  margin: 0 auto;
  padding: 72px 0 96px;
  text-align: center;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  line-height: 1.6;
  scroll-margin-top: 40px;
}

.emerald-details h2 {
  font-family: "Bodoni Moda", Georgia, serif;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.emerald-details .emerald-rsvp-btn {
  margin-top: 2rem;
  max-width: 100%;
}

/* Reference composition: airy small caps, tall names, and a handwritten connector. */
.emerald-hero-eyebrow,
.emerald-hero-invite {
  font-weight: 500;
  letter-spacing: 0.2em;
  color: #38534a;
}


@keyframes emeraldTextReveal {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px), (max-width: 1024px) and (orientation: portrait) {
  .emerald-chandelier-left,
  .emerald-chandelier-right { display: none; }

  .emerald-chandelier-center {
    display: block;
    top: 1.5dvh;
    z-index: 24;
  }

  .emerald-chandelier-center .emerald-chandelier-img {
    width: min(58vw, 28dvh);
    filter: drop-shadow(0 12px 20px rgba(140, 111, 50, 0.25));
  }

  .emerald-stage {
    justify-content: center;
    padding: clamp(50px, 7vh, 75px) 16px clamp(100px, 14vh, 140px);
    overflow: visible;
  }

  .emerald-hero-content {
    width: 100%;
    max-width: 100%;
    padding: 0;
  }

  .emerald-ornate-divider { width: 31vw; }
  .emerald-ornate-top { margin-bottom: 1.5dvh; }
  .emerald-ornate-bottom { margin: 2dvh auto 0; }

  .emerald-hero-eyebrow {
    font-size: clamp(12px, 3.45vw, 24px);
    line-height: 1.6;
    margin: 0 0 2dvh;
    width: 100%;
  }

  .emerald-hero-invite {
    font-size: clamp(12px, 3.45vw, 24px);
    line-height: 1.7;
    margin: 2.2dvh 0 0;
    width: 100%;
    text-wrap: balance;
  }

  .emerald-curtain-left { left: clamp(-55px, -12vw, -30px); }
  .emerald-curtain-right { right: clamp(-55px, -12vw, -30px); }

  .emerald-side-flowers {
    top: 44%;
    height: 34dvh;
    max-width: 19vw;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.2));
  }

  .emerald-scroll-indicator {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    margin: clamp(6px, 1.2vh, 14px) auto 0;
  }
  .emerald-scroll-label {
    font-size: clamp(10px, 2.6vw, 18px);
    letter-spacing: 0.25em;
  }
  .emerald-scroll-arrow-img { height: 44px; width: 12px; margin-top: 8px; }
}

/* The opening scene belongs to the document, including every decorative layer. */
.emerald-stage { overflow: visible !important; }
.emerald-stage .emerald-curtain-top,
.emerald-stage .emerald-curtain-left,
.emerald-stage .emerald-curtain-right,
.emerald-stage .emerald-side-flowers,
.emerald-stage .emerald-chandelier-rig { position: absolute; }
.emerald-stage .emerald-curtain-left,
.emerald-stage .emerald-curtain-right { height: 100%; }
.emerald-story { position: relative; background: #f3efe5; }
.emerald-section {
  position: relative;
  padding: clamp(72px, 10vw, 120px) 28px;
  text-align: center;
  overflow: clip;
  transition: opacity 1.5s ease, transform 1.5s cubic-bezier(.22,1,.36,1);
  scroll-margin-top: 24px;
}
.emerald-section > :not(.emerald-section-floral) { position: relative; z-index: 1; }
.emerald-reveal-pending { opacity: 0; transform: translateY(24px); }
.emerald-section h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 400;
  line-height: 1.12;
  max-width: 580px;
  margin: 14px auto 32px;
  color: #123e2f;
  text-wrap: balance;
}
.emerald-section h3 { font-size: clamp(25px, 3vw, 34px); font-weight: 400; line-height: 1.2; }
.emerald-section p { max-width: 460px; margin-left: auto; margin-right: auto; font-size: 18px; line-height: 1.7; color: #53655c; }
.emerald-story .emerald-kicker { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: #96753c; }
.emerald-dress-section { padding-bottom: 0; }
.emerald-dress-section h2 { font-size: clamp(48px, 10vw, 80px); margin-bottom: 8px; }
.emerald-dress-section h3 { font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(30px, 7vw, 48px); margin: 20px 0; }
.emerald-dress-section p { max-width: 340px; font-style: italic; margin-bottom: 40px; }
.emerald-dress-rule { display: block; width: 160px; margin: 0 auto; color: #96753c; }
.emerald-dress-rule::before, .emerald-dress-rule::after { content: ''; display: inline-block; width: 52px; height: 1px; background: #b69a65; vertical-align: middle; margin: 0 8px; }

/* Interactive Disco Ball with Curved Hint Text Underneath */
.emerald-disco-ball-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 15px auto 0;
  position: relative;
  z-index: 5;
}

.emerald-disco-ball-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0 auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.emerald-disco-ball-btn:hover {
  transform: scale(1.04);
}

.emerald-disco-ball-btn:active {
  transform: scale(0.97);
}

.emerald-disco-ball {
  width: clamp(140px, 38vw, 210px);
  aspect-ratio: 1;
  margin: 0 auto;
  pointer-events: auto;
  filter: drop-shadow(0 10px 28px rgba(18, 62, 47, 0.2));
  transition: filter 0.3s ease;
  position: relative;
  z-index: 2;
}

.emerald-disco-ball-btn.is-dancing .emerald-disco-ball {
  filter: drop-shadow(0 14px 36px rgba(197, 160, 89, 0.5));
}

.emerald-disco-ball canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Curved hint text stacked under the disco ball, cradling its bottom edge */
.emerald-disco-curved-svg {
  width: clamp(230px, 56vw, 320px);
  height: clamp(80px, 20vw, 115px);
  margin-top: clamp(-55px, -14vw, -78px);
  overflow: visible;
  pointer-events: none;
  position: relative;
  z-index: 3;
}

.emerald-disco-curved-text {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.26em;
  fill: #8c6f32;
  text-transform: uppercase;
  transition: fill 0.3s ease;
}

.emerald-disco-ball-btn:hover .emerald-disco-curved-text,
.emerald-disco-ball-btn.is-dancing .emerald-disco-curved-text {
  fill: #c5a059;
}

.emerald-dancers {
  display: grid;
  width: min(100%, 500px);
  margin: clamp(12px, 3vh, 24px) auto 0;
}

.emerald-dancers img {
  grid-area: 1 / 1;
  width: 100%;
  align-self: end;
}

/* Still state: only the first dancer image is visible */
.emerald-dancers-still img:first-child {
  opacity: 1;
}

.emerald-dancers-still img:last-child {
  display: none;
}

/* Dancing state: alternate animation */
.emerald-dancers-animated img:first-child {
  animation: emerald-dancer-step .7s steps(1) infinite;
}

.emerald-dancers-animated img:last-child {
  animation: emerald-dancer-step .7s steps(1) infinite reverse;
}

.emerald-reveal-pending .emerald-dancers img { animation-play-state: paused; }
@keyframes emerald-dancer-step { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .emerald-dancers-animated img { animation: none; }
  .emerald-dancers-animated img:last-child { display: none; }
}
.emerald-section-floral { position: absolute; width: 140px; height: 280px; object-fit: contain; right: -66px; top: -45px; opacity: .55; transform: rotate(-24deg); pointer-events: none; }
.emerald-countdown { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 540px; margin: 40px auto 24px; }
.emerald-countdown-date {
  margin: -8px auto 34px !important;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(17px, 2.8vw, 23px) !important;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.emerald-countdown-date + .emerald-countdown { margin-top: 0; }
.emerald-countdown > div + div { border-left: 1px solid #c5a05940; }
.emerald-countdown span { display: block; color: #123e2f; font-size: clamp(35px, 7vw, 65px); font-weight: 300; font-variant-numeric: tabular-nums; line-height: 1.1; }
.emerald-countdown small { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: .15em; margin-top: 14px; color: #96753c; }
.emerald-tiny-ornament { display: block; color: #b48a3e; font-size: 30px; margin-top: 32px; }
.emerald-venue-section {
  padding: 0;
  background: #f3efe5;
}
.emerald-venue-arch {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  aspect-ratio: 672 / 1024;
  padding: 16% 23% 16%;
  box-sizing: border-box;
}
.emerald-venue-frame {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}
.emerald-venue-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.emerald-venue-content > h2 {
  margin: 0 0 8px;
  font-size: clamp(1.3rem, 4.2vw, 1.8rem);
  line-height: 1.25;
  color: #092c20;
}
.emerald-venue-gate {
  display: block;
  width: min(58%, 180px);
  max-width: 180px;
  height: auto;
  margin: 6px auto 10px;
  filter: drop-shadow(0 10px 14px rgba(9, 44, 32, .18));
  transform-origin: bottom center;
  animation: emeraldGateReveal 1.5s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes emeraldGateReveal {
  from { opacity: 0; transform: translateY(22px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.emerald-venue-arch h3 {
  margin: 6px 0 4px;
  font-size: clamp(1.05rem, 3.4vw, 1.3rem);
  color: #123e2f;
  line-height: 1.3;
}
.emerald-venue-arch p {
  margin: 0;
  font-size: clamp(0.8rem, 2.5vw, 0.92rem);
  line-height: 1.45;
  color: #3d5248;
  max-width: 280px;
}
.emerald-venue-arch .emerald-text-link {
  margin-top: 12px;
}

@media (min-width: 901px) {
  .emerald-venue-section {
    overflow: visible;
  }

  .emerald-venue-arch {
    position: relative;
    width: 100%;
    max-width: none;
    height: calc(100vw * 672 / 1024);
    min-height: calc(100vw * 672 / 1024);
    aspect-ratio: 1024 / 672;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
  }

  .emerald-venue-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    height: 100vw;
    width: calc(100vw * 672 / 1024);
    max-width: none;
    object-fit: fill;
    transform: translate(-50%, -50%) rotate(90deg);
    pointer-events: none;
  }

  .emerald-venue-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: min(52vw, 480px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0;
  }

  .emerald-venue-content > h2 {
    margin: 0 0 6px;
    font-size: clamp(1.4rem, 2.2vw, 1.95rem);
    line-height: 1.2;
  }

  .emerald-venue-gate {
    width: min(30vw, 140px);
    max-width: 140px;
    height: auto;
    margin: 4px auto 8px;
  }

  .emerald-venue-arch h3 {
    margin: 4px 0 2px;
    font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  }

  .emerald-venue-arch p {
    font-size: clamp(0.8rem, 1.3vw, 0.92rem);
    max-width: 440px;
  }

  .emerald-venue-arch .emerald-text-link {
    margin-top: 10px;
  }
}
.emerald-text-link { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; border-bottom: 1px solid #b48a3e; padding: 5px 0; font-size: 12px; letter-spacing: .1em; color: #123e2f; }
.emerald-timeline-section { overflow: visible; background: #f3efe5; }
.emerald-timeline-layout {
  display: grid;
  grid-template-columns: clamp(84px, 20vw, 120px) 1px minmax(0, 1fr);
  column-gap: clamp(18px, 5vw, 42px);
  width: min(100%, 570px);
  margin: 52px auto 0;
  text-align: left;
}
.emerald-timeline-illustrations {
  display: grid;
  grid-template-rows: repeat(5, minmax(165px, auto));
}
.emerald-timeline-illustrations > span {
  display: grid;
  place-items: start center;
  padding-top: 10px;
  color: #6f7255;
}
.emerald-timeline-illustrations img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.emerald-timeline-rail {
  position: relative;
  align-self: stretch;
  min-height: 825px;
  background: linear-gradient(to bottom, transparent, #aa8b50 5%, #aa8b50 95%, transparent);
}
.emerald-timeline-heart {
  position: sticky;
  top: calc(50svh - 17px);
  align-self: start;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-left: -16.5px;
  color: #9b7a3e;
  filter: drop-shadow(0 3px 5px rgba(70, 49, 17, .18));
}
.emerald-timeline-heart svg { width: 25px; height: 25px; fill: #9b7a3e; stroke-width: 1; }
.emerald-timeline {
  display: grid;
  grid-template-rows: repeat(5, minmax(165px, auto));
  list-style: none;
  margin: 0;
  padding: 0;
}
.emerald-timeline li { padding: 4px 0 34px; }
.emerald-timeline h3 {
  margin: 6px 0 8px;
  font-family: "Pinyon Script", cursive;
  font-size: clamp(32px, 6vw, 46px);
  color: #264a3b;
}
.emerald-timeline p { margin: 0; font-size: 16px; line-height: 1.55; }

/* `hidden` creates a non-scrolling ancestor that prevents sticky positioning. */
.emerald-site { overflow-x: clip; }

.emerald-rsvp-section { background: #f3efe5; }
.emerald-rsvp-envelope {
  position: relative;
  width: min(86vw, 420px);
  max-width: 440px;
  aspect-ratio: 890 / 1024;
  margin: 40px auto 16px;
  isolation: isolate;
  container-type: inline-size;
}
.emerald-rsvp-envelope > img {
  position: absolute;
  pointer-events: none;
}
.emerald-rsvp-envelope-back {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  filter: drop-shadow(0 20px 40px rgba(8, 28, 20, 0.38));
}
.emerald-rsvp-envelope-flower {
  position: absolute;
  top: 4%;
  right: -4%;
  width: 48%;
  height: auto;
  z-index: 2;
  transform: rotate(5deg);
  transform-origin: bottom center;
  filter: drop-shadow(2px 10px 20px rgba(10, 32, 20, 0.28));
  pointer-events: none;
}
.emerald-rsvp-heart {
  position: absolute;
  top: 0;
  left: 50%;
  width: 72%;
  opacity: 0;
  z-index: 3;
  will-change: transform, opacity;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.emerald-rsvp-envelope-front {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  filter: drop-shadow(0 -4px 14px rgba(8, 28, 20, 0.18));
}
.emerald-rsvp-heart > img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 24px rgba(9, 44, 32, 0.2));
}
.emerald-rsvp-heart p {
  position: absolute;
  inset: 22% 19% 31%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: #fff4dd;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(15px, 5.2cqw, 27px);
  font-style: italic;
  line-height: 1.15;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.emerald-section-icon { width: 42px; height: 42px; stroke-width: 1; color: #96753c; margin: 0 auto 22px; }
.emerald-rsvp-form-wrap { max-width: 460px; margin: 32px auto 0; padding: clamp(20px, 4vw, 36px); background: #fbf9f4; border: 1px solid #b48a3e40; border-radius: 4px; }
.emerald-rsvp-form-wrap input, .emerald-rsvp-form-wrap textarea { font-size: 16px; }
.emerald-rsvp-form-wrap label { font-size: 10px; letter-spacing: .12em; }
.emerald-rsvp-form-wrap .emerald-form-error { color: #9b2929; font-size: 15px; }
.emerald-closing-scene {
  background: #f3efe5;
  width: 100%;
}

.emerald-closing-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  place-items: center;
  width: 100%;
  min-height: clamp(620px, 80vh, 880px);
  padding: clamp(60px, 8vh, 120px) 24px;
  border: 0;
  background: transparent;
  color: #123e2f;
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

.emerald-rsvp-form-wrap button[type="submit"],
.emerald-rsvp-section .customer-rsvp button {
  background: #717540 !important;
  color: #fffcf6 !important;
  box-shadow: 0 6px 18px rgba(113, 117, 64, 0.28);
  transition: all 0.25s ease;
}
.emerald-rsvp-form-wrap button[type="submit"]:hover,
.emerald-rsvp-section .customer-rsvp button:hover {
  background: #5d6132 !important;
  box-shadow: 0 8px 22px rgba(93, 97, 50, 0.36);
}

.emerald-closing-pattern,
.emerald-closing-painting {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  background-image: var(--emerald-floral-bg, url("/templates/emerald-custom/floral-pattern.jpg"));
  background-repeat: repeat;
  background-position: center top;
  background-size: 100% auto;
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.35) 20%, #000 55%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.35) 20%, #000 55%);
  pointer-events: none;
}

.emerald-closing-badge {
  position: relative;
  z-index: 10;
  display: block;
  width: min(76vw, 350px);
  filter: drop-shadow(0 12px 18px #192d2630);
  container-type: inline-size;
}

/* Bigger screens: center badge vertically and horizontally when at the very bottom */
@media (min-width: 768px) {
  .emerald-closing-scene {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .emerald-closing-card {
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    place-items: center;
    padding: 32px 24px;
    box-sizing: border-box;
  }

  .emerald-closing-badge {
    margin: auto;
    width: min(36vw, 370px);
  }

  .emerald-closing-painting {
    object-position: center 55%;
  }
}

.emerald-closing-badge > img { display: block; width: 100%; height: auto; pointer-events: none; }
.emerald-closing-badge-copy { position: absolute; inset: 23% 20% 22%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; }
.emerald-closing-label { font-size: clamp(8px, 3cqw, 11px); letter-spacing: .18em; text-transform: uppercase; }
.emerald-closing-initials { display: flex; align-items: center; gap: .06em; font-family: "Cormorant Garamond", Georgia, serif; font-size: 26cqw; line-height: 1; font-weight: 400; }
.emerald-closing-initials > span { font-family: "Pinyon Script", cursive; font-size: .48em; color: #858754; }
.emerald-closing-message { font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(15px, 5.4cqw, 19px); font-style: italic; line-height: 1.35; text-wrap: balance; overflow-wrap: anywhere; }
.emerald-script-heading { font-family: "Pinyon Script", cursive; font-size: 38px !important; }
.emerald-story a:focus-visible, .emerald-story button:focus-visible { outline: 2px solid #b48a3e; outline-offset: 5px; }
@media (prefers-reduced-motion: reduce) {
  .emerald-site *, .emerald-site *::before, .emerald-site *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .emerald-reveal-pending { opacity: 1; transform: none; }
}

/* Countdown section: floral wallpaper pattern matching the top stage, no painting, no scroll animation */
.emerald-countdown-section {
  position: relative;
  overflow-x: clip;
  background-color: #faf7ef;
  background-image: var(--emerald-floral-bg, url("/templates/emerald-custom/floral-pattern.jpg"));
  background-repeat: repeat;
  background-position: center top;
  padding-top: clamp(190px, 24vw, 270px);
  padding-bottom: clamp(340px, 40vw, 440px);
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
  animation: none !important;
  transition: none !important;
}

.emerald-countdown-section::before {
  display: none !important;
}

/* Smoothly fade the floral pattern to cream at the bottom of the countdown section, well below the card & flower */
.emerald-countdown-section::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(140px, 18vw, 220px);
  background: linear-gradient(
    to bottom,
    rgba(243, 239, 229, 0) 0%,
    rgba(243, 239, 229, 0.4) 35%,
    rgba(243, 239, 229, 0.85) 75%,
    #f3efe5 100%
  );
  pointer-events: none;
  z-index: 1;
}

.emerald-countdown-section.emerald-reveal-pending,
.emerald-countdown-section.is-revealed {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
  animation: none !important;
  transition: none !important;
}

/* ================= COUNTDOWN ORNATE SAGE PLAQUE ================= */
.emerald-countdown-plaque-wrapper {
  position: relative;
  z-index: 10;
  width: min(92vw, 470px);
  max-width: 100%;
  margin: 0 auto;
  contain: layout;
  container-type: inline-size;
  filter: drop-shadow(0 14px 28px rgba(18, 48, 32, 0.14)) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.06));
}

.emerald-countdown-swans-wrap {
  display: none;
}

/* Cascading floral bouquet on the left side of the plaque */
.emerald-countdown-bouquet-left {
  position: absolute;
  top: clamp(-24px, -5cqi, -8px);
  left: clamp(-46px, -11cqi, -18px);
  width: clamp(96px, 30cqi, 155px);
  height: auto;
  z-index: 15;
  pointer-events: none;
  user-select: none;
  transform: rotate(-3deg);
  transform-origin: top center;
  filter: drop-shadow(3px 10px 18px rgba(10, 32, 20, 0.22));
}

/* Botanical rose blossom on the bottom-right corner of the plaque */
.emerald-countdown-bouquet-right {
  position: absolute;
  bottom: clamp(-46px, -11cqi, -18px);
  right: clamp(-38px, -9cqi, -14px);
  width: clamp(145px, 42cqi, 215px);
  height: auto;
  z-index: 15;
  pointer-events: none;
  user-select: none;
  transform-origin: 98% 64%;
  filter: drop-shadow(4px 12px 24px rgba(10, 32, 20, 0.26)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08));
  animation: emerald-flower-breeze-right 5.6s ease-in-out infinite -1.8s;
  will-change: transform;
}

@keyframes emerald-flower-breeze-right {
  0%, 100% {
    transform: rotate(0.5deg);
  }
  34% {
    transform: rotate(3.6deg);
  }
  60% {
    transform: rotate(1.2deg);
  }
  80% {
    transform: rotate(4.0deg);
  }
}

/* Golden botanical marigold flower on the bottom-left below countdown (bigger than pink flower) */
.emerald-countdown-flower-gold {
  position: absolute;
  bottom: clamp(-106px, -24cqi, -48px);
  left: clamp(-58px, -14cqi, -24px);
  width: clamp(180px, 52cqi, 275px);
  height: auto;
  z-index: 15;
  pointer-events: none;
  user-select: none;
  transform-origin: 0% 53%;
  filter: drop-shadow(4px 16px 28px rgba(10, 32, 20, 0.28)) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.08));
  animation: emerald-flower-breeze-left 5.2s ease-in-out infinite;
  will-change: transform;
}

@keyframes emerald-flower-breeze-left {
  0%, 100% {
    transform: rotate(0.5deg);
  }
  32% {
    transform: rotate(-3.2deg);
  }
  60% {
    transform: rotate(-1deg);
  }
  82% {
    transform: rotate(-3.8deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .emerald-countdown-flower-gold,
  .emerald-countdown-bouquet-right {
    animation: none !important;
  }
}

/* Big screens only: move the two animated flowers all the way to the edges, offset slightly, and double their size */
@media (min-width: 901px) {
  .emerald-countdown-flower-gold {
    left: calc(-1 * (50vw - 235px) - clamp(16px, 2vw, 40px));
    bottom: clamp(-20px, 0vw, 40px);
    width: clamp(360px, 29vw, 550px);
    filter: drop-shadow(6px 20px 36px rgba(10, 32, 20, 0.32)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
  }

  .emerald-countdown-bouquet-right {
    right: calc(-1 * (50vw - 235px) - clamp(16px, 2vw, 40px));
    bottom: clamp(40px, 4vw, 100px);
    width: clamp(290px, 23vw, 430px);
    filter: drop-shadow(6px 18px 32px rgba(10, 32, 20, 0.3)) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.1));
  }
}

.emerald-countdown-plaque-bg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  pointer-events: none;
}

.emerald-countdown-plaque-inner {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  padding: 25% 8% 21%;
  box-sizing: border-box;
}

.emerald-countdown-plaque-inner .emerald-kicker {
  font-family: "Bodoni Moda", "Playfair Display", "Cormorant Garamond", Georgia, serif !important;
  font-size: clamp(20px, 6.5cqi, 32px) !important;
  font-weight: 500 !important;
  line-height: 1.15 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  color: #123e2f !important;
  margin: 0 !important;
  opacity: 0.95;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.45);
}

/* ================= BIG STACKED EDITORIAL DATE (DAY / MONTH / YEAR) ================= */
.emerald-countdown-big-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  text-align: center;
}

.emerald-big-day {
  font-family: "Bodoni Moda", "Playfair Display", "Cormorant Garamond", Georgia, serif !important;
  font-size: clamp(74px, 24cqi, 116px) !important;
  font-weight: 400 !important;
  line-height: 0.82 !important;
  letter-spacing: -0.02em !important;
  color: #123e2f !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.45) !important;
}

.emerald-big-month {
  font-family: "Bodoni Moda", "Playfair Display", "Cormorant Garamond", Georgia, serif !important;
  font-size: clamp(26px, 8.5cqi, 40px) !important;
  font-weight: 600 !important;
  line-height: 1.1 !important;
  letter-spacing: 0.15em !important;
  text-transform: uppercase !important;
  color: #123e2f !important;
  margin: clamp(4px, 1.2cqi, 10px) 0 !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.45) !important;
}

.emerald-big-year {
  font-family: "Bodoni Moda", "Playfair Display", "Cormorant Garamond", Georgia, serif !important;
  font-size: clamp(74px, 24cqi, 116px) !important;
  font-weight: 400 !important;
  line-height: 0.82 !important;
  letter-spacing: -0.02em !important;
  color: #123e2f !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.45) !important;
}

/* ================= COUNTDOWN AT THE BOTTOM ================= */
.emerald-countdown-bottom-wrap {
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(3px, 1cqi, 6px);
}

/* 3-Column Countdown at bottom of plaque */
.emerald-countdown-plaque-inner .emerald-countdown {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  width: 100% !important;
  max-width: clamp(210px, 68cqi, 280px) !important;
  margin: 0 auto !important;
}

.emerald-countdown-plaque-inner .emerald-countdown > div + div {
  border-left: 1.5px solid rgba(23, 56, 42, 0.22) !important;
}

.emerald-countdown-plaque-inner .emerald-countdown span {
  display: block !important;
  color: #123e2f !important;
  font-family: "Cormorant Garamond", Georgia, serif !important;
  font-size: clamp(26px, 8.4cqi, 38px) !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  font-variant-numeric: tabular-nums !important;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.4) !important;
}

.emerald-countdown-plaque-inner .emerald-countdown small {
  display: block !important;
  color: #3b5c49 !important;
  font-size: clamp(8.5px, 2.4cqi, 11px) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.18em !important;
  font-weight: 600 !important;
  margin-top: clamp(2px, 0.7cqi, 5px) !important;
}

.emerald-countdown-plaque-inner .emerald-tiny-ornament {
  display: block !important;
  color: #436652 !important;
  font-size: clamp(11px, 3cqi, 15px) !important;
  line-height: 1 !important;
  margin: 0 auto !important;
  opacity: 0.75;
}

/* Emerald custom: full background floral pattern for top stage */
.emerald-site { background-color: #f4eee2; }
.emerald-stage {
  position: relative;
  z-index: 20;
  overflow: visible !important;
}
.emerald-story {
  position: relative;
  z-index: 5;
  margin-top: 0;
  background-color: #f4eee2;
}

/* Reserve the final stage height before the envelope opens. */
.emerald-hero-pending { visibility: hidden; }
.emerald-hero-pending,
.emerald-hero-pending * { animation-play-state: paused !important; }

/* A pressed-flower portrait bridges the landscape and the venue paper. */
.emerald-countdown-section { padding-bottom: clamp(340px, 40vw, 440px); }
.emerald-portrait-section {
  z-index: 2;
  margin-top: -140px;
  padding: 0 0 48px;
  overflow: visible;
  background: linear-gradient(to bottom, transparent 140px, #f3efe5 140px);
}
.emerald-portrait-composition {
  position: relative;
  width: min(92vw, 680px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  isolation: isolate;
}

.emerald-portrait-wreath-img {
  display: block;
  width: 100%;
  max-width: 620px;
  height: auto;
  aspect-ratio: 749 / 1016;
  object-fit: contain;
  filter: drop-shadow(0 20px 42px rgba(25, 48, 36, 0.16)) drop-shadow(0 4px 14px rgba(0, 0, 0, 0.06));
}

@media (min-width: 901px) {
  .emerald-portrait-composition {
    width: min(50vw, 480px);
  }
  .emerald-portrait-wreath-img {
    max-width: 440px;
  }
}

.emerald-portrait-frame,
.emerald-portrait-mask,
.emerald-gold-frame,
.emerald-portrait-flower {
  display: none !important;
}

.emerald-portrait-composition figcaption {
  margin: clamp(20px, 4vw, 32px) auto 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: clamp(21px, 4.6vw, 30px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: #4a5331;
  text-align: center;
}

/* Guest information: stationery cards and a framed gift note. */
.emerald-site .emerald-travel-section,
.emerald-site .emerald-gifts-section { padding: 72px 24px; text-align: center; }
.emerald-site .emerald-guest-icon { width: 30px; height: 30px; margin: 0 auto 20px; color: #9b814b; stroke-width: 1; }
.emerald-site .emerald-guest-intro { max-width: 520px; margin: 22px auto 32px; line-height: 1.8; white-space: pre-line; }
.emerald-site .emerald-travel-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 20px; max-width: 1000px; margin: 36px auto 0; }
.emerald-site .emerald-travel-card { padding: 32px 24px; border: 1px solid #9b814b55; border-radius: 100px 100px 8px 8px; background: #fffdf555; }
.emerald-site .emerald-travel-card h3 { font-family: inherit; font-size: 26px; font-weight: 400; margin: 18px 0; }
.emerald-site .emerald-travel-card p { line-height: 1.8; white-space: pre-line; overflow-wrap: anywhere; }
.emerald-site .emerald-guest-link { display: inline-flex; align-items: center; justify-content: center; gap: 10px; color: inherit; border-bottom: 1px solid #9b814b; padding: 10px 0; margin-top: 18px; text-decoration: none; }
.emerald-site .emerald-guest-link:focus-visible { outline: 2px solid currentColor; outline-offset: 6px; }
.emerald-site .emerald-gift-note { max-width: 620px; margin: auto; padding: 48px 28px; border: 1px solid #9b814b88; outline: 1px solid #9b814b44; outline-offset: -9px; border-radius: 140px 140px 12px 12px; background: #fffdf555; }
.emerald-site .emerald-gift-note h2, .emerald-site .emerald-travel-section h2 { overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .emerald-site .emerald-travel-section, .emerald-site .emerald-gifts-section { padding: 52px 22px; }
  .emerald-site .emerald-gift-note { padding: 48px 24px 36px; }
}

.emerald-site .emerald-gift-illustration {
  display: block;
  width: min(100%, 320px);
  height: auto;
  margin: 0 auto 30px;
  object-fit: contain;
}


/* Botanical stationery supplied for Travel & Stay. */
.emerald-site .emerald-travel-card {
  border: 0;
  border-radius: 0;
  background: url('/templates/emerald-custom/travel-card.png') center / 100% 100% no-repeat;
  min-height: 390px;
  padding: 52px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #173f2e;
}
.emerald-site .emerald-travel-card .emerald-kicker { color: #3f5025; }
.emerald-site .emerald-travel-card p { font-size: 17px; line-height: 1.7; }
@media (max-width: 480px) {
  .emerald-site .emerald-travel-card { min-height: 400px; padding: 48px 36px; }
}

.emerald-site .emerald-travel-illustration {
  display: block;
  width: 100%;
  max-width: 160px;
  height: 110px;
  object-fit: contain;
  margin: 4px auto 24px;
}
.emerald-site .emerald-travel-card { justify-content: flex-start; }
@media (max-width: 480px) {
  .emerald-site .emerald-travel-illustration { height: 100px; max-width: 145px; }
}

.emerald-site .emerald-venue-content > h3 {
  font-size: clamp(2rem, 7vw, 3.5rem);
  line-height: 1.12;
  margin: 24px 0 18px;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
@media (min-width: 901px) {
  .emerald-site .emerald-venue-content > h3 { font-size: clamp(2.5rem, 4vw, 4rem); }
}
