:root {
  --blush: #f3c6c0;
  --rose: #d97b86;
  --deep: #3a1d2b;
  --ink: #2b1822;
  --cream: #fff6f1;
  --gold: #e8c9a0;
  --night: #1a0f18;
  --glow: rgba(217, 123, 134, 0.45);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: "Manrope", system-ui, sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 700px at 10% -10%, #ffe7e2 0%, transparent 55%),
    radial-gradient(900px 600px at 110% 10%, #f6d7c5 0%, transparent 50%),
    linear-gradient(180deg, #fff8f4 0%, #f8e6e3 40%, #f3d5d8 100%);
  min-height: 100vh;
  overflow-x: clip;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

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

#petals {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

.cursor-glow {
  position: fixed;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 5;
  opacity: 0.55;
  transition: opacity 0.4s ease;
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background:
    radial-gradient(600px 400px at 50% 40%, rgba(255, 214, 208, 0.55), transparent 70%),
    linear-gradient(180deg, #2b1822 0%, #4a2433 55%, #7a3b4d 100%);
  color: var(--cream);
  text-align: center;
  overflow: hidden;
}

.gate::before,
.gate::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.35;
  animation: drift 10s ease-in-out infinite alternate;
}

.gate::before {
  background: #d97b86;
  top: -80px;
  left: -80px;
}

.gate::after {
  background: #e8c9a0;
  right: -90px;
  bottom: -90px;
  animation-delay: -4s;
}

.gate-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: min(100%, 36rem);
  padding: 0 1.2rem;
  animation: rise 1.1s ease both;
}

.gate-kicker,
.eyebrow {
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.78;
}

.gate-title,
.script {
  font-family: "Great Vibes", cursive;
  font-weight: 400;
}

.gate-title {
  font-size: clamp(5rem, 16vw, 9rem);
  line-height: 0.9;
  margin: 0.2em 0 0.15em;
  text-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.gate-sub,
.gate-hint {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
  font-style: italic;
}

.gate-hint {
  margin-top: 1.4rem;
  opacity: 0.7;
  font-size: 1rem;
  animation: blink 1.8s ease-in-out infinite;
}

.heart-btn {
  margin: 1.8rem auto 0;
  width: 92px;
  height: 92px;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.heart-svg {
  width: 58px;
  height: 58px;
  display: block;
  fill: #ffd6d0;
  overflow: visible;
  transform-origin: 50% 50%;
  filter: drop-shadow(0 10px 18px rgba(255, 140, 150, 0.55));
  animation: heartbeat 1.2s ease-in-out infinite;
}

.heart-pulse {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255, 214, 208, 0.45);
  animation: pulse 1.8s ease-out infinite;
  pointer-events: none;
}

.gate.closing {
  animation: veil 0.9s ease forwards;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 6vw;
  backdrop-filter: blur(16px);
  background: rgba(255, 246, 241, 0.55);
  border-bottom: 1px solid rgba(217, 123, 134, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

body.ready .topbar {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.logo {
  font-family: "Great Vibes", cursive;
  font-size: 1.8rem;
}

.topbar nav {
  display: flex;
  gap: 1.2rem;
}

.topbar a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.72;
}

.topbar a:hover {
  opacity: 1;
}

.hero {
  min-height: calc(100vh - 70px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 4vw;
  align-items: center;
  padding: 6vh 8vw 10vh;
}

.hero-copy {
  max-width: 560px;
  animation: rise 1s 0.15s ease both;
}

.script {
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  line-height: 1.05;
  color: var(--deep);
  margin: 0.25em 0 0.4em;
}

.lead {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
  line-height: 1.65;
  margin-bottom: 1.8rem;
}

.cta {
  display: inline-block;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  background: var(--deep);
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  box-shadow: 0 16px 30px rgba(58, 29, 43, 0.22);
}

.hero-polaroids {
  position: relative;
  min-height: 680px;
}

.polaroid {
  position: absolute;
  width: min(240px, 38vw);
  background: #fffdfb;
  padding: 12px 12px 36px;
  border-radius: 8px;
  box-shadow: 0 25px 50px rgba(58, 29, 43, 0.18);
  --rot: 0deg;
  transform: rotate(var(--rot));
  animation: floaty 5.5s ease-in-out infinite;
}

.polaroid img {
  width: 100%;
  height: 270px;
  object-fit: cover;
  border-radius: 4px;
}

.polaroid figcaption {
  font-family: "Great Vibes", cursive;
  text-align: center;
  margin-top: 10px;
  font-size: 1.4rem;
}

.p1 { left: 0; top: 0; --rot: -8deg; }
.p2 { right: 0; top: 70px; --rot: 7deg; animation-delay: -1.4s; }
.p3 { left: 18%; bottom: 10px; --rot: 3deg; animation-delay: -2.6s; }

.moments,
.why,
.play,
.letter {
  padding: 8vh 8vw;
  scroll-margin-top: 86px;
}

.section-head {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-head h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 500;
  margin: 0.35em 0 0.3em;
}

.section-head p:last-child {
  opacity: 0.7;
}

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

.card {
  background: rgba(255, 253, 251, 0.7);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(58, 29, 43, 0.1);
  cursor: pointer;
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.45s ease, box-shadow 0.45s ease;
}

body.ready .card {
  animation: rise 0.8s ease forwards;
}

body.ready .card:nth-child(2) { animation-delay: 0.1s; }
body.ready .card:nth-child(3) { animation-delay: 0.2s; }
body.ready .card:nth-child(4) { animation-delay: 0.3s; }

.card:hover {
  transform: translateY(-8px) rotate(-0.4deg);
  box-shadow: 0 30px 50px rgba(58, 29, 43, 0.16);
}

.card-frame {
  height: 420px;
  overflow: hidden;
}

.card-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.night-crop img {
  object-position: center 42%;
  transform: scale(1.18);
}

.card:hover img {
  transform: scale(1.06);
}

.card:hover .night-crop img {
  transform: scale(1.24);
}

.card-meta {
  padding: 1.3rem 1.4rem 1.6rem;
}

.card-meta h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
  margin-bottom: 0.35rem;
}

.reasons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.reason {
  background: rgba(255, 253, 251, 0.72);
  border: 1px solid rgba(232, 201, 160, 0.45);
  border-radius: 22px;
  padding: 1.4rem 1.3rem;
  min-height: 150px;
  transform: scale(0.92);
  opacity: 0;
}

body.ready .reason {
  animation: pop 0.6s ease forwards;
}

.reason strong {
  display: block;
  font-family: "Great Vibes", cursive;
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--rose);
  margin-bottom: 0.35rem;
}

.play-box {
  max-width: 640px;
  margin: 0 auto;
  background: rgba(255, 253, 251, 0.8);
  border-radius: 32px;
  padding: 2.4rem 1.6rem 2.6rem;
  text-align: center;
  position: relative;
  min-height: 260px;
  box-shadow: 0 24px 50px rgba(58, 29, 43, 0.1);
}

.play-q {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
  margin-bottom: 1.8rem;
}

.play-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  min-height: 72px;
  position: relative;
}

.yes-btn,
.no-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
  font: inherit;
  cursor: pointer;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex: 0 0 auto;
  align-self: center;
  line-height: 1;
  white-space: nowrap;
}

.yes-btn {
  background: var(--deep);
  color: var(--cream);
}

.no-btn {
  background: #f3d5d8;
  color: var(--deep);
  position: relative;
}

.play-result {
  margin-top: 1.5rem;
  font-family: "Great Vibes", cursive;
  font-size: 2.4rem;
  color: var(--rose);
}

.letter {
  display: grid;
  place-items: center;
  padding-bottom: 12vh;
}

.letter-paper {
  width: min(680px, 100%);
  background: #fffdf8;
  padding: 3.2rem 2.4rem;
  border-radius: 8px;
  box-shadow:
    0 1px 0 rgba(232, 201, 160, 0.7),
    0 30px 60px rgba(58, 29, 43, 0.12);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.28rem;
  line-height: 1.8;
  position: relative;
}

.letter-paper::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(217, 123, 134, 0.2);
  pointer-events: none;
}

.letter-hello {
  font-size: 2.8rem;
  margin-bottom: 1rem;
}

.letter-paper p + p {
  margin-top: 1rem;
}

.letter-sign {
  text-align: right;
  font-style: italic;
}

.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  background: #140910;
  z-index: 200;
  display: none;
  place-items: center;
  padding: 8vh 5vw 5vh;
}

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

.lightbox[hidden] {
  display: none !important;
}

body.lightbox-open {
  overflow: hidden;
}

body.lightbox-open .topbar,
body.lightbox-open main,
body.lightbox-open #petals,
body.lightbox-open .cursor-glow {
  visibility: hidden;
}

.lightbox figure {
  max-width: min(720px, 100%);
}

.lightbox img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.lightbox figcaption {
  color: var(--cream);
  text-align: center;
  margin-top: 1rem;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
}

.lb-close {
  position: absolute;
  top: 18px;
  right: 22px;
  background: transparent;
  border: 0;
  color: white;
  font-size: 2.4rem;
  cursor: pointer;
}

@keyframes heartbeat {
  0%, 100% { transform: scale3d(1, 1, 1); }
  25% { transform: scale3d(1.1, 1.1, 1); }
  40% { transform: scale3d(1, 1, 1); }
  60% { transform: scale3d(1.06, 1.06, 1); }
}

@keyframes pulse {
  from { transform: scale(0.8); opacity: 0.8; }
  to { transform: scale(1.5); opacity: 0; }
}

@keyframes blink {
  50% { opacity: 0.25; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes floaty {
  0%, 100% { transform: rotate(var(--rot)) translateY(0); }
  50% { transform: rotate(var(--rot)) translateY(-14px); }
}

@keyframes pop {
  to { opacity: 1; transform: scale(1); }
}

@keyframes veil {
  to { opacity: 0; visibility: hidden; }
}

@keyframes drift {
  to { transform: translate(40px, 30px) scale(1.1); }
}

@media (max-width: 900px) {
  .hero,
  .gallery,
  .reasons {
    grid-template-columns: 1fr;
  }

  .hero {
    display: flex;
    flex-direction: column;
    min-height: auto;
    padding: 2.5vh 6vw 5vh;
    gap: 0.5rem;
  }

  .hero-copy {
    position: relative;
    z-index: 2;
    max-width: none;
  }

  .hero-polaroids {
    display: none;
  }

  .gate-inner {
    padding: 0 1.1rem;
    width: 100%;
  }

  .gate-kicker,
  .eyebrow {
    letter-spacing: 0.14em;
    font-size: 0.62rem;
  }

  .gate-title {
    font-size: clamp(3.8rem, 22vw, 6.5rem);
  }

  .gate-sub {
    font-size: 1.15rem;
  }

  .script {
    font-size: clamp(2.15rem, 11vw, 3.3rem);
  }

  .lead {
    font-size: 1.12rem;
    line-height: 1.55;
  }

  .topbar {
    padding: 0.8rem 5vw;
    gap: 0.45rem 0.75rem;
    flex-wrap: wrap;
  }

  .logo {
    font-size: 1.55rem;
  }

  .topbar nav {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
  }

  .topbar a {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
  }

  .moments,
  .why,
  .play,
  .letter {
    padding: 6vh 5.5vw;
    scroll-margin-top: 96px;
  }

  .section-head {
    margin-bottom: 1.8rem;
  }

  .card-frame {
    height: auto;
    aspect-ratio: 3 / 4;
    max-height: 68vh;
  }

  .card-meta {
    padding: 1.1rem 1.15rem 1.3rem;
  }

  .play-q {
    font-size: 1.35rem;
  }

  .play-box {
    padding: 1.6rem 1.1rem 1.8rem;
    min-height: 0;
    border-radius: 24px;
    overflow: hidden;
  }

  .play-buttons {
    min-height: 92px;
    align-items: center;
  }

  .letter-paper {
    padding: 1.8rem 1.15rem;
    font-size: 1.12rem;
  }

  .letter-hello {
    font-size: 2.15rem;
  }

  .lightbox {
    padding: max(16px, env(safe-area-inset-top)) 4vw max(20px, env(safe-area-inset-bottom));
    overflow: auto;
    align-content: center;
  }

  .lightbox img {
    max-height: min(68vh, 68dvh);
    border-radius: 14px;
  }

  .lightbox figcaption {
    font-size: 1.15rem;
    padding: 0 0.4rem;
  }

  .lb-close {
    top: max(6px, env(safe-area-inset-top));
    right: 10px;
    width: 44px;
    height: 44px;
    line-height: 1;
  }

  .cursor-glow {
    display: none;
  }
}

@media (hover: none) and (pointer: coarse) {
  .cursor-glow {
    display: none;
  }

  .card:hover {
    transform: none;
    box-shadow: 0 20px 40px rgba(58, 29, 43, 0.1);
  }

  .card:hover img {
    transform: none;
  }

  .card:hover .night-crop img {
    transform: scale(1.18);
  }
}
