:root {
  --bg: #fff8ef;
  --surface: rgba(255, 251, 245, 0.84);
  --surface-strong: #fffdf9;
  --text: #2a1637;
  --muted: #6f5b79;
  --accent: #ff6b6b;
  --accent-2: #ffb347;
  --accent-3: #ffd9ec;
  --line: rgba(84, 39, 99, 0.12);
  --shadow: 0 24px 60px rgba(100, 43, 72, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 179, 71, 0.32), transparent 30%),
    radial-gradient(circle at 85% 15%, rgba(255, 107, 107, 0.24), transparent 24%),
    linear-gradient(180deg, #fff6eb 0%, #fffaf4 52%, #fff4ef 100%);
}

body.lightbox-open {
  overflow: hidden;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  --festive-offset: 0px;
  --festive-rotation: 0deg;
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 40px;
  position: relative;
}

.page-content {
  --smooth-translate: 0px;
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  margin: 0 auto;
}

.page-content.is-smooth-scroll {
  position: fixed;
  top: 18px;
  left: 50%;
  width: min(1080px, calc(100% - 32px));
  margin: 0;
  transform: translate3d(-50%, var(--smooth-translate), 0);
  will-change: transform;
}

.side-sparkles {
  position: fixed;
  top: 10vh;
  bottom: 10vh;
  width: 54px;
  pointer-events: none;
  z-index: 0;
}

.side-sparkles-left {
  left: max(8px, calc((100vw - 1180px) / 4 - 27px));
}

.side-sparkles-right {
  right: max(8px, calc((100vw - 1180px) / 4 - 27px));
}

.sparkle {
  position: absolute;
  display: block;
  border-radius: 999px;
  opacity: 0.9;
  will-change: transform;
  animation: sparkle-drift var(--sparkle-duration, 7s) ease-in-out infinite;
  animation-delay: var(--sparkle-delay, 0s);
}

.sparkle::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.95), rgba(255, 179, 71, 0.95));
  box-shadow: 0 0 18px rgba(255, 179, 71, 0.3);
}

.sparkle-one {
  --float-distance: -18px;
  --sway-distance: 8px;
  --sparkle-duration: 5.8s;
  top: 8%;
  left: 12px;
  width: 12px;
  height: 12px;
}

.sparkle-two {
  --float-distance: 22px;
  --sway-distance: -10px;
  --sparkle-duration: 7.2s;
  --sparkle-delay: -1.4s;
  top: 28%;
  left: 22px;
  width: 18px;
  height: 18px;
}

.sparkle-three {
  --float-distance: -26px;
  --sway-distance: 12px;
  --sparkle-duration: 6.4s;
  --sparkle-delay: -2.1s;
  top: 52%;
  left: 8px;
  width: 14px;
  height: 42px;
}

.sparkle-four {
  --float-distance: 20px;
  --sway-distance: -8px;
  --sparkle-duration: 8s;
  --sparkle-delay: -3.2s;
  top: 76%;
  left: 18px;
  width: 22px;
  height: 22px;
}

.side-sparkles-right .sparkle-one,
.side-sparkles-right .sparkle-four {
  border-radius: 8px;
}

.side-sparkles-left .sparkle-two,
.side-sparkles-right .sparkle-three {
  border-radius: 50% 50% 16% 16%;
}

@keyframes sparkle-drift {
  0%,
  100% {
    transform:
      translate3d(0, var(--festive-offset), 0)
      rotate(var(--festive-rotation))
      scale(1);
  }

  50% {
    transform:
      translate3d(var(--sway-distance), calc(var(--festive-offset) + var(--float-distance)), 0)
      rotate(calc(var(--festive-rotation) + 18deg))
      scale(1.08);
  }
}

.hero,
.section {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero {
  min-height: 100vh;
  padding: 22px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 4px 24px;
}

.brand,
.topbar a {
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(84, 39, 99, 0.1);
  font-size: 0.95rem;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: block;
  min-height: calc(100vh - 120px);
  padding: 8px 8px 16px;
}

h1,
h2,
h3 {
  font-family: "Fraunces", serif;
  margin: 0;
}

h1 {
  max-width: 12ch;
  font-size: clamp(3.6rem, 9vw, 7rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
  padding: 12px 6px 20px;
}

.intro-card p,
.memory-copy p,
.family-card-copy p,
.section-lead {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 0;
}

.button {
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

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

.button.primary {
  color: white;
  background: linear-gradient(135deg, var(--accent), #ff8f6b);
  box-shadow: 0 16px 28px rgba(255, 107, 107, 0.28);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(84, 39, 99, 0.12);
}

.hero-featured-photo {
  position: relative;
  overflow: hidden;
  width: min(100%, 760px);
  min-height: 320px;
  border-radius: 36px;
  border: 1px solid rgba(84, 39, 99, 0.12);
  background: var(--surface-strong);
  box-shadow: 0 22px 40px rgba(79, 39, 72, 0.15);
}

.hero-featured-photo img {
  aspect-ratio: 16 / 9;
  border-radius: inherit;
  cursor: zoom-in;
}

.hero-featured-photo span {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.88);
  backdrop-filter: blur(10px);
  font-size: 0.86rem;
  font-weight: 700;
}

.hero-heart {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  animation: heart-bounce 2.4s ease-in-out infinite;
}

.hero-heart svg {
  width: 92px;
  height: 92px;
  overflow: visible;
  filter: drop-shadow(0 14px 18px rgba(255, 107, 107, 0.22));
}

.hero-heart path {
  fill: url(#hero-heart-gradient);
}

@keyframes heart-bounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  20% {
    transform: translateY(-8px) scale(1.04);
  }

  40% {
    transform: translateY(0) scale(0.98);
  }

  60% {
    transform: translateY(-4px) scale(1.02);
  }
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
}

.hero-glow-one {
  width: 260px;
  height: 260px;
  top: -40px;
  right: -20px;
  background: rgba(255, 179, 71, 0.22);
}

.hero-glow-two {
  width: 320px;
  height: 320px;
  bottom: -140px;
  left: -100px;
  background: rgba(255, 107, 107, 0.16);
}

.section {
  margin-top: 24px;
  padding: 38px 26px;
}

.section-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}

.section-heading-centered {
  justify-items: center;
  text-align: center;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.intro-card {
  padding: 28px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 217, 236, 0.45), rgba(255, 255, 255, 0.76)),
    var(--surface-strong);
  border: 1px solid rgba(84, 39, 99, 0.08);
}

.intro-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.intro-photo-card {
  margin: 0;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(84, 39, 99, 0.08);
  box-shadow: 0 18px 36px rgba(79, 39, 72, 0.08);
  background: var(--surface-strong);
}

.intro-photo-card img {
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.memory-card {
  overflow: hidden;
  border-radius: 28px;
  background: var(--surface-strong);
  border: 1px solid rgba(84, 39, 99, 0.08);
}

.memory-media {
  height: 300px;
}

.memory-copy {
  padding: 22px;
}

.memory-age {
  margin: 0 0 8px;
  color: #b1516d;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}

h3 {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.section-lead {
  max-width: 62ch;
  margin: 0;
}

.family-gallery-footer {
  margin: 28px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  font-family: "Fraunces", serif;
  font-size: clamp(2.1rem, 4.6vw, 3.8rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  animation: footer-love-bounce 2.8s ease-in-out infinite;
}

.family-gallery-footer-heart {
  display: inline-flex;
  width: clamp(40px, 4.8vw, 56px);
  height: clamp(40px, 4.8vw, 56px);
}

.family-gallery-footer-heart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 10px 14px rgba(255, 107, 107, 0.22));
}

.family-gallery-footer-heart path {
  fill: url(#family-footer-heart-gradient);
}

@keyframes footer-love-bounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  20% {
    transform: translateY(-7px) scale(1.02);
  }

  40% {
    transform: translateY(0) scale(0.985);
  }

  60% {
    transform: translateY(-3px) scale(1.01);
  }
}

.family-gallery-grid {
  display: grid;
  gap: 18px;
}

.family-gallery-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.family-card {
  overflow: hidden;
  border-radius: 30px;
  background: var(--surface-strong);
  border: 1px solid rgba(84, 39, 99, 0.08);
  box-shadow: 0 18px 36px rgba(79, 39, 72, 0.08);
}

.family-card-media {
  height: 290px;
}

.family-card-media img,
.memory-media img {
  cursor: zoom-in;
}

.family-card-text {
  min-height: 100%;
}

.family-card-text .family-card-media {
  height: 240px;
}

.family-card-featured .family-card-media {
  height: 360px;
}

.family-card-copy {
  padding: 22px;
}

.family-card-tag {
  margin: 0 0 8px;
  color: #b1516d;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(32, 15, 34, 0.72);
  backdrop-filter: blur(10px);
}

.lightbox-dialog {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 1080px);
  max-height: 88vh;
  padding: 18px;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 248, 239, 0.12);
  box-shadow: 0 24px 80px rgba(18, 8, 20, 0.34);
}

.lightbox-image {
  width: 100%;
  max-height: calc(88vh - 36px);
  border-radius: 22px;
  object-fit: contain;
  background: rgba(255, 250, 244, 0.92);
}

.lightbox-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #ff8f6b);
  color: white;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 16px 28px rgba(255, 107, 107, 0.28);
}

@media (max-width: 980px) {
  .memory-grid,
  .family-gallery-cards,
  .intro-photo-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-grid {
    min-height: auto;
    padding-top: 12px;
  }

  .hero-featured-photo {
    min-height: 280px;
  }

  .family-card-featured .family-card-media,
  .family-card-media {
    height: 260px;
  }

  .side-sparkles {
    display: none;
  }

  .page-content {
    width: 100%;
  }

  .page-content.is-smooth-scroll {
    position: relative;
    inset: auto;
    width: 100%;
    transform: none;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    margin-top: 10px;
  }

  .hero,
  .section {
    border-radius: 24px;
  }

  .topbar {
    justify-items: start;
  }

  .hero-featured-photo {
    min-height: 220px;
  }

  .memory-media {
    height: 240px;
  }

  .family-card-media,
  .family-card-featured .family-card-media {
    height: 220px;
  }

  .section {
    padding: 28px 18px;
  }

  .intro-card,
  .memory-copy {
    padding: 20px;
  }

  .family-card {
    border-radius: 24px;
  }
}
