/* Hallmark · macrostructure: Long Document (subpages) · genre: atmospheric
 * theme: studied-DNA (source: image · Behance 花朝青鸾) · studied: yes · DNA-source: image (user reference)
 * shared by: privacy.html · terms.html · event.html — index.html은 index.css를 쓴다
 * paper oklch(13% 0.01 340) · dyes: 홍↔청 · display: Noto Serif KR · body: Pretendard
 * nav: N9 edge-aligned · footer: Ft2 inline single line
 * pre-emit critique: P4 H4 E4 S4 R5 V4
 */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--font-body);
  background: var(--color-paper);
  color: var(--color-ink);
  line-height: 1.7;
  word-break: keep-all;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--color-select-bg); color: var(--color-select-ink); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }

.wrap { width: 100%; max-width: 880px; margin-inline: auto; padding-inline: var(--gutter); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  min-width: 0;
}

/* ── NAV · N9 edge-aligned ─────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: var(--color-paper);
  border-bottom: var(--rule-hair) solid var(--color-rule-soft);
}
.nav__inner {
  display: flex; justify-content: space-between; align-items: center;
  padding-block: var(--space-md);
}
.brand {
  display: inline-flex; align-items: baseline; gap: var(--space-xs);
  font-family: var(--font-display);
  font-size: var(--text-md); font-weight: 700;
}
.brand img { display: none; }
.brand span { font-size: var(--text-sm); font-weight: 500; color: var(--color-neutral); }
/* nav__inner 는 space-between 2자녀 구조다 — 오른쪽 것들을 하나로 묶는다. */
.nav__actions { display: flex; align-items: center; gap: var(--space-sm); }

.chip {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-xs);
  min-height: 44px;
  padding: var(--space-xs) var(--space-lg);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-sm);
  color: var(--color-ink);
  white-space: nowrap;
  transition: background-color var(--dur-short) var(--ease-out),
              border-color var(--dur-short) var(--ease-out),
              transform 100ms var(--ease-out);
}
.chip:hover { background: var(--color-paper-2); border-color: var(--color-neutral); transform: translateY(-1.5px); }
.chip:active { transform: translateY(1px); }
.chip[aria-disabled="true"] {
  color: var(--color-neutral); border-color: var(--color-rule-soft);
  cursor: not-allowed; transform: none; background: transparent;
}

/* ── 문서 머리 ─────────────────────────────────────────── */
.subhero { padding-block: var(--space-2xl) var(--space-xl); }
.subhero .eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-sm); font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--color-accent-2);
  margin-block-end: var(--space-md);
}
.subhero h1 { font-size: var(--text-2xl); }
.subhero .meta { margin-block-start: var(--space-sm); color: var(--color-neutral); font-size: var(--text-sm); }
.subhero + main,
.subhero ~ .rule-dye + main { border-block-start: var(--rule-thick) solid transparent; }
.subhero .wrap { position: relative; }
.subhero .wrap::after {
  content: ""; display: block;
  height: var(--rule-thick);
  margin-block-start: var(--space-xl);
  background: linear-gradient(90deg, var(--dye-jade), var(--dye-blossom));
}

/* ── 본문 문서 타이포 ─────────────────────────────────── */
.prose { padding-block: var(--space-xl) var(--space-3xl); }
.prose .lead { font-size: var(--text-md); color: var(--color-muted); max-width: 62ch; }
.prose h2 {
  font-size: var(--text-lg);
  margin-block: var(--space-2xl) var(--space-md);
  padding-block-start: var(--space-lg);
  border-block-start: var(--rule-hair) solid var(--color-rule-soft);
}
.prose h3 { font-size: var(--text-md); margin-block: var(--space-lg) var(--space-sm); }
.prose p { margin-block-end: var(--space-md); color: var(--color-muted); max-width: 70ch; }
.prose p strong, .prose li strong, .prose li b, .prose td b { color: var(--color-ink); }
.prose ul { list-style: none; margin-block-end: var(--space-md); }
.prose ul li {
  position: relative;
  padding: var(--space-2xs) 0 var(--space-2xs) var(--space-lg);
  color: var(--color-muted);
  max-width: 70ch;
}
.prose ul li::before {
  content: ""; position: absolute; left: 0; top: 0.9em;
  width: 7px; height: 7px; transform: rotate(45deg);
  background: var(--dye-jade-deep);
}
.prose a { color: var(--color-accent); text-decoration: underline; text-underline-offset: 0.16em; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--color-ink); }
.callout {
  background: var(--color-paper-2);
  border: var(--rule-hair) solid var(--color-rule-soft);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-block: var(--space-lg);
}
.callout p { margin: 0; max-width: none; }
.tocnote { font-size: var(--text-sm); color: var(--color-neutral); margin-block-start: var(--space-xl); }

/* ── 이벤트 페이지 ─────────────────────────────────────── */
/* index 히어로와 같은 골격 — 왼쪽에 카피, 오른쪽에 아치 창. */
.event-hero { padding-block: var(--space-2xl) var(--space-xl); }
/* 두 번째 트랙은 반드시 고정폭이다. auto 로 두면 .event-hero__demo 의
   `width: min(100%, 17rem)` 이 자기 트랙을 참조해 순환하고, container-type 의
   inline-size 격리 때문에 내용으로도 못 늘어나 열이 통째로 찌그러진다. */
.event-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  gap: var(--space-2xl);
  align-items: stretch;   /* 데모가 왼쪽 칼럼 높이를 따라간다 */
}
.event-hero .eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-sm); font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--color-accent-2);
  margin-block-end: var(--space-md);
}
.event-hero h1 { font-size: var(--text-display-s); margin-block-end: var(--space-md); }
/* 금액에 염료를 먹인다 — index 의 .rule-dye 와 같은 홍↔청 두 물 */
.event-amount {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-3xl);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  margin-block-end: var(--space-md);
  width: fit-content;
  background: linear-gradient(100deg, var(--dye-jade), var(--dye-blossom));
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.event-hero .lead { color: var(--color-muted); font-size: var(--text-md); margin-block-end: var(--space-xl); }
.event-hero .lead b { color: var(--color-ink); }

.event-timeline { margin-block-end: var(--space-lg); }
.event-tl { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-sm); }
.event-tl__item {
  position: relative;
  border: var(--rule-hair) solid var(--color-rule-soft);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md) var(--space-md);
  overflow: hidden;
}
.event-tl__item::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--dye-jade), var(--dye-blossom));
}
.event-tl__item.is-done { border-color: var(--color-rule); }
.event-tl__item.is-done::after { width: 100%; opacity: 0.4; }
.event-tl__item.is-now { border-color: var(--dye-jade-deep); }
.event-tl__item.is-now::after { width: calc(var(--p, 0) * 100%); }
.event-tl__label { display: block; font-weight: 600; font-size: var(--text-sm); }
.event-tl__date { display: block; font-size: var(--text-xs); color: var(--color-neutral); margin-block-start: var(--space-2xs); }
.event-tl__now {
  position: absolute; top: var(--space-xs); right: var(--space-xs);
  font-size: var(--text-xs); font-weight: 700;
  color: var(--color-on-dye);
  background: var(--color-accent);
  border-radius: 999px;
  padding: 1px var(--space-xs);
}

.event-gauge { margin-block-end: var(--space-lg); }
.event-gauge__bar {
  height: 8px; border-radius: 999px;
  background: var(--color-paper-3);
  overflow: hidden;
}
.event-gauge__fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--dye-jade), var(--dye-blossom));
  transition: width var(--dur-long) var(--ease-out);
}
.event-gauge__label {
  display: flex; justify-content: space-between; gap: var(--space-md);
  font-size: var(--text-sm); color: var(--color-neutral);
  margin-block-start: var(--space-xs);
  font-variant-numeric: tabular-nums;
}
.event-gauge__label b { color: var(--color-ink); }
.event-closed { color: var(--color-accent); font-weight: 700; }

.event-precheck {
  background: var(--color-paper-2);
  border: var(--rule-hair) solid var(--color-rule-soft);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  color: var(--color-muted);
  margin-block-end: var(--space-lg);
}
.event-precheck b { color: var(--color-ink); }

.btn--ink {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px;
  padding: var(--space-sm) var(--space-xl);
  border: 2px solid var(--dye-jade-deep);
  border-radius: var(--radius-sm);
  font-weight: 700;
  color: var(--color-ink);
  white-space: nowrap;
  transition: background-color var(--dur-short) var(--ease-out),
              border-color var(--dur-short) var(--ease-out),
              transform 100ms var(--ease-out);
}
.btn--ink:hover { background: var(--color-paper-2); border-color: var(--dye-jade); transform: translateY(-1.5px); }
.btn--ink:active { transform: translateY(1px); }
.btn--ink[aria-disabled="true"] {
  color: var(--color-neutral); border-color: var(--color-rule-soft);
  cursor: not-allowed; transform: none; background: transparent;
}

/* 캡처 예시 — PC 에서는 화면 **전체**를 세워 왼쪽 칼럼 높이에 맞춘다.
   전에는 상단만 잘라 두어 오른쪽 칼럼 아래로 화면 높이의 3분의 1이 빈 채 남았다.
   이미지가 남은 높이를 채우고 캡션은 밑에 붙는 flex 기둥 구조다. */
.event-hero__demo { display: flex; flex-direction: column; width: 100%; }
.event-hero__shot {
  flex: 1 1 auto;
  min-height: 0;          /* 이 줄이 없으면 flex 자식이 본디 높이 밑으로 못 줄어든다 */
  /* 상자가 원본 비율(1125:2436)보다 길어지면 cover 가 좌우를 잘라 채운다.
     측정값은 631~651px 이라 잘림이 한쪽 10~14px 수준이지만, 왼쪽 칼럼이
     예상 밖으로 길어지면 하단 탭 아이콘까지 잘린다. 상한을 둬서 그때는
     높이를 맞추는 대신 잘림을 멈춘다. */
  max-height: 44rem;
  width: 100%;
  object-fit: cover;
  object-position: top center;
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-md);
  background: var(--color-paper-2);
}
.event-hero__shot-cap {
  flex: none;
  font-size: var(--text-sm); color: var(--color-neutral); margin-block-start: var(--space-sm);
}
.event-hero__shot-cap b { color: var(--color-ink); }

/* 참여 방법 — index 의 사형(四形)을 그대로 가져온다. 단계마다 전통 도형 인장. */
.event-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-xl) var(--space-lg);
  margin-block: var(--space-xl);
}
.event-step { text-align: center; }
.event-step figure {
  position: relative; width: min(100%, 8.5rem); margin-inline: auto;
  container-type: inline-size;
}
.event-step figure svg { display: block; width: 100%; height: auto; }
.event-step figure b {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700; font-size: 26cqw;
  color: var(--color-on-dye);
}
.event-step__n {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-sm); font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--color-accent-2);
  margin-block: var(--space-lg) var(--space-2xs);
}
.event-step > b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-md);
  margin-block-end: var(--space-2xs);
}
.event-step > span { display: block; color: var(--color-muted); font-size: var(--text-sm); }

/* 스토어 버튼은 index.html 과 같은 .stores/.store (tokens.css) 를 쓴다.
   .prose a 의 밑줄·강조색은 본문 인라인 링크를 위한 것이라 버튼에는 걸리면
   안 된다 — .prose a(0,1,1)가 .store(0,1,0)를 이기므로 여기서 되돌린다. */
.prose .stores { margin-block-end: var(--space-xl); }
.prose .store { color: var(--color-ink); text-decoration: none; }

.event-table {
  width: 100%; border-collapse: collapse;
  margin-block: var(--space-md) var(--space-lg);
  font-size: var(--text-sm);
}
.event-table th, .event-table td {
  text-align: left; vertical-align: top;
  padding: var(--space-sm) var(--space-md) var(--space-sm) 0;
  border-block-end: var(--rule-hair) solid var(--color-rule-soft);
}
.event-table th { color: var(--color-neutral); font-weight: 600; white-space: nowrap; width: 9em; }
.event-table td { color: var(--color-muted); }
.event-table a { color: var(--color-accent); text-decoration: underline; text-underline-offset: 0.16em; }

/* ── FOOTER · Ft2 inline single line ──────────────────── */
.foot { padding-block: var(--space-2xl) var(--space-xl); }
.foot__bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-sm) var(--space-lg);
  padding-block-start: var(--space-lg);
  border-block-start: var(--rule-hair) solid var(--color-rule);
  font-size: var(--text-sm); color: var(--color-neutral);
}
.foot__bar a { color: var(--color-muted); white-space: nowrap; transition: color var(--dur-short) var(--ease-out); }
.foot__bar a:hover { color: var(--color-ink); }

/* ── 반응형 ───────────────────────────────────────────── */
/* 모바일 — 한 칼럼이 되면 세로로 긴 전체 화면은 스크롤만 길게 만든다.
   보여줘야 할 연속 학습일이 있는 **상단만** 남기고 아래는 페이드로 녹인다. */
@media (max-width: 52rem) {
  .event-hero__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
  .event-hero__demo { display: block; width: min(100%, 17rem); margin-inline: auto; }
  .event-hero__shot {
    aspect-ratio: 1125 / 1000;
    height: auto;
    border-block-end: 0;
    border-end-start-radius: 0;
    border-end-end-radius: 0;
    -webkit-mask-image: linear-gradient(to bottom, #000 74%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 74%, transparent 100%);
  }
}

@media (max-width: 44rem) {
  .event-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 40rem) {
  .subhero h1 { font-size: var(--text-xl); }
  .event-hero h1 { font-size: var(--text-xl); }
  .event-amount { font-size: var(--text-2xl); }
  .event-tl { grid-template-columns: minmax(0, 1fr); }
  .event-table th { width: 7em; }
  .btn--ink { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 150ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 150ms !important;
  }
  .chip:hover, .btn--ink:hover { transform: none; }
}
