/* =========================================================
   포토페이지 — 날짜별 타임라인 + 그리드 + 라이트박스
   ========================================================= */

/* ---------- page intro ---------- */
.photos-intro {
  padding-top: clamp(36px, 5vw, 60px);
  padding-bottom: clamp(24px, 3vw, 36px);
  background: radial-gradient(110% 80% at 90% -20%, var(--primary-soft) 0%, rgba(234, 242, 246, 0) 55%);
  border-bottom: 1px solid var(--line-soft);
}
.photos-intro__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.photos-intro h1 {
  font-size: clamp(2rem, 4.4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin-top: 14px;
}
.photos-intro p {
  color: var(--ink-soft);
  margin-top: 14px;
  max-width: 52ch;
  text-wrap: pretty;
}
.photos-intro__stat {
  display: flex;
  gap: 28px;
  padding: 16px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--sh-sm);
}
.photos-intro__stat div b {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--primary-deep);
  line-height: 1;
}
.photos-intro__stat div span {
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-weight: 600;
}

/* ---------- event list (목록 카드) ---------- */
.event-list {
  padding-top: clamp(26px, 4vw, 40px);
  padding-bottom: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(18px, 2.4vw, 26px);
}
.event-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.event-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--sh-lg);
  border-color: transparent;
}
.event-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
}
.event-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.event-card:hover .event-card__media img {
  transform: scale(1.05);
}
.event-card__date {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 9px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  box-shadow: var(--sh-sm);
  line-height: 1.05;
}
.event-card__date .d {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.event-card__date .w {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-deep);
}
.event-card__count {
  position: absolute;
  bottom: 14px;
  right: 14px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: rgba(13, 28, 35, 0.62);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}
.event-card__body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}
.event-card__body h3 {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.event-card__body .place {
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.event-card__foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
}
.event-card__foot svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}
.event-card:hover .event-card__foot svg {
  transform: translateX(3px);
}

/* ---------- event detail hero ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-soft);
  transition: color 0.15s ease, gap 0.15s ease;
}
.back-link:hover {
  color: var(--primary);
  gap: 10px;
}
.back-link svg {
  width: 17px;
  height: 17px;
}
.event-hero {
  padding-top: clamp(20px, 3vw, 30px);
}
.event-hero__head {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px 22px;
}
.event-hero__date {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.event-hero__date .d {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
}
.event-hero__date .y {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-faint);
}
.event-hero__date .w {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-deep);
}
.event-hero__tags {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 6px;
}
.event-hero__place {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.event-hero__place svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}
.event-hero__note {
  color: var(--ink-soft);
  font-size: 1.02rem;
  margin-top: 18px;
  max-width: 64ch;
  text-wrap: pretty;
}
.event-hero__count {
  margin-top: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-faint);
}

/* ---------- event prev/next nav ---------- */
.event-nav {
  margin-top: clamp(40px, 6vw, 70px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.event-nav a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 46%;
}
.event-nav a.is-next {
  text-align: right;
  margin-left: auto;
  align-items: flex-end;
}
.event-nav .dir {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}
.event-nav .ttl {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  transition: color 0.15s ease;
}
.event-nav a:hover .ttl {
  color: var(--primary);
}
.event-nav .disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ---------- timeline (legacy, single-page) ---------- */
.timeline {
  padding-top: clamp(20px, 3vw, 30px);
  padding-bottom: 40px;
}

.day {
  margin-bottom: clamp(40px, 6vw, 68px);
}

/* sticky date header */
.day__header {
  position: sticky;
  top: var(--nav-h);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.day__date {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex: none;
}
.day__date .d {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}
.day__date .y {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink-faint);
}
.day__date .w {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent-deep);
}
.day__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}
.day__place {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.day__place svg {
  width: 15px;
  height: 15px;
  color: var(--primary);
  flex: none;
}
.day__count {
  margin-left: auto;
  flex: none;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-faint);
}

.day__note {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 18px;
  max-width: 64ch;
  text-wrap: pretty;
}

/* uniform photo grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 1.4vw, 16px);
}
.tile {
  position: relative;
  margin: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  cursor: zoom-in;
  box-shadow: var(--sh-sm);
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.tile:hover img {
  transform: scale(1.06);
}
.tile__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 12px 14px;
  background: linear-gradient(to top, rgba(13, 28, 35, 0.62) 0%, rgba(13, 28, 35, 0) 46%);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.tile:hover .tile__overlay,
.tile:focus-visible .tile__overlay {
  opacity: 1;
}
.tile__cap {
  color: #fff;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.tile__zoom {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  place-items: center;
  color: var(--ink);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.tile:hover .tile__zoom {
  opacity: 1;
  transform: scale(1);
}
.tile__zoom svg {
  width: 16px;
  height: 16px;
}

/* reveal for tiles (stagger via inline delay) */
.tile.reveal {
  transform: translateY(16px) scale(0.99);
}
.tile.reveal.is-in {
  transform: none;
}

/* ---------- back to top ---------- */
.to-top {
  position: fixed;
  right: clamp(16px, 3vw, 30px);
  bottom: clamp(16px, 3vw, 30px);
  z-index: 40;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--primary-deep);
  display: grid;
  place-items: center;
  box-shadow: var(--sh-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.to-top.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.to-top:hover {
  color: #fff;
  background: var(--primary);
}
.to-top svg {
  width: 22px;
  height: 22px;
}

/* ---------- lightbox ---------- */
.lb {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 3vw, 40px);
  background: rgba(11, 22, 27, 0.9);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}
.lb.open {
  opacity: 1;
  visibility: visible;
}
.lb__stage {
  position: relative;
  max-width: min(1100px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.lb__imgwrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: calc(100vh - 150px);
  transform: scale(0.96);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.lb.open .lb__imgwrap {
  transform: scale(1);
}
.lb__img {
  max-width: 100%;
  max-height: calc(100vh - 150px);
  width: auto;
  height: auto;
  border-radius: var(--r-md);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  background: #1a2b33;
  transition: opacity 0.2s ease;
}
.lb__caption {
  text-align: center;
  color: #eaf1f4;
  max-width: 60ch;
}
.lb__caption .meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #b9ccd4;
  margin-bottom: 6px;
}
.lb__caption .meta .badge {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.lb__caption p {
  font-size: 0.96rem;
  color: #dce6ea;
}
.lb__count {
  font-size: 0.8rem;
  color: #8fa6af;
  margin-top: 2px;
}

/* lightbox controls */
.lb__btn {
  position: absolute;
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  display: grid;
  place-items: center;
  transition: background 0.18s ease, transform 0.18s ease;
}
.lb__btn:hover {
  background: rgba(255, 255, 255, 0.28);
}
.lb__btn svg {
  width: 24px;
  height: 24px;
}
.lb__close {
  top: -2px;
  right: -2px;
  position: fixed;
  top: clamp(14px, 3vw, 26px);
  right: clamp(14px, 3vw, 26px);
}
.lb__prev,
.lb__next {
  top: 50%;
  transform: translateY(-50%);
}
.lb__prev {
  left: clamp(6px, 2vw, 18px);
}
.lb__next {
  right: clamp(6px, 2vw, 18px);
}
.lb__prev:hover {
  transform: translateY(-50%) scale(1.08);
}
.lb__next:hover {
  transform: translateY(-50%) scale(1.08);
}

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .day__count {
    width: 100%;
    margin-left: 0;
    order: 3;
  }
}
@media (max-width: 460px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .lb__prev {
    left: 4px;
  }
  .lb__next {
    right: 4px;
  }
  .lb__btn {
    width: 42px;
    height: 42px;
  }
}
