:root {
  --night: #080c22;
  --night-soft: #111737;
  --cream: #fff8ec;
  --pink: #f5b6c6;
  --pink-bright: #ffcfda;
  --gold: #e9cc93;
  --muted: #b9bbd1;
  --line: rgba(255, 255, 255, 0.15);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--cream);
  background:
    radial-gradient(circle at 75% 10%, rgba(65, 63, 132, 0.25), transparent 32rem),
    linear-gradient(180deg, #080c22 0%, #0d1230 45%, #120f2b 100%);
  font-family: "Mali", sans-serif;
  font-weight: 300;
  overflow-x: hidden;
}

body.locked { overflow: hidden; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background: radial-gradient(circle at center, transparent 0, rgba(2, 4, 14, 0.45) 100%);
}

.password-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% 35%, rgba(92, 70, 132, .34), transparent 26rem),
    rgba(5, 8, 26, .96);
  transition: opacity .65s ease, visibility .65s ease;
}

.password-gate::before,
.password-gate::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: white;
  box-shadow: 12vw 9vh rgba(255,255,255,.6), 28vw 22vh rgba(255,255,255,.35), 77vw 13vh rgba(255,255,255,.7), 88vw 66vh rgba(255,255,255,.4), 14vw 82vh rgba(255,255,255,.5), 64vw 88vh rgba(255,255,255,.4);
  animation: twinkle 3s ease-in-out infinite;
}

.password-gate::after { transform: translate(35vw, 35vh); animation-delay: 1.4s; }
.password-gate.is-unlocked { opacity: 0; visibility: hidden; pointer-events: none; }
.password-gate__stars { position: absolute; top: 8%; color: var(--gold); font-size: .85rem; letter-spacing: .35em; opacity: .7; }

.password-card {
  position: relative;
  width: min(430px, 100%);
  padding: 50px 44px 42px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.025));
  box-shadow: 0 35px 100px rgba(0,0,0,.45);
  backdrop-filter: blur(18px);
}

.password-card__lock { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 25px; color: #fff; border: 1px solid rgba(245,182,198,.5); border-radius: 50%; background: rgba(245,182,198,.12); font-size: 1.75rem; box-shadow: 0 0 35px rgba(245,182,198,.15); }
.password-card h1 { margin: 0 0 18px; font-family: "Itim", cursive; font-size: clamp(2.35rem, 8vw, 3.25rem); font-weight: 400; line-height: 1.12; }
.password-card__message { margin: 0 0 30px; color: var(--muted); font-size: .9rem; line-height: 1.8; }
.password-card label { display: block; margin: 0 0 9px 4px; color: rgba(255,255,255,.64); text-align: left; font-size: .72rem; letter-spacing: .08em; }
.password-field { position: relative; }
.password-field input { width: 100%; height: 56px; padding: 0 58px 0 18px; color: var(--cream); border: 1px solid rgba(255,255,255,.18); border-radius: 15px; outline: none; background: rgba(4,7,24,.55); font: 500 1.15rem/1 "Mali", sans-serif; letter-spacing: .22em; transition: border-color .25s, box-shadow .25s; }
.password-field input::placeholder { color: rgba(255,255,255,.28); }
.password-field input:focus { border-color: rgba(245,182,198,.7); box-shadow: 0 0 0 4px rgba(245,182,198,.08); }
.password-field input.is-wrong { border-color: #e58eaa; animation: shake .35s ease; }
.password-field__toggle { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); width: 42px; height: 36px; color: var(--pink); border: 0; border-radius: 9px; background: transparent; font-family: "Mali", sans-serif; cursor: pointer; }
.password-error { min-height: 24px; margin: 8px 0 5px; color: #f2a8bd; font-size: .75rem; }
.unlock-button { width: 100%; height: 54px; color: #2d1830; border: 0; border-radius: 15px; background: var(--pink-bright); font: 500 .9rem/1 "Mali", sans-serif; cursor: pointer; box-shadow: 0 12px 35px rgba(245,182,198,.15); transition: transform .25s, box-shadow .25s; }
.unlock-button:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(245,182,198,.25); }
.unlock-button span { margin-left: 8px; font-size: 1.1rem; }
.password-card small { display: block; margin-top: 18px; color: rgba(255,255,255,.35); font-size: .7rem; }

.sky { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.stars { position: absolute; inset: 0; }
.star { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: white; animation: twinkle var(--speed) ease-in-out infinite; opacity: var(--opacity); }

.moon {
  position: absolute;
  top: 9vh;
  right: 10vw;
  width: clamp(78px, 10vw, 130px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff5d5;
  box-shadow: 0 0 30px rgba(255, 239, 187, 0.34), 0 0 90px rgba(255, 232, 158, 0.13);
}

.moon::after { content: ""; position: absolute; width: 100%; height: 100%; border-radius: 50%; top: -15%; left: -23%; background: #0b1028; }

.shooting-star { position: absolute; width: 110px; height: 1px; background: linear-gradient(90deg, white, transparent); transform: rotate(-35deg); opacity: 0; animation: shoot 8s linear infinite; }
.shooting-star--one { top: 20%; left: 12%; }
.shooting-star--two { top: 42%; left: 72%; animation-delay: 4.5s; }

.section { width: min(1120px, calc(100% - 40px)); min-height: 100vh; margin: 0 auto; padding: 110px 0; }

.hero { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; position: relative; }
.eyebrow, .section-heading > p { margin: 0 0 17px; color: var(--gold); font-size: .73rem; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; }
.couple-names { display: flex; align-items: center; gap: 16px; margin: 4px 0 24px; color: var(--pink-bright); font-family: "Itim", cursive; font-size: clamp(1.5rem, 4vw, 2.25rem); letter-spacing: .08em; }
.couple-names b { color: var(--gold); font-size: .65em; font-weight: 400; }
.hero h1 { margin: 0; font-family: "Itim", cursive; font-size: clamp(4.5rem, 13vw, 9.8rem); font-weight: 400; line-height: .72; letter-spacing: -.04em; text-shadow: 0 8px 35px rgba(0,0,0,.25); }
.hero h1 span { color: var(--pink-bright); font-size: .7em; }
.hero__date { margin: 48px 0 0; color: var(--gold); font-size: clamp(.82rem, 2vw, 1rem); letter-spacing: .16em; }
.hero__message { margin: 28px 0 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.25rem); line-height: 2; }
.scroll-cue { position: absolute; bottom: 40px; color: rgba(255,255,255,.6); font-size: .7rem; letter-spacing: .11em; text-decoration: none; display: grid; gap: 9px; transition: color .25s; }
.scroll-cue:hover { color: white; }
.scroll-cue__arrow { font-size: 1.2rem; animation: bob 1.8s ease-in-out infinite; }

.section-heading { max-width: 680px; margin: 0 auto 74px; text-align: center; }
.section-heading h2 { margin: 0 0 18px; font-family: "Itim", cursive; font-size: clamp(2.5rem, 6vw, 4.2rem); font-weight: 400; line-height: 1.1; }
.section-heading > span { color: var(--muted); line-height: 1.8; }

.timeline { position: relative; display: grid; gap: 100px; }
.timeline::before { content: ""; position: absolute; top: 30px; bottom: 30px; left: 50%; width: 1px; background: linear-gradient(transparent, var(--line) 8%, var(--line) 92%, transparent); }
.memory { display: grid; grid-template-columns: 1fr 1fr; gap: 90px; align-items: center; min-width: 0; }
.memory--reverse .memory__photo { grid-column: 2; grid-row: 1; transform: rotate(2.5deg); }
.memory--reverse .memory__copy { grid-column: 1; grid-row: 1; text-align: right; }
.memory__photo { position: relative; width: 100%; min-width: 0; min-height: 380px; padding: 17px 17px 55px; background: #f9f1e4; border-radius: 3px; box-shadow: 0 24px 70px rgba(0,0,0,.38); transform: rotate(-2.5deg); transition: transform .35s ease; }
.memory__photo:hover { transform: rotate(0) scale(1.02); }
.memory__photo::after { content: "♡"; position: absolute; bottom: 13px; right: 25px; color: #8f6e77; font-family: "Itim"; font-size: 1.4rem; }
.memory__photo img { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }
.photo-one, .photo-running, .photo-date-three { min-height: 0; }
.photo-two { min-height: 0; }
.photo-two img { aspect-ratio: 4 / 3; object-position: center; }
.photo-date-five { min-height: 0; }
.photo-date-five img,
.photo-date-nine img { aspect-ratio: 4 / 3; object-position: center; }
.photo-date-seven, .photo-date-eight { min-height: 0; }
.photo-date-nine { min-height: 0; }
.photo-date-twelve { min-height: 0; }
.photo-date-twelve img { aspect-ratio: 4 / 3; object-position: center; }
.photo-anniversary { min-height: 0; }
.photo-anniversary img { aspect-ratio: 4 / 3; object-position: center; }
.memory__photo--pair { min-height: 0; }
.photo-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.photo-pair img { min-width: 0; aspect-ratio: 3 / 4; object-fit: cover; }
.memory__photo--video { min-height: 0; }
.memory__photo--video video { display: block; width: 100%; aspect-ratio: 1; border: 0; background: #050713; object-fit: cover; }
.memory__photo span { width: 100%; height: 100%; min-height: 308px; display: grid; place-content: center; text-align: center; color: rgba(255,255,255,.9); font-family: "Itim"; font-size: 1.5rem; line-height: 1.5; border: 1px solid rgba(255,255,255,.18); }
.photo-one span { background: linear-gradient(140deg, rgba(20,18,56,.3), rgba(111,60,96,.3)), radial-gradient(circle at 30% 20%, #8986ad, #363357 72%); }
.photo-two span { background: linear-gradient(140deg, rgba(30,18,42,.15), rgba(90,46,55,.4)), radial-gradient(circle at 67% 27%, #bd8a83, #4a3151 70%); }
.photo-three span { background: linear-gradient(140deg, rgba(20,18,56,.2), rgba(45,83,109,.35)), radial-gradient(circle at 35% 60%, #7c91a8, #2a3656 70%); }
.memory__copy { position: relative; padding: 15px; }
.memory__copy::before { content: ""; position: absolute; top: 35px; left: -53px; width: 15px; height: 15px; border-radius: 50%; background: var(--pink); border: 5px solid #111636; box-shadow: 0 0 0 1px rgba(245,182,198,.35), 0 0 20px rgba(245,182,198,.35); }
.memory--reverse .memory__copy::before { left: auto; right: -53px; }
.memory time { color: var(--gold); font-size: .73rem; font-weight: 500; letter-spacing: .25em; text-transform: uppercase; }
.memory h3 { margin: 13px 0 18px; font-family: "Itim"; font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 400; }
.memory p { margin: 0; color: var(--muted); line-height: 2; }
.memory__video { grid-column: 1 / -1; grid-row: 2; width: min(340px, 100%); margin: -30px auto 0; padding: 12px 12px 18px; border-radius: 24px; background: rgba(255,255,255,.07); border: 1px solid var(--line); box-shadow: 0 24px 65px rgba(0,0,0,.28); }
.memory__video video { display: block; width: 100%; aspect-ratio: 9 / 16; border-radius: 15px; background: #050713; object-fit: cover; }
.memory__video figcaption { margin-top: 13px; color: var(--muted); text-align: center; font-size: .72rem; letter-spacing: .05em; }
.memory__video--date-seven { grid-row: 3; width: min(520px, 100%); margin-top: 10px; }
.memory__video--date-seven video { aspect-ratio: 3 / 4; }
.memory__video-pair { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); justify-content: center; gap: 18px; width: 100%; margin: -25px auto 0; }
.memory__video-card { margin: 0; padding: 10px 10px 15px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.07); box-shadow: 0 24px 65px rgba(0,0,0,.28); }
.memory__video-card video { display: block; width: 100%; aspect-ratio: 9 / 16; border-radius: 14px; background: #050713; object-fit: cover; }
.memory__video-card figcaption { margin-top: 12px; color: var(--muted); text-align: center; font-size: .72rem; letter-spacing: .05em; }
.memory__gallery { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin: -25px 0 0; }
.memory__gallery img { display: block; grid-column: span 2; width: 100%; max-width: 100%; height: auto; aspect-ratio: 3 / 4; border-radius: 16px; object-fit: cover; box-shadow: 0 16px 45px rgba(0,0,0,.28); }
.memory__gallery .memory__gallery-wide { grid-column: 1 / -1; justify-self: center; width: min(680px, 100%); aspect-ratio: 4 / 3; }
.memory__gallery .memory__gallery-portrait { grid-column: 1 / -1; justify-self: center; width: min(360px, 100%); aspect-ratio: 3 / 4; }
.memory__gallery figcaption { grid-column: 1 / -1; margin-top: 3px; color: var(--muted); text-align: center; font-size: .72rem; letter-spacing: .05em; }

.reasons { min-height: auto; }
.reasons__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.reason-card { position: relative; min-height: 310px; padding: 35px 28px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.015)); backdrop-filter: blur(10px); transition: transform .3s, border-color .3s, background .3s; }
.reason-card:hover { transform: translateY(-9px); border-color: rgba(245,182,198,.45); background: linear-gradient(145deg, rgba(245,182,198,.12), rgba(255,255,255,.02)); }
.reason-card > span { position: absolute; right: 24px; top: 22px; color: rgba(255,255,255,.16); font-family: "Itim"; font-size: 2rem; }
.reason-card__icon { color: var(--pink); font-size: 2.4rem; margin: 25px 0 38px; }
.reason-card h3 { margin: 0 0 15px; font-family: "Itim"; font-size: 1.55rem; font-weight: 400; }
.reason-card p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.9; }

.letter-section { display: grid; place-items: center; text-align: center; perspective: 1400px; }
.letter-intro h2 { margin: 0 0 38px; font-family: "Itim"; font-size: clamp(3rem, 7vw, 5.4rem); line-height: 1.1; font-weight: 400; }
.open-letter { border: 1px solid rgba(245,182,198,.55); border-radius: 100px; padding: 13px 25px 13px 13px; color: #2d1830; background: var(--pink-bright); font-family: "Mali"; font-size: .95rem; cursor: pointer; box-shadow: 0 12px 40px rgba(245,182,198,.17); transition: transform .25s, box-shadow .25s; }
.open-letter:hover { transform: translateY(-3px); box-shadow: 0 18px 55px rgba(245,182,198,.28); }
.open-letter__heart { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-right: 10px; border-radius: 50%; color: white; background: #9d5773; font-size: 1.35rem; }
.letter-intro small { display: block; margin-top: 17px; color: rgba(255,255,255,.43); }
.letter { display: none; position: relative; width: min(690px, 100%); padding: clamp(45px, 8vw, 80px); color: #43333a; text-align: left; background: #fff8ec; border-radius: 3px; box-shadow: 0 35px 100px rgba(0,0,0,.5); transform-origin: center bottom; }
.letter::before { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(157,87,115,.2); pointer-events: none; }
.letter.is-open { display: block; animation: openLetter .75s cubic-bezier(.2,.75,.25,1) both; }
.letter__close { position: absolute; z-index: 1; top: 20px; right: 22px; width: 34px; height: 34px; border: 0; border-radius: 50%; color: #795664; background: rgba(157,87,115,.1); font-size: 1.4rem; cursor: pointer; }
.letter p { line-height: 2; }
.letter__to { color: #9d5773; font-family: "Itim"; font-size: 1.65rem; }
.letter__question { margin-top: 30px; color: #9d5773; font-family: "Itim"; font-size: 1.45rem; text-align: center; }
.letter__sign { margin-top: 35px; font-family: "Itim"; font-size: 1.35rem; text-align: right; }
.letter__sign span { color: #8a777e; font-family: "Mali"; font-size: .78rem; }

footer { padding: 30px; color: rgba(255,255,255,.38); text-align: center; font-size: .75rem; letter-spacing: .08em; }
footer span { color: var(--pink); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.confetti { position: fixed; inset: 0; z-index: 10; pointer-events: none; overflow: hidden; }
.confetti-piece { position: absolute; top: -20px; animation: fall var(--duration) linear forwards; }

@keyframes twinkle { 0%, 100% { opacity: calc(var(--opacity) * .3); transform: scale(.8); } 50% { opacity: var(--opacity); transform: scale(1.4); } }
@keyframes shoot { 0%, 76% { opacity: 0; transform: translate(0,0) rotate(-35deg); } 78% { opacity: .8; } 84% { opacity: 0; transform: translate(240px,160px) rotate(-35deg); } 100% { opacity: 0; } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(7px); } }
@keyframes openLetter { from { opacity: 0; transform: rotateX(-28deg) translateY(40px) scale(.9); } to { opacity: 1; transform: rotateX(0) translateY(0) scale(1); } }
@keyframes fall { to { transform: translate(var(--drift), 105vh) rotate(720deg); opacity: 0; } }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }

@media (max-width: 850px) {
  .section { padding: 90px 0; }
  .timeline { gap: 75px; }
  .timeline::before { left: 8px; }
  .memory, .memory--reverse { grid-template-columns: 1fr; gap: 28px; padding-left: 35px; }
  .memory--reverse .memory__photo { grid-column: 1; grid-row: auto; order: 0; }
  .memory--reverse .memory__copy { grid-column: 1; grid-row: auto; text-align: left; }
  .memory__copy::before, .memory--reverse .memory__copy::before { top: 20px; left: -34px; right: auto; }
  .memory__video { grid-row: auto; margin-top: 5px; }
  .memory__video-pair { grid-row: auto; margin-top: 5px; }
  .memory__gallery { grid-row: auto; margin-top: 5px; }
  .reasons__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .section { width: min(100% - 28px, 1120px); }
  .hero h1 { font-size: 4.7rem; }
  .moon { top: 6vh; right: 6vw; }
  .memory__photo { min-height: 310px; padding-bottom: 48px; }
  .memory__photo.photo-one,
  .memory__photo.photo-two,
  .memory__photo.photo-running,
  .memory__photo.photo-date-three,
  .memory__photo.photo-date-five,
  .memory__photo.photo-date-seven,
  .memory__photo.photo-date-eight,
  .memory__photo.photo-date-nine,
  .memory__photo.photo-date-twelve,
  .memory__photo.photo-anniversary { min-height: 0; }
  .memory__photo.memory__photo--pair { min-height: 0; }
  .memory__photo.photo-one img,
  .memory__photo.photo-running img,
  .memory__photo.photo-date-three img,
  .memory__photo.photo-date-seven img,
  .memory__photo.photo-date-eight img { aspect-ratio: 4 / 5; }
  .memory__photo.photo-one img { object-position: center 78%; }
  .memory__photo.photo-running img { object-position: center 32%; }
  .memory__photo.photo-date-three img { object-position: center 48%; }
  .memory__photo.photo-date-seven img { object-position: center 45%; }
  .memory__photo.photo-date-eight img { object-position: center 44%; }
  .memory__photo.photo-two img { aspect-ratio: 4 / 3; object-position: center; }
  .memory__photo.photo-date-nine img { aspect-ratio: 4 / 3; object-position: center; }
  .memory__photo.memory__photo--video { min-height: 0; }
  .memory__gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .memory__gallery img { grid-column: auto; border-radius: 12px; }
  .memory__gallery img:nth-child(3) { grid-column: 1 / -1; justify-self: center; width: min(52%, 180px); }
  .memory__gallery .memory__gallery-wide { grid-column: 1 / -1; width: 100%; aspect-ratio: 4 / 3; }
  .memory__gallery .memory__gallery-portrait { grid-column: 1 / -1; width: min(82%, 300px); aspect-ratio: 3 / 4; }
  .memory__video-pair { grid-template-columns: minmax(0, 300px); }
  .memory__photo span { min-height: 245px; }
  .reasons__grid { grid-template-columns: 1fr; }
  .reason-card { min-height: 250px; }
  .letter { padding: 55px 32px 45px; }
  .password-card { padding: 42px 25px 34px; border-radius: 24px; }
}

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