/* ════════════════════════════════════
   00-base.css — Reset, 변수, 폰트, 공통 애니메이션, 내비게이션
   ════════════════════════════════════ */
@font-face {
  font-family: "Pretendard";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Thin.woff2")
    format("woff2");
  font-weight: 100;
  font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Light.woff2")
    format("woff2");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Regular.woff2")
    format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Medium.woff2")
    format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Bold.woff2")
    format("woff2");
  font-weight: 700;
  font-display: swap;
}
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --bg: #f0ede8;
  --bg2: #e8e4de;
  --paper: #f8f6f2;
  --ink: #1a1714;
  --ink2: #6a6560;
  --rule: rgba(26, 23, 20, 0.1);
  --holo1: #e8d5ff;
  --holo2: #c8e8ff;
  --holo3: #c8f5e8;
  --holo4: #fff5c8;
  --holo5: #ffd5e8;
  --holo: linear-gradient(
    135deg,
    #e8d5ff,
    #c8e8ff,
    #c8f5e8,
    #fff5c8,
    #ffd5e8,
    #e8d5ff
  );
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard", sans-serif;
  font-weight: 300;
  overflow-x: hidden;
}

@keyframes holoFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
@keyframes holoText {
  from {
    background-position: 0%;
  }
  to {
    background-position: 300%;
  }
}
@keyframes cUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 2.5rem;
  transition:
    background 0.4s,
    opacity 0.5s ease;
  opacity: 0;
  pointer-events: none;
}
nav.visible {
  opacity: 1;
  pointer-events: auto;
}
nav.scrolled {
  background: rgba(248, 246, 242, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rule);
}
.nav-left {
  font-size: 1.2rem;
  letter-spacing: 0.25em;
  color: rgba(26, 23, 20, 0.5);
}
.head-logo {
  display: flex;
  align-items: stretch;
  gap: 1rem;
}
#head-logo {
  width: 100%;
  height: auto;
}
#head-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nav-menu {
  position: relative;
  z-index: 2;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 3rem;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--ink2);
}
.nav-menu.visible {
  opacity: 1;
  pointer-events: auto;
}
.nav-menu a {
  font-size: 1rem;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink2);
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  transition: all 0.2s;
}
.nav-menu a:hover {
  color: var(--ink);
}
/* ── 공통 유틸리티 ── */
.content-wrap {
  position: relative;
  z-index: 10;
  background: var(--bg);
}
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── 카드뉴스 모달 (전역 컴포넌트) ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(26, 23, 20, 0.5);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 5rem;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.modal-box {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  width: min(680px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(28px) scale(0.97);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 32px 80px rgba(26, 23, 20, 0.2);
}
.modal-overlay.open .modal-box {
  transform: none;
}
.modal-img-box {
  position: relative;
  width: 100%;
  height: 380px; /* 기본 미리보기 높이 — 이미지 위쪽만 보임 */
  overflow: hidden;
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-img-stack {
  width: 100%;
}
.modal-img-box img {
  width: 100%; /* 항상 모달 너비와 동일 */
  height: auto;
  display: block;
  object-fit: unset; /* 너비를 100%로 채우고, 높이는 비율대로 — 넘치는 아래쪽은 부모의 overflow:hidden이 가림 */
}
.modal-img-expand {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2.5rem 1rem 1rem;
  border: none;
  cursor: pointer;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(26, 23, 20, 0.75) 65%
  );
  color: #fff;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: center;
}
.modal-img-box.expanded {
  height: auto; /* JS가 실제 이미지 높이로 인라인 style을 덮어씀 */
}
.modal-img-box.expanded .modal-img-expand {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(26, 23, 20, 0.55) 100%
  );
}
.modal-body {
  padding: 2rem 2.2rem 2.5rem;
}
.modal-no {
  font-size: 1.2rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #a88db8;
  margin-bottom: 0.5rem;
}
.modal-title {
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.3rem;
}
.modal-type {
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink2);
  margin-bottom: 1rem;
}
.modal-divider {
  height: 1px;
  background: var(--rule);
  margin-bottom: 1rem;
}
.modal-tools {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}
.modal-chip-group{
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-tool-chip {
  font-size: 1rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: 20px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
}
/* modal-tools의 직계 자식으로 오는 chip(카드뉴스 모달처럼 modal-chip-group 없이
   바로 쓰이는 경우)은 flex-direction:column의 기본 stretch 때문에
   부모 너비만큼 늘어나므로, 텍스트 너비만큼만 차지하도록 고정 */
.modal-tools > .modal-tool-chip {
  align-self: flex-start;
}
.modal-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 32px;
  height: 32px;
  background: rgba(26, 23, 20, 0.07);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--ink);
  transition: background 0.2s;
  border-radius: 4px;
  z-index: 5;
}
.modal-close:hover {
  background: rgba(26, 23, 20, 0.14);
}

/* ── 공통 Room 배지(아크릴 액자) — Room A~D 헤더에서 공통 사용 ── */
.room-badge-acrylic {
  flex-shrink: 0;
  width: 150px;
  height: 150px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  outline: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  position: relative;
  box-shadow:
    0 15px 40px rgba(0, 0, 0, 0.08),
    inset 0 2px 2px rgba(255, 255, 255, 0.75),
    inset 0 -2px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}
.rb-screw-tl,
.rb-screw-tr,
.rb-screw-bl,
.rb-screw-br {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, #cfcfcf 55%, #8b8b8b);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.22);
  z-index: 1;
}
.rb-screw-tl {
  top: 5px;
  left: 5px;
}
.rb-screw-tr {
  top: 5px;
  right: 5px;
}
.rb-screw-bl {
  bottom: 5px;
  left: 5px;
}
.rb-screw-br {
  bottom: 5px;
  right: 5px;
}
.rb-sm {
  font-size: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #a88db8;
}
.rb-letter {
  font-size: 5rem;
  font-weight: 600;
  color: #826e8d;
  line-height: 4rem;
}
/* 각 섹션 제목 */

/* ════════════════════════════════════
   room-headers.css — 전 룸 헤더 공통: 홀로그램 그라데이션 텍스트 + 배경 고스트 레터
   ════════════════════════════════════ */

/* 1) 홀로그램 그라데이션 텍스트
   — 제목(*-name) 요소에 class="holo-title" 추가해서 사용 */
.holo-title {
  background: linear-gradient(
    135deg,
    #b088e8,
    #4fa8d8,
    #3fc9a8,
    #d8b23c,
    #e068a8,
    #b088e8
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0.5px rgba(26, 23, 20, 0.25);
  animation: holoFlow 4s ease infinite;
  display: inline-block;
  font-weight: 700;
}

/* room A C E 제목과 캡션 순서와 위치 변경 */

/* ════════════════════════════════════
   room-hdr-zigzag.css — 헤더 지그재그 배치
   ── 기본: 뱃지(좌) + 제목(우), 화면 좌측 정렬
   ── .hdr-right 클래스 추가 시: 제목(좌) + 뱃지(우), 화면 우측 정렬
   ════════════════════════════════════ */

.hdr-right {
  justify-content: flex-end;
}

/* 뱃지를 순서상 뒤로, 정보 블록을 앞으로 */
.hdr-right .room-badge-acrylic {
  order: 2;
}

.hdr-right .ra-info,
.hdr-right .rb-info,
.hdr-right .rc-info,
.hdr-right .rd-info,
.hdr-right .re-info {
  order: 1;
  text-align: right;
}

/* 작업물 개수 표시(span)는 맨 앞으로 보내서 왼쪽 여백 쪽에 배치 */
.hdr-right > span {
  order: 0;
}

/* ── 햄버거 버튼 (기본: 숨김) ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 210;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}
.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── 태블릿 + 모바일 공통 ── */
@media (max-width: 1024px) {
  nav {
    padding: 1.2rem 1.5rem;
  }
  .nav-toggle {
    display: flex;
  }
  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(320px, 80vw);
    background: rgba(248, 246, 242, 0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.6rem;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    box-shadow: -8px 0 30px rgba(26, 23, 20, 0.1);
  }
  .nav-menu.open {
    transform: translateX(0);
  }
  .nav-menu a {
    font-size: 1.1rem;
    padding: 0.5rem 0;
  }
}

@media (max-width: 480px) {
  .head-logo img,
  #head-logo img {
    height: 32px; /* 모바일에서 로고 살짝 축소 */
  }
}