:root {
  --jungle-950: #0b261b;
  --jungle-900: #113624;
  --jungle-800: #1e5032;
  --jungle-700: #2d6b3f;
  --leaf: #4f8a39;
  --lime: #96b94e;
  --wood: #713912;
  --wood-dark: #3e1d0a;
  --clay: #a24d22;
  --parchment: #f8e7b9;
  --parchment-light: #fff7dc;
  --ink: #352113;
  --white: #fffef5;
  --shadow: 0 18px 46px rgba(5, 27, 16, .28);
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--jungle-950);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--white);
  background: var(--jungle-950);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.invitation {
  width: 100%;
  overflow: hidden;
  background:
    linear-gradient(rgba(5, 32, 20, .2), rgba(5, 32, 20, .82)),
    url("assets/selva.png") center top / cover fixed;
}

.hero {
  position: relative;
  height: clamp(560px, 137vw, 800px);
  min-height: 0;
  display: grid;
  place-items: center;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(7, 37, 24, .05) 40%, rgba(7, 37, 24, .9) 96%),
    url("assets/selva.png") center / cover;
}
.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(circle at 65% 23%, transparent 0 16%, rgba(6, 30, 20, .34) 64%, rgba(6, 30, 20, .72));
}
.hero__content {
  position: relative;
  width: min(100%, 620px);
  min-height: 0;
  height: 100%;
  padding: max(26px, env(safe-area-inset-top)) 12px 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.eyebrow {
  width: 68%;
  margin: 0 0 7px auto;
  color: var(--white);
  font-size: clamp(.62rem, 2.5vw, .92rem);
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .55);
}
.parchment {
  position: relative;
  border: 1px solid rgba(113, 57, 18, .28);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, .6), transparent 20%),
    linear-gradient(135deg, var(--parchment-light), var(--parchment));
  box-shadow: var(--shadow), inset 0 0 28px rgba(133, 76, 25, .13);
}
.parchment::before,
.parchment::after {
  display: none;
}
.parchment--hero {
  width: 69%;
  margin-left: auto;
  padding: clamp(22px, 6vw, 38px) 12px 26px;
  text-align: center;
  transform: rotate(-.7deg);
}
.hero__kicker {
  margin: 0;
  color: var(--wood);
  font-family: Georgia, serif;
  font-size: clamp(1.1rem, 5.4vw, 2.45rem);
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
}
.hero__kicker span { color: var(--leaf); font-size: .7em; }
.hero h1 {
  width: 100%;
  max-width: 100%;
  margin: 12px auto;
  padding: .06em .08em .1em;
  color: var(--jungle-800);
  font-family: Georgia, serif;
  font-size: clamp(2.4rem, 9.6vw, 4.75rem);
  line-height: 1;
  letter-spacing: -.045em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 3px 0 rgba(255, 255, 255, .75), 0 8px 16px rgba(28, 67, 32, .18);
}
.hero__intro { max-width: 410px; margin: 0 auto; font-size: clamp(.72rem, 2.8vw, 1.12rem); line-height: 1.35; }
.hero__baby {
  position: absolute;
  z-index: 3;
  width: clamp(260px, 72vw, 480px);
  max-height: 80%;
  bottom: -2px;
  left: -2%;
  right: auto;
  object-fit: contain;
  filter: drop-shadow(0 16px 16px rgba(15, 35, 15, .35));
  mask-image: linear-gradient(to bottom, #000 76%, transparent 99%);
}
.scroll-cue {
  position: absolute;
  bottom: 16px;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--white);
  font-size: .78rem;
  text-decoration: none;
  transform: translateX(-50%);
  text-shadow: 0 2px 8px rgba(0, 0, 0, .7);
}
.scroll-cue span:last-child { font-size: 1.8rem; line-height: .7; animation: bob 1.5s ease-in-out infinite; }

.content-wrap {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 34px 14px max(30px, env(safe-area-inset-bottom));
}
.personal-pass {
  margin: 0 0 40px;
  padding: 24px 20px;
  text-align: center;
  border: 3px solid var(--lime);
}
.personal-pass h2 { margin: 2px 0 8px; color: var(--jungle-800); font: 800 clamp(1.6rem, 7vw, 2.4rem) Georgia, serif; }
.personal-pass p { margin: 4px 0; }
.pass-code { color: var(--clay); font-size: .86rem; letter-spacing: .06em; }
.section { margin: 0 0 42px; }
.wood-sign {
  position: relative;
  z-index: 2;
  width: min(94%, 570px);
  margin: 0 auto -13px;
  padding: 13px 28px;
  color: var(--white);
  text-align: center;
  border: 2px solid #9b5c2b;
  border-radius: 16px 11px 18px 10px;
  background:
    linear-gradient(90deg, transparent 0 15%, rgba(255,255,255,.08) 16% 17%, transparent 18% 72%, rgba(0,0,0,.09) 73% 74%, transparent 75%),
    linear-gradient(#8c4d20, #5d2d0e);
  box-shadow: 0 8px 0 rgba(39, 20, 7, .45), 0 15px 28px rgba(5, 20, 12, .3);
  transform: rotate(-.6deg);
}
.wood-sign::before,
.wood-sign::after { content: "◆"; position: absolute; top: 50%; color: var(--lime); transform: translateY(-50%); }
.wood-sign::before { left: 11px; }
.wood-sign::after { right: 11px; }
.wood-sign h2 { margin: 0; font: 700 clamp(1.35rem, 5.5vw, 2rem) Georgia, serif; letter-spacing: .02em; }

.countdown-section { padding-top: 12px; }
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  padding-top: 28px;
}
.countdown__unit {
  min-width: 0;
  padding: 15px 2px 12px;
  text-align: center;
  border: 2px solid rgba(84, 44, 15, .42);
  border-radius: 16px;
  background: linear-gradient(var(--parchment-light), var(--parchment));
  box-shadow: 0 9px 20px rgba(5, 25, 15, .24);
}
.countdown__unit strong { display: block; color: var(--jungle-800); font: 800 clamp(1.6rem, 8vw, 3rem) Georgia, serif; line-height: 1; }
.countdown__unit span { display: block; margin-top: 6px; color: var(--wood); font-size: clamp(.66rem, 2.6vw, .86rem); font-weight: 800; text-transform: uppercase; }
.countdown__message { margin: 18px 0 0; color: var(--white); text-align: center; font-weight: 700; }

.details { padding: 28px 18px 24px; text-align: center; }
.section-label { margin: 0 0 16px; color: var(--jungle-700); font: italic 700 1.15rem Georgia, serif; }
.date-lockup { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; max-width: 420px; margin: 0 auto 24px; }
.date-lockup__weekday,
.date-lockup__month { padding: 7px; border-block: 1px solid rgba(113, 57, 18, .42); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.date-lockup__day { grid-row: span 2; padding: 0 14px; color: var(--clay); font: 800 3.2rem Georgia, serif; line-height: 1; }
.date-lockup__year { grid-column: 3; font-size: .8rem; letter-spacing: .16em; }
.event-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.event-card { padding: 16px 8px; border-radius: 15px; background: rgba(255, 255, 255, .42); }
.event-card__icon { display: inline-grid; width: 42px; height: 42px; place-items: center; color: var(--white); border-radius: 50%; background: var(--jungle-700); }
.event-card__label { margin: 8px 0 0; color: var(--clay); font-size: .77rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.event-card h3 { margin: 5px 0; font: 800 clamp(.92rem, 3.9vw, 1.35rem) Georgia, serif; }
.event-card p { margin: 4px 0; font-size: clamp(.72rem, 2.9vw, 1rem); }
.event-card--compact h3 { color: var(--clay); }
.event-card__time { color: var(--jungle-800); font-weight: 900; }

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  color: var(--white);
  border: 2px solid var(--jungle-700);
  border-radius: 999px;
  background: var(--jungle-700);
  box-shadow: 0 7px 0 var(--jungle-950);
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.button:hover { background: var(--jungle-800); transform: translateY(-2px); box-shadow: 0 9px 0 var(--jungle-950); }
.button:active { transform: translateY(4px); box-shadow: 0 3px 0 var(--jungle-950); }
.button:focus-visible, input:focus-visible, textarea:focus-visible, .photo:focus-visible, .lightbox__close:focus-visible { outline: 4px solid #f2b84b; outline-offset: 3px; }
.button--outline { min-height: 42px; margin-top: 13px; padding: 8px 16px; color: var(--jungle-800); border-color: var(--jungle-700); background: transparent; box-shadow: none; }
.button--outline:hover { color: var(--white); box-shadow: none; }

.sponsors__mark { color: var(--clay); font-size: clamp(1.15rem, 5vw, 2rem); line-height: 1; }
.sponsors h3 { margin: 5px 0 7px; color: var(--wood); font: 800 clamp(.72rem, 3.3vw, 1.15rem) Georgia, serif; line-height: 1.12; text-wrap: balance; }
.sponsors p { margin: 0; white-space: pre-line; font-size: clamp(.66rem, 2.75vw, .92rem); line-height: 1.38; }
.sponsors-qr { display: block; padding-top: 26px; }
.book-sponsors { position: relative; width: 100%; aspect-ratio: 1519 / 1035; filter: drop-shadow(0 13px 20px rgba(4,22,13,.38)); }
.book-sponsors > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.book-page { position: absolute; top: 10%; width: 38%; height: 76%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3% 2.5%; overflow: hidden; text-align: center; }
.book-page--left { left: 8%; transform: rotate(-.35deg); }
.book-page--right { right: 8%; transform: rotate(.35deg); }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; padding-top: 32px; }
.photo { padding: 5px 5px 14px; border: 0; background: var(--white); box-shadow: 0 12px 25px rgba(3, 25, 14, .4); cursor: zoom-in; transform: rotate(-2.5deg); transition: transform .25s ease; }
.photo:nth-child(even) { transform: rotate(2.5deg); }
.photo:hover { z-index: 2; transform: rotate(0) scale(1.03); }
.photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.placeholder-note { color: rgba(255, 255, 255, .8); font-size: .75rem; text-align: center; }
.placeholder-note code { padding: 2px 5px; color: var(--jungle-950); border-radius: 5px; background: var(--parchment); }

.rsvp-layout { display: grid; gap: 30px; padding: 42px 18px 26px; }
.rsvp-layout { max-width: 570px; margin-inline: auto; }
.rsvp-form { text-align: left; }
.rsvp-form > p:first-child { text-align: center; }
.rsvp-form label { display: block; margin: 13px 0 5px; color: var(--jungle-900); font-size: .82rem; font-weight: 900; }
.rsvp-form input,
.rsvp-form textarea { width: 100%; padding: 13px 14px; color: var(--ink); border: 2px solid rgba(81, 101, 49, .38); border-radius: 12px; background: rgba(255, 255, 255, .74); }
.rsvp-form textarea { resize: vertical; }
.rsvp-form .button { width: 100%; margin-top: 18px; }
.form-status { min-height: 1.5em; margin: 13px 0 0; color: var(--clay); font-size: .88rem; text-align: center; }
.confirmation-pass {
  width: min(100%, 360px);
  margin: 8px auto 0;
  padding: 22px 16px;
  text-align: center;
  border: 2px solid rgba(113, 57, 18, .32);
  border-radius: 20px;
  background: rgba(255, 255, 255, .48);
  box-shadow: inset 0 0 22px rgba(113, 57, 18, .08);
}
.confirmation-pass[hidden] { display: none; }
.confirmation-pass__check { width: 42px; height: 42px; display: grid; place-items: center; margin: 0 auto 7px; color: var(--white); border-radius: 50%; background: var(--jungle-700); font-size: 1.45rem; font-weight: 900; }
.confirmation-pass h3 { margin: 3px 0 15px; color: var(--jungle-800); font: 800 clamp(1.25rem, 5vw, 1.7rem) Georgia, serif; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.confirmation-pass .qr { width: 208px; min-width: 208px; min-height: 208px; margin-inline: auto; }
.confirmation-pass .qr img, .confirmation-pass .qr canvas { width: 180px !important; height: 180px !important; }
.confirmation-pass .button { width: 100%; margin-top: 12px; }
.confirmation-pass__code { margin: 10px 0 0; color: var(--clay); font-size: .78rem; font-weight: 800; letter-spacing: .04em; overflow-wrap: anywhere; }
.confirmation-pass__note { margin: 12px 0 0; color: var(--wood); font-size: .76rem; line-height: 1.4; }
.qr-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.qr { min-width: 196px; min-height: 196px; display: grid; place-items: center; padding: 12px; border: 2px solid var(--wood); border-radius: 15px; background: #fff; }
.qr img, .qr canvas { width: 170px !important; height: 170px !important; }
.qr-card p { margin: 12px 0 0; }
.qr-card__status { max-width: 260px; color: var(--clay); font-size: .77rem; }

.thanks { padding: 34px 26px; text-align: center; }
.thanks__leaf { margin: 0; color: var(--leaf); font-size: 2rem; }
.thanks h2 { margin: -8px 0 10px; color: var(--jungle-800); font: italic 800 clamp(2.4rem, 10vw, 4.2rem) Georgia, serif; }
.thanks p { max-width: 570px; margin-inline: auto; }
.thanks__closing { padding-top: 14px; color: var(--wood); font: 800 1.25rem Georgia, serif; }
.thanks__scene {
  position: relative;
  z-index: 0;
  width: calc(100% + 52px);
  max-width: none;
  margin: clamp(-240px, -28vw, -92px) -26px -34px;
  border-radius: 0 0 var(--radius) var(--radius);
  pointer-events: none;
}
.thanks > :not(.thanks__scene) { position: relative; z-index: 1; }
.footer { padding: 0 16px 20px; color: var(--white); text-align: center; text-shadow: 0 2px 8px rgba(0, 0, 0, .7); }
.music-control { position: fixed; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 40; }
.music-control button { min-height: 46px; padding: 10px 16px; color: var(--white); border: 2px solid rgba(255,255,255,.6); border-radius: 999px; background: rgba(17,54,36,.92); box-shadow: 0 8px 22px rgba(0,0,0,.35); cursor: pointer; font-weight: 800; backdrop-filter: blur(8px); }
.music-control button[aria-pressed="true"] { background: var(--clay); }

.lightbox { width: min(92vw, 650px); padding: 18px; border: 0; border-radius: 18px; background: var(--parchment-light); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.lightbox::backdrop { background: rgba(3, 17, 10, .82); backdrop-filter: blur(4px); }
.lightbox img { max-height: 78vh; margin: auto; object-fit: contain; }
.lightbox__close { position: absolute; top: 4px; right: 7px; width: 42px; height: 42px; color: var(--white); border: 0; border-radius: 50%; background: var(--jungle-900); cursor: pointer; font-size: 1.7rem; }

@keyframes bob { 50% { transform: translateY(5px); } }
@keyframes photoRevealLeft {
  from { opacity: 0; transform: translate3d(-28px, 24px, 0) rotate(-5deg) scale(.92); }
  to { opacity: 1; transform: rotate(-2.5deg) scale(1); }
}
@keyframes photoRevealRight {
  from { opacity: 0; transform: translate3d(28px, 24px, 0) rotate(5deg) scale(.92); }
  to { opacity: 1; transform: rotate(2.5deg) scale(1); }
}
@media (min-width: 640px) {
  .content-wrap { padding-inline: 28px; }
  .event-grid { grid-template-columns: repeat(4, 1fr); }
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .hero__baby { left: -4%; }
}
@media (min-width: 900px) {
  .hero__content { width: 720px; }
  .parchment--hero { padding-inline: 55px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 480px) {
  .hero { height: clamp(500px, 135vw, 560px); }
  .hero__content { padding-inline: 8px; }
  .content-wrap { padding: 24px 9px max(24px, env(safe-area-inset-bottom)); }
  .section { margin-bottom: 31px; }
  .wood-sign { width: 96%; padding: 11px 25px; }
  .wood-sign h2 { font-size: clamp(1.18rem, 5.4vw, 1.55rem); line-height: 1.12; }
  .countdown { gap: 5px; padding-top: 25px; }
  .countdown__unit { padding: 12px 1px 10px; border-radius: 13px; }
  .details { padding: 23px 9px 18px; }
  .event-grid { gap: 6px; }
  .event-card { padding: 13px 5px; }
  .sponsors-qr { padding-top: 23px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 12px; padding: 30px 6px 4px; }
  .photo { padding: 7px 7px 17px; opacity: 0; will-change: transform, opacity; }
  .photo.is-visible { animation: photoRevealLeft .7s cubic-bezier(.2,.75,.25,1) forwards; }
  .photo:nth-child(even).is-visible { animation-name: photoRevealRight; }
  .photo:nth-child(2) { animation-delay: .1s; }
  .photo:nth-child(3) { animation-delay: .18s; }
  .photo:nth-child(4) { animation-delay: .26s; }
  .rsvp-layout { padding: 37px 12px 20px; }
  .thanks { padding: 25px 18px; overflow: hidden; }
  .thanks h2 { font-size: clamp(2.15rem, 11vw, 3rem); }
  .thanks p { line-height: 1.5; text-wrap: balance; }
  .thanks__closing { margin: 8px auto 0; padding-top: 8px; font-size: 1.08rem; line-height: 1.32; }
  .thanks__scene { width: calc(100% + 36px); max-height: 300px; margin: 18px -18px -25px; object-fit: cover; object-position: center bottom; }
  .footer { padding-bottom: 12px; }
}
