.opening {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 25% 15%, #fffcf5 0, #eee9df 70%);
  perspective: 1400px;
  overflow: hidden;
}
.opening:before {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px solid #d7cebd;
  pointer-events: none;
}
.envelope-shell {
  width: min(86vw, 650px);
  aspect-ratio: 1.35;
  position: relative;
  filter: drop-shadow(0 24px 24px #534d3d25) drop-shadow(0 2px 2px #67574022);
  perspective: 1200px;
  background: #e3dbca;
  border: 1px solid #ddd1bc;
}
.envelope-front {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    #e9decd,
    #f5efe3 28%,
    #f1e7d6 74%,
    #fffaf0
  );
  clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%);
  z-index: 3;
}
.envelope-front:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, #fffdf6, #f5edde 70%);
  box-shadow: inset 0 -1px 0 #cbbda599;
  clip-path: polygon(0 100%, 50% 44%, 100% 100%);
}
.flap {
  position: absolute;
  inset: 0 0 46%;
  background: linear-gradient(155deg, #fff9ed, #eee5d5 62%, #d6c8af);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top;
  z-index: 4;
  backface-visibility: hidden;
}
.guest-name {
  position: absolute;
  z-index: 5;
  left: 8%;
  right: 8%;
  bottom: 11%;
  text-align: center;
  font-family: var(--display-font);
  font-size: clamp(1.35rem, 5.6vw, 2.5rem);
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.seal {
  position: absolute;
  width: 75px;
  height: 75px;
  left: 50%;
  top: 43%;
  transform: translate(-50%, -50%);
  background: none;
  border: 0;
  padding: 0;
  z-index: 6;
  filter: drop-shadow(0 3px 2px #51402022);
}
.seal svg {
  width: 100%;
  height: 100%;
  fill: #b59a65;
  stroke: #d9c598;
  stroke-width: 2;
}
.seal:after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid #eadab7;
  border-radius: 48% 48% 42% 42%;
  opacity: 0.25;
}
.seal:hover {
  filter: brightness(1.08);
}
.monogram {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-bottom: 12px;
  font-family: var(--display-font);
  font-size: 17px;
  color: #45351f;
  text-shadow: 0 1px 0 #e6d4ad;
}
.emerging-card {
  position: absolute;
  inset: 8% 7%;
  background: #fcfaf4;
  display: grid;
  place-items: center;
  border: 1px solid #d4c8b2;
  z-index: 1;
}
.emerging-card span {
  font-size: clamp(1.6rem, 5vw, 3rem);
  font-style: italic;
}
.is-opening .seal {
  animation: unseal 0.7s forwards;
}
.is-opening .flap {
  animation: unfold 1.3s 0.4s forwards;
}
.is-opening .emerging-card {
  animation: emerge 1.8s 1s forwards;
}
.is-opening .envelope-shell {
  animation: depart 1.4s 2.1s forwards;
}
.is-opening {
  animation: fade-away 1s 2.6s forwards;
}
@keyframes unseal {
  to {
    opacity: 0;
    transform: translate(-50%, -65%) scale(1.12);
  }
}
@keyframes unfold {
  to {
    transform: rotateX(180deg);
  }
}
@keyframes emerge {
  to {
    transform: translateY(-45%) scale(1.04);
  }
}
@keyframes depart {
  to {
    transform: translateY(30vh);
    opacity: 0;
  }
}
@keyframes fade-away {
  to {
    opacity: 0;
  }
}
.hero {
  height: 100svh;
  min-height: 550px;
  isolation: isolate;
  position: relative;
  overflow: hidden;
  background: #686c5d;
  color: #fffdf5;
}
.hero-image,
.hero-shade {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  inset: 0;
}
.hero-shade {
  background: linear-gradient(180deg, #131b1812, #10151018 35%, #1820178c);
}
.hero-copy {
  position: absolute;
  inset: auto 22px 23%;
  text-align: center;
}
.hero h1 {
  font-size: clamp(3.3rem, 13vw, 7.8rem);
  font-weight: 400;
  line-height: 1.05;
  margin: 24px auto 22px;
  max-width: 1000px;
  text-wrap: balance;
  outline: 0;
}
.hero .eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.32em;
}
.hero-date {
  font-size: clamp(0.95rem, 3vw, 1.3rem);
}
.entering .hero-image {
  animation: cinema 24s ease-out forwards;
}
.entering .hero-copy > * {
  animation: reveal 1.5s 2.7s both;
}
.entering .hero-copy h1 {
  animation-delay: 3s;
}
.entering .hero-date {
  animation-delay: 3.3s;
}
@keyframes cinema {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.055);
  }
}
.scroll-cue {
  position: absolute;
  bottom: calc(32px + env(safe-area-inset-bottom));
  left: calc(50% - 24px);
  width: 48px;
  height: 48px;
  text-align: center;
  text-decoration: none;
  font-size: 27px;
  border: 1px solid #ffffff55;
  border-radius: 50%;
  line-height: 44px;
}
#welcome {
  padding-top: 90px;
  padding-bottom: 58px;
}
#countdown {
  padding-top: 28px;
  padding-bottom: 80px;
}
.countdown {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}
.countdown > div {
  width: 25%;
  max-width: 165px;
  padding: 0 5px;
  border-right: 1px solid var(--line);
}
.countdown > div:last-child {
  border: 0;
}
.countdown strong {
  font-weight: 400;
  font-family: var(--display-font);
  font-size: clamp(1.7rem, 7.5vw, 4.3rem);
  line-height: 1.1;
  display: block;
  font-variant-numeric: tabular-nums;
}
.countdown span {
  font:
    0.7rem Arial,
    sans-serif;
  letter-spacing: 0;
  display: block;
  margin-top: 15px;
}
#locations {
  border-top: 1px solid #d6cfbf88;
  border-bottom: 1px solid #d6cfbf88;
}
.locations {
  display: grid;
  gap: 64px;
}
.location h3 {
  max-width: 340px;
  margin: 18px auto 15px;
}
.location > p:not(.eyebrow) {
  font-size: 0.95rem;
}
.location-time {
  margin: 10px 0;
}
.location .line-icon {
  display: block;
}
.timeline {
  list-style: none;
  text-align: left;
  max-width: 360px;
  margin: 45px auto 0;
  padding: 0 0 0 26px;
}
.timeline li {
  position: relative;
  border-left: 1px solid var(--line);
  padding: 0 0 38px 45px;
  min-height: 100px;
}
.timeline li:last-child {
  border: 0;
  padding-bottom: 0;
  min-height: 50px;
}
.timeline-mark {
  position: absolute;
  left: -21px;
  top: -3px;
  background: var(--paper);
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
}
.timeline-mark .line-icon {
  width: 25px;
  height: 25px;
  margin: 0;
}
.timeline h3 {
  margin-top: 7px;
}
#dress-code {
  background: #ede9df;
  max-width: none;
}
.dress-columns {
  display: grid;
  gap: 28px;
  max-width: 720px;
  margin: auto;
}
.dress-columns p {
  max-width: 340px;
  margin: 12px auto 0;
}
.swatches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px 14px;
  list-style: none;
  padding: 0;
  max-width: 490px;
  margin: 35px auto;
}
.swatches li {
  width: 65px;
  font:
    0.7rem Arial,
    sans-serif;
  line-height: 1.4;
}
.swatch {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin: 0 auto 10px;
  border: 1px solid #00000015;
}
.dress-note {
  font-style: italic;
  font-size: 0.95rem;
}
.closing-quote {
  font-size: clamp(1.4rem, 4.8vw, 2.15rem);
  margin-top: 26px;
}
.signature {
  font-size: clamp(2.8rem, 10vw, 4.7rem);
  font-style: italic;
  margin-top: 42px;
  line-height: 1.1;
}
.closing-date {
  letter-spacing: 0.2em;
  font-size: 0.85rem;
  margin: 22px 0 36px;
}
#closing {
  padding-bottom: calc(110px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
footer {
  font:
    0.6rem Arial,
    sans-serif;
  letter-spacing: 0.4em;
  margin-top: 65px;
  color: var(--muted);
}
.floating-cta {
  position: fixed;
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  z-index: 10;
  animation: cta-in 0.3s both;
}
@keyframes cta-in {
  from {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
.music-control {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top));
  right: 6px;
  z-index: 11;
  border: 1px solid #cac2b0;
  background: #f6f2eaef;
  color: var(--accent);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 20px;
}
dialog {
  width: calc(100% - 28px);
  max-width: 520px;
  max-height: calc(100dvh - 40px);
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 42px 24px 28px;
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #181c16aa;
}
dialog h2 {
  font-size: 2.25rem;
  margin: 16px 0;
}
dialog > p {
  font-size: 0.9rem;
}
.close-dialog {
  position: absolute;
  right: 6px;
  top: 4px;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  font-size: 28px;
  color: var(--ink);
}
fieldset {
  padding: 0;
  border: 0;
  margin: 26px 0;
}
legend {
  margin-bottom: 12px;
}
.choices {
  display: flex;
  gap: 16px;
}
.choices label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid var(--line);
  padding: 10px 20px;
  flex: 1;
}
input[type="radio"] {
  accent-color: var(--ink);
  width: 18px;
  height: 18px;
}
.field {
  margin-bottom: 24px;
}
.field label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.95rem;
}
select,
textarea {
  width: 100%;
  border: 1px solid #9f9d92;
  background: #fffdf7;
  padding: 13px;
  color: var(--ink);
  font-size: 16px;
  border-radius: 0;
}
textarea {
  resize: vertical;
}
.form-status {
  font-size: 0.92rem;
  margin: 15px 0;
}
.form-status:empty {
  display: none;
}

.floating-cta {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 12px);
  animation: none;
  transition:
    opacity 0.3s,
    transform 0.3s,
    visibility 0.3s;
}
.floating-cta.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* Original embossed botanical paper, attached to each folding surface. */
.envelope-shell {
  --paper-pattern: url("/releases/6ab471f752f5a46483ff/assets/images/paper-emboss.svg");
  --paper-grain: repeating-linear-gradient(96deg, #8976510d 0 1px, transparent 1px 3px);
}
.envelope-front {
  background-image: var(--paper-pattern), var(--paper-grain), linear-gradient(135deg, #e6d8c1, #f5eddd 32%, #e4d5bd 75%, #fff8eb);
  background-size: 132px 162px, auto, auto;
  background-position: center top;
}
.envelope-front::after {
  background-image: var(--paper-pattern), var(--paper-grain), linear-gradient(165deg, #fff9ec, #ede0c9 70%);
  background-size: 132px 162px, auto, auto;
  background-position: center bottom;
  -webkit-mask-position: center bottom;
  mask-position: center bottom;
}
.flap {
  background-image: var(--paper-pattern), var(--paper-grain), linear-gradient(155deg, #fff8e9, #eddfc8 62%, #cdbb98);
  background-size: 132px 162px, auto, auto;
  background-position: center -12px;
}
.flap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 28%, #ffffff45 48%, transparent 65%);
  opacity: .65;
}
.guest-name {
  text-shadow: 0 1px 2px #fff9ec, 0 0 8px #fff9ec, 0 0 16px #fff9ec;
}
.opening::after {
  content: "";
  position: absolute;
  inset: -20%;
  pointer-events: none;
  background: radial-gradient(ellipse at 35% 48%, #fff3cf88, transparent 38%);
  opacity: 0;
  mix-blend-mode: soft-light;
}
.is-opening::after {
  animation: paper-light 2.8s ease-in-out both;
}
@keyframes paper-light {
  0%,
  100% {
    opacity: 0;
    transform: translateX(-10%);
  }
  40% {
    opacity: 0.85;
  }
  80% {
    transform: translateX(12%);
  }
}
.seal svg {
  filter: drop-shadow(0 2px 1px #6b512b55);
}
.hero::after {
  content: "";
  position: absolute;
  z-index: 2;
  bottom: -1px;
  left: -5%;
  width: 110%;
  height: 34px;
  background: var(--paper);
  border-radius: 55% 45% 0 0 / 95% 75% 0 0;
  pointer-events: none;
}
.hero-ornament {
  font-size: 1.7rem;
  color: inherit;
  opacity: 0.65;
  line-height: 1;
  margin: 25px 0;
}
.hero-arch {
  display: none;
}
.hero-editorial {
  background: var(--paper);
  color: var(--ink);
}
.hero-editorial .hero-shade {
  background: radial-gradient(ellipse at 50% 35%, #fffcf4, #e9e0cf 110%);
}
.hero-editorial .hero-shade::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background: repeating-linear-gradient(
    0deg,
    #b8a98f0b 0 1px,
    transparent 1px 4px
  );
}
.hero-editorial .hero-arch {
  display: block;
  position: absolute;
  inset: 9% 7% 10%;
  border: 1px solid #c9bba377;
  border-radius: 48% 48% 3px 3px / 31% 31% 3px 3px;
}
.hero-editorial .hero-arch::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid #c9bba333;
  border-radius: inherit;
}
.hero-editorial .hero-copy {
  inset: 37% 28px auto;
}
.hero-editorial h1 {
  font-size: clamp(3.3rem, 14vw, 7rem);
  line-height: 1.1;
  max-width: 850px;
}
.hero-editorial .eyebrow,
.hero-editorial .hero-date {
  color: #786449;
}
.hero-editorial .scroll-cue {
  color: var(--accent);
  border-color: #a88f6555;
  bottom: calc(54px + env(safe-area-inset-bottom));
}
#invitation {
  overflow: clip;
}
#welcome,
#gifts {
  position: relative;
  isolation: isolate;
}
#welcome::before,
#gifts::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 380px;
  background: url("/releases/6ab471f752f5a46483ff/assets/images/floral-line.svg") center/contain no-repeat;
  pointer-events: none;
  opacity: 0.22;
  filter: blur(0.25px);
  z-index: -1;
}
#welcome::before {
  top: 18px;
  left: -153px;
  transform: rotate(-12deg);
}
#gifts::after {
  right: -155px;
  bottom: 24px;
  transform: rotate(160deg);
}
#dress-code {
  position: relative;
  border-radius: 48% 35% 0 0 / 24px 20px 0 0;
}
.visible .line-icon {
  animation: icon-arrive 0.7s ease-out both;
}
@keyframes icon-arrive {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.music-control {
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  box-shadow: 0 2px 10px #574e3b0d;
}
.music-control.is-playing {
  border-color: var(--accent);
}

/* Light follows the same botanical strokes on each folding paper surface. */
.envelope-front::before,
.paper-light-bottom,
.flap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: #ffe0a0;
  -webkit-mask-image: url("/releases/6ab471f752f5a46483ff/assets/images/paper-emboss-light.svg");
  mask-image: url("/releases/6ab471f752f5a46483ff/assets/images/paper-emboss-light.svg");
  -webkit-mask-size: 132px 162px;
  mask-size: 132px 162px;
  -webkit-mask-position: center top;
  mask-position: center top;
  filter: drop-shadow(0 0 2px #eeb54c) drop-shadow(0 0 6px #ffdf9b);
}
.envelope-front::before { z-index: 1; }
.paper-light-bottom {
  z-index: 2;
  clip-path: polygon(0 100%, 50% 44%, 100% 100%);
  background-position: center bottom;
  -webkit-mask-position: center bottom;
  mask-position: center bottom;
}
.envelope-front::before {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 44%, 0 100%);
}
.flap::after {
  -webkit-mask-position: center -12px;
  mask-position: center -12px;
}
.is-opening .envelope-front::before,
.is-opening .paper-light-bottom,
.is-opening .flap::after {
  animation: botanical-light 2.1s ease-in-out both;
}
@keyframes botanical-light {
  0% { opacity: 0; }
  16% { opacity: .95; }
  45% { opacity: .8; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .is-opening .envelope-front::before,
  .is-opening .paper-light-bottom,
  .is-opening .flap::after { animation: none; opacity: 0; }
}

/* Floral keepsake revealed by the original opening sequence. */
.emerging-card {
  background: url("/releases/6ab471f752f5a46483ff/assets/images/wedding-floral-frame.svg") center / 100% 100% no-repeat,
    radial-gradient(ellipse at center, #fffaf0 25%, #eee0c9 100%);
  border: 1px solid #d3bf9a;
  border-radius: 34% 34% 3px 3px / 28% 28% 3px 3px;
  box-shadow: 0 6px 22px #66513318, inset 0 0 20px #fffaf0;
  overflow: hidden;
}
.wedding-card-copy {
  width: 62%;
  text-align: center;
  display: grid;
  gap: clamp(6px, 1.6vw, 16px);
  justify-items: center;
  color: #655336;
}
.wedding-card-copy small {
  font-family: Georgia, serif;
  font-size: clamp(.48rem, 1.65vw, .72rem);
  letter-spacing: .18em;
  text-transform: uppercase;
}
.emerging-card .wedding-card-copy span {
  font-family: var(--display-font);
  font-size: clamp(1.25rem, 4.6vw, 2.7rem);
  font-style: normal;
  line-height: 1.1;
  text-wrap: balance;
}
.wedding-card-mark { opacity: .7; }

/* The same wedding flowers remain after the opening, framing the editorial hero. */
.hero-editorial .hero-arch {
  background: url("/releases/6ab471f752f5a46483ff/assets/images/wedding-hero-flowers.svg") center / 100% 100% no-repeat;
}
