:root {
  --paper: #f8f5ee;
  --paper-deep: #f1ede4;
  --ink: #293142;
  --muted: #707687;
  --blue: #7287ae;
  --blue-deep: #52688f;
  --pink: #edcad3;
  --pink-soft: #f7e7e9;
  --yellow: #e9c75b;
  --line: rgba(54, 65, 85, .15);
  --serif: "Gowun Batang", serif;
  --sans: "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(237, 202, 211, .34), transparent 27rem),
    radial-gradient(circle at 88% 40%, rgba(233, 199, 91, .18), transparent 22rem),
    #e8eaf0;
  font-family: var(--sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

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

.invitation {
  width: min(100%, 760px);
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 0 80px rgba(35, 42, 58, .13);
}

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background: #eff1ed;
}

.hero__photo {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  object-position: 52% 46%;
  animation: hero-arrive 1.5s cubic-bezier(.2,.7,.2,1) both;
}

.hero__photo-button { position: absolute; inset: 0; }

.hero__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(248, 247, 240, .24), transparent 36%, transparent 67%, rgba(31, 36, 48, .14));
  pointer-events: none;
}

.hero__heading {
  position: absolute;
  z-index: 1;
  right: clamp(1.25rem, 5vw, 3rem);
  bottom: max(5.5rem, 10vh);
  left: clamp(1.25rem, 5vw, 3rem);
  padding: 1.35rem 1.4rem 1.5rem;
  text-shadow: 0 1px 10px rgba(255,255,255,.95), 0 1px 2px rgba(255,255,255,.9);
  text-align: center;
  pointer-events: none;
  animation: text-arrive 1.1s .25s ease-out both;
}

.eyebrow,
.section__kicker {
  margin: 0 0 1rem;
  color: var(--blue-deep);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .23em;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.28;
}

.hero h1 span {
  display: block;
  font-size: clamp(1.4rem, 5vw, 2.1rem);
}

.hero h1 strong {
  display: block;
  font-size: clamp(2.25rem, 9vw, 3.7rem);
  font-weight: 700;
  letter-spacing: -.06em;
}

.hero__name {
  margin: 1.15rem 0 0;
  color: #6e7380;
  font-family: var(--serif);
  font-size: .88rem;
  letter-spacing: .56em;
  text-indent: .56em;
}

.hero__scroll {
  position: absolute;
  z-index: 2;
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  left: 50%;
  display: grid;
  justify-items: center;
  gap: .35rem;
  color: rgba(255,255,255,.95);
  font-size: .72rem;
  letter-spacing: .16em;
  text-decoration: none;
  transform: translateX(-50%);
}

.hero__scroll svg { width: 1.4rem; fill: none; stroke: currentColor; stroke-width: 1.5; }

.section { padding: 7rem clamp(1.5rem, 7vw, 4.5rem); }

.message {
  position: relative;
  text-align: center;
  background:
    radial-gradient(circle at 8% 12%, rgba(237, 202, 211, .52) 0 3.8rem, transparent 3.9rem),
    radial-gradient(circle at 96% 82%, rgba(114, 135, 174, .12) 0 5.2rem, transparent 5.3rem),
    var(--paper);
}

.section h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.85rem, 6vw, 2.7rem);
  line-height: 1.52;
  letter-spacing: -.055em;
}

.ornament {
  display: block;
  width: 1px;
  height: 3rem;
  margin: 2.1rem auto;
  background: var(--yellow);
}

.message__copy {
  margin: 0;
  color: #555d6b;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 2;
}

.family-line {
  margin: 3rem 0 0;
  color: #454b58;
  font-family: var(--serif);
  font-size: .96rem;
  letter-spacing: .02em;
}

.family-line span, .family-line small { color: #8b8f98; font-size: .78rem; }
.family-line i { padding: 0 .2rem; color: var(--pink); font-style: normal; }
.family-line strong { color: var(--blue-deep); font-weight: 700; }

.wide-photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #aa7650;
}

.photo-button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.photo-button:focus-visible {
  outline: 4px solid rgba(255,255,255,.92);
  outline-offset: -6px;
}

.wide-photo img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transform: scale(2.1);
  transform-origin: 50% 63%;
}

.wide-photo figcaption {
  position: absolute;
  right: 1.2rem;
  bottom: 1.1rem;
  padding: .55rem .8rem;
  color: #fff;
  border: 1px solid rgba(255,255,255,.58);
  border-radius: 999px;
  background: rgba(40, 31, 25, .23);
  backdrop-filter: blur(8px);
  font-family: var(--serif);
  font-size: .78rem;
}

.details { background: #f4f5f8; }
.details > .section__kicker, .details > h2 { text-align: center; }

.details__card {
  margin-top: 3.25rem;
  padding: 2rem clamp(1.25rem, 5vw, 2.3rem);
  border: 1px solid rgba(82, 104, 143, .18);
  border-radius: .35rem;
  background: rgba(255,255,255,.68);
  box-shadow: 0 1.25rem 3rem rgba(65, 73, 91, .07);
}

.details__row {
  display: grid;
  grid-template-columns: 4.4rem 1fr;
  gap: 1rem;
  align-items: start;
}

.details__label {
  margin: .13rem 0 0;
  color: var(--blue-deep);
  font-size: .79rem;
  font-weight: 600;
  letter-spacing: .18em;
}

.details__value {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 700;
}

.details__sub { margin: .55rem 0 0; color: var(--muted); font-size: .91rem; line-height: 1.75; }
.details__rule { height: 1px; margin: 1.6rem 0; background: var(--line); }

.notes { margin: 1.5rem 0 0; }
.notes p { display: flex; align-items: baseline; gap: .8rem; margin: .7rem 0; color: #5f6674; font-size: .88rem; line-height: 1.65; }
.notes span { color: var(--pink); font-family: var(--serif); font-size: .75rem; font-weight: 700; }

.actions { display: grid; grid-template-columns: 1fr 8.5rem; gap: .7rem; margin-top: 2rem; }
.button, .share-button {
  min-height: 3.5rem;
  border: 0;
  border-radius: .3rem;
  font: 500 .91rem var(--sans);
  cursor: pointer;
}
.button { display: flex; align-items: center; justify-content: center; gap: .65rem; padding: 0 1rem; text-decoration: none; }
.button svg { width: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.6; }
.button--primary { color: #fff; background: var(--blue-deep); }
.button--secondary { color: var(--blue-deep); border: 1px solid rgba(82,104,143,.25); background: transparent; }
.button:hover, .button:focus-visible, .share-button:hover, .share-button:focus-visible { filter: brightness(.96); }
.button:focus-visible, .share-button:focus-visible { outline: 3px solid rgba(114,135,174,.35); outline-offset: 3px; }

.toast { min-height: 1.4rem; margin: .65rem 0 -1.2rem; color: var(--blue-deep); font-size: .8rem; text-align: center; }

.gallery { padding-right: 0; padding-left: 0; background: var(--paper); }
.gallery__heading { padding: 0 clamp(1.5rem, 7vw, 4.5rem) 2.8rem; text-align: center; }
.gallery__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-flow: dense;
  gap: .45rem;
  padding: 0 .45rem;
}
.gallery__item { position: relative; margin: 0; overflow: hidden; background: var(--paper-deep); }
.gallery__item img { height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.gallery__item:hover img { transform: scale(1.025); }
.gallery__item:not(.gallery__item--family):not(.gallery__item--portrait) { aspect-ratio: 1 / 1.18; }
.gallery__item--tall { grid-row: span 2; aspect-ratio: auto !important; }
.gallery__item--family { aspect-ratio: 2 / 3; }
.gallery__item--portrait { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.gallery__item--portrait img { object-position: center 31%; }
.gallery__item--family figcaption {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  color: #fff;
  font-family: var(--serif);
  font-size: .82rem;
  letter-spacing: .12em;
  text-shadow: 0 1px 8px rgba(0,0,0,.35);
}

.lightbox {
  width: min(94vw, 860px);
  max-width: none;
  max-height: 92vh;
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
}
.lightbox::backdrop { background: rgba(21, 25, 34, .88); backdrop-filter: blur(5px); }
.lightbox__image {
  width: auto;
  max-width: 94vw;
  height: auto;
  max-height: 84vh;
  margin: auto;
  object-fit: contain;
  box-shadow: 0 1.5rem 5rem rgba(0,0,0,.35);
}
.lightbox__caption { margin: .8rem 3rem 0; color: #fff; font-size: .88rem; text-align: center; }
.lightbox__close {
  position: absolute;
  z-index: 2;
  top: -2.9rem;
  right: 0;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 50%;
  color: #fff;
  background: rgba(20,24,32,.38);
  font: 300 1.8rem/1 var(--sans);
  cursor: pointer;
}
body.lightbox-open { overflow: hidden; }

.closing {
  position: relative;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(247,231,233,.85), transparent 55%),
    var(--paper);
}
.closing::before, .closing::after {
  position: absolute;
  content: "";
  border-radius: 50%;
  filter: blur(.2px);
}
.closing::before { width: 7rem; height: 7rem; top: 2rem; right: -3rem; border: 1px solid rgba(114,135,174,.28); }
.closing::after { width: 1rem; height: 1rem; bottom: 3.5rem; left: 12%; background: rgba(233,199,91,.55); }
.closing__one { margin: 0 0 1.25rem; color: var(--pink); font-family: var(--serif); font-size: 4.8rem; line-height: 1; letter-spacing: -.08em; }
.closing > p:not(.closing__one) { margin: 1.2rem 0 0; color: var(--muted); font-family: var(--serif); }
.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-width: 13rem;
  margin-top: 2.5rem;
  padding: 0 1.4rem;
  color: #fff;
  background: var(--ink);
}
.share-button svg { width: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.6; }

footer {
  padding: 2rem 1.5rem calc(2rem + env(safe-area-inset-bottom));
  color: rgba(255,255,255,.72);
  background: var(--ink);
  text-align: center;
}
footer p { margin: 0; font-family: var(--serif); font-size: .87rem; }
footer span { display: block; margin-top: .4rem; font-size: .68rem; letter-spacing: .12em; }

.motion-ready [data-reveal] { opacity: 0; transform: translateY(1.6rem); transition: opacity .8s ease, transform .8s ease; }
.motion-ready [data-reveal].is-visible { opacity: 1; transform: none; }

@keyframes hero-arrive { from { opacity: 0; transform: scale(1.035); } to { opacity: 1; transform: scale(1); } }
@keyframes text-arrive { from { opacity: 0; transform: translateY(-.8rem); } to { opacity: 1; transform: none; } }

@media (max-width: 430px) {
  .hero__photo { object-position: 50% 46%; }
  .section { padding-top: 6rem; padding-bottom: 6rem; }
  .actions { grid-template-columns: 1fr; }
  .button--secondary { min-height: 3.1rem; }
  .gallery__grid { gap: .25rem; padding: 0 .25rem; }
}

@media (min-width: 761px) {
  body { padding: 3rem 0; }
  .hero { min-height: min(960px, calc(100vh - 6rem)); }
  .hero__photo { object-position: 52% 50%; }
}

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