@font-face {
  font-family: "KZ Balmoral";
  src: url("assets/kzbalmoral_regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ivory: #fffdf7;
  --paper: rgba(255, 253, 247, 0.78);
  --paper-strong: rgba(255, 253, 247, 0.92);
  --ink: #302a2c;
  --muted: #7c6d67;
  --rose: #bd1d4b;
  --rose-deep: #8d173c;
  --blush: #f3bfd0;
  --sage: #6f927f;
  --sage-dark: #345f55;
  --gold: #c7a56d;
  --gold-soft: rgba(199,165,109,0.32);
  --shadow: 0 24px 70px rgba(77, 46, 41, 0.16);
  --display-font: "KZ Balmoral", "KZBalmoral-Regular", Georgia, "Times New Roman", serif;
  --body-font: Georgia, "Times New Roman", Times, serif;
  --bg-desktop: url("assets/background-desktop.webp");
  --bg-mobile: url("assets/background-mobile.webp");
}

* { box-sizing: border-box; }
html { min-height: 100%; overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  padding-bottom: 160px;
  color: var(--ink);
  font-family: var(--body-font);
  background-color: var(--ivory);
  background-image: linear-gradient(rgba(255,255,255,.18), rgba(255,255,255,.18)), var(--bg-desktop);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 10%, rgba(255,255,255,.68), transparent 38%),
    radial-gradient(circle at 50% 90%, rgba(255,238,244,.34), transparent 46%);
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.falling-leaves {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.leaf {
  position: absolute;
  top: -14vh;
  left: var(--leaf-left);
  width: var(--leaf-size);
  height: calc(var(--leaf-size) * 1.85);
  opacity: var(--leaf-opacity);
  transform-origin: 50% 50%;
  animation: leafFall var(--leaf-duration) linear var(--leaf-delay) infinite;
  will-change: transform;
}
.leaf::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 85% 0 85% 0;
  transform: rotate(42deg);
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,.55), transparent 28%),
    linear-gradient(135deg, rgba(156, 188, 169, .92), rgba(61, 112, 96, .76));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28), 0 8px 16px rgba(48,80,69,.12);
}
.leaf::after {
  content: "";
  position: absolute;
  width: 1px;
  height: 78%;
  left: 50%;
  top: 10%;
  transform: rotate(42deg);
  background: rgba(255,255,255,.42);
}
@keyframes leafFall {
  0% { transform: translate3d(0, -14vh, 0) rotate(var(--leaf-rotate)); }
  35% { transform: translate3d(var(--leaf-drift-a), 34vh, 0) rotate(calc(var(--leaf-rotate) + 120deg)); }
  70% { transform: translate3d(var(--leaf-drift-b), 78vh, 0) rotate(calc(var(--leaf-rotate) + 245deg)); }
  100% { transform: translate3d(var(--leaf-drift-c), 116vh, 0) rotate(calc(var(--leaf-rotate) + 390deg)); }
}

.page {
  position: relative;
  z-index: 1;
  width: min(100%, 780px);
  margin: 0 auto;
  padding: 0 22px 160px;
}
.section {
  margin: 42px 0;
}
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 0 54px;
}
.hero-card,
.content-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, rgba(255,255,255,.86), rgba(255,250,244,.68));
  border: 1px solid rgba(199,165,109,.34);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.hero-card::before,
.content-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(199,165,109,.22);
  border-radius: inherit;
  pointer-events: none;
}
.hero-card::after,
.content-card::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -35%;
  width: 55%;
  height: 180%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.42), transparent);
  transform: rotate(18deg);
  animation: softShimmer 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes softShimmer {
  0%, 48% { transform: translateX(-120%) rotate(18deg); opacity: 0; }
  56% { opacity: .55; }
  72%,100% { transform: translateX(360%) rotate(18deg); opacity: 0; }
}
.hero-card {
  width: 100%;
  min-height: min(720px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-radius: 34px;
  padding: clamp(44px, 9vw, 92px) clamp(24px, 6vw, 76px);
}
.hero-title,
.section-label {
  margin: 0;
  font-family: var(--display-font);
  text-transform: none;
  letter-spacing: .02em;
  color: var(--sage-dark);
  font-size: clamp(30px, 8vw, 52px);
  line-height: 1.12;
  font-weight: 400;
}
.couple-names {
  margin: 26px 0 18px;
  font-family: var(--display-font);
  line-height: .9;
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255,255,255,.6);
}
.couple-names .name {
  display: block;
  font-size: clamp(68px, 17vw, 136px);
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
}
.couple-names .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(18px) scale(.96);
  animation: letterReveal .85s cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay: calc(var(--char-index) * 42ms + 260ms);
}
@keyframes letterReveal { to { opacity: 1; transform: translateY(0) scale(1); } }
.couple-names .and {
  display: block;
  margin: 14px auto 10px;
  font-family: var(--body-font);
  font-style: normal;
  font-size: clamp(15px, 3.5vw, 20px);
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--rose-deep);
}
.hero-date-wrap {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 18px;
  align-items: center;
  margin-top: 20px;
  padding: 14px 24px;
  border-top: 1px solid rgba(87,79,72,.34);
  border-bottom: 1px solid rgba(87,79,72,.34);
  color: var(--ink);
  font-size: clamp(17px, 4.2vw, 25px);
}
.hero-date,
.hero-time { white-space: nowrap; }
.hero-seal {
  margin-top: 28px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(199,165,109,.5);
  color: var(--rose);
  background: rgba(255,255,255,.52);
  box-shadow: 0 12px 26px rgba(148,79,72,.12);
  animation: sealPulse 3.4s ease-in-out infinite;
}
@keyframes sealPulse {
  0%,100% { transform: scale(1); box-shadow: 0 12px 26px rgba(148,79,72,.12); }
  50% { transform: scale(1.04); box-shadow: 0 16px 34px rgba(189,29,75,.18); }
}

.content-card {
  border-radius: 28px;
  padding: clamp(28px, 7vw, 48px);
}
.section-label {
  text-align: center;
  margin-bottom: 22px;
}
.section-label::after {
  content: "";
  display: block;
  width: 64px;
  height: 1px;
  margin: 12px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.invitation-text {
  white-space: pre-line;
  text-align: center;
  color: #3f3637;
  font-size: clamp(16px, 4vw, 19px);
  line-height: 1.78;
  margin: 0;
}
.hosts-line {
  margin: 0;
  text-align: center;
  font-family: var(--display-font);
  font-size: clamp(34px, 8.5vw, 58px);
  font-style: normal;
  font-weight: 400;
  color: var(--rose-deep);
  line-height: 1.15;
}

.calendar-card {
  max-width: 560px;
  margin: 0 auto;
}
.calendar-header {
  text-align: center;
  font-family: var(--display-font);
  font-size: clamp(38px, 10vw, 64px);
  font-weight: 400;
  font-style: normal;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 24px;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.weekday {
  text-align: center;
  color: var(--sage-dark);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .09em;
  font-weight: 700;
  padding-bottom: 8px;
}
.calendar-day {
  min-height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255,255,255,.4);
  color: #4a4140;
  font-size: 16px;
  position: relative;
}
.calendar-day.empty { background: transparent; }
.calendar-day.selected { background: transparent; }
.heart-marker {
  position: relative;
  width: 48px;
  height: 46px;
  display: grid;
  place-items: center;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  animation: calendarHeart 2.8s ease-in-out infinite;
}
.heart-marker::before {
  content: "♥";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--rose);
  font-size: 48px;
  line-height: 1;
  text-shadow: 0 9px 18px rgba(189,29,75,.22), 0 1px 0 rgba(255,255,255,.38);
}
.heart-marker::after { display: none; }
.heart-marker .date-num {
  position: relative;
  z-index: 1;
  transform: none;
  color: #fff;
  font-weight: 700;
  line-height: 1;
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(0,0,0,.28);
}
@keyframes calendarHeart {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.calendar-time {
  text-align: center;
  margin: 26px 0 0;
  color: var(--rose-deep);
  font-size: clamp(18px, 4.5vw, 24px);
  letter-spacing: .05em;
}

.timeline-list {
  position: relative;
  display: grid;
  gap: 16px;
  margin: 8px 0 0;
  padding-left: 22px;
}
.timeline-list::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: linear-gradient(180deg, transparent, rgba(111,146,127,.54), rgba(189,29,75,.35), transparent);
}
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 16px;
  align-items: start;
  padding: 16px 16px 16px 20px;
  border-radius: 20px;
  background: rgba(255,255,255,.48);
  border: 1px solid rgba(199,165,109,.18);
}
.timeline-item::before {
  content: "♥";
  position: absolute;
  left: -21px;
  top: 18px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: var(--rose);
  font-size: 13px;
  background: rgba(255,253,247,.95);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(199,165,109,.28);
}
.timeline-time {
  color: var(--rose-deep);
  font-weight: 700;
  letter-spacing: .06em;
}
.timeline-title {
  color: var(--ink);
  line-height: 1.45;
}

.photo-frame {
  margin: 0 auto;
  max-width: 560px;
  padding: 12px;
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(255,255,255,.86), rgba(250,234,221,.74));
  border: 1px solid rgba(199,165,109,.34);
  box-shadow: 0 24px 58px rgba(77,46,41,.16);
}
.photo-frame img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 22px;
  filter: saturate(1.03) contrast(1.02);
}
.venue-lines {
  text-align: center;
  display: grid;
  gap: 8px;
  font-size: clamp(16px, 4vw, 19px);
  line-height: 1.55;
}
.venue-hall {
  font-family: var(--display-font);
  color: var(--rose-deep);
  font-size: clamp(28px, 7vw, 42px);
  font-style: italic;
  line-height: 1.1;
}
.map-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 24px auto 0;
  padding: 13px 22px;
  border-radius: 999px;
  text-decoration: none;
  background: linear-gradient(135deg, var(--sage-dark), #527c6f);
  color: #fff;
  box-shadow: 0 12px 26px rgba(52,95,85,.22);
  font-weight: 700;
}
.map-button:hover { transform: translateY(-1px); }

.audio-fab {
  position: fixed;
  z-index: 30;
  right: 22px;
  bottom: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid rgba(199,165,109,.46);
  background: rgba(255,253,247,.82);
  color: var(--rose-deep);
  box-shadow: 0 14px 34px rgba(77,46,41,.2);
  display: none;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.audio-fab.is-visible { display: grid; }
.audio-fab.is-playing { color: #fff; background: linear-gradient(135deg, var(--rose), var(--rose-deep)); }

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.is-hidden { display: none !important; }

@media (max-width: 700px) {
  body {
    background-image: linear-gradient(rgba(255,255,255,.12), rgba(255,255,255,.12)), var(--bg-mobile);
    background-position: center top;
  }
  .page { padding-inline: 14px; }
  .hero { padding-top: 54px; }
  .hero-card { min-height: calc(100vh - 94px); border-radius: 28px; }
  .content-card { border-radius: 24px; padding: 28px 18px; }
  .calendar-grid { gap: 5px; }
  .calendar-day { min-height: 40px; border-radius: 12px; font-size: 14px; }
  .heart-marker { width: 42px; height: 40px; }
  .heart-marker::before { font-size: 42px; }
  .heart-marker .date-num { font-size: 13px; }
  .timeline-item { grid-template-columns: 62px 1fr; gap: 10px; padding: 14px 12px 14px 16px; }
  .audio-fab { right: 16px; bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .falling-leaves { display: none; }
  .couple-names .char { opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; }
}