/* ==========================================================================
   MOODWITH — 무드윗
   소극장(밍글 소극장)에서 열리는 소셜 프로그램 브랜드.
   컨셉: 객석의 어둠 + 무대 조명. 티켓/플레이빌 모티프.

   구성
     1. 디자인 토큰
     2. 리셋 · 베이스
     3. 레이아웃 프리미티브 (.wrap / .section)
     4. 타이포그래피 역할
     5. 버튼
     6. 컴포넌트 (등장 순서대로)
     7. 페이지 푸터

   규칙
     - 스타일은 전부 클래스로. HTML inline style 금지 (사진 경로 같은 데이터 제외).
     - 컨텍스트에 따라 달라지는 마진은 컨텍스트 쪽에 스코프해서 정의.
     - 파생 값(티켓 절취선 위치 등)은 CSS 변수로 한 곳에서만 조정.
   ========================================================================== */

/* --- 1. 디자인 토큰 ------------------------------------------------------- */

:root {
  --bg: #1a1317;          /* 암전 — 따뜻한 자흑색 */
  --stage: #241a20;       /* 무대 — 살짝 밝은 면 */
  --stage-2: #2c2027;
  --ivory: #f1e9e0;       /* 상아 — 본문 */
  --muted: #a99a94;       /* 침묵 — 보조 텍스트 */
  --amber: #dfa15c;       /* 조명 — 주 강조 */
  --amber-soft: rgba(223, 161, 92, 0.14);
  --rose: #c9767f;        /* 장미 — 보조 강조 */
  --line: rgba(241, 233, 224, 0.14);
  --line-soft: rgba(241, 233, 224, 0.08);

  --serif-kr: "Noto Serif KR", "Nanum Myeongjo", serif;
  --caps-en: "Marcellus", "Times New Roman", serif;
  --body: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo",
    "Malgun Gothic", sans-serif;

  --wrap: 600px;
}

/* --- 2. 리셋 · 베이스 ------------------------------------------------------ */

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  background: var(--bg);
  color: var(--ivory);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; letter-spacing: inherit; color: inherit; cursor: pointer; }

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

/* --- 3. 레이아웃 프리미티브 ------------------------------------------------ */

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding-block: 72px; }
.section + .section { border-top: 1px solid var(--line-soft); }

.section--center { text-align: center; }

.section-head { margin-bottom: 36px; }
.section-head .eyebrow { display: block; margin-bottom: 12px; }
.section-head h2 { font-size: 25px; }

@media (max-width: 420px) {
  .section { padding-block: 56px; }
}

/* --- 4. 타이포그래피 역할 -------------------------------------------------- */

.eyebrow {
  font-family: var(--caps-en);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--amber);
}

.h-serif {
  font-family: var(--serif-kr);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.005em;
}

.lead { color: var(--muted); }

.footnote {
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

/* --- 5. 버튼 --------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 15px 28px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  text-align: center;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.btn-primary { background: var(--amber); color: #241505; }
.btn-primary:hover { opacity: 0.88; }

.btn-ghost { border-color: var(--line); color: var(--ivory); }
.btn-ghost:hover { background: var(--line-soft); }

/* 신청서 선택(여성/남성): 동일 위계 한 쌍. 구별은 도트 색으로만. */

.btn-pair { display: grid; gap: 10px; }
.btn-pair--row { grid-template-columns: 1fr 1fr; }

@media (max-width: 420px) {
  .btn-pair--row { grid-template-columns: 1fr; }
}

.btn-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--stage);
  color: var(--ivory);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.btn-choice:hover { border-color: var(--amber); background: var(--stage-2); }

.btn-choice .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-w { background: var(--rose); }
.dot-m { background: var(--amber); }

/* --- 6. 컴포넌트 ----------------------------------------------------------- */

/* 상단 미니 내비 (상세 페이지) */

.topbar { padding-block: 20px; }

.topbar a {
  font-family: var(--caps-en);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}

.topbar a:hover { color: var(--ivory); }

/* 히어로 */

.hero {
  position: relative;
  padding-block: 96px 64px;
  text-align: center;
  overflow: hidden;
}

.hero--sub { padding-top: 56px; } /* topbar가 위에 있는 상세 페이지용 */

/* 스포트라이트: 위에서 떨어지는 조명 한 줄기 */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 62% at 50% -12%,
    rgba(223, 161, 92, 0.17), transparent 70%);
  pointer-events: none;
  animation: light-up 1.6s ease-out both;
}

@keyframes light-up {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hero > .wrap { position: relative; }

.hero .eyebrow { display: block; margin-bottom: 28px; }

.wordmark {
  font-family: var(--caps-en);
  font-weight: 400;
  font-size: clamp(40px, 11vw, 56px);
  letter-spacing: 0.14em;
  line-height: 1.1;
  text-transform: uppercase;
}

.wordmark-kr {
  display: block;
  margin-top: 10px;
  font-family: var(--serif-kr);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.5em;
  text-indent: 0.5em; /* 자간 보정: 가운데 정렬 유지 */
  color: var(--muted);
}

.hero-copy {
  margin-top: 40px;
  font-family: var(--serif-kr);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.65;
}

.hero-sub {
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
}

@media (max-width: 420px) {
  .hero { padding-block: 72px 48px; }
  .hero--sub { padding-top: 48px; }
}

/* 프로그램 카드 (대문) */

.program-card {
  display: block;
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.program-card + .program-card { margin-top: 16px; }

.program-card:hover { border-color: var(--amber); background: var(--stage); }

.program-card .card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.card-en {
  font-family: var(--caps-en);
  font-size: 22px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-open { background: var(--amber-soft); color: var(--amber); }
.badge-soon { background: var(--line-soft); color: var(--muted); }

.program-card .card-kr {
  margin-top: 4px;
  font-family: var(--serif-kr);
  font-size: 15px;
  color: var(--muted);
}

.program-card p {
  margin-top: 16px;
  font-size: 15px;
  color: var(--muted);
}

.program-card .card-cta {
  display: inline-block;
  margin-top: 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--amber);
}

/* 티켓 (무드러브 핵심 정보)
   절취선 홈 위치는 스텁 폭에서 파생되므로 --stub-w로만 조정한다. */

.ticket {
  --stub-w: 84px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr var(--stub-w);
  margin-top: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--stage);
  text-align: left;
}

.ticket::before,
.ticket::after {
  content: "";
  position: absolute;
  right: calc(var(--stub-w) - 8px);
  width: 16px;
  height: 16px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
}
.ticket::before { top: -9px; }
.ticket::after  { bottom: -9px; }

@media (max-width: 420px) {
  .ticket { --stub-w: 64px; }
}

.ticket-main { padding: 28px; }

.ticket-row + .ticket-row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.ticket-label {
  font-family: var(--caps-en);
  font-size: 10.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
}

.ticket-value {
  margin-top: 3px;
  font-family: var(--serif-kr);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
}

.ticket-value small {
  font-family: var(--body);
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.ticket-stub {
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 1px dashed var(--line);
}

.ticket-stub span {
  font-family: var(--caps-en);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--amber);
  writing-mode: vertical-rl;
}

/* 리스트: 이런 분께 */

.for-list { list-style: none; }

.for-list li {
  position: relative;
  padding-left: 26px;
}

.for-list li + li { margin-top: 18px; }

.for-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.65em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber-soft);
  border: 1px solid var(--amber);
}

/* 플레이빌 (진행 순서) */

.playbill { list-style: none; }

.playbill li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  padding-block: 16px;
}

.playbill li + li { border-top: 1px solid var(--line-soft); }

.playbill .pb-time {
  font-family: var(--caps-en);
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--amber);
  padding-top: 2px;
}

.playbill .pb-title {
  font-weight: 600;
  font-size: 16px;
}

.playbill .pb-desc {
  margin-top: 2px;
  font-size: 14px;
  color: var(--muted);
}

.playbill .intermission {
  display: block;
  text-align: center;
  padding-block: 18px;
}

.playbill .intermission span {
  font-family: var(--caps-en);
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
}

/* 사진 (.media 는 본문 흐름 속 figure, .ph 는 자리 표시 프레임)
   images/ 에 파일을 넣으면 .ph-img 가 덮어서 자동 교체된다. */

.media { margin-top: 32px; }
.media + .media { margin-top: 16px; }

.media figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.ph {
  position: relative;
  aspect-ratio: 3 / 2;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background:
    radial-gradient(ellipse 70% 90% at 50% -10%, rgba(223, 161, 92, 0.1), transparent 70%),
    var(--stage);
  overflow: hidden;
}

.ph .ph-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--caps-en);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.ph .ph-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

/* 참가 절차 */

.steps { list-style: none; counter-reset: step; }

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 52px;
  padding-block: 6px;
}

.steps li + li { margin-top: 22px; }

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 4px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--caps-en);
  font-size: 14px;
  color: var(--amber);
}

.steps .step-title { font-weight: 600; }

.steps .step-desc {
  margin-top: 2px;
  font-size: 14px;
  color: var(--muted);
}

/* 표 (환불 규정) */

.table { width: 100%; border-collapse: collapse; font-size: 15px; }

.table th, .table td {
  padding: 13px 6px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
}

.table th {
  font-weight: 400;
  color: var(--muted);
  width: 55%;
}

.table td { font-weight: 600; }

/* FAQ */

.faq details { border-bottom: 1px solid var(--line-soft); }

.faq summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
  font-weight: 600;
  font-size: 15.5px;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--caps-en);
  font-size: 18px;
  color: var(--amber);
  transition: transform 0.15s ease;
}

.faq details[open] summary::after { transform: rotate(45deg); }

.faq .faq-body {
  padding-bottom: 22px;
  font-size: 15px;
  color: var(--muted);
}

/* 주소 카드 */

.venue-addr {
  margin-top: 24px;
  padding: 20px 22px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  font-size: 14.5px;
  color: var(--muted);
  text-align: left;
}

.venue-addr strong {
  display: block;
  color: var(--ivory);
  font-family: var(--serif-kr);
  font-size: 16px;
  margin-bottom: 4px;
}

.venue-addr .map-links { margin-top: 12px; }

.venue-addr .map-links a {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--amber);
  text-decoration: none;
  margin-right: 16px;
}

.venue-addr .map-links a:hover { text-decoration: underline; }

/* 문의 */

.contact-list { list-style: none; margin-top: 28px; }

.contact-list li + li { margin-top: 12px; }

.contact-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.contact-link:hover { border-color: var(--amber); background: var(--stage); }

.contact-link .c-label {
  font-family: var(--caps-en);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-link .c-value { font-weight: 600; font-size: 15px; }

/* 신청 섹션 (무드러브) */

.apply .btn-pair { margin-top: 28px; }

.apply-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* CTA 한 줄 (무드파티 등) */

.cta-row { margin-top: 36px; }

/* 하단 고정 CTA */

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: rgba(26, 19, 23, 0.92);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line-soft);
}

.sticky-cta .btn {
  display: block;
  width: 100%;
  max-width: calc(var(--wrap) - 48px);
  margin-inline: auto;
}

.has-sticky { padding-bottom: 88px; }

/* 신청 다이얼로그 */

.apply-dialog {
  width: min(400px, calc(100vw - 40px));
  margin: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ivory);
  padding: 30px 24px 18px;
}

.apply-dialog::backdrop { background: rgba(10, 7, 9, 0.72); }

.apply-dialog h2 {
  font-size: 20px;
  text-align: center;
}

.apply-dialog .dialog-sub {
  margin-top: 8px;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}

.apply-dialog .btn-pair { margin-top: 22px; }

.apply-dialog .apply-note { margin-top: 16px; }

.dialog-close {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  background: none;
  border: none;
  font-size: 14px;
  color: var(--muted);
}

.dialog-close:hover { color: var(--ivory); }

/* --- 7. 푸터 --------------------------------------------------------------- */

.footer {
  padding-block: 48px 64px;
  border-top: 1px solid var(--line-soft);
  text-align: center;
}

.footer .f-mark {
  font-family: var(--caps-en);
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer p {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--muted);
  opacity: 0.8;
}

.footer a { color: inherit; }
