:root {
  --bg: #f6f0e7;
  --bg-deep: #ece1d4;
  --surface: rgba(255, 251, 245, 0.86);
  --ink: #1f1a17;
  --muted: #6b5a4d;
  --accent: #9f4e3d;
  --accent-soft: #d38862;
  --line: #e8d8c4;
  --gold: #b58850;
  --shadow: 0 24px 60px rgba(88, 52, 27, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "DM Sans", sans-serif;
  background: radial-gradient(circle at 12% 8%, #fff2df 0%, transparent 42%),
    radial-gradient(circle at 86% 16%, #ebccb0 0%, transparent 40%),
    radial-gradient(circle at 50% 100%, #e3d4c4 0%, transparent 40%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

body.intro-lock {
  overflow: hidden;
}

.invite-intro {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(circle at 20% 16%, #fce9d4 0%, transparent 42%),
    radial-gradient(circle at 80% 20%, #efd2b5 0%, transparent 40%),
    linear-gradient(180deg, #f3e7d8 0%, #e7d8c6 100%);
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.petals {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.petals span {
  position: absolute;
  width: 14px;
  height: 10px;
  border-radius: 60% 40% 60% 40%;
  background: linear-gradient(140deg, #efd6be 0%, #cb9f79 100%);
  opacity: 0.65;
  top: -24px;
  animation: petalFall 8s linear infinite;
}

.petals span:nth-child(1) { left: 8%; animation-delay: 0.2s; }
.petals span:nth-child(2) { left: 21%; animation-delay: 1.1s; }
.petals span:nth-child(3) { left: 33%; animation-delay: 2.4s; }
.petals span:nth-child(4) { left: 45%; animation-delay: 0.8s; }
.petals span:nth-child(5) { left: 58%; animation-delay: 3.2s; }
.petals span:nth-child(6) { left: 71%; animation-delay: 1.7s; }
.petals span:nth-child(7) { left: 84%; animation-delay: 2.8s; }
.petals span:nth-child(8) { left: 93%; animation-delay: 0.4s; }

.invite-intro.opened {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.welcome-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(18px);
  width: min(520px, calc(100vw - 26px));
  padding: 16px 18px 14px;
  border-radius: 16px;
  border: 1px solid #d8bb98;
  background: linear-gradient(170deg, rgba(255, 251, 245, 0.98) 0%, rgba(244, 230, 211, 0.96) 100%);
  box-shadow: 0 18px 34px rgba(88, 52, 27, 0.24);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 12;
}

.welcome-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.welcome-title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.45rem;
  color: #5e3a21;
}

.welcome-text {
  margin: 4px 0 0;
  color: #6d5849;
}

.welcome-close {
  margin-top: 10px;
  border: 1px solid #d5b490;
  background: #fff7ed;
  color: #815635;
  padding: 7px 14px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.intro-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.35;
  animation: floatOrb 8s ease-in-out infinite alternate;
}

.intro-glow-a {
  width: 260px;
  height: 260px;
  background: #d39a6a;
  top: 10%;
  left: 8%;
}

.intro-glow-b {
  width: 320px;
  height: 320px;
  background: #b37a4a;
  bottom: 8%;
  right: 10%;
  animation-delay: 0.8s;
}

.envelope-wrap {
  text-align: center;
  width: min(480px, 95vw);
  position: relative;
  z-index: 1;
}

.intro-overline {
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  color: #6e5849;
}

.envelope {
  width: 100%;
  aspect-ratio: 5 / 3.4;
  position: relative;
  filter: drop-shadow(0 24px 30px rgba(83, 54, 34, 0.26));
  perspective: 1200px;
  animation: envelopeIdle 3.6s ease-in-out infinite;
}

.envelope::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.36) 0%, transparent 42%);
  pointer-events: none;
}

.envelope::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 18px;
  border: 1px solid rgba(181, 136, 80, 0.5);
  pointer-events: none;
}

.envelope-body {
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, #ddba95 0%, #bb8a5d 58%, #ac794f 100%);
  border-radius: 14px;
  border: 1px solid #a97648;
  overflow: hidden;
}

.envelope-body::before,
.envelope-body::after {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%);
  background: linear-gradient(150deg, #c7986e 0%, #a7734a 100%);
  border-radius: 14px;
}

.envelope-body::after {
  clip-path: polygon(0 100%, 50% 52%, 100% 100%);
  background: linear-gradient(120deg, #e5c6a4 0%, #bf8f62 100%);
}

.envelope-body::before {
  box-shadow: inset 0 1px 0 rgba(255, 242, 226, 0.45);
}

.envelope-body > * {
  position: relative;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 58%;
  transform-origin: top;
  transform: rotateX(0deg);
  transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 3;
}

.envelope-flap::before {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  background: linear-gradient(160deg, #eacdad 0%, #c28f62 70%, #b07a4f 100%);
  border-radius: 10px;
  border: 1px solid #b78258;
}

.envelope-flap::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 22%;
  width: 36%;
  height: 1px;
  transform: translateX(-50%);
  background: rgba(124, 80, 46, 0.45);
}

.envelope-title-tag {
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  z-index: 5;
  min-width: 244px;
  padding: 12px 24px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 251, 245, 0.99) 0%, rgba(243, 226, 205, 0.96) 100%);
  border: 1px solid #c99f76;
  color: #5a3119;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(0.98rem, 3.2vw, 1.2rem);
  letter-spacing: 0.03em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 22px rgba(98, 62, 38, 0.25), inset 0 1px 0 rgba(255, 250, 242, 0.9);
  transition: transform 0.7s ease, opacity 0.45s ease;
  display: grid;
  justify-items: center;
  line-height: 1.05;
  overflow: hidden;
}

.envelope-title-tag span {
  font-size: 0.86em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.86;
}

.envelope-title-tag strong {
  font-size: 1.48em;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-top: 2px;
}

.envelope-title-tag .title-date {
  margin-top: 7px;
  padding: 0;
  color: #755138;
  font-style: normal;
  font-size: 0.64em;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.envelope-title-tag::after {
  content: "";
  position: absolute;
  top: 56%;
  width: 28px;
  height: 1px;
  background: rgba(160, 115, 72, 0.55);
}

.envelope-title-tag::before {
  left: 16px;
}

.envelope-title-tag::after {
  right: 16px;
}

.envelope-letter {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 15%;
  bottom: 8%;
  background: repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.6) 0,
      rgba(255, 255, 255, 0.6) 2px,
      transparent 2px,
      transparent 6px
    ),
    linear-gradient(180deg, #fff9f1 0%, #f3e5d4 100%);
  border-radius: 10px;
  border: 1px solid #e6cfb0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding-top: 10px;
  transform: translateY(22%);
  transition: transform 1s cubic-bezier(0.2, 0.85, 0.2, 1), opacity 0.6s ease;
  z-index: 2;
  box-shadow: inset 0 0 0 1px rgba(255, 250, 240, 0.45);
}

.envelope-letter::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 34%;
  width: 58%;
  height: 34%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 250, 242, 0.6) 0%, transparent 72%);
  pointer-events: none;
}

.envelope-letter p {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.45rem, 4.8vw, 2.15rem);
  color: #6f3f22;
  line-height: 1.05;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 0 rgba(255, 251, 244, 0.9);
}

.envelope-letter small {
  color: #7e5c42;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.68rem;
}

.letter-ornament {
  color: #b58850;
  letter-spacing: 0.35em;
  font-size: 0.72rem;
}

.envelope-seal {
  position: absolute;
  left: 50%;
  bottom: 20%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 26%, #df876f 0%, #a8372a 66%, #7b2118 100%);
  border: 2px solid #7a1f17;
  color: #fce8d5;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.05rem;
  display: grid;
  place-items: center;
  z-index: 4;
  letter-spacing: 0.06em;
  box-shadow: 0 10px 18px rgba(86, 28, 20, 0.42), inset 0 1px 4px rgba(255, 212, 191, 0.35);
  transition: transform 0.85s ease, opacity 0.45s ease;
}

.envelope-seal::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 1px solid rgba(253, 220, 194, 0.55);
}

.envelope-seal::after {
  content: "";
  position: absolute;
  top: 10px;
  left: 12px;
  width: 10px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 210, 186, 0.44);
  transform: rotate(-16deg);
}

.intro-text {
  margin: 30px 0 0;
  color: #6e5849;
}

.intro-actions {
  margin-top: 16px;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.invite-intro.opening .envelope-flap {
  transform: rotateX(178deg);
}

.invite-intro.opening .envelope-letter {
  transform: translateY(-40%);
}

.invite-intro.opening .envelope-title-tag {
  transform: translate(-50%, -155%) scale(0.92);
  opacity: 0;
}

.invite-intro.opening .envelope {
  animation: none;
}

.invite-intro.opening .envelope-seal {
  transform: translateX(-50%) translateY(12px) scale(0.8);
  opacity: 0;
}

.sparkle-burst {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe7a5 0%, #d39a4f 70%);
  pointer-events: none;
  animation: burstOut 700ms ease-out forwards;
}

.paper-grain {
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.1) 0,
    rgba(255, 255, 255, 0.1) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.28;
  pointer-events: none;
  z-index: -1;
}

.bg-orb {
  position: fixed;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.26;
  z-index: -1;
  animation: floatOrb 12s ease-in-out infinite alternate;
}

.orb-a {
  background: #f2b78d;
  top: -140px;
  left: -110px;
}

.orb-b {
  background: #d1a06a;
  bottom: -180px;
  right: -80px;
  animation-delay: 1.2s;
}

main,
header,
footer {
  width: min(1020px, 92vw);
  margin: 0 auto;
}

.hero {
  text-align: center;
  padding: 96px 0 64px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 10px;
  font-size: 0.76rem;
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", serif;
  margin: 0;
  line-height: 1.05;
}

h1 {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 600;
  text-shadow: 0 6px 18px rgba(103, 62, 40, 0.1);
}

h1 span {
  color: var(--accent);
}

.hero-text {
  margin: 20px auto 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-divider {
  margin: 18px 0 0;
  letter-spacing: 0.5em;
  color: var(--gold);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.1rem;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.hero-meta > div {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(250, 240, 228, 0.86));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 15px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-meta > div::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 54px;
  height: 54px;
  background: radial-gradient(circle, rgba(181, 136, 80, 0.22) 0%, transparent 70%);
}

.meta-label {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.meta-value {
  margin: 4px 0 0;
  font-size: 1.12rem;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 12px 24px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-soft) 100%);
  color: #fff;
  box-shadow: 0 10px 26px rgba(166, 79, 60, 0.35);
}

.btn-secondary {
  color: #fff;
  background: linear-gradient(120deg, #b17c46 0%, #8f5f34 100%);
  border: 1px solid #b28757;
  box-shadow: 0 12px 28px rgba(128, 86, 48, 0.35);
}

.btn-secondary:hover {
  box-shadow: 0 18px 30px rgba(128, 86, 48, 0.42);
}

.btn-ghost {
  color: #7e5435;
  background: rgba(255, 252, 246, 0.88);
  border: 1px solid #d8bc9d;
  box-shadow: 0 8px 16px rgba(122, 80, 47, 0.12);
}

.btn-ghost:hover {
  box-shadow: 0 14px 24px rgba(122, 80, 47, 0.2);
}

section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  margin: 18px 0;
  padding: 34px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
  position: relative;
  overflow: hidden;
}

section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.25) 0%, transparent 45%);
  pointer-events: none;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  margin-bottom: 16px;
  position: relative;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  width: 70%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(181, 136, 80, 0.75) 50%, transparent 100%);
}

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

.timer article {
  text-align: center;
  background: rgba(255, 255, 255, 0.95);
  border: 1px dashed #dec3a4;
  border-radius: 18px;
  padding: 18px 8px 16px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.timer article:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 22px rgba(131, 82, 46, 0.14);
}

.timer p {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--accent);
}

.timer span {
  color: var(--muted);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.countdown,
.details,
.gallery {
  text-align: center;
}

.timeline article {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  padding: 20px 18px;
  border: 1px solid #e5ceb5;
  box-shadow: 0 10px 24px rgba(121, 74, 40, 0.1);
  position: relative;
}

.timeline article::before {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
}

.timeline h3 {
  font-size: clamp(1.55rem, 3.4vw, 1.9rem);
  margin-bottom: 10px;
  line-height: 1.08;
  color: #5c371f;
}

.timeline p {
  font-size: 1.03rem;
}

.timeline-time {
  width: fit-content;
  margin: 0 auto 10px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid #d7b58f;
  background: linear-gradient(180deg, #fff7ee 0%, #f6e8d8 100%);
  color: #7d4f2d;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  font-weight: 700;
}

.timeline p,
.story p,
footer p {
  margin: 0;
  color: var(--muted);
}

.location {
  text-align: center;
}

.location-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
}

.location-card {
  text-align: left;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e5ceb5;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 10px 24px rgba(121, 74, 40, 0.1);
}

.location-card h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.location-address {
  margin: 0;
  color: #6d5747;
  font-weight: 700;
}

.mini-map {
  margin-top: 14px;
  min-height: 280px;
  border-radius: 14px;
  border: 1px solid #dabc97;
  background: #f7ecdf;
  position: relative;
  overflow: hidden;
}

.mini-map-embed {
  width: 100%;
  height: 100%;
  min-height: 280px;
  border: 0;
  display: block;
}

.location-notes {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.location-notes li {
  color: #6f5d4e;
  padding-left: 18px;
  position: relative;
}

.location-notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(120deg, #c08a5b 0%, #a46b41 100%);
}

.location-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.calendar-card {
  background: linear-gradient(165deg, rgba(255, 251, 244, 0.95) 0%, rgba(245, 230, 211, 0.9) 100%);
}

.calendar-text {
  margin: 0;
  color: #6f5a49;
}

.story {
  text-align: center;
}

.story p {
  max-width: 760px;
  margin: 0 auto;
}

.story-quote {
  margin: 18px auto 0;
  width: fit-content;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
  color: var(--accent);
  border-bottom: 1px solid rgba(159, 78, 61, 0.28);
  padding-bottom: 4px;
}

.contact {
  text-align: center;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.contact-card {
  text-align: left;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #e5ceb5;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 10px 24px rgba(121, 74, 40, 0.1);
}

.contact-card h3 {
  font-size: 1.45rem;
  margin-bottom: 6px;
}

.contact-family {
  margin: 0 0 4px;
  color: #8a6a53;
  font-weight: 600;
}

.contact-name {
  margin: 0;
  color: #6d5747;
  font-weight: 700;
}

.contact-phone {
  margin: 4px 0 0;
  color: #7a5f4a;
  font-weight: 500;
}

.contact-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.contact-note {
  margin: 14px 0 0;
  color: #7a6656;
  font-size: 0.95rem;
}

.gallery-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1.4fr 1fr 1fr;
}

.card {
  min-height: 210px;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: end;
  padding: 16px;
  color: #fff;
  font-weight: 700;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 34px rgba(55, 35, 22, 0.28);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(20, 16, 12, 0.76) 100%);
}

.card figcaption {
  position: relative;
  z-index: 1;
  font-size: 1.02rem;
  letter-spacing: 0.04em;
}

.photo-a {
  background: linear-gradient(130deg, #d7b494, #916748);
}

.photo-b {
  background: linear-gradient(130deg, #c58f61, #7a4a2f);
}

.photo-c {
  background: linear-gradient(130deg, #b57f5f, #52372a);
}

footer {
  text-align: center;
  padding: 26px 0 42px;
}

footer p:first-child {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
  color: #5d4a3d;
}

.reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.99);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes floatOrb {
  from {
    transform: translateY(0) translateX(0);
  }
  to {
    transform: translateY(26px) translateX(12px);
  }
}

@keyframes petalFall {
  0% {
    transform: translateY(-24px) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(110vh) rotate(280deg);
    opacity: 0;
  }
}

@keyframes burstOut {
  0% {
    transform: translate(0, 0) scale(0.8);
    opacity: 0.95;
  }
  100% {
    transform: translate(var(--x), var(--y)) scale(0.1);
    opacity: 0;
  }
}

@keyframes envelopeIdle {
  0% {
    transform: translateY(0) rotate(-0.35deg);
  }
  50% {
    transform: translateY(-4px) rotate(0.45deg);
  }
  100% {
    transform: translateY(0) rotate(-0.35deg);
  }
}

@media (max-width: 820px) {
  .hero {
    padding-top: 74px;
  }

  .hero-meta,
  .timeline,
  .location-grid,
  .contact-grid,
  .countdown .timer,
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid .photo-a {
    grid-column: 1 / -1;
  }

  section {
    padding: 28px;
  }
}

@media (max-width: 560px) {
  .hero {
    padding-top: 56px;
    padding-bottom: 46px;
  }

  section {
    padding: 22px;
    border-radius: 18px;
  }

  .hero-meta,
  .timeline,
  .location-grid,
  .contact-grid,
  .countdown .timer,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .location-card {
    padding: 16px;
  }

  .location-actions .btn {
    width: 100%;
  }

  .contact-card {
    padding: 16px;
  }

  .contact-actions .btn {
    width: 100%;
  }

  .welcome-toast {
    width: calc(100vw - 18px);
    bottom: 10px;
    padding: 12px 14px;
    border-radius: 14px;
  }

  .welcome-title {
    font-size: 1.22rem;
  }

  .welcome-text {
    font-size: 0.93rem;
  }

  .story-quote {
    font-size: 1.2rem;
  }

  .envelope-wrap {
    width: min(360px, 95vw);
  }

  .envelope-letter {
    padding-top: 8px;
  }

  .envelope-title-tag {
    top: 52%;
    min-width: 192px;
    padding: 9px 12px 10px;
    font-size: clamp(0.82rem, 4.2vw, 0.98rem);
  }

  .envelope-title-tag::before,
  .envelope-title-tag::after {
    width: 18px;
  }

  .envelope-title-tag .title-date {
    font-size: 0.6em;
    letter-spacing: 0.1em;
  }
}

@media (max-width: 430px) {
  body {
    line-height: 1.55;
  }

  .invite-intro {
    padding: 12px;
  }

  .envelope-wrap {
    width: min(332px, 94vw);
  }

  .intro-overline {
    margin-bottom: 10px;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
  }

  .intro-text {
    margin-top: 24px;
    font-size: 0.95rem;
  }

  .hero {
    padding-top: 42px;
    padding-bottom: 36px;
  }

  h1 {
    font-size: clamp(2.2rem, 11vw, 2.9rem);
  }

  .hero-text {
    font-size: 0.98rem;
  }

  .hero-meta > div {
    padding: 13px;
  }

  .meta-value {
    font-size: 1rem;
  }

  .hero-actions .btn,
  .location-actions .btn {
    width: 100%;
  }

  section {
    padding: 18px;
    margin: 14px 0;
  }

  h2 {
    font-size: clamp(1.5rem, 8vw, 2rem);
  }

  .timer p {
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

  .timeline h3,
  .location-card h3,
  .contact-card h3 {
    font-size: 1.25rem;
  }

  .timeline p {
    font-size: 0.98rem;
  }

  .story-quote {
    font-size: 1.05rem;
  }

  footer {
    padding: 18px 0 30px;
  }

  footer p:first-child {
    font-size: 1.2rem;
  }

  .mini-map {
    min-height: 132px;
  }

  .mini-map-text {
    font-size: 0.88rem;
  }
}
