@import url("https://fonts.googleapis.com/css2?family=Gowun+Batang:wght@400;700&family=Gowun+Dodum&display=swap");

@font-face {
  font-family: "InvitationBody";
  src: url("./fonts/custom-body.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "InvitationDisplay";
  src: url("./fonts/custom-display.woff2") format("woff2");
  font-display: swap;
}

:root {
  --font-body: "InvitationBody", "Gowun Dodum", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-display: "InvitationDisplay", "Gowun Batang", "Nanum Myeongjo", Georgia, serif;
  --mint: #74cdb9;
  --mint-deep: #43a68e;
  --mint-pale: #eefbf7;
  --leaf: #386f63;
  --ink: #343434;
  --muted: #8b8b8b;
  --line: #d9eee8;
  --paper: #fffdf8;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  background: #e6f5ef;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 247, 221, 0.9) 0 120px, transparent 121px),
    radial-gradient(circle at 85% 20%, rgba(186, 230, 220, 0.5) 0 150px, transparent 151px),
    linear-gradient(180deg, #e4f5ef, #fbf8ef 48%, #dff2ed);
  color: var(--ink);
  font-family: var(--font-body);
  letter-spacing: 0;
}

body.motion-ready .section-title,
body.motion-ready .profile-photo,
body.motion-ready .center-copy,
body.motion-ready .poem,
body.motion-ready .tags,
body.motion-ready .qa,
body.motion-ready .letter,
body.motion-ready .parents,
body.motion-ready .pill,
body.motion-ready .wide-photo,
body.motion-ready .calendar,
body.motion-ready .countdown,
body.motion-ready .d-day-line,
body.motion-ready .location h3,
body.motion-ready .copy-address,
body.motion-ready .map-card,
body.motion-ready .map-links,
body.motion-ready .gallery-grid img,
body.motion-ready .notice-list p,
body.motion-ready .guest-card,
body.motion-ready .account details,
body.motion-ready .life-line,
body.motion-ready #baby-age,
body.motion-ready .wreath button,
body.motion-ready .photo-stack,
body.motion-ready .guest-album small,
body.motion-ready .ending__copy,
body.motion-ready .ending button,
body.motion-ready .ending small {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
}

body.motion-ready .gallery-grid img,
body.motion-ready .profile-photo,
body.motion-ready .photo-stack img {
  transform: translate3d(0, 28px, 0) scale(0.96);
}

body.motion-ready .wide-photo,
body.motion-ready .map-card,
body.motion-ready .ending {
  opacity: 0;
  transform: translate3d(0, 26px, 0) scale(0.985);
}

body.motion-ready .reveal-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  transition:
    opacity 760ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

body.motion-ready .section-title.reveal-visible {
  transition-duration: 680ms, 820ms;
}

body.motion-ready .gallery-grid img.reveal-visible,
body.motion-ready .profile-photo.reveal-visible,
body.motion-ready .photo-stack img.reveal-visible {
  transition:
    opacity 720ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 860ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.motion-ready .countdown.reveal-visible div {
  animation: count-pop 620ms cubic-bezier(0.2, 1.2, 0.34, 1) both;
}

body.motion-ready .countdown.reveal-visible div:nth-child(2) {
  animation-delay: 80ms;
}

body.motion-ready .countdown.reveal-visible div:nth-child(3) {
  animation-delay: 160ms;
}

body.motion-ready .countdown.reveal-visible div:nth-child(4) {
  animation-delay: 240ms;
}

body.motion-ready .hero img {
  animation: hero-bloom 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.motion-ready .hero__copy {
  animation: hero-copy 950ms 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.motion-ready .wide-photo img,
body.motion-ready .ending img {
  will-change: transform;
  transition: transform 260ms linear;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
}

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

.hero img,
.profile-photo img,
.timeline img,
.wide-photo img,
.gallery-grid img,
.ending img {
  object-fit: cover;
  object-position: center center;
}

.phone {
  width: min(100vw, 430px);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 0 40px rgba(50, 105, 91, 0.18);
}

.section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 58px 20px 56px;
  font-size: 14px;
  line-height: 1.75;
}

.section:nth-of-type(even) {
  background: #f4fbf7;
}

.section-title {
  width: 100%;
  margin-bottom: 28px;
  text-align: center;
  color: var(--mint-deep);
}

.section-title p {
  margin: 0 0 2px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
}

.section-title h2 {
  margin: 0;
  color: var(--leaf);
  font-size: 20px;
  font-weight: 500;
}

.section-title span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.hero {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  background: #ccece3;
}

.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 44%, rgba(21, 67, 56, 0.22) 72%, rgba(12, 43, 36, 0.45));
}

.hero img {
  width: 100%;
  height: 610px;
  object-fit: cover;
}

.hero__copy {
  position: absolute;
  right: 0;
  bottom: 44px;
  left: 0;
  z-index: 1;
  color: white;
  text-align: center;
  text-shadow: 0 2px 14px rgba(19, 57, 49, 0.35);
}

.hero__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 32px;
}

.hero h1 {
  margin: 4px 0 18px;
  font-size: 27px;
  font-weight: 500;
}

.hero__copy p {
  margin: 4px 0;
}

.about h3 {
  margin: -6px 0 24px;
  color: var(--leaf);
  font-size: 18px;
  font-weight: 500;
}

.profile-photo {
  width: 235px;
  height: 235px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  box-shadow: 0 18px 35px rgba(49, 129, 108, 0.13);
}

.profile-photo img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.center-copy,
.poem,
.letter,
.parents {
  text-align: center;
}

.center-copy p,
.poem p,
.letter p,
.parents p {
  margin: 0;
}

.about .center-copy {
  margin: 24px 0 18px;
}

.poem {
  color: var(--leaf);
  font-size: 16px;
}

.tags {
  margin: 16px 0 0;
  color: var(--mint-deep);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
  padding-left: 10px;
}

.timeline article {
  position: relative;
  display: grid;
  grid-template-columns: 136px 1fr;
  gap: 18px;
  align-items: center;
  opacity: 1;
  transform: none;
}

.timeline article:nth-child(2),
.qa:nth-of-type(2),
.notice-list p:nth-child(2),
.guest-card:nth-of-type(2),
.account details:nth-of-type(2) {
  --reveal-delay: 90ms;
}

.timeline article:nth-child(3),
.qa:nth-of-type(3),
.notice-list p:nth-child(3),
.guest-card:nth-of-type(3) {
  --reveal-delay: 180ms;
}

.timeline article:nth-child(4),
.qa:nth-of-type(4) {
  --reveal-delay: 270ms;
}

.timeline article::before {
  position: absolute;
  top: 133px;
  bottom: -24px;
  left: 67px;
  width: 1px;
  content: "";
  background: var(--line);
}

.timeline article:last-child::before {
  content: none;
}

.timeline img {
  width: 136px;
  height: 136px;
  border: 6px solid white;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 26px rgba(67, 166, 142, 0.14);
}

.timeline h3 {
  margin: 0 0 6px;
  color: var(--leaf);
  font-size: 15px;
  font-weight: 600;
}

.timeline p,
.qa p {
  margin: 0;
}

.qa {
  width: 100%;
  margin-bottom: 14px;
  padding: 18px 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 24px rgba(61, 132, 114, 0.08);
}

.qa b {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--mint);
  color: white;
  font-size: 13px;
}

.qa h3 {
  margin: 0 0 8px;
  color: var(--leaf);
  font-size: 15px;
  font-weight: 600;
}

.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  padding: 8px 12px;
  background: transparent;
  color: var(--leaf);
  cursor: pointer;
}

.text-button::after {
  margin-left: 8px;
  content: "⌄";
  color: var(--mint-deep);
}

.letter {
  margin-bottom: 30px;
  line-height: 2.05;
}

.parents {
  margin-bottom: 22px;
  color: var(--leaf);
}

.pill {
  display: inline-flex;
  width: 160px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--mint);
  color: white;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(67, 166, 142, 0.22);
}

.wide-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.wide-photo {
  overflow: hidden;
}

.calendar {
  width: 100%;
  max-width: 340px;
  padding: 16px 18px 20px;
  border-radius: 8px;
  background: white;
  box-shadow: 0 10px 28px rgba(67, 166, 142, 0.1);
}

.calendar__month {
  margin-bottom: 14px;
  color: var(--leaf);
  text-align: center;
}

.calendar__week,
.calendar__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px 6px;
  text-align: center;
}

.calendar__week {
  margin-bottom: 12px;
  color: var(--mint-deep);
  font-weight: 600;
}

.calendar__days span {
  display: grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
}

.calendar__days .muted {
  color: #c4c4c4;
}

.day-party {
  background: var(--mint);
  color: white;
  font-weight: 700;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
  margin: 26px 0 12px;
}

.countdown div {
  display: flex;
  min-height: 64px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #e9f8f4;
}

.countdown span {
  color: var(--mint-deep);
  font-size: 11px;
}

.countdown b {
  color: var(--leaf);
  font-size: 22px;
}

.d-day-line {
  margin: 0;
  color: var(--leaf);
}

.location h3 {
  margin: -8px 0 10px;
  color: var(--leaf);
  font-size: 17px;
}

.copy-address {
  margin-bottom: 16px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.map-card {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #dcefe9;
}

.map-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.6) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.55) 1px, transparent 1px),
    linear-gradient(135deg, transparent 46%, rgba(116, 205, 185, 0.65) 47% 53%, transparent 54%),
    linear-gradient(45deg, transparent 42%, rgba(255, 232, 161, 0.7) 43% 48%, transparent 49%);
  background-size: 34px 34px, 34px 34px, 100% 100%, 100% 100%;
}

.map-card iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.map-card span {
  position: absolute;
  bottom: 12px;
  left: 50%;
  padding: 8px 12px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: white;
  color: var(--leaf);
  box-shadow: 0 8px 22px rgba(63, 126, 110, 0.16);
  white-space: nowrap;
}

.map-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  margin-top: 14px;
}

.map-links a {
  display: grid;
  min-height: 38px;
  place-items: center;
  border-radius: 8px;
  background: white;
  color: var(--leaf);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(67, 166, 142, 0.1);
}

.map-links a:hover {
  opacity: 0.88;
}

.movie {
  background: #fdfbf4;
}

.movie video {
  display: block;
  width: 100%;
  max-height: 520px;
  border-radius: 8px;
  background: #d8efe8;
  box-shadow: 0 12px 28px rgba(67, 166, 142, 0.12);
}

.movie-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--mint);
  color: white;
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(67, 166, 142, 0.18);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 100%;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 4px;
  object-fit: cover;
}

.gallery-grid img:nth-child(3n + 2) {
  --reveal-delay: 80ms;
}

.gallery-grid img:nth-child(3n) {
  --reveal-delay: 160ms;
}

.notice-list {
  width: 100%;
  padding: 6px 0;
}

.notice-list p {
  margin: 0 0 10px;
  padding: 14px 16px;
  border-radius: 8px;
  background: white;
  box-shadow: 0 7px 20px rgba(67, 166, 142, 0.08);
}

.guestbook .pill {
  margin-bottom: 18px;
}

.guest-card {
  width: 100%;
  margin-bottom: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  background: white;
  box-shadow: 0 8px 22px rgba(67, 166, 142, 0.09);
}

.guest-card div {
  display: flex;
  gap: 5px;
  padding-bottom: 6px;
  border-bottom: 1px solid #d7e8e3;
}

.guest-card span {
  color: var(--mint-deep);
}

.guest-card p {
  margin: 10px 0;
}

.guest-card time {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.account details {
  width: 100%;
  margin-top: 12px;
  border-radius: 12px;
  background: white;
  box-shadow: 0 8px 22px rgba(67, 166, 142, 0.09);
}

.account summary {
  padding: 13px;
  color: var(--leaf);
  text-align: center;
  cursor: pointer;
}

.account details button {
  width: calc(100% - 32px);
  margin: 0 16px 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.together {
  background: #fdfbf4;
}

.life-line {
  position: relative;
  width: 100%;
  height: 52px;
  margin-bottom: 14px;
}

.life-line::before {
  position: absolute;
  top: 24px;
  right: 40px;
  left: 40px;
  height: 1px;
  content: "";
  background: #9ebdb3;
}

.life-line .birth,
.life-line .today {
  position: absolute;
  top: 0;
  color: #666;
  font-size: 12px;
}

.life-line .birth {
  left: 44px;
}

.life-line .today {
  right: 61px;
}

.life-line .birth::after,
.life-line .today::after {
  position: absolute;
  top: 22px;
  left: 50%;
  width: 14px;
  height: 14px;
  transform: translateX(-50%);
  border: 3px solid white;
  border-radius: 50%;
  content: "";
  background: var(--mint);
  box-shadow: 0 4px 12px rgba(67, 166, 142, 0.2);
}

#baby-age {
  margin: 0;
}

.wreath {
  padding: 56px 20px;
  background: #f4fbf7;
}

.wreath button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(67, 166, 142, 0.09);
}

.wreath span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.wreath b {
  font-weight: 500;
}

.wreath small,
.guest-album small {
  color: var(--muted);
  font-size: 13px;
}

.wreath i {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 50%;
  background: var(--mint-pale);
  color: var(--mint-deep);
  font-size: 25px;
  font-style: normal;
}

.photo-stack {
  position: relative;
  width: 300px;
  height: 170px;
  margin: -6px 0 16px;
}

.photo-stack img {
  position: absolute;
  width: 112px;
  height: 112px;
  border: 5px solid white;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 10px 22px rgba(60, 117, 104, 0.16);
}

.photo-stack img:nth-child(1) {
  top: 24px;
  left: 0;
  transform: rotate(-7deg);
  --stack-rotate: -7deg;
}

.photo-stack img:nth-child(2) {
  top: 6px;
  left: 94px;
  z-index: 1;
  width: 122px;
  height: 122px;
  transform: rotate(4deg);
  --stack-rotate: 4deg;
}

.photo-stack img:nth-child(3) {
  top: 28px;
  right: 0;
  transform: rotate(5deg);
  --stack-rotate: 5deg;
}

body.motion-ready .photo-stack img {
  opacity: 0;
  transform: translate3d(0, 28px, 0) rotate(var(--stack-rotate)) scale(0.94);
}

body.motion-ready .photo-stack.reveal-visible img {
  animation: stack-drop 780ms cubic-bezier(0.18, 1.18, 0.28, 1) both;
}

body.motion-ready .photo-stack.reveal-visible img:nth-child(2) {
  animation-delay: 110ms;
}

body.motion-ready .photo-stack.reveal-visible img:nth-child(3) {
  animation-delay: 210ms;
}

.guest-album .center-copy {
  margin-bottom: 24px;
}

.guest-album small {
  margin-top: 12px;
}

.ending {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  color: white;
  text-align: center;
}

.ending::after {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(17, 55, 47, 0.42);
}

.ending img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.ending__copy {
  position: absolute;
  top: 70px;
  right: 0;
  left: 0;
  z-index: 1;
  line-height: 1.8;
}

.ending__copy p {
  margin: 0;
}

.ending button {
  position: absolute;
  right: 0;
  bottom: 54px;
  left: 0;
  z-index: 1;
  margin: auto;
  background: transparent;
  color: white;
  cursor: pointer;
}

.ending button::before {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  margin-right: 6px;
  border-radius: 50%;
  background: #ffea2f;
  color: #2f1d1a;
  content: "K";
  font-size: 11px;
  font-weight: 700;
}

.ending small {
  position: absolute;
  right: 0;
  bottom: 14px;
  left: 0;
  z-index: 1;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

@keyframes hero-bloom {
  from {
    opacity: 0;
    transform: scale(1.012);
    filter: saturate(0.85) brightness(1.08);
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: saturate(1) brightness(1);
  }
}

@keyframes hero-copy {
  from {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes count-pop {
  from {
    transform: translate3d(0, 12px, 0) scale(0.9);
  }
  to {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes stack-drop {
  from {
    opacity: 0;
    transform: translate3d(0, 28px, 0) rotate(var(--stack-rotate)) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(var(--stack-rotate)) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.motion-ready .section-title,
  body.motion-ready .profile-photo,
  body.motion-ready .center-copy,
  body.motion-ready .poem,
  body.motion-ready .tags,
  body.motion-ready .qa,
  body.motion-ready .letter,
  body.motion-ready .parents,
  body.motion-ready .pill,
  body.motion-ready .wide-photo,
  body.motion-ready .calendar,
  body.motion-ready .countdown,
  body.motion-ready .d-day-line,
  body.motion-ready .location h3,
  body.motion-ready .copy-address,
  body.motion-ready .map-card,
  body.motion-ready .map-links,
  body.motion-ready .gallery-grid img,
  body.motion-ready .notice-list p,
  body.motion-ready .guest-card,
  body.motion-ready .account details,
  body.motion-ready .life-line,
  body.motion-ready #baby-age,
  body.motion-ready .wreath button,
  body.motion-ready .photo-stack,
  body.motion-ready .photo-stack img,
  body.motion-ready .guest-album small,
  body.motion-ready .ending,
  body.motion-ready .ending__copy,
  body.motion-ready .ending button,
  body.motion-ready .ending small {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }
}

@media (min-width: 431px) {
  body {
    padding: 0;
  }

  .phone {
    width: 430px;
  }
}
