:root {
  color-scheme: dark;
  --ink: #fff7fb;
  --muted: rgba(255, 247, 251, 0.78);
  --soft: rgba(255, 255, 255, 0.12);
  --line: rgba(255, 255, 255, 0.22);
  --rose: #ff6f9f;
  --rose-deep: #c52d68;
  --gold: #ffd37a;
  --night: #170711;
  --plum: #351024;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 111, 159, 0.34), transparent 34rem),
    radial-gradient(circle at 88% 0%, rgba(255, 211, 122, 0.26), transparent 30rem),
    linear-gradient(135deg, var(--night), #260b1d 48%, #481735);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 86%);
}

main {
  width: 100%;
  margin: 0 auto;
  padding: 0;
}

img {
  display: block;
  max-width: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.hero {
  position: relative;
  height: 100svh;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #12060e;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.34);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.next-section {
  position: absolute;
  right: clamp(18px, 4vw, 42px);
  bottom: clamp(18px, 4vw, 42px);
  z-index: 5;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  color: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  transition: transform 180ms ease, background 180ms ease;
}

.next-section:hover {
  transform: translateY(3px);
  background: rgba(255, 255, 255, 0.2);
}

.hero__stage,
.hero__photo,
.hero__shade {
  position: absolute;
  inset: 0;
}

.hero__stage {
  overflow: hidden;
}

.hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: saturate(1.08) contrast(1.02);
  transform: scale(1.06);
  transition: opacity 900ms ease, transform 6800ms ease;
}

.hero__photo.is-active {
  opacity: 1;
  transform: scale(1.16);
}

.hero__shade {
  background:
    linear-gradient(90deg, rgba(16, 4, 12, 0.84), rgba(16, 4, 12, 0.34) 47%, rgba(16, 4, 12, 0.12)),
    linear-gradient(0deg, rgba(16, 4, 12, 0.78), transparent 42%);
}

.hero__copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(760px, 100%);
  height: 100%;
  min-height: 0;
  padding: clamp(24px, 6vw, 72px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Playfair Display", Georgia, serif;
  line-height: 0.96;
  letter-spacing: -0.06em;
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(3.4rem, 10vw, 8.6rem);
  text-wrap: balance;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 1.16;
  text-wrap: balance;
}

p,
li {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}

.hero__copy p:not(.eyebrow) {
  width: min(620px, 100%);
  color: rgba(255, 247, 251, 0.86);
  font-size: clamp(0.96rem, 1.6vw, 1.16rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 999px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
}

.ghost-button:hover {
  transform: translateY(-2px);
}

.note,
.final-note {
  min-height: 100svh;
  position: relative;
  margin-top: 0;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.gallery-section {
  position: relative;
  margin-top: 0;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

.note {
  display: grid;
  grid-template-columns: 1fr 0.86fr;
  gap: 32px;
  align-items: center;
  padding: clamp(28px, 6vw, 68px);
}

.note p:last-child {
  margin-bottom: 0;
  align-self: end;
}

.gallery-section {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  height: auto;
  padding: clamp(18px, 3vw, 34px);
  overflow: visible;
}

.section-heading {
  flex: 0 0 auto;
  padding: 0 64px 20px 0;
}

.gallery {
  flex: 0 0 auto;
  overflow: visible;
  columns: 4 230px;
  column-gap: 16px;
  padding: 0 4px 86px;
}

.memory-card {
  position: relative;
  display: inline-block;
  width: 100%;
  height: auto;
  margin: 0 0 16px;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  padding: 0;
  color: inherit;
  background: #210b19;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  cursor: pointer;
  break-inside: avoid;
  animation: floatIn both;
  animation-timeline: view();
  animation-range: entry 0% cover 32%;
}

.memory-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(12, 3, 9, 0.18), rgba(12, 3, 9, 0.1) 42%, rgba(12, 3, 9, 0.78)),
    radial-gradient(circle at 50% 85%, rgba(255, 111, 159, 0.28), transparent 32rem);
  pointer-events: none;
}

.memory-card img {
  width: 100%;
  height: auto;
  filter: saturate(1.04);
  transition: transform 420ms ease, filter 420ms ease;
}

.memory-card::after {
  content: attr(data-caption);
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 2;
  max-width: none;
  padding: 10px 12px;
  border-radius: 16px;
  color: var(--white);
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: left;
  background: rgba(23, 7, 17, 0.62);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.memory-card:hover img {
  filter: saturate(1.12) brightness(1.04);
  transform: scale(1.045);
}

.memory-card:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.final-note {
  display: grid;
  align-content: center;
  padding: clamp(36px, 7vw, 86px);
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 211, 122, 0.22), transparent 28rem),
    linear-gradient(135deg, rgba(255, 111, 159, 0.28), rgba(255, 255, 255, 0.08));
}

.final-note p,
.final-note strong {
  display: block;
  max-width: 900px;
  margin: 0 auto;
}

.final-note p {
  color: var(--white);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 5vw, 4.7rem);
  line-height: 1.22;
  letter-spacing: -0.05em;
}

.final-note strong {
  margin-top: 24px;
  color: var(--gold);
  font-size: 1.1rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: 28px;
  background: rgba(8, 2, 6, 0.9);
  backdrop-filter: blur(14px);
}

.lightbox.is-open {
  display: grid;
}

.lightbox img {
  max-width: min(100%, 1120px);
  max-height: 82vh;
  border-radius: 24px;
  object-fit: contain;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.44);
}

.lightbox p {
  position: absolute;
  right: 22px;
  bottom: 22px;
  left: 22px;
  max-width: min(760px, calc(100% - 44px));
  margin: 0;
  margin-inline: auto;
  color: var(--white);
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
  text-wrap: balance;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.lightbox__close {
  top: 22px;
  right: 22px;
  width: 48px;
  height: 48px;
  font-size: 2rem;
}

.lightbox__nav {
  top: 50%;
  width: 54px;
  height: 54px;
  font-size: 2.4rem;
  transform: translateY(-50%);
}

.lightbox__nav--prev {
  left: 22px;
}

.lightbox__nav--next {
  right: 22px;
}

.sparkles span {
  position: fixed;
  top: -24px;
  z-index: 12;
  color: rgba(255, 211, 122, 0.78);
  pointer-events: none;
  animation: fall linear forwards;
}

@keyframes fall {
  to {
    transform: translate3d(var(--drift), calc(100vh + 48px), 0) rotate(240deg);
    opacity: 0;
  }
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(34px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 820px) {
  main {
    width: 100%;
    padding: 0;
  }

  .hero {
    height: 100svh;
    min-height: 0;
    border-radius: 0;
  }

  .hero__copy {
    height: 100%;
    min-height: 0;
    padding: 24px;
    justify-content: flex-start;
    padding-top: clamp(30px, 8svh, 54px);
  }

  .hero__shade {
    background:
      linear-gradient(180deg, rgba(16, 4, 12, 0.8), rgba(16, 4, 12, 0.24) 42%, rgba(16, 4, 12, 0.88)),
      linear-gradient(90deg, rgba(16, 4, 12, 0.34), rgba(16, 4, 12, 0.08));
  }

  .note {
    grid-template-columns: 1fr;
  }

  .section-heading {
    padding-right: 58px;
  }

  .gallery {
    columns: 2 150px;
    column-gap: 10px;
    padding-bottom: 74px;
  }

  .memory-card {
    margin-bottom: 10px;
    border-radius: 18px;
  }

  .memory-card::after {
    right: 8px;
    bottom: 8px;
    left: 8px;
    font-size: 0.72rem;
  }

  .lightbox {
    padding: 14px;
  }

  .lightbox img {
    max-height: 78vh;
    border-radius: 18px;
  }

  .lightbox__nav {
    width: 44px;
    height: 44px;
    font-size: 2rem;
  }
}

@media (max-height: 680px) {
  .hero__copy {
    padding-top: 22px;
    padding-bottom: 22px;
  }

  .eyebrow {
    margin-bottom: 8px;
  }

  h1 {
    margin-bottom: 14px;
    font-size: clamp(3rem, 8vw, 6.2rem);
  }

  .hero__copy p:not(.eyebrow) {
    line-height: 1.55;
  }

  .hero__actions {
    margin-top: 14px;
  }
}

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