/* 틈 TEUM 아카이브
   배경은 브랜드 오프화이트 #F8F8F5, 포인트 컬러는 #334732 하나만 쓴다.
   (브랜드 장의 컬러 칩은 내용으로 보여 주는 것이라 예외) */
:root {
  --point: #334732;
  --ink: #1d1f1d;
  --muted: #6c706b;
  --hair: #e7e9e6;
  --bg: #F8F8F5;
  --white: #ffffff;

  --measure: 36rem;
  --page: 72rem;
  --gutter: 1.25rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: anywhere;
  font-feature-settings: "ss06";
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--point); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--point); outline-offset: 3px; border-radius: 2px; }
p { margin: 0 0 1.1em; }
strong { font-weight: 700; }
h3 {
  margin: 3rem 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h4 { margin: 0 0 0.35rem; font-size: 1rem; color: var(--point); }

/* ---------- 첫 화면 ---------- */
.hero {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(3.5rem, 13vw, 8rem) var(--gutter) clamp(2.5rem, 6vw, 4rem);
}
.hero-title {
  margin: 0 0 2rem;
  color: var(--point);
  font-size: clamp(4.25rem, 19vw, 12rem);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.045em;
}

.hero-line {
  margin: 0 0 1.25rem;
  font-size: clamp(1.4rem, 4.4vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}
.hero-lede { max-width: var(--measure); }
.hero-meta {
  display: grid;
  gap: 0.35rem;
  margin: 2rem 0 0;
  font-size: 0.9375rem;
}
.hero-meta div { display: flex; gap: 1rem; }
.hero-meta dt { flex: 0 0 4.5rem; color: var(--muted); }
.hero-meta dd { margin: 0; }

/* ---------- 목차 ---------- */
.index {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(248, 248, 245, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hair);
}
.index ol {
  display: flex;
  gap: 1.35rem;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0.8rem var(--gutter);
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  font-size: 0.9375rem;
  white-space: nowrap;
}
.index ol::-webkit-scrollbar { display: none; }
.index a { color: var(--muted); text-decoration: none; }
.index a:hover, .index a[aria-current="true"] { color: var(--point); }

/* ---------- 장 ---------- */
.chapter {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 7rem) var(--gutter) 0;
  scroll-margin-top: 3.25rem;
}
.ch-head { margin-bottom: 1.5rem; }
.ch-no {
  margin: 0;
  color: var(--point);
  font-size: 0.9375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ch-head h2 {
  margin: 0.15rem 0 0;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.03em;
}
.ch-body > p, .ch-body > h3, .ch-body > .pair { max-width: var(--measure); }
.lead {
  color: var(--point);
  font-size: clamp(1.25rem, 3.6vw, 1.6rem);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

@media (min-width: 60rem) {
  .chapter {
    display: grid;
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 3rem;
  }
  .ch-head { position: sticky; top: 5rem; align-self: start; }
}

.pair { display: grid; gap: 1.5rem; margin: 2rem 0; }
.pair h3 { margin: 0 0 0.35rem; font-size: 1rem; color: var(--point); }
@media (min-width: 40rem) { .pair { grid-template-columns: 1fr 1fr; max-width: 44rem !important; } }

.note, .caption { color: var(--muted); font-size: 0.9375rem; }

/* ---------- 사진 ---------- */
figure { margin: 2rem 0; }
figcaption { margin-top: 0.55rem; color: var(--muted); font-size: 0.875rem; }
.wide img { width: 100%; border-radius: 4px; outline: 1px solid var(--hair); outline-offset: -1px; }

.phones {
  display: grid;
  grid-template-columns: repeat(4, minmax(9rem, 1fr));
  gap: 0.75rem;
  margin: 2rem 0 0.5rem;
  padding-bottom: 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.phones figure { margin: 0; scroll-snap-align: start; }
.phones img { border-radius: 10px; outline: 1px solid var(--hair); outline-offset: -1px; }
.phones + p:not(.caption) { margin-top: 1.5rem; }

.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-top: -1rem; }
.trio figure { margin: 0 0 2rem; }
.trio img { border-radius: 3px; }

.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: -1rem 0 2rem; }
.strip img { aspect-ratio: 3 / 2; object-fit: cover; }
.film iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 4px; margin: 2rem 0; }

/* ---------- 역할 ---------- */
.role {
  margin-top: 2rem;
  padding-left: 1rem;
  border-left: 2px solid var(--point);
}
.role strong { display: block; color: var(--point); font-size: 0.9375rem; }
.links { font-weight: 600; }

/* ---------- 표 ---------- */
.table-wrap { max-width: 46rem; margin: 1.5rem 0 2rem; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.55; }
th, td { padding: 0.75rem 0.9rem 0.75rem 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hair); }
thead th { color: var(--muted); font-weight: 500; font-size: 0.875rem; border-bottom-color: var(--ink); }
tbody th { font-weight: 600; white-space: nowrap; }
table.rules tbody th { width: 9.5rem; }
tr.ours th, tr.ours td { color: var(--point); font-weight: 700; }

/* ---------- 단계 ---------- */
.flow {
  display: grid;
  gap: 1.25rem;
  margin: 2rem 0 2.5rem;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted);
}
.flow li { display: grid; grid-template-columns: 2rem 1fr; column-gap: 0.75rem; align-items: start; align-content: start; }
.flow .t strong { display: block; }
.flow .step {
  display: grid; place-items: center;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: var(--point);
  color: var(--white);
  font-weight: 700;
  font-size: 0.875rem;
}
.flow strong { color: var(--ink); font-size: 1rem; }
@media (min-width: 48rem) {
  .flow { grid-template-columns: repeat(5, 1fr); }
  .flow-3 { grid-template-columns: repeat(3, 1fr); max-width: 40rem; }
  .flow li { grid-template-columns: 1fr; row-gap: 0.75rem; }
}

/* ---------- 브랜드 ---------- */
.logo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; max-width: 40rem; }
.logo-row figure { margin: 1rem 0 0; }
.logo-row img { border-radius: 6px; }
.logo-final { max-width: 14rem; margin: 2.5rem 0 1rem; }
.logo-final figcaption { color: var(--point); font-weight: 600; }

.swatches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 1rem;
  max-width: 40rem;
  margin: 1.5rem 0 1rem;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
}
@media (min-width: 40rem) { .swatches { grid-template-columns: repeat(3, 1fr); } }
.swatches .chip { display: block; aspect-ratio: 1; border-radius: 6px; margin-bottom: 0.6rem; }
.swatches .chip.line { outline: 1px solid var(--hair); outline-offset: -1px; }
.swatches strong { display: block; color: var(--ink); font-size: 0.9375rem; }
.swatches code { display: block; font-family: inherit; font-variant-numeric: tabular-nums; color: var(--ink); }

.type-spec { max-width: var(--measure); }
.type-big {
  margin: 0.5rem 0 1rem;
  font-size: clamp(2rem, 7vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--point);
}

/* ---------- 타임라인 ---------- */
.timeline { margin: 0; padding: 0; list-style: none; max-width: 40rem; }
.timeline li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--hair);
}
.timeline li:first-child { padding-top: 0; }
.timeline time { color: var(--point); font-weight: 700; font-variant-numeric: tabular-nums; }
.timeline p { margin: 0; }
@media (max-width: 30rem) { .timeline li { grid-template-columns: 1fr; gap: 0.15rem; } }

/* ---------- 정리 ---------- */
.closing {
  max-width: var(--page);
  margin: clamp(5rem, 12vw, 9rem) auto 0;
  padding: 0 var(--gutter);
}
.closing p { max-width: var(--measure); }
.closing-q {
  color: var(--point);
  font-size: clamp(1.75rem, 6vw, 3rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.035em;
  max-width: 20ch !important;
}
@media (min-width: 60rem) { .closing { padding-left: calc(var(--gutter) + 18rem); } }

/* ---------- 만든 사람 ---------- */
.facts { margin: 0 0 1.25rem; padding: 0; list-style: none; max-width: var(--measure); }
.facts li { padding: 0.15rem 0; }
.tools { color: var(--muted); font-size: 0.9375rem; }

/* ---------- 바닥 ---------- */
.foot {
  max-width: var(--page);
  margin: clamp(5rem, 12vw, 8rem) auto 0;
  padding: 2rem var(--gutter) 3rem;
  border-top: 1px solid var(--hair);
  color: var(--muted);
  font-size: 0.875rem;
}
.foot img { width: 56px; margin-bottom: 0.75rem; }

/* ---------- 작업 과정 ---------- */
.steps {
  max-width: var(--measure);
  margin: 1rem 0 1rem;
  padding: 0;
  list-style: none;
  counter-reset: s;
}
.steps li {
  position: relative;
  padding: 0 0 1.1rem 2.25rem;
  counter-increment: s;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}
.steps li::before {
  content: counter(s);
  position: absolute; left: 0; top: 0.05rem;
  width: 1.5rem; height: 1.5rem;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--point);
  color: var(--point);
  font-size: 0.75rem; font-weight: 700;
}
.steps li:not(:last-child)::after {
  content: "";
  position: absolute; left: 0.72rem; top: 1.75rem; bottom: 0.2rem;
  width: 1.5px; background: var(--hair);
}
.steps strong { display: block; color: var(--ink); font-size: 1rem; }

.duo { display: grid; gap: 0.75rem; margin: 1.5rem 0 2rem; }
@media (min-width: 40rem) { .duo { grid-template-columns: 1fr 1fr; } }
.duo figure { margin: 0; }
.duo img, .trio img, .catalogue img { outline: 1px solid var(--hair); outline-offset: -1px; }
.ch-body .trio { margin-top: 0; }

.catalogue { display: grid; gap: 0.75rem; margin: 1.5rem 0 0; align-items: end; }
.catalogue figure { margin: 0; }
@media (min-width: 40rem) { .catalogue { grid-template-columns: 0.52fr 1fr 1fr; } }
@media (max-width: 39.99rem) { .cat-v01 { max-width: 55%; } }

/* ---------- 이머시브 과정 ---------- */
.ch-body h4.sub { margin: 2.5rem 0 0.75rem; font-size: 1rem; color: var(--ink); }
.quotes {
  max-width: var(--measure);
  margin: 0 0 1.25rem;
  padding: 0 0 0 1rem;
  border-left: 2px solid var(--point);
  list-style: none;
  color: var(--point);
  font-weight: 600;
}
.quotes li { padding: 0.15rem 0; }

.scenes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 0.6rem;
  margin: 1rem 0 0.5rem;
}
@media (min-width: 48rem) { .scenes { grid-template-columns: repeat(3, 1fr); } }
.scenes figure { margin: 0; }
.scenes img { border-radius: 3px; outline: 1px solid var(--hair); outline-offset: -1px; }
.scenes figcaption { font-size: 0.8125rem; line-height: 1.45; }

.decisions { max-width: 44rem; margin: 0.5rem 0 0; }
.decisions div { padding: 0.9rem 0; border-bottom: 1px solid var(--hair); }
.decisions dt { font-weight: 700; color: var(--point); }
.decisions dd { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.9375rem; line-height: 1.65; }
@media (min-width: 48rem) {
  .decisions div { display: grid; grid-template-columns: 15rem 1fr; gap: 1.25rem; }
  .decisions dd { margin: 0; }
}

.dropped { max-width: var(--measure); margin: 0; padding: 0; list-style: none; font-size: 0.9375rem; color: var(--muted); }
.dropped li { padding: 0.45rem 0; border-bottom: 1px solid var(--hair); }
.dropped strong { display: block; color: var(--ink); font-weight: 600; text-decoration: line-through; text-decoration-color: var(--muted); }
