@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@1.3.9/dist/web/static/pretendard.css");
@import url("https://fonts.googleapis.com/css2?family=Nanum+Myeongjo:wght@400;700;800&display=swap");

:root {
  --lime: #bfff00;
  --ink: #050505;
  --muted: #8a8a8a;
  --line: #e8e8e8;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html:not(:has(body.detail-page)):not(:has(body.works-page)) { scroll-snap-type: y mandatory; }
.hero, .work, .services { scroll-snap-align: start; scroll-snap-stop: normal; }
body {
  margin: 0; color: var(--ink); background: #fff;
  font-family: "Pretendard", -apple-system, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-weight: 400; -webkit-font-smoothing: antialiased;
  word-break: keep-all; overflow-wrap: break-word;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
svg { display: block; }

/* ===== 좌하단 고정 전화 버튼 (전 섹션 공통) ===== */
.call-fab {
  position: fixed; left: 24px; bottom: 24px; z-index: 30;
  width: 56px; height: 56px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(0,0,0,.18); transition: transform .2s;
}
.call-fab:hover { transform: scale(1.08); }
.call-fab svg { width: 22px; height: 22px; color: var(--ink); }

/* ===== 연락처 팝업 ===== */
.contact-modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 20, 5, .6); backdrop-filter: blur(2px);
  display: none; align-items: flex-end; justify-content: flex-start; z-index: 100; padding: 24px;
}
.contact-modal-overlay.open { display: flex; }
.contact-modal { background: #fff; width: min(720px, 100%); padding: 48px; position: relative; }
.contact-modal-close {
  position: absolute; top: 20px; right: 20px; width: 36px; height: 36px;
  border: 2px solid var(--ink); background: none; color: var(--ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.contact-modal-close:hover { background: var(--ink); color: #fff; }
.contact-modal h3 { font-size: 20px; font-weight: 400; margin: 0 0 40px; }
.contact-modal h3 strong { font-weight: 900; }
.contact-modal-body { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.contact-modal-phone {
  display: flex; align-items: center; gap: 14px; background: #000; color: #fff;
  padding: 18px 32px; font-size: 22px; font-weight: 900; text-decoration: none; flex-shrink: 0;
}
.contact-modal-phone svg { width: 20px; height: 20px; }
.contact-modal-address { font-size: 15px; font-weight: 400; line-height: 1.7; color: var(--ink); }

/* ===== 스크롤 화살표 버튼 ===== */
.scroll-btn {
  border: 5px solid var(--ink); border-radius: 50%; display: flex; align-items: center;
  justify-content: center; color: var(--ink); flex-shrink: 0; transition: background .2s, color .2s;
}
.scroll-btn:hover { background: var(--ink); color: var(--lime); }
.scroll-btn-lg { width: 96px; height: 96px; }
.scroll-btn-lg svg { width: 50px; height: 50px; }
.scroll-btn-sm { width: 34px; height: 34px; }
.scroll-btn-sm svg { width: 16px; height: 16px; }

/* ===== 히어로 : 라임 배경, 2줄 회전 헤드라인 ===== */
.hero {
  position: relative; background: var(--lime); height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; justify-content: center; padding: 8vh 5vw 12vh;
  overflow: hidden;
}
.hero-lines { position: relative; }
.rotating-headline {
  font-size: clamp(48px, 12vw, 200px); font-weight: 900; letter-spacing: -7px;
  line-height: .8; margin: 0; color: var(--ink); overflow: hidden; white-space: nowrap;
  width: max-content;
}
.rotating-headline.line2 { padding-left: 20vw; }
.rotating-headline .word { display: block; }
.rotating-headline.anim-drop .word { animation: dropIn .65s cubic-bezier(.2,.8,.2,1); }
.rotating-headline.anim-slide .word { animation: slideIn .65s cubic-bezier(.2,.8,.2,1); }
@keyframes dropIn { from { opacity: 0; transform: translateY(-38px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-38px); } to { opacity: 1; transform: translateX(0); } }

.hero-copy {
  position: absolute; right: 5vw; top: 30%; max-width: 320px; text-align: left;
}
.hero-copy p { font-size: 12.5px; line-height: 1.65; margin: 0 0 14px; color: #14140f; }
.hero-copy-strong { font-size: 18px; font-weight: 400; font-variant: jis90; }
.hero-copy-strong strong { font-weight: 900; }

/* line2("PLANNING")는 2줄짜리 헤드라인의 아래쪽 절반 — %는 폰트 크기가 반응형으로
   바뀌어도 항상 line2 기준 위치를 유지한다 */
.hero-lines .scroll-btn-lg { position: absolute; top: 75%; left: 95%; transform: translate(-50%, -50%); }

.hero-subnav {
  position: absolute; top: 55%; left: 5vw;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center;
}
.hero-subnav .t1 { font-size: 20px; font-weight: 900; }
.hero-subnav .t2 { font-size: 14px; font-weight: 700; color: #4c5a10; }

/* ===== 포트폴리오 (블랙) ===== */
.work {
  background: #000; color: #fff; padding: 56px 0 100px; height: 100vh; height: 100dvh; box-sizing: border-box; overflow: hidden;
  display: flex; flex-direction: column;
}
.work-head {
  display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 32px;
  margin-bottom: 40px; padding: 56px 5vw 100px;
}
.work-tagline-top { font-size: 16px; margin-bottom: 18px; color: #eee; }
.work-tagline-top strong { font-weight: 900; color: #fff; }
.work-logo { height: 60px; width: auto; margin-bottom: 12px; }
.work-tagline { font-size: 15px; font-weight: 700; color: var(--lime); }

.work-right { display: flex; flex-direction: column; align-items: flex-end; gap: 24px; width: 50%; }
.work-nav { display: flex; gap: 10px; }
.work-nav-item {
  display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700;
  padding: 10px 18px; border: 1px solid #fff; color: #fff;
}
.work-nav-item .icon-box {
  width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
  border: 1px solid #fff; font-size: 13px; line-height: 1;
}
.work-nav-item.active { background: #fff; color: #000; border-color: #fff; }
.work-nav-item.active .icon-box { background: #000; color: #fff; border-color: #000; }

.work-filters {
  width: 100%;
  /* max-width: 340px; */
}
.filter {
  display: block; width: 100%; text-align: left; background: none; border: none;
  border-bottom: 1px solid #2c2c2c; color: #fff; font-size: 12px; font-weight: 700;
  padding: 7px 4px; cursor: pointer; letter-spacing: .04em; transition: color .15s;
}
.filter:hover { color: var(--lime); }
.filter.active { color: var(--lime); }

/* 홈 포트폴리오 캐러셀: 드래그/자동슬라이드 — 데스크톱 8개 / 태블릿 4개 / 모바일 2개씩 보임 */
.grid {
  display: flex; gap: 20px; margin: auto 0 0; padding: 0; width: 100%;
  overflow-x: auto; scroll-behavior: smooth; cursor: grab;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; -ms-overflow-style: none;
  user-select: none;
}
.grid::-webkit-scrollbar { display: none; }
.grid.dragging { cursor: grabbing; scroll-behavior: auto; }
.grid .card { flex: 0 0 calc((100% - 7 * 20px) / 8); min-width: 0; }

/* 스크롤 시 좌우 끝에 잘려서 보이는 카드는 텍스트 숨김 (JS가 .peek 부여) */
.grid .card.peek .name,
.grid .card.peek .date {
  display: none;
}
@media (max-width: 1024px) {
  .grid .card { flex-basis: calc((100% - 3 * 20px) / 4); }
}
@media (max-width: 640px) {
  .grid .card { flex-basis: calc((100% - 1 * 20px) / 2); }
}
.card { display: block; }
.card .thumb { width: 100%; aspect-ratio: 3 / 4; background: #111; overflow: hidden; margin-bottom: 12px; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card:hover .thumb img { transform: scale(1.05); }
.card .name {
  font-size: 13px; font-weight: 700; color: #fff; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .2s;
}
.card:hover .name { color: var(--lime); }
.card .date { font-size: 11px; color: #999; margin-top: 6px; }
.empty { color: #999; font-size: 14px; padding: 40px 0; }

/* ===== 서비스 (라임) ===== */
.services { background: var(--lime); padding: 90px 5vw 110px; height: 100vh; height: 100dvh; box-sizing: border-box; display: flex; flex-direction: column; overflow: hidden; }
.services-title {
  font-size: clamp(44px, 9vw, 200px); font-weight: 900; letter-spacing: -6px;
  line-height: .80; margin: -100px 0 120px; text-align: center;
}
.services-title span { display: block; }

.services-cols {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 60px;
  margin-top: auto; margin-bottom: auto;
}
.services-spacer { grid-column: span 2; }
.hatch {
  width: 70px; height: 12px; margin-bottom: 16px;
  background-image: repeating-linear-gradient(-45deg, var(--ink) 0 2px, transparent 2px 6px);
}
.services-cols h3 { font-size: 30px; font-weight: 900; margin: 0 0 12px; letter-spacing: -0.5px; }
.services-cols .lead { font-size: 15px; font-weight: 700; margin: 0 0 16px; }
.services-cols .body { font-size: 13.5px; line-height: 1.6; color: #1c1c14; margin: 0 0 24px; font-weight: 500; }
.btn-outline {
  display: inline-block; border: 1px solid var(--ink); padding: 12px 28px;
  font-size: 12px; font-weight: 700; letter-spacing: .05em; transition: background .2s, color .2s;
}
.btn-outline:hover { background: var(--ink); color: var(--lime); }

.do-item { margin-bottom: 22px; }
.do-item b { display: block; font-size: 14px; font-weight: 900; margin-bottom: 6px; }
.do-item p { font-size: 13.5px; line-height: 1.6; color: #1c1c14; margin: 0; }

/* ===== 스크롤 리빌 ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ===== 푸터 ===== */
.site-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 5vw; background: #000; color: #fff; font-size: 13px;
  scroll-snap-align: start;
}
.footer-logo { height: 22px; }
.footer-center { text-align: center; }
.footer-copyright { font-size: 12px; color: #ccc; }
.footer-credit { font-size: 12px; font-weight: 700; margin-top: 3px; }
.footer-right { display: flex; align-items: center; gap: 24px; font-size: 13px; font-weight: 700; }
.footer-right a { color: #fff; }
.footer-right a:hover { color: var(--lime); }

.footer-nav {
  display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: 10px 24px; overflow: hidden;
  max-width: 0; opacity: 0; transform: translateX(-16px);
  transition: max-width .45s cubic-bezier(.2,.8,.2,1), opacity .3s ease, transform .35s ease;
}
.footer-nav a { white-space: nowrap; }
.footer-nav.open { flex-wrap: wrap; max-width: 640px; opacity: 1; transform: translateX(0); }
.admin-only-link { display: none; }
.admin-only-link.show { display: inline; }

.theme-toggle {
  width: 46px; height: 24px; border-radius: 12px; background: #333; border: none;
  cursor: pointer; position: relative; padding: 0; flex-shrink: 0; transition: background .2s;
}
.theme-toggle .knob {
  position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; transition: transform .2s, background .2s;
}
.theme-toggle.on { background: var(--lime); }
.theme-toggle.on .knob { transform: translateX(22px); background: #000; }

@media (max-width: 600px) {
  .site-footer { flex-direction: column; text-align: center; }
}

/* ===== 태블릿/모바일 공통: 절대배치 요소를 흐름 안으로 내려서 겹침 방지 ===== */
@media (max-width: 1024px) {
  .rotating-headline.line2 { padding-left: 0; }
  .hero { padding-top: 12vh; padding-bottom: 8vh; }
  .hero-lines { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
  .hero-copy {
    position: static; margin-top: 32px; text-align: left; max-width: 100%;
  }
  .hero-subnav {
    position: static; margin-top: 28px; align-items: flex-start; text-align: left;
  }
  .hero .scroll-btn-lg { display: none; }

  .work-head { padding-top: 40px; padding-bottom: 40px; }
  .work-right { width: 100%; align-items: flex-start; }
  .work-nav { flex-wrap: wrap; }

  .services-cols { grid-template-columns: 1fr 1fr; gap: 40px; }
  .services-spacer { display: none; }
  .services-title { margin: -40px 0 60px; }

  .rotating-headline { letter-spacing: -3px; }
  .services-title { letter-spacing: -3px; }

  .grid { padding-left: 20px; padding-right: 20px; }
}

@media (max-width: 640px) {
  .hero, .work, .services {
    height: auto; min-height: 100vh; min-height: 100dvh; overflow: visible;
  }

  .services-cols { grid-template-columns: 1fr; gap: 48px; }
  .services-title { margin: 0 0 40px; }
  .work-nav-item { flex: 1 1 auto; justify-content: center; }
  .contact-modal { padding: 32px 24px; }
  .contact-modal-body { flex-direction: column; align-items: flex-start; gap: 16px; }

  .rotating-headline { letter-spacing: -1px; }
  .services-title { letter-spacing: -1px; }

  .grid { padding-left: 20px; padding-right: 20px; }
}

/* ===== 상세 페이지: 막이 오르다 ===== */
:root {
  --gold: #d9a85c;
  --wine: #0d0c0c;
  --dline: rgba(217,168,92,.25);
  --dmuted: #b79c92;
  --curtain-radius: 32px;
}
body.detail-page { background: var(--ink); color: #fff; }
.serif { font-family: "Nanum Myeongjo", serif; }
.dlabel { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }

.back-link { position: absolute; z-index: 3; top: 26px; left: 5vw; font-size: 12px; color: #fff; text-decoration: none; opacity: .8; }
.back-link:hover { opacity: 1; }

/* ===== 포트폴리오 전체보기 (works.html) ===== */
body.works-page { background: var(--ink); color: #fff; }
.works-wrap { padding-top: 76px; }
.works-head { padding: 24px 5vw 24px; }
.works-head h1 { font-size: clamp(32px, 5vw, 56px); font-weight: 900; letter-spacing: -.02em; margin: 0 0 26px; }
.works-filters { display: flex; gap: 26px; flex-wrap: wrap; border-bottom: 1px solid #2c2c2c; padding-bottom: 16px; }
.works-filters .filter { display: inline-block; width: auto; border-bottom: none; padding: 4px 0; }
.works-grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 32px 20px;
  padding: 36px 5vw 0;
}
@media (max-width: 1399px) { .works-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1023px) { .works-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 639px) { .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.works-empty { grid-column: 1 / -1; color: #999; font-size: 14px; padding: 60px 0; text-align: center; }
.works-more-wrap { display: flex; justify-content: center; padding: 56px 5vw 100px; }
.works-more-btn {
  background: none; border: 1px solid #fff; color: #fff; font-size: 12px; font-weight: 700;
  letter-spacing: .05em; padding: 14px 44px; cursor: pointer; transition: background .15s, color .15s;
}
.works-more-btn:hover { background: #fff; color: #000; }

.hero-fixed { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--ink); }
.hero-fixed img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; transform: scale(1.04); }
.hero-fixed::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(ellipse 70% 55% at 50% 38%, rgba(5,5,5,0) 0%, rgba(5,5,5,.55) 72%, rgba(5,5,5,.92) 100%);
}
.hero-fixed::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(5,5,5,.5) 0%, rgba(5,5,5,0) 24%, rgba(5,5,5,0) 60%, rgba(5,5,5,.9) 100%);
}
.stage-copy { position: absolute; z-index: 2; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; text-align: center; padding: 0 6vw 12vh; }
.hero-eyebrow { color: var(--gold); margin-bottom: 22px; }
.hero-title { font-weight: 800; color: #fff; font-size: clamp(32px,6vw,50px); line-height: 1.15; margin: 0; text-wrap: balance; word-break: keep-all; overflow-wrap: normal; }
.scroll-cue { position: absolute; z-index: 2; left: 50%; bottom: 5vh; transform: translateX(-50%); font-size: 11px; letter-spacing: .15em; color: var(--dmuted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.scroll-cue span { width: 1px; height: 34px; background: linear-gradient(var(--gold), transparent); }

.curtain { position: relative; z-index: 2; margin-top: 94vh; background: var(--wine); border-radius: var(--curtain-radius) var(--curtain-radius) 0 0; box-shadow: 0 -60px 120px rgba(0,0,0,.55); }
.curtain-trim { height: 8px; background: repeating-linear-gradient(90deg, var(--gold) 0 2px, transparent 2px 26px); opacity: .5; border-radius: var(--curtain-radius) var(--curtain-radius) 0 0; }

.playbill { max-width: 720px; margin: 0 auto; padding: 72px 6vw 40px; }
.playbill .dlabel { color: var(--gold); margin-bottom: 14px; }
.meta-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; padding: 24px 0; border-top: 1px solid var(--dline); border-bottom: 1px solid var(--dline); margin-bottom: 44px; }
.meta-row div .dlabel { margin-bottom: 8px; color: var(--gold); }
.meta-row div .v { font-size: 14px; color: #fff; }
.program-note { font-size: 15px; line-height: 2; color: #e4d6c8; margin: 0; }
.program-note p { margin: 0 0 1.6em; }
.program-note p:last-child { margin-bottom: 0; }
.program-note p.lang-gap { margin-top: 1.6em; }

.dgallery { padding-bottom: 10px; }
.dstage-full { width: 100%; margin: 44px 0; }
.dstage-full img { width: 100%; height: auto; display: block; }

/* 벽돌식 배치: 줄(mrow) 높이만 맞추고 폭은 원본 비율대로 — 크롭 없이 전체를 보여준다.
   클러스터마다 1줄/2줄 구성을 번갈아 섞는다. */
.mosaic { display: flex; flex-direction: column; gap: 16px; max-width: 1200px; margin: 64px auto; padding: 0 6vw; }
.mrow { display: flex; gap: 16px; align-items: flex-start; }
.mrow img { flex: 1 1 0; min-width: 0; width: 100%; height: auto; box-shadow: 0 20px 50px rgba(0,0,0,.4); display: block; }

.curtain-close { max-width: 640px; margin: 0 auto; padding: 60px 6vw 20px; text-align: center; }
.curtain-close .fin { font-size: 12px; letter-spacing: .3em; color: var(--gold); text-transform: uppercase; }

.detail-nav { max-width: 1000px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 32px 6vw 60px; border-top: 1px solid var(--dline); font-size: 13px; }
.detail-nav a { color: var(--dmuted); text-decoration: none; }
.detail-nav a:hover { color: var(--gold); }
.detail-nav-all { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--dline); border-radius: 50%; transition: border-color .15s, color .15s; }
.detail-nav-all:hover { border-color: var(--gold); }

.detail-edit-bar { max-width: 1000px; margin: 0 auto; padding: 0 6vw 60px; text-align: center; }
.edit-btn.admin-only-link.show { display: inline-flex; }
.edit-btn { align-items: center; gap: 6px; border: 1px solid var(--gold); color: var(--gold); text-decoration: none; font-size: 12.5px; letter-spacing: .04em; padding: 10px 22px; border-radius: 999px; transition: background .15s, color .15s; }
.edit-btn:hover { background: var(--gold); color: #000; }

.site-footer { position: relative; z-index: 2; }

@media (max-width: 760px) {
  .meta-row { grid-template-columns: repeat(2,1fr); }
  .dstage-pair { grid-template-columns: 1fr; }
  .hero-fixed img { object-position: 50% 50%; }
}
