/* ========================================
   김기원 & 이서영 웨딩 초대장 스타일시트
   ======================================== */

/* CSS 변수 */
:root {
  --color-bg: #fffbee;
  --color-bg-alt: #f5efe6;
  --color-text: #5c4b34;
  --color-text-light: #a38e75;
  --color-accent: #8b7355;
  --color-btn-bg: #5c4b34;
  --color-btn-text: #fffbee;
  --color-border: #d4c5b0;

  --font-serif: 'Noto Serif KR', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Pretendard', sans-serif;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.wrapper {
  max-width: 480px;
  margin: 0 auto;
  background-color: var(--color-bg);
}

/* ========================================
   1. 메인 비주얼 (Hero)
   ======================================== */
.hero {
  position: relative;
  text-align: center;
  padding: 0;
}

.hero-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.hero-image .placeholder-image {
  width: 100%;
  height: 100%;
}

.hero-content {
  padding: 2rem 1.5rem;
}

.hero-date {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--color-text-light);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.hero-names {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 400;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.hero-names .amp {
  font-size: 1.2rem;
  color: var(--color-accent);
}

/* ========================================
   공통 섹션 스타일
   ======================================== */
section {
  padding: 3rem 0;
}

.section-content {
  padding: 0 1.5rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 500;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--color-text);
  letter-spacing: 0.05em;
}

/* 플레이스홀더 이미지 */
.placeholder-image {
  background: linear-gradient(135deg, var(--color-border) 0%, #e8dfd0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 0.9rem;
}

/* ========================================
   2. 인사말
   ======================================== */
.greeting {
  background-color: var(--color-bg);
}

.greeting-message {
  text-align: center;
  font-size: 0.95rem;
  line-height: 2;
  color: var(--color-text);
  margin-bottom: 2rem;
}

.parents-info {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.parents-line {
  font-size: 0.9rem;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.3rem;
}

.parents-line .child-name {
  font-weight: 500;
}

/* ========================================
   3. 캘린더
   ======================================== */
.calendar-section {
  background-color: var(--color-bg-alt);
}

.wedding-datetime {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: 1.5rem;
}

.calendar {
  background: var(--color-bg);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.calendar-header {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  text-align: center;
}

.calendar-day-name {
  font-size: 0.75rem;
  color: var(--color-text-light);
  padding: 0.5rem 0;
}

.calendar-day-name:first-child {
  color: #c76b6b;
}

.calendar-day-name:last-child {
  color: #6b8bc7;
}

.calendar-day {
  font-size: 0.85rem;
  color: var(--color-text);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-day.empty {
  visibility: hidden;
}

.calendar-day.sunday {
  color: #c76b6b;
}

.calendar-day.saturday {
  color: #6b8bc7;
}

.calendar-day.wedding-day {
  background: var(--color-accent);
  color: var(--color-btn-text);
  border-radius: 50%;
  font-weight: 600;
  position: relative;
}

.dday-counter {
  text-align: center;
}

.dday-text {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--color-accent);
  font-weight: 500;
}

/* ========================================
   4. 갤러리
   ======================================== */
.gallery-section {
  background-color: var(--color-bg);
  padding-bottom: 2rem;
}

.gallery-slider {
  width: 100%;
  overflow: hidden;
  margin-bottom: 1rem;
}

.gallery-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  aspect-ratio: 1;
}

.gallery-slide .placeholder-image {
  width: 100%;
  height: 100%;
}

.gallery-thumbnails {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.thumb {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--color-border);
  cursor: pointer;
  transition: all 0.3s ease;
}

.thumb.active {
  background: var(--color-accent);
  transform: scale(1.2);
}

/* ========================================
   5. 연락처
   ======================================== */
.contact-section {
  background-color: var(--color-bg-alt);
}

.contact-group {
  margin-bottom: 1.5rem;
}

.contact-group:last-child {
  margin-bottom: 0;
}

.contact-group-title {
  font-size: 0.85rem;
  color: var(--color-text-light);
  text-align: center;
  margin-bottom: 1rem;
  font-weight: 400;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-bg);
  padding: 0.75rem 1rem;
  border-radius: 8px;
}

.contact-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-role {
  font-size: 0.8rem;
  color: var(--color-text-light);
  min-width: 2.5rem;
}

.contact-name {
  font-size: 0.95rem;
  color: var(--color-text);
}

.contact-buttons {
  display: flex;
  gap: 0.5rem;
}

.contact-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.contact-btn:hover {
  background: var(--color-accent);
  color: var(--color-btn-text);
  border-color: var(--color-accent);
}

.contact-btn svg {
  width: 18px;
  height: 18px;
}

/* ========================================
   6. 오시는 길
   ======================================== */
.location-section {
  background-color: var(--color-bg);
}

.venue-info {
  text-align: center;
  margin-bottom: 1.5rem;
}

.venue-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.venue-address {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.map-container {
  margin-bottom: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  height: 300px;
}

.map-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
}

.nav-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s ease;
  min-width: 80px;
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-logo {
  width: 28px;
  height: 28px;
}

/* 네이버지도 */
.nav-btn.naver {
  background: #03c75a;
  color: #fff;
}

.nav-btn.naver:hover {
  background: #02b351;
}

/* 카카오맵 */
.nav-btn.kakao {
  background: #fee500;
  color: #191919;
}

.nav-btn.kakao:hover {
  background: #e6cf00;
}

/* 티맵 */
.nav-btn.tmap {
  background: #1c6ef2;
  color: #fff;
}

.nav-btn.tmap:hover {
  background: #1560d9;
}

/* ========================================
   7. 마음 전하실 곳
   ======================================== */
.account-section {
  background-color: var(--color-bg-alt);
}

.account-desc {
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
}

.accordion {
  background: var(--color-bg);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  border: none;
  font-size: 0.95rem;
  color: var(--color-text);
  cursor: pointer;
  font-family: inherit;
}

.accordion-icon {
  font-size: 1.2rem;
  color: var(--color-accent);
  transition: transform 0.3s ease;
}

.accordion.open .accordion-icon {
  transform: rotate(45deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion.open .accordion-content {
  max-height: 500px;
}

.account-list {
  padding: 0 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.account-item {
  padding: 1rem;
  background: var(--color-bg-alt);
  border-radius: 8px;
}

.account-label {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
}

.account-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.account-info {
  font-size: 0.9rem;
  color: var(--color-text);
}

.account-bank {
  font-weight: 500;
}

.copy-btn {
  padding: 0.4rem 0.8rem;
  background: var(--color-btn-bg);
  color: var(--color-btn-text);
  border: none;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: opacity 0.2s ease;
  font-family: inherit;
}

.copy-btn:hover {
  opacity: 0.8;
}

/* ========================================
   8. 공유하기
   ======================================== */
.share-section {
  background-color: var(--color-bg);
  padding-bottom: 2rem;
}

.share-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: opacity 0.2s ease;
  font-family: inherit;
}

.share-btn:hover {
  opacity: 0.9;
}

.share-btn.kakao-share {
  background: #fee500;
  color: #191919;
}

.share-btn.link-copy {
  background: var(--color-btn-bg);
  color: var(--color-btn-text);
}

/* ========================================
   푸터
   ======================================== */
.footer {
  padding: 2rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--color-border);
}

.footer p {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: var(--color-text-light);
  font-style: italic;
}

/* ========================================
   Toast 메시지
   ======================================== */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--color-btn-bg);
  color: var(--color-btn-text);
  padding: 0.75rem 1.5rem;
  border-radius: 24px;
  font-size: 0.9rem;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ========================================
   스크롤 애니메이션
   ======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   반응형 (모바일 최적화)
   ======================================== */
@media (max-width: 360px) {
  html {
    font-size: 14px;
  }
}

@media (min-width: 481px) {
  .wrapper {
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
    margin: 2rem auto;
    border-radius: 16px;
    overflow: hidden;
  }
}
