:root {
  --bg: #faf7f2;
  --bg-outer: #efe9e1;
  --surface: #ffffff;
  --text: #4a4038;
  --text-soft: #8a7e74;
  --accent: #b08d73;
  --accent-soft: #e9ddd2;
  --heart: #d38b8b;
  --line: #e6ddd3;

  --serif: "Gowun Batang", serif;
  --display: "Cormorant Garamond", "Gowun Batang", serif;
  --sans: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", sans-serif;

  --max-w: 440px;
  --gutter: 28px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg-outer);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.8;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }

.invitation {
  max-width: var(--max-w);
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
  box-shadow: 0 0 40px rgba(74, 64, 56, 0.08);
}

/* ---------- 공통 섹션 ---------- */
.section {
  min-height: 100vh;
  min-height: 100svh;
  padding: 96px var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  scroll-snap-align: start;
}

.section + .section { border-top: 1px solid var(--line); }

.eyebrow {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.35em;
  color: var(--accent);
}

.title {
  margin: 0 0 40px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 400;
  line-height: 1.6;
}

.divider {
  width: 1px;
  height: 40px;
  margin: 40px auto;
  background: var(--accent);
  opacity: 0.5;
}

/* ---------- 스크롤 등장 애니메이션 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__photo, .hero__names, .scroll-hint { animation: none !important; }
}

/* ---------- 1. 메인 ---------- */
.hero {
  position: relative;
  padding: 0;
  justify-content: flex-end;
  color: #fff;
  border-top: 0;
}

.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 40%;
  animation: hero-zoom 2.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 45%, rgba(40, 30, 24, 0.45) 100%);
}

.hero__names {
  position: relative;
  margin: 0 0 22vh;
  margin: 0 0 22svh;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
  animation: fade-up 1.4s 0.6s ease both;
}

.hero__heart {
  font-size: 15px;
  color: #ffd9d9;
}

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.3em;
  opacity: 0.85;
  animation: fade-up 1s 1.6s ease both;
}

.scroll-hint i {
  width: 1px;
  height: 32px;
  background: currentColor;
  transform-origin: top;
  animation: scroll-line 1.8s ease-in-out infinite;
}

@keyframes hero-zoom {
  from { transform: scale(1.08); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes scroll-line {
  0% { transform: scaleY(0); }
  50% { transform: scaleY(1); }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ---------- 2. 인사말 ---------- */
.greeting__text {
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 2.1;
}

.greeting__text p { margin: 0 0 24px; }
.greeting__text p:last-child { margin-bottom: 0; }

.parents {
  margin: 0;
  display: grid;
  gap: 10px;
}

.parents__row {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
}

.parents dt { font-weight: 500; }
.parents dt span { margin-left: 2px; font-size: 13px; color: var(--text-soft); font-weight: 400; }
.parents dd { margin: 0; font-family: var(--serif); font-size: 17px; }

/* ---------- 3. 날짜 / 달력 ---------- */
.calendar {
  width: 100%;
  padding: 28px 18px 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.calendar__month {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: 26px;
  font-style: italic;
  color: var(--accent);
}

.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 6px;
  font-size: 14px;
}

.calendar__grid .dow {
  padding-bottom: 6px;
  font-size: 12px;
  color: var(--text-soft);
}

.calendar__grid .day {
  display: grid;
  place-items: center;
  height: 36px;
}

.calendar__grid .sun { color: #c26a6a; }

.calendar__grid .is-wedding span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.dday { margin-top: 36px; }

.dday__units {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.dday__units div {
  width: 62px;
  padding: 10px 0 8px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(74, 64, 56, 0.06);
}

.dday__units strong {
  display: block;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
}

.dday__units span {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--text-soft);
}

.dday__text { margin: 22px 0 0; font-size: 14px; }
.dday__text b,
.dday__text .heart { color: var(--heart); }

/* ---------- 4. 갤러리 ---------- */
.gallery__grid {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.gallery__grid button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  background: var(--accent-soft);
}

.gallery__grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery__grid button:hover img { transform: scale(1.05); }

.lightbox {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(20, 16, 14, 0.94);
  color: #fff;
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox::backdrop { background: transparent; }

.lightbox__img {
  max-width: min(100%, var(--max-w));
  max-height: 80vh;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  border: 0;
  background: none;
  color: #fff;
  line-height: 1;
}

.lightbox__close { top: 14px; right: 14px; padding: 8px 12px; font-size: 32px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); padding: 20px 14px; font-size: 40px; opacity: 0.8; }
.lightbox__nav--prev { left: 4px; }
.lightbox__nav--next { right: 4px; }

.lightbox__count {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

/* ---------- 5. 오시는 길 ---------- */
.venue__name { margin: 0; font-family: var(--serif); font-size: 18px; }
.venue__address { margin: 4px 0 0; font-size: 14px; }
.venue__tel { margin: 0; font-size: 13px; color: var(--text-soft); }

.map {
  width: calc(100% + var(--gutter) * 2);
  margin: 28px calc(var(--gutter) * -1) 0;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(176, 141, 115, 0.12) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(176, 141, 115, 0.12) 39px 40px),
    var(--accent-soft);
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.6;
}

.map-links {
  width: calc(100% + var(--gutter) * 2);
  margin: 0 calc(var(--gutter) * -1);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.map-links a,
.map-links button {
  padding: 14px 0;
  border: 0;
  background: var(--surface);
  font-size: 13px;
  text-decoration: none;
  color: var(--text);
}

.map-links > * + * { border-left: 1px solid var(--line); }

.transport {
  width: 100%;
  margin-top: 32px;
  text-align: left;
}

.transport__item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.transport__item:last-child { border-bottom: 0; }

.transport h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.transport p { margin: 0; font-size: 14px; line-height: 1.7; }

/* ---------- 6. 마음 전하실 곳 ---------- */
.account__intro {
  margin: -16px 0 32px;
  font-size: 14px;
  color: var(--text-soft);
}

.accordion {
  width: 100%;
  margin-bottom: 12px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(74, 64, 56, 0.06);
  text-align: left;
  overflow: hidden;
}

.accordion summary {
  position: relative;
  padding: 16px 20px;
  list-style: none;
  font-weight: 500;
  cursor: pointer;
}

.accordion summary::-webkit-details-marker { display: none; }

.accordion summary::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--text-soft);
  border-bottom: 1.5px solid var(--text-soft);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.25s ease;
}

.accordion[open] summary::after { transform: translateY(-30%) rotate(-135deg); }

.accordion ul {
  margin: 0;
  padding: 0 20px 8px;
  list-style: none;
  border-top: 1px solid var(--line);
}

.accordion li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
}

.accordion li + li { border-top: 1px dashed var(--line); }

.accordion li div { display: flex; flex-direction: column; line-height: 1.5; }
.accordion li b { font-size: 14px; font-weight: 500; }
.accordion li span { font-size: 13px; color: var(--text-soft); }

.accordion li button {
  flex-shrink: 0;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-size: 12px;
}

/* ---------- 푸터 / 토스트 ---------- */
.footer {
  padding: 56px 0 64px;
  text-align: center;
  background: var(--accent-soft);
}

.share {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 var(--gutter) 40px;
}

.share button {
  padding: 14px 0;
  border: 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
}

.share__kakao { background: #fee500; color: #191919; }
.share__link { background: var(--surface); color: var(--text); }

.footer p { margin: 0; font-family: var(--serif); font-size: 16px; }
.footer small { font-family: var(--display); font-size: 13px; letter-spacing: 0.1em; color: var(--text-soft); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(40, 32, 28, 0.88);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 10;
}

.toast.is-shown {
  opacity: 1;
  transform: translate(-50%, 0);
}
