/* ---------- Theme (여기만 바꿔도 분위기가 바뀜) ---------- */
:root {
  --bg: #f3f1ed;       /* 따뜻한 아이보리 그레이 */
  --ink: #2a2a2b;
  --muted: #8b8883;
  --line: #dcd8d1;
  --accent: #7f8c99;   /* 겨울 느낌의 차분한 블루그레이 */
  --serif: 'Cormorant Garamond', serif;
  --sans: 'Jost', sans-serif;
  --gap: 100px;         /* 섹션 위아래 여백: 이 값 하나로 전체 리듬 조절 */
}

/* ---------- Base ---------- */
* { box-sizing: border-box; margin: 0; -webkit-tap-highlight-color: transparent; z-index:1}
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font: 300 15px/1.85 var(--sans); letter-spacing: .02em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body:has(dialog[open]) { overflow: hidden; }   /* 라이트박스 열렸을 때 뒤 스크롤 잠금 */
img, video { display: block; width: 100%; }
p { margin-top: 1.3em; }
hr { border: 0; border-top: 1px solid var(--line); width: 40px; margin: 48px auto; }

section { max-width: 520px; margin: auto; padding: var(--gap) 28px; text-align: center;}
section.wide { max-width: 900px; padding-inline: 14px;}

.eyebrow { font-size: 11px; letter-spacing: .35em; text-transform: uppercase; color: var(--muted); }
h2 { font: 300 36px/1.2 var(--serif); margin-top: .3em; }

.btn {
  display: inline-block; margin-top: 1.8em; padding: 13px 30px;
  border: 1px solid var(--ink); color: var(--ink); text-decoration: none;
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  transition: .4s;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.cal-btns { display: flex; justify-content: center; gap: 12px; margin-top: 1.2em; }
.cal-btns .btn { margin-top: 0; padding-inline: 26px; }

footer {
  padding: 24px 0 calc(64px + env(safe-area-inset-bottom));
  text-align: center; font: italic 300 22px var(--serif); color: var(--muted);
}

/* ---------- Hero ---------- */
 .hero {
  position: relative; height: 100vh; height: 100svh; min-height: 520px; overflow: hidden;
  display: grid; align-items: end; text-align: center; color: #fff;
  clip-path: inset(0);   /* fixed 사진을 hero 영역 안에서만 보이게 자름 (빠른 스크롤에도 뒤에 비치지 않음) */
}
.hero-bg, .hero-img { position: fixed; inset: 0; width: 100%; height: 100%; }
.hero-bg {        /* 뒤: 화면을 꽉 채우고 흐리게 (blur 가장자리가 비지 않게 살짝 키움) */
  object-fit: cover; filter: blur(30px) brightness(.85); transform: scale(1.15);
}
.hero-img {       /* 앞: 확대/크롭 없이 통째로 선명하게. padding 으로 가장자리 여백, 그림자로 살짝 띄움 */
  object-fit: contain; object-position: var(--focus, center);
  padding: clamp(16px, 4vw, 40px);
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .25));
  animation: zoom 12s ease-out both;
}

.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 35%, rgba(20, 22, 26, .6)); z-index:1}
.hero-text { position: relative; z-index: 2; padding-bottom: calc(10vh + env(safe-area-inset-bottom)); }
.hero-text .eyebrow { color: rgba(255, 255, 255, .85); }
.hero h1 { font: 300 clamp(48px, 12vw, 84px)/1.1 var(--serif); margin: .2em 0 .3em; }
.hero h1 em { font-size: .6em; padding: 0 .1em; }
.hero-text > * { animation: up 1.6s ease both; }
.hero-text > :nth-child(2) { animation-delay: .4s; }
.hero-text > :nth-child(3) { animation-delay: .8s; }

@keyframes zoom { from { transform: scale(1.06); } }
@keyframes up   { from { opacity: 0; transform: translateY(20px); } }

main { background: var(--bg);}   /* hero-img(fixed)를 덮는 역할 */

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1.2s ease, transform 1.2s ease; }
.reveal.show { opacity: 1; transform: none; z-index:2}

/* ---------- Video (작고 귀여운 폴라로이드 느낌) ---------- */
video {
  width: min(400px, 90%); margin: auto; background: #e6e2db;
  border: 8px solid #fff; border-radius: 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .12); transform: rotate(-2deg);
  margin-top: 60px;
}

.sound {
  display: block; margin: 28px auto 0; padding: 4px 0; background: none; border: 0;
  border-bottom: 1px solid var(--line); color: var(--muted); cursor: pointer;
  font: 300 11px var(--sans); letter-spacing: .3em; text-transform: uppercase;
}

/* ---------- Gallery (배치는 Masonry가 담당, 칸 수/간격만 여기서) ---------- */
.gallery { --cols: 2; --gut: 8px; margin-top: 32px; }
.gallery .gut { width: var(--gut); }
.gallery .col, .gallery img { width: calc((100% - (var(--cols) - 1) * var(--gut)) / var(--cols)); }
.gallery .col { height: 0; }
.gallery img { margin-bottom: var(--gut); aspect-ratio: auto 2 / 3; background: #e6e2db; cursor: pointer; }
@media (min-width: 720px) { .gallery { --cols: 4; --gut: 12px; } }

/* ---------- Calendar ---------- */
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px 0; margin-top: 28px; font-size: 14px; }
.calendar b { font-weight: 400; font-size: 11px; letter-spacing: .15em; color: var(--muted); }
.calendar span { display: grid; place-items: center; height: 38px; width: 38px; margin: auto; border-radius: 50%; }
.calendar .on { background: var(--accent); color: #fff; animation: pulse 3s ease-in-out infinite; }
.countdown { font: italic 300 22px var(--serif); color: var(--muted); }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(127, 140, 153, .18); } }

/* ---------- Lightbox ---------- */
.lightbox {
  border: 0; padding: 0; width: 100vw; height: 100vh; height: 100dvh;
  max-width: none; max-height: none; background: rgba(20, 22, 26, .95);
}
.lightbox img { height: 100%; object-fit: contain; }
.lightbox button {
  position: fixed; background: none; border: 0; color: #fff; font-size: 34px; line-height: 1;
  width: 56px; height: 56px; cursor: pointer;
}
.lightbox [data-go="-1"] { left: 0; top: calc(50% - 28px); }
.lightbox [data-go="1"]  { right: 0; top: calc(50% - 28px); }
.lightbox [data-go="0"]  { right: 0; top: env(safe-area-inset-top); font-size: 22px; }

/* ---------- 모션 줄이기 설정 존중 ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}