:root {
  --ink: #251b1d;
  --muted: #756568;
  --paper: #fffaf5;
  --paper-soft: #fff4ec;
  --blush: #f8d9d2;
  --rose: #bd6f78;
  --berry: #7f3847;
  --gold: #c69c55;
  --sage: #72816d;
  --title-font: "Libre Baskerville", Georgia, "Times New Roman", ui-serif, serif;
  --body-font: "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ui-font: "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow: 0 24px 70px rgba(90, 54, 55, 0.16);
  --soft-shadow: 0 16px 40px rgba(90, 54, 55, 0.11);
  --radius: 26px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 5%, color-mix(in srgb, var(--blush) 80%, transparent), transparent 30rem),
    radial-gradient(circle at 95% 20%, color-mix(in srgb, var(--gold) 17%, transparent), transparent 24rem),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-soft) 44%, var(--paper) 100%);
  font-family: var(--body-font);
  line-height: 1.6;
  overflow-x: hidden;
}

body.lightbox-open {
  overflow: hidden;
}

body.modal-open {
  overflow: hidden;
}

body:not(.surprise-open),
body:not(.site-unlocked) {
  overflow-y: hidden;
}

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

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

button,
input,
select,
textarea {
  font-family: var(--ui-font);
}

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

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.ambient span {
  position: absolute;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: rgba(189, 111, 120, 0.22);
  box-shadow: 0 0 18px rgba(189, 111, 120, 0.2);
  animation: floatParticle 18s linear infinite;
}

.ambient span:nth-child(1) { left: 12%; bottom: -8%; animation-delay: 0s; }
.ambient span:nth-child(2) { left: 28%; bottom: -12%; animation-delay: 4s; background: rgba(198, 156, 85, 0.24); }
.ambient span:nth-child(3) { left: 46%; bottom: -7%; animation-delay: 8s; }
.ambient span:nth-child(4) { left: 65%; bottom: -14%; animation-delay: 2s; background: rgba(114, 129, 109, 0.22); }
.ambient span:nth-child(5) { left: 78%; bottom: -9%; animation-delay: 6s; }
.ambient span:nth-child(6) { left: 92%; bottom: -11%; animation-delay: 10s; background: rgba(198, 156, 85, 0.22); }

.music-toggle {
  position: fixed;
  right: 1rem;
  top: 1rem;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0.68rem 0.9rem;
  color: var(--berry);
  background: rgba(255, 250, 245, 0.76);
  border: 1px solid rgba(127, 56, 71, 0.13);
  border-radius: 999px;
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.password-gate {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background:
    linear-gradient(color-mix(in srgb, var(--paper) 72%, transparent), color-mix(in srgb, var(--paper-soft) 90%, transparent)),
    radial-gradient(circle at 18% 12%, color-mix(in srgb, var(--blush) 84%, transparent), transparent 24rem),
    radial-gradient(circle at 88% 78%, color-mix(in srgb, var(--gold) 20%, transparent), transparent 22rem);
}

.password-gate[hidden] {
  display: none !important;
}

.password-card {
  width: min(100%, 34rem);
  padding: clamp(1.45rem, 6vw, 3.2rem);
  text-align: center;
  background: rgba(255, 250, 245, 0.78);
  border: 1px solid rgba(127, 56, 71, 0.13);
  border-radius: clamp(1.5rem, 6vw, 2.8rem);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.password-card h1 {
  font-size: clamp(2.05rem, 10vw, 3.8rem);
}

.password-card p {
  margin: 1rem auto 0;
  max-width: 26rem;
  color: var(--muted);
}

.password-form {
  margin-top: 1.5rem;
  text-align: left;
}

.password-form label {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--berry);
  font-family: var(--ui-font);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.password-row {
  display: grid;
  gap: 0.7rem;
}

.password-row input {
  width: 100%;
  min-height: 3.35rem;
  padding: 0.85rem 1rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(127, 56, 71, 0.18);
  border-radius: 999px;
  font: inherit;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.password-row input:focus {
  border-color: rgba(127, 56, 71, 0.55);
  box-shadow: 0 0 0 4px rgba(189, 111, 120, 0.14);
}

.password-row .button {
  width: 100%;
  margin-top: 0;
}

.password-error {
  min-height: 1.5rem;
  margin: 0.75rem 0 0;
  color: var(--berry);
  font-size: 0.95rem;
  font-weight: 800;
  text-align: center;
}

.music-toggle:hover,
.music-toggle:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.92);
}

.music-toggle.is-playing {
  color: #fff;
  background: rgba(127, 56, 71, 0.92);
}

.music-icon {
  display: grid;
  width: 1.4rem;
  height: 1.4rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(189, 111, 120, 0.13);
  font-weight: 800;
}

.section {
  position: relative;
  padding: clamp(4.5rem, 11vw, 8.5rem) 1rem;
}

.section--compact {
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
}

.section__inner {
  width: min(100%, var(--max-width));
  margin: 0 auto;
}

.surprise-content[hidden] {
  display: none !important;
}

.hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 5.25rem 1rem 4rem;
  isolation: isolate;
}

.hero__backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(255, 250, 245, 0.68), rgba(255, 244, 236, 0.86)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='1000' viewBox='0 0 1600 1000'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' x2='1' y1='0' y2='1'%3E%3Cstop stop-color='%23f9ddd5'/%3E%3Cstop offset='.52' stop-color='%23fff5ec'/%3E%3Cstop offset='1' stop-color='%23d8c4a0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='1600' height='1000' fill='url(%23g)'/%3E%3Ccircle cx='1290' cy='190' r='220' fill='%23ffffff' opacity='.32'/%3E%3Ccircle cx='260' cy='760' r='270' fill='%23bd6f78' opacity='.11'/%3E%3Cpath d='M0 650 C260 560 450 780 730 690 C1010 600 1200 360 1600 500 L1600 1000 L0 1000 Z' fill='%23fffaf5' opacity='.72'/%3E%3Cpath d='M980 760 C1130 650 1290 720 1460 620' fill='none' stroke='%23bd6f78' stroke-width='3' opacity='.16'/%3E%3Cpath d='M140 280 C290 170 470 240 610 150' fill='none' stroke='%23c69c55' stroke-width='4' opacity='.16'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
}

.hero__content {
  width: min(100%, 48rem);
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--berry);
  font-family: var(--ui-font);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: var(--title-font);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0;
  font-variant-numeric: lining-nums proportional-nums;
  font-feature-settings: "lnum" 1, "pnum" 1;
}

h1 {
  font-size: clamp(2.65rem, 10.8vw, 5.85rem);
}

h2 {
  font-size: clamp(2.25rem, 8vw, 4.45rem);
}

.hero__subheading {
  margin: 1.3rem auto 0;
  max-width: 38rem;
  color: var(--berry);
  font-size: clamp(1.08rem, 4vw, 1.45rem);
  font-weight: 700;
}

.hero__description,
.section-heading p,
.celebration p {
  color: var(--muted);
  font-size: clamp(1rem, 2.8vw, 1.18rem);
}

.hero__description {
  margin: 0.7rem auto 0;
  max-width: 32rem;
}

.hero__quote {
  min-height: 2.1rem;
  margin: 1.35rem auto 0;
  color: var(--ink);
  font-family: var(--title-font);
  font-size: clamp(1.12rem, 4.2vw, 1.45rem);
  font-style: italic;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.35rem;
  margin-top: 1.65rem;
  padding: 0.9rem 1.35rem;
  color: #fff;
  background: linear-gradient(135deg, var(--berry), var(--rose));
  border: 1px solid rgba(127, 56, 71, 0.2);
  border-radius: 999px;
  box-shadow: 0 18px 34px rgba(127, 56, 71, 0.24);
  font-weight: 800;
  text-decoration: none;
  transition: transform 190ms ease, box-shadow 190ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px rgba(127, 56, 71, 0.28);
}

.button--ghost {
  color: var(--berry);
  background: rgba(255, 250, 245, 0.78);
  box-shadow: var(--soft-shadow);
}

.scroll-hint {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  width: 1.6rem;
  height: 2.6rem;
  border: 1px solid rgba(127, 56, 71, 0.28);
  border-radius: 999px;
  transform: translateX(-50%);
}

.scroll-hint span {
  position: absolute;
  top: 0.48rem;
  left: 50%;
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 999px;
  background: var(--berry);
  transform: translateX(-50%);
  animation: scrollDot 1.7s ease-in-out infinite;
}

.section-heading {
  max-width: 43rem;
  margin: 0 0 clamp(2rem, 7vw, 4rem);
}

.section-heading p {
  margin: 1rem 0 0;
  max-width: 40rem;
}

.countdown-card {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.5rem;
  padding: 1.1rem;
  background: rgba(255, 250, 245, 0.78);
  border: 1px solid rgba(127, 56, 71, 0.11);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
}

.countdown-unit {
  padding: 1rem 0.7rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(127, 56, 71, 0.08);
  border-radius: 20px;
}

.countdown-value {
  display: block;
  color: var(--berry);
  font-family: var(--title-font);
  font-size: clamp(2rem, 10vw, 3.5rem);
  line-height: 1;
}

.countdown-label {
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.countdown-note {
  margin: 0;
  color: var(--muted);
}

.message-grid {
  display: grid;
  gap: 1rem;
}

.message-card {
  position: relative;
  min-height: 14rem;
  padding: 1.35rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 246, 240, 0.72)),
    radial-gradient(circle at 100% 0, rgba(198, 156, 85, 0.13), transparent 13rem);
  border: 1px solid rgba(127, 56, 71, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
  overflow: hidden;
  cursor: pointer;
  transition: transform 210ms ease, box-shadow 210ms ease, border-color 210ms ease;
}

.message-card::before {
  content: "";
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 999px;
  background: rgba(189, 111, 120, 0.1);
}

.message-card:hover,
.message-card:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(127, 56, 71, 0.18);
  box-shadow: var(--shadow);
  outline: none;
}

.message-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  color: var(--berry);
  background: rgba(189, 111, 120, 0.12);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
}

.message-card__photo {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 4.2rem;
  height: 4.2rem;
  object-fit: cover;
  border: 0.22rem solid rgba(255, 250, 245, 0.88);
  border-radius: 18px;
  box-shadow: 0 12px 26px rgba(90, 54, 55, 0.16);
  transform: rotate(2deg);
}

.message-card h3 {
  margin: 1.35rem 0 0.2rem;
  padding-right: 3.8rem;
  font-size: 1.18rem;
}

.message-card .relationship {
  margin: 0;
  color: var(--sage);
  font-family: var(--ui-font);
  font-size: 0.9rem;
  font-weight: 800;
}

.message-pdf-badge {
  display: inline-flex;
  margin-top: 0.55rem;
  padding: 0.28rem 0.55rem;
  color: var(--berry);
  background: rgba(189, 111, 120, 0.1);
  border-radius: 999px;
  font-family: var(--ui-font);
  font-size: 0.72rem;
  font-weight: 900;
}

.message-preview {
  margin: 1.2rem 0 0;
  color: #392b2e;
  font-family: var(--title-font);
  font-size: 1.2rem;
  line-height: 1.55;
}

.message-open {
  display: inline-flex;
  margin-top: 1.1rem;
  color: var(--berry);
  font-family: var(--ui-font);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.photo-card {
  position: relative;
  min-height: 11rem;
  padding: 0.5rem 0.5rem 3rem;
  background: #fffdf9;
  border: 1px solid rgba(127, 56, 71, 0.11);
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(90, 54, 55, 0.13);
  cursor: pointer;
  transform: rotate(var(--tilt));
  transition: transform 210ms ease, box-shadow 210ms ease;
}

.photo-card:hover,
.photo-card:focus-visible {
  transform: rotate(0deg) translateY(-5px);
  box-shadow: var(--shadow);
  outline: none;
}

.photo-card img,
.photo-fallback {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 13px;
  background:
    linear-gradient(135deg, rgba(127, 56, 71, 0.2), rgba(198, 156, 85, 0.18)),
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.6), transparent 8rem);
}

.photo-fallback {
  display: grid;
  place-items: center;
  color: rgba(127, 56, 71, 0.75);
  font-family: var(--title-font);
  font-size: 2.3rem;
}

.photo-card figcaption {
  position: absolute;
  right: 0.58rem;
  bottom: 0.48rem;
  left: 0.58rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  color: var(--muted);
  font-size: clamp(0.72rem, 2.7vw, 0.86rem);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-wrap: balance;
}

.timeline-list {
  position: relative;
  display: grid;
  gap: 1.15rem;
}

.timeline-list::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 1rem;
  width: 2px;
  background: linear-gradient(var(--rose), rgba(198, 156, 85, 0.25));
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.9rem;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 2rem;
  height: 2rem;
  margin-top: 0.5rem;
  background: var(--paper);
  border: 0.42rem solid rgba(189, 111, 120, 0.42);
  border-radius: 999px;
  box-shadow: 0 0 0 0.35rem rgba(255, 250, 245, 0.86);
}

.timeline-content {
  padding: 1.25rem;
  background: rgba(255, 250, 245, 0.72);
  border: 1px solid rgba(127, 56, 71, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.timeline-year {
  color: var(--berry);
  font-family: var(--ui-font);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.timeline-content h3 {
  margin: 0.4rem 0 0.35rem;
}

.timeline-content p {
  margin: 0;
  color: var(--muted);
}

.letter {
  padding-top: clamp(3.5rem, 8vw, 7rem);
}

.letter-card {
  position: relative;
  padding: clamp(1.5rem, 6vw, 4rem);
  background:
    linear-gradient(135deg, rgba(255, 253, 249, 0.95), rgba(255, 241, 232, 0.88)),
    radial-gradient(circle at 90% 12%, rgba(198, 156, 85, 0.16), transparent 16rem);
  border: 1px solid rgba(127, 56, 71, 0.13);
  border-radius: clamp(1.6rem, 6vw, 3rem);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.letter-card::after {
  content: "";
  position: absolute;
  right: -4rem;
  bottom: -5rem;
  width: 14rem;
  height: 14rem;
  border: 1px solid rgba(127, 56, 71, 0.12);
  border-radius: 999px;
}

.letter-body {
  position: relative;
  z-index: 1;
  margin-top: 1.4rem;
  color: #3b2b2e;
  font-family: var(--title-font);
  font-size: clamp(1.12rem, 3.8vw, 1.42rem);
}

.letter-body p {
  margin: 0 0 1rem;
}

.letter-body p:last-child {
  margin-bottom: 0;
}

.celebration {
  min-height: 88svh;
  display: grid;
  place-items: center;
  text-align: center;
}

.celebration__content {
  width: min(100%, 44rem);
}

.celebration p {
  margin: 1rem auto 0;
  max-width: 26rem;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}

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

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(37, 27, 29, 0.82);
  backdrop-filter: blur(14px);
}

.letter-modal {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(37, 27, 29, 0.78);
  backdrop-filter: blur(16px);
}

.letter-modal[hidden] {
  display: none;
}

.letter-modal__card {
  position: relative;
  width: min(100%, 44rem);
  max-height: min(82svh, 46rem);
  overflow: auto;
  padding: clamp(1.45rem, 6vw, 3rem);
  background:
    linear-gradient(135deg, rgba(255, 253, 249, 0.98), rgba(255, 241, 232, 0.94)),
    radial-gradient(circle at 92% 8%, rgba(198, 156, 85, 0.16), transparent 14rem);
  border: 1px solid rgba(127, 56, 71, 0.13);
  border-radius: clamp(1.4rem, 5vw, 2.5rem);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
}

.letter-modal__card h2 {
  padding-right: 2.4rem;
}

.letter-modal__body {
  margin-top: 1.35rem;
  color: #392b2e;
  font-family: var(--title-font);
  font-size: clamp(1.12rem, 4vw, 1.36rem);
  line-height: 1.65;
}

.letter-modal__photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.letter-modal__photos figure {
  margin: 0;
  padding: 0.45rem;
  background: #fffdf9;
  border: 1px solid rgba(127, 56, 71, 0.11);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(90, 54, 55, 0.12);
  transform: rotate(-1deg);
}

.letter-modal__photos figure:nth-child(even) {
  transform: rotate(1deg);
}

.letter-modal__photos img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 13px;
}

.letter-modal__photos figcaption {
  margin-top: 0.45rem;
  color: var(--muted);
  font-family: var(--ui-font);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.letter-modal__pdf {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.2rem;
  padding: 0.7rem;
  background: rgba(255, 250, 245, 0.72);
  border: 1px solid rgba(127, 56, 71, 0.13);
  border-radius: 16px;
  font-family: var(--ui-font);
}

.letter-modal__pdf-heading {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  color: var(--berry);
  font-size: 0.82rem;
}

.letter-modal__pdf-heading span {
  max-width: 62%;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.letter-modal__pdf iframe {
  width: 100%;
  height: min(58svh, 38rem);
  background: #fff;
  border: 0;
  border-radius: 11px;
}

.letter-modal__pdf > a {
  justify-self: start;
  color: var(--berry);
  font-size: 0.76rem;
  font-weight: 800;
}

.letter-modal__body p {
  margin: 0 0 1rem;
}

.letter-modal__body p:last-child {
  margin-bottom: 0;
}

.letter-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 2.55rem;
  height: 2.55rem;
  padding: 0;
  place-items: center;
  color: transparent;
  background: rgba(127, 56, 71, 0.1);
  border: 1px solid rgba(127, 56, 71, 0.13);
  border-radius: 999px;
  cursor: pointer;
}

.letter-modal__close::before {
  content: "×";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--berry);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.9rem;
  font-weight: 300;
  line-height: 1;
  transform: translateY(-1px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox__figure {
  width: min(100%, 58rem);
  margin: 0;
}

.lightbox__figure img {
  width: 100%;
  max-height: 76svh;
  object-fit: contain;
  border: 0.7rem solid #fffdf9;
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.lightbox__figure figcaption {
  margin-top: 0.85rem;
  color: #fffaf5;
  font-weight: 800;
  text-align: center;
}

.lightbox__close,
.lightbox__nav {
  position: fixed;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  padding: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  cursor: pointer;
}

.lightbox__close {
  top: 1rem;
  right: 1rem;
  font-size: 2.15rem;
  font-weight: 300;
  line-height: 1;
  font-family: Arial, Helvetica, sans-serif;
  color: transparent;
}

.lightbox__close::before {
  content: "×";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  line-height: 1;
  transform: translateY(-1px);
}

.lightbox__nav {
  top: 50%;
  font-size: 2.4rem;
  line-height: 1;
  transform: translateY(-50%);
}

.lightbox__nav--prev {
  left: 1rem;
}

.lightbox__nav--next {
  right: 1rem;
}

@keyframes floatParticle {
  0% {
    transform: translate3d(0, 0, 0) scale(0.8);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: translate3d(1.5rem, -110vh, 0) scale(1.35);
    opacity: 0;
  }
}

@keyframes scrollDot {
  0%,
  100% {
    transform: translate(-50%, 0);
    opacity: 0.3;
  }
  50% {
    transform: translate(-50%, 0.85rem);
    opacity: 1;
  }
}

@media (min-width: 620px) {
  .section {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
  }

  .countdown-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .password-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .password-row .button {
    width: auto;
  }

  .message-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 940px) {
  .message-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .photo-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .timeline-list::before {
    left: 50%;
  }

  .timeline-item {
    grid-template-columns: 1fr 2.5rem 1fr;
    gap: 1.1rem;
  }

  .timeline-item:nth-child(odd) .timeline-content {
    grid-column: 1;
    text-align: right;
  }

  .timeline-item:nth-child(even) .timeline-content {
    grid-column: 3;
  }

  .timeline-dot {
    grid-column: 2;
  }
}

@media (max-width: 520px) {
  .music-label {
    display: none;
  }

  .music-toggle {
    right: 0.75rem;
    top: 0.75rem;
    padding: 0.65rem;
  }

  .hero {
    min-height: 100svh;
  }

  .photo-grid {
    gap: 0.62rem;
  }

  .photo-card {
    min-height: 9.5rem;
    padding-bottom: 2.85rem;
  }

  .lightbox__nav {
    top: auto;
    bottom: 1.1rem;
    transform: none;
  }
}

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

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