:root {
  --paper: #f6efe3;
  --paper-deep: #efe0cc;
  --rose: #cc7d7f;
  --rose-soft: #e1b0ad;
  --sage: #70755d;
  --ink: #59493f;
  --gold: #af8550;
  --shadow: rgba(97, 75, 55, 0.12);
  --glow: rgba(255, 247, 235, 0.72);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, serif;
  --script: "Snell Roundhand", "Apple Chancery", "URW Chancery L", cursive;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.75), transparent 35%),
    linear-gradient(180deg, #fbf6ee 0%, var(--paper) 28%, #f9f0e4 65%, #f4ebde 100%);
  color: var(--ink);
  font-family: var(--serif);
}

button,
input,
select,
textarea {
  font: inherit;
}

.paper-grain,
.petal {
  pointer-events: none;
  position: fixed;
  inset: 0;
}

.paper-grain {
  opacity: 0.32;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(153, 124, 96, 0.12) 0.08rem, transparent 0.09rem),
    radial-gradient(circle at 70% 70%, rgba(153, 124, 96, 0.08) 0.05rem, transparent 0.09rem),
    radial-gradient(circle at 35% 75%, rgba(153, 124, 96, 0.08) 0.05rem, transparent 0.09rem);
  background-size: 1.2rem 1.2rem, 1.6rem 1.6rem, 1.1rem 1.1rem;
  mix-blend-mode: multiply;
  z-index: 0;
}

.petal {
  z-index: 1;
}

.petal::before,
.petal::after {
  content: "";
  position: absolute;
  width: 16rem;
  height: 16rem;
  border-radius: 50%;
  filter: blur(36px);
  opacity: 0.18;
}

.petal-one::before {
  top: 10%;
  left: -4rem;
  background: rgba(226, 168, 163, 0.7);
}

.petal-one::after {
  right: -5rem;
  top: 18%;
  background: rgba(194, 171, 125, 0.45);
}

.petal-two::before {
  bottom: 10%;
  right: -4rem;
  background: rgba(219, 183, 161, 0.58);
}

.petal-two::after {
  bottom: 24%;
  left: -3rem;
  background: rgba(191, 201, 173, 0.4);
}

.storybook {
  position: relative;
  z-index: 2;
}

.scene {
  width: min(100%, 84rem);
  margin: 0 auto;
  padding: 6rem 1.5rem;
  position: relative;
}

.opening-scene {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding-top: 3rem;
  padding-bottom: 7rem;
}

.intro-composition {
  position: relative;
  width: min(100%, 72rem);
  min-height: 48rem;
  display: grid;
  place-items: center;
}

.scene-wash {
  position: absolute;
  inset: 5% 3% 8%;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.85), transparent 35%),
    radial-gradient(circle at 80% 18%, rgba(249, 225, 217, 0.45), transparent 26%),
    radial-gradient(circle at 18% 76%, rgba(225, 207, 189, 0.44), transparent 28%);
  filter: blur(4px);
}

.ambient-glow,
.title-reveal,
.intro-stage,
.intro-art,
.butterfly-trail {
  opacity: 0;
}

.ambient-glow {
  position: absolute;
  inset: 8% 10% 18%;
  background:
    radial-gradient(circle at 22% 20%, rgba(250, 221, 213, 0.52), transparent 24%),
    radial-gradient(circle at 76% 18%, rgba(244, 229, 199, 0.5), transparent 24%),
    radial-gradient(circle at 36% 64%, rgba(226, 207, 193, 0.42), transparent 28%);
  filter: blur(22px);
  animation: fade-in 2.6s ease-out 0.2s forwards;
}

.intro-stage {
  position: absolute;
  inset: 0;
  animation: fade-in 1.2s ease-out 0.2s forwards;
}

.intro-vignette,
.intro-meadow {
  position: absolute;
}

.intro-vignette {
  inset: 4% 6% 10%;
  border-radius: 48% 52% 44% 56% / 34% 36% 64% 66%;
  background:
    radial-gradient(circle at center, rgba(255, 251, 244, 0.82), rgba(250, 239, 223, 0.16) 58%, transparent 76%);
  filter: blur(8px);
  opacity: 0;
  animation: fade-in 2s ease-out 1.1s forwards;
}

.intro-meadow {
  left: 18%;
  right: 18%;
  bottom: 2.8rem;
  height: 8.5rem;
  background:
    radial-gradient(ellipse at center, rgba(194, 177, 145, 0.32), transparent 68%),
    radial-gradient(ellipse at center, rgba(239, 229, 209, 0.9), transparent 72%);
  filter: blur(14px);
  opacity: 0;
  animation: fade-in 1.8s ease-out 3.8s forwards;
}

.intro-art {
  position: absolute;
  display: block;
  height: auto;
  filter: drop-shadow(0 1.4rem 1.8rem rgba(109, 82, 56, 0.16));
}

.floral-left,
.floral-right {
  width: clamp(14rem, 22vw, 19rem);
  animation: bloom-in 1.7s ease-out forwards;
}

.floral-left {
  top: 0.5rem;
  left: 0.2rem;
  animation-delay: 2.6s;
}

.floral-right {
  top: 0.2rem;
  right: 0.2rem;
  transform: scaleX(-1);
  animation-delay: 2.9s;
}

.watch-art {
  top: -0.4rem;
  left: clamp(0.2rem, 2vw, 1.8rem);
  width: clamp(12rem, 20vw, 16rem);
  transform-origin: top center;
  animation:
    fade-in 1.2s ease-out 0.5s forwards,
    swing-fragment 8s ease-in-out 1.7s infinite;
}

.butterfly-trail {
  position: absolute;
  top: 8.6rem;
  right: 4%;
  width: min(24rem, 38vw);
  height: min(18rem, 28vw);
  animation: fade-in 1.2s ease-out 1.8s forwards;
}

.butterfly-trail svg {
  width: 100%;
  height: 100%;
}

.butterfly-trail path {
  fill: none;
  stroke: rgba(208, 137, 126, 0.75);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 0.03 0.045;
  animation: draw-path 5.8s ease-out 2s forwards;
}

.butterfly-art {
  top: 8%;
  left: 8%;
  width: clamp(4.1rem, 7vw, 6.2rem);
  animation:
    fade-in 1s ease-out 2s forwards,
    flutter-fragment 10s ease-in-out 2.2s infinite alternate;
}

.signpost-art {
  left: 2.2rem;
  bottom: 5.7rem;
  width: clamp(11rem, 17vw, 14rem);
  animation: fade-in-up 1.4s ease-out 3.4s forwards;
}

.title-reveal {
  position: relative;
  text-align: center;
  max-width: 36rem;
  padding: 9rem 2rem 5rem;
  margin-inline: auto;
  border-radius: 2.6rem;
  background:
    linear-gradient(180deg, rgba(255, 250, 243, 0.72), rgba(251, 244, 233, 0.48));
  box-shadow:
    inset 0 0 0 1px rgba(255, 247, 235, 0.7),
    0 1.4rem 3rem rgba(115, 89, 61, 0.08);
  backdrop-filter: blur(10px);
  animation: fade-in-up 1.6s ease-out 4.5s forwards;
}

.eyebrow,
.section-whisper {
  margin: 0 0 0.9rem;
  color: rgba(112, 117, 93, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.25rem;
  font-size: 0.78rem;
}

.title-reveal h1,
.details-card h2,
.rsvp-card h2,
.panel-copy h2 {
  margin: 0;
  font-weight: 400;
}

.title-top,
.title-bottom {
  display: block;
  color: var(--rose);
  font-size: clamp(4rem, 12vw, 8.8rem);
  letter-spacing: 0.42rem;
  line-height: 0.95;
}

.title-middle {
  display: block;
  margin: 0.7rem 0 0.4rem;
  color: var(--sage);
  font-family: var(--script);
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  line-height: 0.88;
}

.lede,
.heart-copy p,
.details-card p,
.rsvp-card p,
.panel-copy p,
.form-note {
  margin: 1.2rem auto 0;
  max-width: 32rem;
  font-size: 1.08rem;
  line-height: 1.8;
  color: rgba(89, 73, 63, 0.9);
}

.story-button {
  appearance: none;
  border: 0;
  margin-top: 2rem;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  background:
    linear-gradient(180deg, #d99092, #bf7174);
  color: #fff9f4;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
  font-size: 0.84rem;
  cursor: pointer;
  box-shadow: 0 1rem 1.8rem rgba(160, 104, 102, 0.2);
  transition: transform 220ms ease, box-shadow 220ms ease, opacity 220ms ease;
  text-decoration: none;
}

.story-button:hover,
.story-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 1.1rem 2.2rem rgba(160, 104, 102, 0.26);
}

.story-button:focus-visible,
.panel-close:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(172, 121, 85, 0.7);
  outline-offset: 4px;
}

.story-button.secondary {
  background:
    linear-gradient(180deg, #cab48f, #a48960);
}

.story-button.ghost {
  background: transparent;
  color: var(--sage);
  border: 1px solid rgba(125, 130, 106, 0.3);
  box-shadow: none;
}

.heart-scene {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding-top: 2rem;
}

.heart-copy {
  text-align: center;
  max-width: 44rem;
  margin: 0 auto;
}

.heart-copy h2,
.details-card h2,
.rsvp-card h2,
.panel-copy h2 {
  font-size: clamp(2rem, 4.3vw, 3.5rem);
  line-height: 1.1;
  color: #654c3a;
}

.hero-illustration {
  position: relative;
  width: min(100%, 45rem);
  margin: 0 auto;
  border-radius: 2rem;
  overflow: hidden;
}

.illustration-glow {
  position: absolute;
  inset: 5% 4%;
  background: radial-gradient(circle, rgba(255, 247, 234, 0.95), transparent 67%);
  filter: blur(18px);
}

.hero-illustration img {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  box-shadow:
    0 2rem 4rem rgba(116, 89, 61, 0.12),
    inset 0 0 0 1px rgba(255, 246, 234, 0.7);
}

.invitation-cta {
  text-align: center;
}

.details-scene,
.rsvp-scene {
  padding-top: 3rem;
}

.details-card,
.rsvp-card {
  background: rgba(255, 250, 243, 0.72);
  border: 1px solid rgba(203, 184, 161, 0.4);
  border-radius: 2rem;
  padding: clamp(1.6rem, 4vw, 3rem);
  box-shadow:
    0 1.4rem 3rem rgba(111, 87, 63, 0.1),
    inset 0 0 0 0.15rem rgba(255, 246, 236, 0.5);
  backdrop-filter: blur(12px);
}

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

.details-subtitle {
  color: rgba(117, 87, 66, 0.86);
  font-size: 1.2rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.detail-grid article {
  padding: 1.3rem 1rem;
  border-radius: 1.4rem;
  background: rgba(247, 239, 228, 0.68);
}

.detail-grid h3 {
  margin: 0 0 0.7rem;
  color: var(--rose);
  font-size: 1rem;
  letter-spacing: 0.18rem;
  text-transform: uppercase;
  font-weight: 400;
}

.detail-grid p {
  margin: 0;
  max-width: none;
}

.detail-note {
  color: rgba(112, 117, 93, 0.92);
  font-size: 0.96rem;
  margin-top: 0.55rem;
}

.rsvp-block {
  margin-top: 2rem;
}

.rsvp-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
}

.rsvp-card {
  width: min(100%, 38rem);
  margin: 0 auto;
  text-align: center;
}

.rsvp-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.8rem;
  text-align: left;
}

.rsvp-form label {
  display: grid;
  gap: 0.45rem;
  color: #6a5345;
  font-size: 0.98rem;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;
  border: 1px solid rgba(183, 156, 131, 0.45);
  border-radius: 1rem;
  padding: 0.95rem 1rem;
  background: rgba(255, 251, 245, 0.84);
  color: var(--ink);
}

.rsvp-form textarea {
  resize: vertical;
}

.rsvp-form .story-button {
  justify-self: start;
}

.form-note {
  margin-top: 0;
  font-size: 0.95rem;
  color: rgba(112, 117, 93, 0.95);
}

.invitation-panel {
  width: min(92vw, 68rem);
  border: 0;
  border-radius: 2rem;
  padding: 0;
  background: rgba(252, 246, 237, 0.97);
  color: var(--ink);
  box-shadow: 0 2.2rem 5rem rgba(83, 61, 43, 0.25);
}

.invitation-panel::backdrop {
  background: rgba(86, 64, 48, 0.36);
  backdrop-filter: blur(4px);
}

.panel-content {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1.6rem;
  align-items: center;
  padding: 2rem;
}

.panel-content img {
  width: 100%;
  display: block;
  border-radius: 1.4rem;
}

.panel-close {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 50%;
  background: rgba(241, 228, 212, 0.92);
  color: #75574a;
  font-size: 1.6rem;
  cursor: pointer;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 1.2s ease,
    transform 1.2s ease;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fade-in {
  to {
    opacity: 1;
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bloom-in {
  from {
    opacity: 0;
    transform: scale(0.74);
  }
  to {
    opacity: 0.95;
    transform: scale(1);
  }
}

@keyframes swing-fragment {
  0%,
  100% {
    transform: rotate(7deg);
  }
  50% {
    transform: rotate(-7deg);
  }
}

@keyframes draw-path {
  from {
    stroke-dashoffset: 1;
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  to {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

@keyframes flutter-fragment {
  0% {
    transform: translate(0, 0) rotate(4deg);
  }
  30% {
    transform: translate(4.5rem, -2.6rem) rotate(-2deg);
  }
  65% {
    transform: translate(8.4rem, 1.1rem) rotate(8deg);
  }
  100% {
    transform: translate(13rem, -1.8rem) rotate(-4deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .ambient-glow,
  .intro-stage,
  .intro-art,
  .title-reveal,
  .butterfly-trail,
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (max-width: 820px) {
  .opening-scene {
    min-height: auto;
    padding-top: 7rem;
  }

  .intro-composition {
    min-height: 44rem;
  }

  .title-reveal {
    max-width: 32rem;
    padding: 12rem 1.7rem 4rem;
  }

  .butterfly-trail {
    top: 10.5rem;
    right: 0.8rem;
    width: min(17rem, 52vw);
  }

  .watch-art {
    left: 0.1rem;
    width: 11rem;
  }

  .signpost-art {
    left: 0.4rem;
    bottom: 5.8rem;
    width: 10rem;
  }

  .floral-left,
  .floral-right {
    width: 12rem;
  }

  .detail-grid,
  .panel-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .scene {
    padding-inline: 1rem;
  }

  .intro-composition {
    min-height: 40rem;
  }

  .title-top,
  .title-bottom {
    letter-spacing: 0.24rem;
  }

  .title-middle {
    margin-top: 0.5rem;
  }

  .title-reveal {
    max-width: 100%;
    padding: 11.5rem 1.25rem 3rem;
    border-radius: 2rem;
  }

  .heart-copy h2,
  .details-card h2,
  .rsvp-card h2,
  .panel-copy h2 {
    font-size: 1.9rem;
  }

  .butterfly-trail {
    opacity: 0.72;
    width: min(14rem, 48vw);
    top: 10.4rem;
    right: 0;
  }

  .watch-art {
    width: 8.8rem;
    top: 0.7rem;
  }

  .signpost-art {
    width: 8.1rem;
    left: -0.2rem;
    bottom: 4.9rem;
  }

  .floral-left,
  .floral-right {
    width: 8.8rem;
  }

  .rsvp-form .story-button {
    width: 100%;
    justify-self: stretch;
  }
}
