:root {
  --ink: #251f29;
  --muted: #655964;
  --paper: #fffaf4;
  --rose: #f48fa4;
  --coral: #f05d5e;
  --teal: #3aa8a8;
  --gold: #f3b54b;
  --violet: #6f5aa7;
  --shadow: 0 22px 70px rgba(37, 31, 41, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

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

button {
  font: inherit;
}

#confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(18px, 4vw, 52px);
  color: #fff;
  background: linear-gradient(180deg, rgba(37, 31, 41, 0.72), rgba(37, 31, 41, 0));
}

.brand {
  font-weight: 800;
  font-size: 1rem;
}

.nav-links {
  display: flex;
  gap: clamp(14px, 3vw, 30px);
  font-size: 0.9rem;
  font-weight: 700;
}

.nav-links a {
  opacity: 0.88;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  opacity: 1;
}

.hero {
  position: relative;
  min-height: 92vh;
  overflow: hidden;
  display: grid;
  align-items: center;
  padding: 110px clamp(18px, 5vw, 78px) 80px;
  color: #fff;
  background:
    radial-gradient(circle at 15% 20%, rgba(244, 143, 164, 0.7), transparent 30%),
    linear-gradient(135deg, #251f29 0%, #684f64 45%, #c85b69 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(37, 31, 41, 0.82) 0%, rgba(37, 31, 41, 0.42) 48%, rgba(37, 31, 41, 0.18) 100%),
    linear-gradient(0deg, rgba(37, 31, 41, 0.58), transparent 30%);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-photo {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: var(--shadow);
  filter: saturate(1.08) contrast(1.02);
}

.hero-photo-large {
  right: clamp(8px, 5vw, 76px);
  top: 82px;
  width: min(47vw, 530px);
  height: min(68vh, 620px);
  object-position: center;
  border-radius: 8px;
}

.hero-photo-tilt {
  right: min(38vw, 450px);
  bottom: 42px;
  width: min(25vw, 280px);
  height: min(38vh, 350px);
  border-radius: 8px;
  transform: rotate(-5deg);
}

.hero-photo-small {
  right: clamp(22px, 4vw, 70px);
  bottom: 34px;
  width: min(22vw, 220px);
  height: min(25vw, 220px);
  border-radius: 50%;
  object-position: center;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 670px;
  padding-top: 24px;
}

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

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(4rem, 12vw, 9.2rem);
  line-height: 0.88;
  letter-spacing: 0;
}

h1 span {
  display: block;
}

.hero-note {
  max-width: 640px;
  margin: 28px 0 0;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  color: #fff;
  background: rgba(37, 31, 41, 0.38);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(6px);
  font-size: clamp(1.28rem, 3vw, 2.1rem);
  font-weight: 900;
  line-height: 1.04;
}

.surprise-button {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 3;
  min-width: 220px;
  height: 58px;
  padding: 0 30px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: linear-gradient(135deg, #fff5bd, #f6bd5c 48%, #ff7d89);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transform: translateX(-50%);
  transition: transform 180ms ease, box-shadow 180ms ease;
  animation: breathe-center 2.6s ease-in-out infinite;
}

.surprise-button span {
  display: block;
  font-weight: 900;
}

.surprise-button:hover,
.surprise-button:focus-visible {
  transform: translateX(-50%) translateY(-3px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.36);
  animation-play-state: paused;
}

.intro-band {
  padding: clamp(44px, 8vw, 92px) clamp(18px, 5vw, 78px);
  background: #fff;
}

.intro-copy {
  max-width: 1050px;
  margin: 0 auto;
}

.intro-copy p {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.7rem, 4vw, 4.5rem);
  line-height: 1.02;
  font-weight: 900;
}

.moments {
  padding: clamp(54px, 8vw, 102px) clamp(18px, 5vw, 78px);
  background:
    linear-gradient(180deg, #fffaf4, #fff1f0 54%, #f7fbfb);
}

.section-heading {
  max-width: 980px;
  margin: 0 auto 30px;
}

.section-heading h2,
.group-copy h2 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.photo-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 250px;
  gap: 16px;
}

.memory-card {
  position: relative;
  overflow: hidden;
  margin: 0;
  border-radius: 8px;
  background: #ddd;
  box-shadow: 0 16px 44px rgba(37, 31, 41, 0.13);
}

.memory-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.62));
}

.memory-card.tall {
  grid-row: span 2;
}

.memory-card.wide {
  grid-column: span 2;
}

.memory-card figcaption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 1;
  color: #fff;
  font-size: 0.98rem;
  font-weight: 900;
}

.group-band {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
  align-items: center;
  gap: clamp(24px, 5vw, 70px);
  padding: clamp(58px, 9vw, 118px) clamp(18px, 5vw, 78px);
  background: #24363d;
  color: #fff;
}

.group-copy {
  max-width: 560px;
}

.group-copy p:not(.eyebrow) {
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 2vw, 1.22rem);
}

.group-photo {
  position: relative;
  overflow: hidden;
  margin: 0;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.group-photo figcaption {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 1;
  color: #fff;
  font-size: 0.96rem;
  font-weight: 900;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.birthday-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  pointer-events: none;
  opacity: 0;
  transition: none;
}

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

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(37, 31, 41, 0.72);
  backdrop-filter: blur(8px);
}

.modal-panel {
  position: relative;
  width: min(720px, 100%);
  overflow: hidden;
  padding: 42px clamp(18px, 5vw, 42px) 46px;
  border-radius: 8px;
  color: var(--ink);
  text-align: center;
  background:
    linear-gradient(145deg, #ffffff, #fff3dc),
    radial-gradient(circle at 15% 12%, rgba(244, 143, 164, 0.25), transparent 26%);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.36);
  transform: translateY(0) scale(1);
  transition: none;
}

.birthday-modal.is-open .modal-panel {
  transform: translateY(0) scale(1);
}

.close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
  cursor: pointer;
  font-size: 1.45rem;
  line-height: 1;
}

.modal-photo {
  position: relative;
  z-index: 1;
  overflow: hidden;
  margin: 6px auto 24px;
  width: min(100%, 520px);
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background: #fffaf4;
  box-shadow: 0 18px 46px rgba(37, 31, 41, 0.22);
}

.modal-photo img {
  object-fit: contain;
  object-position: center top;
}

.video-wrap {
  position: relative;
  z-index: 1;
  overflow: hidden;
  width: min(100%, 720px);
  aspect-ratio: 16 / 9;
  margin: 10px auto 0;
  border-radius: 8px;
  background: #000;
  box-shadow: 0 18px 46px rgba(37, 31, 41, 0.26);
}

.video-wrap iframe,
.video-wrap video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}

[hidden] {
  display: none !important;
}

.cake {
  position: relative;
  width: 168px;
  height: 154px;
  margin: 8px auto 24px;
}

.plate,
.cake-base,
.cake-top,
.candle,
.flame {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.plate {
  bottom: 0;
  width: 170px;
  height: 20px;
  border-radius: 50%;
  background: #d8dde1;
}

.cake-base {
  bottom: 12px;
  width: 138px;
  height: 62px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(90deg, #5a303d, #8f4051);
}

.cake-base::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 0;
  right: 0;
  height: 13px;
  background: repeating-linear-gradient(90deg, #ffd267 0 20px, #f59ea6 20px 40px);
}

.cake-top {
  bottom: 72px;
  width: 154px;
  height: 34px;
  border-radius: 8px 8px 14px 14px;
  background: #fff0f2;
}

.cake-top::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: -14px;
  height: 24px;
  border-radius: 0 0 20px 20px;
  background: linear-gradient(90deg, #fff0f2 0 28%, transparent 28% 42%, #fff0f2 42% 70%, transparent 70%);
}

.candle {
  bottom: 106px;
  width: 16px;
  height: 42px;
  border-radius: 4px;
  background: repeating-linear-gradient(135deg, #fff 0 7px, var(--teal) 7px 14px);
}

.flame {
  bottom: 148px;
  width: 22px;
  height: 31px;
  border-radius: 50% 50% 50% 0;
  background: var(--gold);
  transform: translateX(-50%) rotate(-38deg);
  animation: flame 720ms infinite alternate ease-in-out;
}

.modal-kicker {
  margin: 0 0 8px;
  color: var(--coral);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.modal-panel h2 {
  margin: 0;
  font-size: clamp(2.5rem, 8vw, 5.4rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.modal-action {
  margin: 22px auto 0;
  min-width: 190px;
  height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: linear-gradient(135deg, #fff5bd, #f6bd5c 48%, #ff7d89);
  box-shadow: 0 14px 34px rgba(37, 31, 41, 0.2);
  cursor: pointer;
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease;
  animation: breathe 2.6s ease-in-out infinite;
}

.modal-action:hover,
.modal-action:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(37, 31, 41, 0.26);
  animation-play-state: paused;
}

.modal-action.is-even-better {
  background: linear-gradient(135deg, #c7fff5, #7cc9f0 48%, #f48fa4);
}

.modal-action.is-even-better:hover,
.modal-action.is-even-better:focus-visible {
  transform: translateY(-2px) scale(1.02);
}

.modal-message {
  max-width: 410px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.burst {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  opacity: 0.9;
  background: conic-gradient(from 10deg, transparent 0 10deg, var(--gold) 10deg 17deg, transparent 17deg 34deg, var(--rose) 34deg 42deg, transparent 42deg 64deg, var(--teal) 64deg 72deg, transparent 72deg 360deg);
  animation: spin 5s linear infinite;
}

.burst-one {
  top: -76px;
  left: -62px;
}

.burst-two {
  right: -76px;
  bottom: -78px;
  animation-direction: reverse;
}

body.modal-open {
  overflow: hidden;
}

@keyframes flame {
  from {
    transform: translateX(-50%) rotate(-42deg) scale(0.88);
  }

  to {
    transform: translateX(-50%) rotate(-34deg) scale(1.06);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.045);
  }
}

@keyframes breathe-center {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
  }

  50% {
    transform: translateX(-50%) scale(1.045);
  }
}

@media (max-width: 920px) {
  .hero {
    min-height: 96vh;
    align-items: start;
  }

  .hero-copy {
    padding-top: 52px;
  }

  .hero-photo-large {
    top: auto;
    right: 16px;
    bottom: 96px;
    width: min(64vw, 430px);
    height: 48vh;
  }

  .hero-photo-tilt {
    right: auto;
    left: 18px;
    bottom: 66px;
    width: min(36vw, 210px);
    height: 28vh;
  }

  .hero-photo-small {
    display: none;
  }

  .surprise-button {
    bottom: 28px;
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 240px;
  }

  .group-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 14px 16px;
  }

  .nav-links {
    gap: 14px;
    font-size: 0.82rem;
  }

  .hero {
    min-height: 94vh;
    padding: 86px 16px 118px;
  }

  h1 {
    font-size: clamp(3.35rem, 17vw, 4.9rem);
  }

  .hero-note {
    max-width: 330px;
    margin-top: 18px;
    padding: 14px 16px;
    font-size: clamp(1.05rem, 5.3vw, 1.36rem);
    line-height: 1.08;
  }

  .hero-photo-large {
    right: 0;
    bottom: 28px;
    width: 100%;
    height: 40vh;
    border: 0;
    opacity: 0.36;
    object-position: center top;
  }

  .hero-photo-tilt {
    display: none;
  }

  .surprise-button {
    left: 21px;
    bottom: 28px;
    right: auto;
    width: min(348px, calc(100vw - 42px));
    max-width: none;
    transform: none;
    animation-name: breathe;
  }

  .surprise-button:hover,
  .surprise-button:focus-visible {
    transform: translateY(-3px);
  }

  .photo-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 360px;
  }

  .memory-card.tall,
  .memory-card.wide {
    grid-row: span 1;
    grid-column: span 1;
  }

  .group-photo {
    aspect-ratio: 1 / 1.08;
  }
}

@media (max-width: 700px) {
  .nav-links {
    display: none;
  }
}

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