:root {
  color-scheme: light;
  --ink: #11110f;
  --paper: #f4f2ed;
  --muted: #74716b;
  --line: rgba(17, 17, 15, 0.18);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

main {
  position: relative;
  overflow: hidden;
}

body.is-loading {
  overflow: hidden;
}

@media (hover: hover) and (pointer: fine) {
  html.has-heart-pointer,
  html.has-heart-pointer * {
    cursor: none !important;
  }

  .heart-pointer {
    position: fixed;
    z-index: 200;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    pointer-events: none;
    opacity: 0;
    filter: drop-shadow(0 4px 8px rgba(194, 45, 104, 0.28));
    transform: translate3d(-50px, -50px, 0) rotate(-12deg) scale(0.35);
    transition: opacity 160ms ease, scale 220ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
  }

  .heart-pointer.is-visible {
    opacity: 1;
    scale: 1;
  }

  .heart-pointer.is-pressed {
    scale: 1.35;
  }

  .heart-pointer svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
    animation: heart-beat 1.25s ease-in-out infinite;
  }

  .heart-pointer:not(.is-visible) svg {
    animation-play-state: paused;
  }

  .heart-pointer path {
    fill: #f04f92;
    stroke: #fff3f8;
    stroke-width: 1.2;
  }
}

.page-progress {
  position: fixed;
  z-index: 80;
  top: 0;
  right: 0;
  width: 2px;
  height: 100svh;
  pointer-events: none;
  background: rgba(17, 17, 15, 0.08);
}

.page-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: top;
}

.entrance {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--paper);
  background: transparent;
  transition: visibility 0s linear 1.3s;
}

.entrance > :not(.entrance__curtain) {
  position: relative;
  z-index: 1;
}

.entrance__content {
  text-align: center;
}

.entrance__curtain {
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  width: 51%;
  background: #181816;
}

.entrance__curtain--left { left: 0; }
.entrance__curtain--right { right: 0; }

.entrance::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  content: "";
  background: rgba(244, 242, 237, 0.5);
}

.entrance__line {
  width: 1px;
  height: 52px;
  margin: 0 auto 26px;
  background: rgba(244, 242, 237, 0.5);
  transform: scaleY(0);
  transform-origin: top;
  animation: grow-line 0.8s ease 0.15s forwards;
}

.entrance__eyebrow,
.eyebrow {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  line-height: 1.5;
  text-transform: uppercase;
}

.entrance__eyebrow {
  opacity: 0;
  animation: fade-up 0.7s ease 0.45s forwards;
}

.entrance__names {
  margin: 12px 0 0;
  font: 4rem/1 var(--serif);
  letter-spacing: 0.06em;
  opacity: 0;
  animation: fade-up 0.85s ease 0.7s forwards;
}

.entrance__date {
  margin: 19px 0 0;
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  opacity: 0;
  animation: fade-up 0.7s ease 0.92s forwards;
}

.entrance__open {
  display: block;
  margin: 30px auto 0;
  padding: 6px;
  border: 0;
  outline: 0;
  appearance: none;
  color: var(--paper);
  background: transparent;
  font: 500 0.58rem/1 var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(12px);
  animation:
    fade-up 0.7s ease 1.15s forwards,
    open-prompt-bounce 1.6s ease-in-out 1.9s infinite;
  touch-action: manipulation;
}

.entrance__open:active {
  transform: scale(0.97);
}

.entrance__open:focus-visible {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.entrance__open:disabled {
  opacity: 0.65;
}

.entrance__names span,
h1 i,
.closing__mark i {
  font-weight: 400;
  font-style: italic;
}

body.is-ready .entrance {
  pointer-events: none;
  visibility: hidden;
}

body.is-ready .entrance__content {
  animation: entrance-content-out 0.25s ease forwards;
}

body.is-ready .entrance__curtain--left {
  animation: curtain-left 1.05s cubic-bezier(0.77, 0, 0.18, 1) 0.18s forwards;
}

body.is-ready .entrance__curtain--right {
  animation: curtain-right 1.05s cubic-bezier(0.77, 0, 0.18, 1) 0.18s forwards;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 42px 22px 76px;
  overflow: hidden;
  text-align: center;
}

.hero::before,
.hero::after {
  position: absolute;
  width: 34vw;
  max-width: 150px;
  height: 1px;
  content: "";
  background: var(--line);
}

.hero::before {
  top: 28px;
  left: 0;
}

.hero::after {
  right: 0;
  bottom: 28px;
}

.hero__grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.14'/%3E%3C/svg%3E");
}

.hero__orb {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
  pointer-events: none;
}

.hero__orb--one {
  top: 13%;
  right: -25vw;
  width: 65vw;
  height: 65vw;
}

.hero__orb--two {
  bottom: 15%;
  left: -15vw;
  width: 35vw;
  height: 35vw;
}

.hero__eyebrow,
.hero h1,
.hero__portrait,
.hero__invitation,
.hero__date,
.scroll-cue {
  opacity: 0;
  transform: translateY(18px);
}

body.is-ready .hero__eyebrow {
  animation: fade-up 0.8s ease 0.55s forwards;
}

h1 {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 19px 0 18px;
  font: 400 clamp(2.9rem, 14.6vw, 5.8rem)/0.8 var(--serif);
  letter-spacing: -0.07em;
}

h1 i {
  margin: 8px 0 6px;
  font-size: 0.42em;
  line-height: 1;
  letter-spacing: 0;
}

body.is-ready .hero h1 {
  animation: fade-up 1s cubic-bezier(0.22, 1, 0.36, 1) 0.7s forwards;
}

.hero__portrait {
  width: min(72vw, 300px);
  height: min(82vw, 340px);
  flex: 0 0 auto;
  margin: 0 auto 17px;
  clip-path: inset(0 0 100% 0);
}

.photo-frame.hero__portrait img {
  width: 100%;
  object-position: 50% 72%;
  filter: saturate(1.35) contrast(1.06);
}

body.is-ready .hero__portrait {
  animation: hero-photo-reveal 1.15s cubic-bezier(0.77, 0, 0.18, 1) 0.8s forwards;
}

body.is-ready .hero__portrait .photo-sheen {
  animation: photo-sheen 1.45s ease 1.45s both;
}

.hero__invitation {
  max-width: 270px;
  margin: 0;
  color: var(--muted);
  font: italic 1rem/1.6 var(--serif);
}

body.is-ready .hero__invitation {
  animation: fade-up 0.85s ease 0.95s forwards;
}

.hero__date {
  margin: 23px 0 0;
  font: 0.7rem/1 var(--sans);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.hero__date i {
  margin: 0 7px;
  font: italic 1.1rem/1 var(--serif);
  letter-spacing: 0;
  text-transform: none;
}

body.is-ready .hero__date {
  animation: fade-up 0.85s ease 1.1s forwards;
}

.scroll-cue {
  position: absolute;
  bottom: 47px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

body.is-ready .scroll-cue {
  animation: fade-up 0.75s ease 1.2s forwards;
}

.scroll-cue span {
  font-size: 0.55rem;
  letter-spacing: 0.23em;
  text-transform: uppercase;
}

.scroll-cue i {
  width: 1px;
  height: 28px;
  overflow: hidden;
  background: var(--line);
}

.scroll-cue i::after {
  display: block;
  width: 100%;
  height: 50%;
  content: "";
  background: var(--ink);
  animation: scroll-line 1.7s ease-in-out infinite;
}

.photo-frame {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #d6d3cc;
}

.photo-sheen {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.14) 49%, transparent 68%);
  transform: translateX(-120%);
}

.is-visible .photo-sheen {
  animation: photo-sheen 1.45s ease 0.55s both;
}

.photo-frame img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(1.35) contrast(1.04);
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.photo-frame.is-missing img {
  display: none;
}

.photo-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #f3f1ec;
  background: linear-gradient(145deg, #383836, #161615);
  font: 3.5rem/1 var(--serif);
}

.photo-fallback::after {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  content: "";
}

.photo-fallback i {
  font-size: 0.45em;
  font-weight: 400;
}

.details {
  padding: 95px 24px 105px;
  color: var(--paper);
  background: var(--ink);
}

.details__heading {
  margin-bottom: 60px;
  text-align: center;
}

.details .eyebrow {
  color: #a3a099;
}

h2 {
  margin: 10px 0 0;
  font: 400 3.25rem/1 var(--serif);
}

.details__grid {
  border-top: 1px solid rgba(244, 242, 237, 0.25);
}

.detail {
  position: relative;
  padding: 35px 0 34px;
  border-bottom: 1px solid rgba(244, 242, 237, 0.25);
}

.detail__number {
  position: absolute;
  top: 39px;
  right: 0;
  color: #807e79;
  font-size: 0.64rem;
}

.detail__label {
  margin: 0 0 12px;
  color: #9e9b94 !important;
  font-size: 0.6rem !important;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.detail h3 {
  margin: 0;
  font: 400 2rem/1.1 var(--serif);
}

.detail h3 small {
  font: 0.65rem/1 var(--sans);
  letter-spacing: 0.18em;
}

.detail p:last-child {
  margin: 10px 0 0;
  color: #aaa7a0;
  font: italic 0.9rem/1.5 var(--serif);
}

.location-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 44px;
  padding: 20px 21px;
  border: 1px solid rgba(244, 242, 237, 0.5);
  color: var(--paper);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.3s ease, background 0.3s ease;
}

.location-button svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.location-button:active {
  color: var(--ink);
  background: var(--paper);
}

.story-ribbon {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.story-ribbon__track {
  width: max-content;
  display: flex;
  animation: ribbon 24s linear infinite;
}

.story-ribbon__group {
  min-width: 100vw;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-around;
  gap: clamp(30px, 5vw, 90px);
  padding: 18px clamp(22px, 4vw, 72px);
}

.story-ribbon span {
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.story-ribbon i {
  font: italic 1rem/1 var(--serif);
}

.closing {
  position: relative;
  height: 100svh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 76px 24px 0;
  overflow: hidden;
  text-align: center;
}

.closing > :not(.closing__image) {
  position: relative;
  z-index: 2;
}

.closing__image {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  height: 62%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.22) 18%, #000 52%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.22) 18%, #000 52%);
}

.closing__image::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to bottom, rgba(244, 242, 237, 0.28), transparent 55%);
}

.closing__image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 68%;
  filter: saturate(1.3) contrast(1.08);
  opacity: 0.88;
}

.closing__mark {
  margin: 23px 0;
  font: 4.5rem/1 var(--serif);
}

.closing__message {
  max-width: 250px;
  margin: 0;
  color: var(--muted);
  font: italic 1rem/1.55 var(--serif);
}

.closing__line {
  width: 1px;
  height: 46px;
  margin-top: 30px;
  background: var(--line);
}

.reveal {
  opacity: 1;
  transform: none;
}

.motion-ready .reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.85s ease, transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.motion-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--clip {
  clip-path: none;
}

.motion-ready .reveal--clip {
  clip-path: inset(0 0 100% 0);
  opacity: 1;
  transform: translateY(22px);
  transition: clip-path 1.15s cubic-bezier(0.77, 0, 0.18, 1), transform 1.15s cubic-bezier(0.22, 1, 0.36, 1);
}

.motion-ready .reveal--clip.is-visible {
  clip-path: inset(0 0 0 0);
  transform: translateY(0);
}

@keyframes grow-line {
  to { transform: scaleY(1); }
}

@keyframes fade-up {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-photo-reveal {
  to { opacity: 1; transform: translateY(0); clip-path: inset(0 0 0 0); }
}

@keyframes scroll-line {
  0% { transform: translateY(-110%); }
  100% { transform: translateY(210%); }
}

@keyframes curtain-left {
  to { transform: translateX(-102%); }
}

@keyframes curtain-right {
  to { transform: translateX(102%); }
}

@keyframes entrance-content-out {
  to { opacity: 0; transform: scale(0.985); }
}

@keyframes open-prompt-bounce {
  0%, 45%, 100% { transform: translateY(0); }
  20% { transform: translateY(-7px); }
  32% { transform: translateY(-2px); }
}

@keyframes photo-sheen {
  to { transform: translateX(120%); }
}

@keyframes ribbon {
  to { transform: translateX(-50%); }
}

@keyframes heart-beat {
  0%, 44%, 100% { transform: scale(1); }
  12% { transform: scale(1.16); }
  24% { transform: scale(1.03); }
  34% { transform: scale(1.12); }
}

@media (min-width: 700px) {
  .details {
    max-width: 700px;
    margin-right: auto;
    margin-left: auto;
  }

  .details {
    max-width: none;
    padding-right: max(24px, calc((100vw - 650px) / 2));
    padding-left: max(24px, calc((100vw - 650px) / 2));
  }

  .details__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .detail:not(:last-child) {
    padding-right: 35px;
    border-right: 1px solid rgba(244, 242, 237, 0.25);
  }

  .detail:not(:first-child) {
    padding-left: 35px;
  }

}

@media (hover: hover) {
  .entrance__open:hover {
    opacity: 0.65;
  }

  .location-button:hover {
    color: var(--ink);
    background: var(--paper);
  }

  .photo-frame:hover img {
    transform: scale(1.025);
  }
}

@media (max-width: 520px) {
  .scroll-cue {
    bottom: 7px;
    gap: 6px;
  }

  .scroll-cue i {
    height: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }

  .entrance {
    display: none;
  }

  .hero__eyebrow,
  .hero h1,
  .hero__invitation,
  .hero__date,
  .scroll-cue,
  .reveal {
    opacity: 1;
    transform: none;
  }

  .reveal--clip {
    clip-path: none;
  }

  .story-ribbon__track {
    animation: none;
  }
}
