:root {
  --paper: #fbf4e6;
  --paper-2: #f5ead4;
  --forest: #2c5a2a;
  --sage: #4f9a3c;
  --terra: #c8401f;
  --gold: #f0a81c;
  --blush: #f08a8a;
  --ink: #4a3b2c;
  --ground-h: clamp(80px, 16vh, 170px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-snap-type: y proximity; }

body {
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.5;
  overflow-x: hidden;
  background-color: var(--paper);
  /* warm autumn sunshine */
  background-image:
    radial-gradient(circle at 80% 8%, rgba(255, 214, 102, .55), transparent 35%),
    radial-gradient(circle at 12% 25%, rgba(247, 134, 42, .14), transparent 40%),
    linear-gradient(to bottom, #fff6de 0%, #ffecc2 50%, #fbd98f 100%);
  background-attachment: fixed;
}

/* ---------- forest background ---------- */
.forest { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.forest img { position: absolute; display: block; }
.forest .ground {
  left: 0; bottom: 0; width: 100%; height: var(--ground-h);
  object-fit: cover; object-position: bottom center;
}
.forest .side { bottom: 0; width: min(26vw, 33vh); height: auto; }
.forest .left { left: 0; }
.forest .right { right: 0; }
.forest .hedgehog {
  bottom: calc(var(--ground-h) * .06); width: clamp(54px, 6vw, 80px);
  animation: walk 48s linear infinite;
}
.sky-balloons { position: absolute; inset: 0; }
.sky-balloon { position: absolute; bottom: -120px; width: 38px; animation: rise-up linear forwards; }
.sky-balloon svg { display: block; width: 100%; animation: wobble 3s ease-in-out infinite; transform-origin: 50% 0; }

#sky { position: fixed; inset: 0; pointer-events: none; z-index: 50; }

/* ---------- pages ---------- */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 16px calc(var(--ground-h) + 40px);
  overflow: hidden;
  scroll-snap-align: start;
}
.inner { position: relative; z-index: 2; width: 100%; max-width: 1000px; text-align: center; }

.next {
  position: absolute; left: 0; right: 0; margin: 0 auto; width: max-content;
  bottom: calc(var(--ground-h) * .35);
  padding: 8px 18px 6px 22px; /* extra left padding balances the trailing letter-spacing */
  border-radius: 999px; background: rgba(251, 244, 230, .85);
  color: var(--forest); font-size: 14px; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; text-align: center; z-index: 2;
}
.next span { display: block; font-size: 22px; line-height: 1; animation: bob 1.8s ease-in-out infinite; }

/* page navigation dots */
.dots {
  position: fixed; right: 18px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 14px; z-index: 60;
}
.dots a {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1.5px solid var(--terra); background: rgba(251, 244, 230, .8);
  transition: background .3s, transform .3s;
}
.dots a.active { background: var(--terra); transform: scale(1.25); }

/* ---------- typography ---------- */
h1 {
  font-family: "Fraunces", serif; font-weight: 600; color: var(--forest);
  font-size: clamp(46px, 9vw, 108px); line-height: 1.02; letter-spacing: -.01em;
  cursor: pointer;
}
h1 .l2 { display: block; font-size: .72em; }
h1 em { display: block; font-style: italic; color: var(--terra); font-size: .74em; margin-top: .1em; }

h2 {
  font-family: "Fraunces", serif; font-weight: 600; color: var(--forest);
  font-size: clamp(36px, 6vw, 64px); line-height: 1.1;
}
.kicker {
  font-family: "Fraunces", serif; font-style: italic; color: var(--terra);
  font-size: clamp(20px, 2.6vw, 26px); margin-bottom: 6px;
}

.names {
  font-family: "Fraunces", serif; color: var(--forest);
  font-size: clamp(22px, 3.4vw, 36px); line-height: 1.3;
}
.names strong { color: var(--terra); font-weight: 600; font-size: 1.35em; }
.names .num {
  display: inline-block; font-weight: 700; color: var(--terra); font-size: 1.6em;
  line-height: 1; font-variant-numeric: lining-nums tabular-nums; vertical-align: -.08em;
}

/* ---------- decorations ---------- */
.lights { position: absolute; top: 0; left: 0; width: 100%; height: 90px; z-index: 3; }
.lights .bulb { animation: twinkle 2.4s ease-in-out infinite; }

.bunting { position: absolute; top: 0; left: 0; width: 100%; height: 60px; z-index: 3; }
.bunting .flag { transform-box: fill-box; transform-origin: top center; animation: flutter 3s ease-in-out infinite; }

.balloons {
  position: absolute; left: max(22vw, 16px); top: 18%;
  width: clamp(70px, 10vw, 140px); z-index: 1; overflow: visible;
  animation: float 5s ease-in-out infinite;
}
.balloons.r { left: auto; right: max(22vw, 16px); top: 12%; width: clamp(56px, 8vw, 110px); animation-delay: -2.5s; animation-duration: 6s; }
.balloons .b { transform-box: fill-box; transform-origin: 50% 100%; animation: swing 3.2s ease-in-out infinite; }
.balloons .b2 { animation-duration: 3.8s; animation-delay: -1s; }
.balloons .b3 { animation-duration: 2.8s; animation-delay: -2s; }

.divider { display: flex; justify-content: center; margin: 26px auto; width: min(320px, 80%); }
.divider svg { width: 100%; height: auto; }
.divider .heart { transform-box: fill-box; transform-origin: center; animation: beat 1.6s ease-in-out infinite; }

/* ---------- page 2 ---------- */
.infos {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 3vw, 32px); margin: 50px auto 0; max-width: 860px;
}
.info {
  background: rgba(255, 252, 245, .86);
  backdrop-filter: blur(3px);
  border: 1.5px solid rgba(79, 154, 60, .45);
  border-radius: 160px 160px 28px 28px;
  padding: 40px 18px 34px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  box-shadow: 0 18px 40px -24px rgba(74, 59, 44, .35);
  transition: transform .5s cubic-bezier(.2, .9, .3, 1.4), opacity 1s ease;
}
.info:hover { transform: translateY(-8px) rotate(-1.5deg); }
.info:nth-child(2):hover { transform: translateY(-8px) rotate(1.5deg); }
.info svg { width: 58px; height: 58px; color: var(--terra); }
.info .hand { transform-origin: 24px 24px; animation: clock 6s ease-in-out infinite; }
.info .pin { transform-box: fill-box; transform-origin: bottom center; animation: bounce 2.4s ease-in-out infinite; }
.info .label { font-size: 15px; letter-spacing: .18em; text-transform: uppercase; color: var(--sage); }
.info .value { font-family: "Fraunces", serif; font-weight: 600; color: var(--forest); font-size: clamp(24px, 3vw, 32px); line-height: 1.2; }
.info .value small { display: block; font-family: "Cormorant Garamond", serif; font-weight: 500; font-style: italic; color: var(--ink); font-size: .7em; margin-top: 4px; }

.nowrap { white-space: nowrap; }

/* ---------- page 3 ---------- */
blockquote {
  font-family: "Fraunces", serif; font-style: italic; font-weight: 500; color: var(--terra);
  font-size: clamp(32px, 5.6vw, 64px); line-height: 1.2;
}
.pulse { display: inline-block; animation: beat 1.6s ease-in-out infinite; cursor: pointer; }

/* ---------- entrance animations ---------- */
.word { display: inline-block; opacity: 0; transform: translateY(30px) rotate(-4deg); animation: rise .9s cubic-bezier(.2, .9, .3, 1.3) forwards; }
.fade { opacity: 0; animation: fade 1s forwards; }
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s ease, transform 1s cubic-bezier(.2, .8, .3, 1); }
.reveal.in { opacity: 1; transform: none; }
.infos .reveal:nth-child(2) { transition-delay: .15s; }
.infos .reveal:nth-child(3) { transition-delay: .3s; }

@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes fade { to { opacity: 1; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@keyframes twinkle { 0%, 100% { opacity: 1; filter: drop-shadow(0 0 6px #ffd66b); } 50% { opacity: .45; filter: none; } }
@keyframes flutter { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-30px); } }
@keyframes swing { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes wobble { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes rise-up { to { transform: translateY(calc(-100vh - 200px)); } }
@keyframes walk { from { left: -90px; } to { left: 100%; } }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(1); } 45% { transform: scale(1.15); } }
@keyframes clock { 0%, 100% { transform: rotate(-20deg); } 50% { transform: rotate(20deg); } }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); } 75% { transform: translateY(-6px); } }

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  .infos { grid-template-columns: 1fr; gap: 14px; margin-top: 32px; }
  .info { border-radius: 28px; padding: 22px 16px; flex-direction: row; flex-wrap: wrap; justify-content: center; text-align: center; }
  .info svg { width: 44px; height: 44px; }
  .info .label { width: 100%; order: -1; }
  .balloons { left: 16px; top: 13%; width: 64px; }
  .balloons.r { right: 16px; top: 9%; width: 50px; }
  .dots { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
