:root {
  color-scheme: light;
  --ink: #263847;
  --porcelain: #f7f3eb;
  --copper: #a96750;
  --paper: #f5efe4;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--porcelain);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--porcelain);
  color: var(--ink);
  font-family: Arial, sans-serif;
}

body.is-entering { overflow: hidden; }

[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 30;
  top: calc(12px + var(--safe-top));
  left: 12px;
  padding: 12px 16px;
  transform: translateY(-160%);
  border: 2px solid var(--copper);
  border-radius: 999px;
  background: var(--porcelain);
  color: var(--ink);
  font: 700 14px/1.2 Arial, sans-serif;
  text-decoration: none;
}

.skip-link:focus { transform: translateY(0); }

.entry {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--porcelain);
  opacity: 1;
  transition: opacity 620ms ease;
}

.entry.is-leaving { opacity: 0; pointer-events: none; }

.open-envelope {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.open-envelope:focus-visible { outline: 3px solid var(--copper); outline-offset: -7px; }

.envelope-stage {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(90vw, 560px);
  height: min(90vw, 560px);
  transform: translate(-50%, -53%);
}

.envelope-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.985);
  transition: opacity 460ms ease, transform 620ms cubic-bezier(.2,.7,.2,1);
  pointer-events: none;
  user-select: none;
}

.frame-closed { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.envelope-stage[data-stage="seal"] .frame-closed { opacity: 0; }
.envelope-stage[data-stage="seal"] .frame-seal { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.envelope-stage[data-stage="flap"] .frame-seal { opacity: 0; }
.envelope-stage[data-stage="flap"] .frame-flap { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.envelope-stage[data-stage="card"] .frame-flap { opacity: 0; }
.envelope-stage[data-stage="card"] .frame-card { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.insert-caption {
  position: absolute;
  top: 37.7%;
  left: 50%;
  width: 82%;
  color: var(--ink);
  font: 400 clamp(14px, 4.35vw, 20px)/1.15 Georgia, serif;
  letter-spacing: .01em;
  opacity: 0;
  transform: translate(-50%, 3px);
  transition: opacity 360ms ease 130ms, transform 360ms ease 130ms;
  pointer-events: none;
  white-space: nowrap;
}

.envelope-stage[data-stage="card"] .insert-caption { opacity: 1; transform: translate(-50%, 0); }

.open-hint {
  position: absolute;
  top: calc(50% + min(34vw, 190px));
  left: 0;
  width: 100%;
  color: #8d796c;
  font: 700 10px/1 Arial, sans-serif;
  letter-spacing: .23em;
  text-align: center;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.entry.is-opening .open-hint { opacity: 0; }

.invitation {
  width: min(100%, 780px);
  margin-inline: auto;
  overflow: clip;
  background: var(--porcelain);
}

.scene {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  line-height: 0;
  isolation: isolate;
}

.scene > img {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  border: 0;
  vertical-align: top;
  user-select: none;
  -webkit-user-drag: none;
}

.scene-cleanup {
  position: absolute;
  z-index: 1;
  display: block;
  pointer-events: none;
}

.countdown-note-cleanup {
  top: 79.9%;
  left: 0;
  width: 100%;
  height: 4.6%;
  background: #263847;
}

.venue-note-cleanup {
  top: 48.53%;
  left: 30%;
  width: 40%;
  height: 2.05%;
  background: linear-gradient(to bottom, #2b3e4b 0 85%, #2b3d4b 85% 100%);
}

.directions-note-cleanup {
  top: 85.75%;
  left: 0;
  width: 100%;
  height: 2.25%;
  background: #f7f3eb;
}

.gifts-note-cleanup {
  top: 68.3%;
  left: 0;
  width: 100%;
  height: 12.25%;
  background: #f2eae2;
}

.rsvp-note-cleanup {
  top: 86.8%;
  left: 27%;
  width: 46%;
  height: 4.2%;
  background: #f7f3eb;
}

.countdown-live {
  position: absolute;
  z-index: 2;
  top: 19.7%;
  left: 23%;
  display: grid;
  width: 54%;
  height: 20.8%;
  place-items: center;
  overflow: hidden;
  background: #263847;
  color: var(--porcelain);
  font: 400 min(20.5vw, 160px)/.92 Georgia, serif;
  font-variant-numeric: lining-nums;
  text-align: center;
  white-space: nowrap;
}

.hotspot {
  position: absolute;
  z-index: 2;
  display: block;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hotspot:focus-visible {
  outline: 3px solid var(--copper);
  outline-offset: 2px;
}

.hotspot-calendar {
  top: 76.9%;
  left: 22.2%;
  width: 55.6%;
  height: 44px;
}

.scene-09 .hotspot { height: 44px; }
.hotspot-bus { top: 34.7%; left: 31%; width: 38%; }
.hotspot-lodging { top: 57.1%; left: 14%; width: 28%; }
.hotspot-parking { top: 57.1%; left: 58%; width: 28%; }
.hotspot-ceremony-map { top: 75.9%; left: 13.2%; width: 29.5%; }
.hotspot-reception-map { top: 75.9%; left: 57.5%; width: 29.5%; }
.hotspot-gifts { top: 80.4%; left: 27.5%; width: 45%; height: 44px; }
.hotspot-rsvp { top: 70.5%; left: 24%; width: 52%; height: 44px; }

.hotspot:disabled { cursor: not-allowed; }
.hotspot:disabled:focus-visible { outline: none; }

.audio-toggle {
  position: fixed;
  z-index: 10;
  right: max(5px, env(safe-area-inset-right, 0px));
  bottom: calc(14px + var(--safe-bottom));
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--copper);
  filter: drop-shadow(0 1px 3px rgba(247, 243, 235, .9));
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.audio-toggle:focus-visible { outline: 3px solid var(--copper); outline-offset: 3px; }
.audio-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }

.reveal-scene img { opacity: 1; transform: translateY(0); }
.invitation.motion-ready .reveal-scene img {
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 520ms ease, transform 520ms ease;
}
.invitation.motion-ready .reveal-scene.is-visible img { opacity: 1; transform: translateY(0); }

@media (min-width: 430px) {
  .countdown-live { font-size: min(20.5vw, 160px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .invitation.motion-ready .reveal-scene img { opacity: 1; transform: none; }
}
