/* ================= COMMON ================= */
section {
  position: relative;
  z-index: 2;
}
.container {
  width: min(1020px, 90%);
  margin: auto;
}
.reveal {
  opacity: 0;
  transform: translateY(45px);
  transition: 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

.kicker {
  font-family: var(--script);
  font-size: 30px;
  color: var(--rose);
}

/* ================= INTRO ================= */
.intro {
  padding: 160px 0 120px;
}
.intro-card {
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: 4px;
  backdrop-filter: blur(18px);
  padding: 70px 60px;
  max-width: 760px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4);
}
.intro-card h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(32px, 4.5vw, 46px);
  line-height: 1.15;
  margin: 14px 0 22px;
  color: var(--ivory);
}
.intro-card p {
  font-size: 18px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 62ch;
}
.intro-card p + p {
  margin-top: 16px;
}
.signature {
  font-family: var(--script);
  font-size: 34px;
  color: var(--champagne);
  margin-top: 26px;
}

/* ================= CONSTELLATION TIMELINE ================= */
.story {
  padding: 100px 0 150px;
}
.story-head {
  text-align: center;
  margin-bottom: 90px;
}
.story-head h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(32px, 4.5vw, 48px);
  margin-top: 10px;
}

.constellation {
  position: relative;
  max-width: 820px;
  margin: auto;
}
.const-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: repeating-linear-gradient(to bottom, var(--glass-brd) 0 6px, transparent 6px 14px);
  transform: translateX(-50%);
}
.moment {
  width: 50%;
  padding: 0 60px 90px;
  position: relative;
  opacity: 0;
  transform: translateY(36px);
  transition: 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
.moment.show {
  opacity: 1;
  transform: none;
}
.moment:nth-child(odd) {
  text-align: right;
}
.moment:nth-child(even) {
  margin-left: 50%;
}
.moment .node {
  position: absolute;
  top: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--champagne);
  box-shadow:
    0 0 0 4px rgba(230, 196, 143, 0.14),
    0 0 18px rgba(230, 196, 143, 0.6);
}
.moment:nth-child(odd) .node {
  right: -6px;
}
.moment:nth-child(even) .node {
  left: -6px;
}
.moment small {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--teal);
}
.moment h3 {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: 29px;
  margin: 10px 0 8px;
  color: var(--ivory);
}
.moment p {
  font-size: 16.5px;
  color: var(--muted);
  line-height: 1.6;
}

/* ================= COUNTDOWN ================= */
.countdown {
  padding: 60px 0 130px;
  text-align: center;
}
.countdown h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 40px);
  margin: 10px 0 44px;
}
.countdown-boxes {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
}
.countdown-box {
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: 4px;
  padding: 26px 32px;
  min-width: 104px;
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: scale(0.6);
  transition: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.countdown-box.show {
  opacity: 1;
  transform: scale(1);
}
.countdown-box .num {
  font-family: var(--display);
  font-weight: 500;
  font-size: 44px;
  color: var(--teal);
  display: block;
}
.countdown-box .label {
  font-size: 10.5px;
  letter-spacing: 2px;
  color: var(--muted);
  margin-top: 6px;
  display: block;
}

/* ================= LETTER ================= */
.letter {
  padding: 60px 0 170px;
  text-align: center;
}
.letter-inner {
  max-width: 720px;
  margin: auto;
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: 4px;
  padding: 70px 55px;
  backdrop-filter: blur(18px);
  box-shadow: 0 0 70px rgba(167, 139, 250, 0.08);
}
.letter h2 {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(30px, 5vw, 46px);
  margin: 14px 0 30px;
}
.letter p {
  font-size: 20px;
  line-height: 1.7;
  color: var(--muted);
}
.typing-text {
  border-right: 2px solid var(--rose);
  animation: caret 0.85s step-end infinite;
}
@keyframes caret {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: var(--rose);
  }
}
.letter .signature {
  color: var(--rose);
  margin-top: 26px;
}

/* ================= MEMORIES (glass frames) ================= */
.memories {
  padding: 40px 0 150px;
}
.memories-head {
  text-align: center;
  margin-bottom: 70px;
}
.memories-head h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 4.5vw, 46px);
  margin-top: 10px;
}
.frames {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.frame {
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  padding: 14px 14px 40px;
  border-radius: 3px;
  opacity: 0;
  transform: translateY(-40px) rotate(var(--r0, 0deg));
  transition: 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
}
.frames.show .frame {
  opacity: 1;
  transform: rotate(var(--r, 0deg));
}
.frames.show .frame:nth-child(1) {
  transition-delay: 0.1s;
}
.frames.show .frame:nth-child(2) {
  transition-delay: 0.3s;
}
.frames.show .frame:nth-child(3) {
  transition-delay: 0.5s;
}
.frame:nth-child(2) {
  margin-top: 46px;
}
.frame:hover {
  transform: rotate(0deg) translateY(-10px) !important;
  z-index: 3;
}
.frame img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  display: block;
  filter: saturate(0.9) contrast(1.02);
}
.frame p {
  font-family: var(--script);
  text-align: center;
  margin-top: 14px;
  font-size: 21px;
  color: var(--champagne);
}

/* ================= GALLERY ================= */
.gallery {
  padding: 40px 0 160px;
}
.gallery-head {
  text-align: center;
  margin-bottom: 60px;
}
.gallery-head h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 4.5vw, 46px);
  margin-top: 10px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  perspective: 800px;
}
.gallery-item {
  transform: rotate(var(--tilt, 0deg));
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s ease;
}
.gallery.visible .gallery-item {
  opacity: 1;
  transform: rotate(var(--tilt, 0deg));
}
.gallery.visible .gallery-item:nth-child(1) { transition-delay: 0.05s; }
.gallery.visible .gallery-item:nth-child(2) { transition-delay: 0.13s; }
.gallery.visible .gallery-item:nth-child(3) { transition-delay: 0.21s; }
.gallery.visible .gallery-item:nth-child(4) { transition-delay: 0.29s; }
.gallery.visible .gallery-item:nth-child(5) { transition-delay: 0.37s; }
.gallery.visible .gallery-item:nth-child(6) { transition-delay: 0.45s; }
.gallery.visible .gallery-item:nth-child(7) { transition-delay: 0.53s; }
.gallery-frame {
  position: relative;
  background: rgba(246, 242, 234, 0.04);
  border: 1px solid var(--glass-brd);
  border-radius: 4px;
  padding: 10px;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}
.gallery-item:first-child .gallery-frame {
  padding: 10px;
}
.gallery-item:first-child {
  grid-column: span 2;
  grid-row: span 2;
}
.gallery-frame img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  filter: saturate(0.9);
  transition: filter 0.4s ease;
}
.gallery-item:first-child .gallery-frame img {
  aspect-ratio: auto;
  height: 100%;
}
.gallery-frame:hover {
  transform: rotate(0deg) translateY(-8px) scale(1.03);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(95, 224, 199, 0.12);
}
.gallery-frame:hover img {
  filter: saturate(1.05);
}

/* ================= PROMISE ================= */
.promise {
  min-height: 100vh;
  padding: 160px 0;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    linear-gradient(rgba(8, 11, 20, 0.82), rgba(8, 11, 20, 0.9)),
    url("../images/img3.jpeg") center/cover fixed;
}
.promise-box {
  max-width: 780px;
}
.promise h2 {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(42px, 7.5vw, 82px);
  line-height: 1;
  margin: 20px 0 28px;
}
.promise p {
  font-size: 20px;
  color: var(--muted);
  line-height: 1.7;
}
.promise button {
  margin-top: 36px;
  padding: 15px 30px;
  border: 1px solid var(--rose);
  background: transparent;
  color: var(--ivory);
  border-radius: 50px;
  cursor: pointer;
  transition: 0.3s;
  font-size: 14.5px;
}
.promise button:hover {
  background: var(--rose);
  color: var(--void);
}

/* ================= FOOTER ================= */
footer {
  padding: 70px 20px 50px;
  text-align: center;
  color: var(--muted);
  font-size: 14.5px;
  position: relative;
  z-index: 2;
}
.footer-line {
  width: 50px;
  height: 1px;
  background: var(--champagne);
  margin: 0 auto 22px;
  opacity: 0.5;
}
footer span {
  display: block;
  font-family: var(--script);
  font-size: 30px;
  color: var(--rose);
  margin-bottom: 10px;
}
