/* 사람조합 디자인 시스템 v0.1 (2026-12-02)
   기준 문서: ../DESIGN_SYSTEM.md
   이 파일은 값(토큰)과 부품만 담는다. 페이지는 이 파일의 값만 쓴다. */

/* ---------- 1. 값 ---------- */
:root {
  /* 색: 먹, 한지, 주홍. 색은 이 여섯 개와 선 하나로 끝낸다. */
  --ink: #14161b;          /* 먹. 글자와 어두운 구역 */
  --ink-2: #2a2d34;        /* 어두운 구역 안의 면 */
  --paper: #f4efe6;        /* 한지. 기본 바탕 */
  --paper-2: #ebe4d6;      /* 한지보다 한 단계 짙은 면 */
  --white: #ffffff;
  --accent: #c63f22;       /* 주홍. 버튼과 강조 한 군데에만 */
  --sub: #5b5f66;          /* 보조 글자(한지 위) */
  --sub-on-ink: #b9bcc2;   /* 보조 글자(먹 위) */
  --line: rgba(20, 22, 27, .16);
  --line-on-ink: rgba(255, 255, 255, .2);

  /* 글자 */
  --serif: "Pretendard Variable", "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; /* 제목 글꼴. 대표 요청(12-02)으로 명조에서 프리텐다드로 바꿈 */
  --sans: "Pretendard Variable", "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;

  /* 글자 크기: 일곱 단계. 화면 너비에 따라 부드럽게 변한다. */
  --t-display: clamp(2.5rem, 1.2rem + 5.2vw, 5.25rem);   /* 40 → 84 */
  --t-h1: clamp(2.125rem, 1.3rem + 3.3vw, 3.75rem);      /* 34 → 60 */
  --t-h2: clamp(1.625rem, 1.2rem + 1.7vw, 2.5rem);       /* 26 → 40 */
  --t-h3: clamp(1.25rem, 1.15rem + .4vw, 1.5rem);        /* 20 → 24 */
  --t-lead: clamp(1.1875rem, 1.1rem + .45vw, 1.5rem);    /* 19 → 24 */
  --t-body: clamp(1.0625rem, 1rem + .25vw, 1.1875rem);    /* 17 → 19 */
  --t-small: clamp(.9375rem, .9rem + .2vw, 1.0625rem);    /* 15 → 17 */
  --t-label: clamp(.875rem, .84rem + .15vw, .9375rem);    /* 14 → 15 */

  /* 간격: 8의 배수 */
  --s-1: 8px; --s-2: 16px; --s-3: 24px; --s-4: 32px; --s-5: 48px;
  --s-6: 64px; --s-7: 96px; --s-8: 128px; --s-9: 160px;
  --section: clamp(72px, 4rem + 7vw, 160px);  /* 구역 위아래 */
  --gutter: clamp(20px, 4vw, 56px);           /* 화면 양옆 */
  --max: 1320px;

  /* 모양 */
  --r-pill: 999px;
  --r-card: 20px;
  --r-field: 12px;

  /* 움직임 */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: .5s;
}

/* ---------- 2. 바탕 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: var(--t-body); line-height: 1.75;
  word-break: keep-all; overflow-wrap: break-word; overflow-x: clip;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--white); padding: 8px 14px; z-index: 99; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.section.ink { background: var(--ink); color: var(--white); }
.section.white { background: var(--white); }
.section.tint { background: var(--paper-2); }

/* 12칸 격자 */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(16px, 2vw, 32px); row-gap: var(--s-5); }
.c-3 { grid-column-end: span 3; } .c-4 { grid-column-end: span 4; } .c-5 { grid-column-end: span 5; }
.c-6 { grid-column-end: span 6; } .c-7 { grid-column-end: span 7; } .c-8 { grid-column-end: span 8; }
.c-12 { grid-column-end: span 12; }
.start-6 { grid-column-start: 6; } .start-7 { grid-column-start: 7; }

/* ---------- 3. 글자 ---------- */
.display, .h1, .h2 { font-family: var(--serif); font-weight: 700; letter-spacing: -0.045em; margin: 0; }
.display { font-size: var(--t-display); line-height: 1.16; font-weight: 800; }
.h1 { font-size: var(--t-h1); line-height: 1.24; }
.h2 { font-size: var(--t-h2); line-height: 1.36; letter-spacing: -0.035em; font-weight: 600; }
.h3 { font-family: var(--sans); font-size: var(--t-h3); font-weight: 600; line-height: 1.45; letter-spacing: -0.02em; margin: 0; }
.lead { font-size: var(--t-lead); line-height: 1.75; margin: 0; color: var(--sub); max-width: 34em; }
.ink .lead { color: var(--sub-on-ink); }
.body { margin: 0; max-width: 36em; }
.small { font-size: var(--t-small); color: var(--sub); margin: 0; }
.ink .small { color: var(--sub-on-ink); }
.label { font-size: var(--t-label); font-weight: 600; letter-spacing: .08em; color: var(--sub); margin: 0; display: flex; align-items: center; gap: 10px; }
.label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.ink .label { color: var(--sub-on-ink); }
.accent { color: var(--accent); }
.ink .accent { color: #f08a6c; }
.stack > * + * { margin-top: var(--s-3); }
.stack-lg > * + * { margin-top: var(--s-5); }

/* ---------- 4. 부품 ---------- */
/* 버튼: 알약 모양 두 가지뿐 */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: var(--r-pill); font: 600 var(--t-body)/1 var(--sans); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform var(--dur) var(--ease), background .25s, color .25s; }
.btn:hover { transform: translateY(-2px); }
.btn-fill { background: var(--accent); color: var(--white); }
.btn-fill:hover { background: #a93318; }
.btn-line { border-color: currentColor; color: inherit; background: transparent; }
.btn .arrow { width: 18px; height: 18px; transition: transform var(--dur) var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.textlink { font-weight: 600; text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 2px; }

/* 머리 */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.375rem; font-weight: 800; letter-spacing: -0.03em; text-decoration: none; }
.menu { display: flex; align-items: center; gap: 6px; }
.menu a { text-decoration: none; font-size: var(--t-small); font-weight: 500; padding: 10px 16px; border-radius: var(--r-pill); transition: background .2s; }
.menu a:hover { background: var(--paper-2); }
.menu .btn { min-height: 44px; padding: 0 20px; font-size: var(--t-small); margin-left: 8px; }
.menu .btn:hover { background: #a93318; }

/* 숫자 */
.stat { border-top: 1px solid var(--line); padding-top: var(--s-3); }
.ink .stat { border-color: var(--line-on-ink); }
.stat b { display: block; font-family: var(--serif); font-weight: 800; font-size: clamp(2.75rem, 1.6rem + 3.6vw, 4.5rem); white-space: nowrap; line-height: 1.1; letter-spacing: -0.04em; }
.stat > span { display: block; margin-top: 12px; font-size: var(--t-body); color: var(--sub); line-height: 1.55; }
.ink .stat > span { color: var(--sub-on-ink); }

/* 줄 목록: 상자 대신 가는 선으로 나눈다 */
.rows { border-top: 1px solid var(--line); }
.ink .rows { border-color: var(--line-on-ink); }
.row { display: grid; grid-template-columns: 72px 1fr 1.4fr; gap: clamp(16px, 3vw, 48px); padding: var(--s-5) 0; border-bottom: 1px solid var(--line); align-items: start; }
.ink .row { border-color: var(--line-on-ink); }
.row .no { font-family: var(--serif); font-size: var(--t-h3); font-weight: 700; color: var(--accent); }
.ink .row .no { color: #f08a6c; }
.row p { margin: 0; color: var(--ink); font-size: var(--t-lead); line-height: 1.7; }
.ink .row p { color: var(--white); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--s-2); padding: 0; list-style: none; }
.tags li { font-size: var(--t-small); font-weight: 500; padding: 8px 16px; border-radius: var(--r-pill); border: 1px solid var(--line); }
.ink .tags li { border-color: var(--line-on-ink); }

/* 카드: 테두리와 그림자 없이 면으로만 */
.card { background: var(--white); border-radius: var(--r-card); padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: var(--s-2); min-height: 100%; }
.tint .card, .white .card { background: var(--paper); }
.ink .card { background: var(--ink-2); }
.card .meta { font-size: var(--t-label); font-weight: 600; letter-spacing: .06em; color: var(--sub); }
.ink .card .meta { color: var(--sub-on-ink); }
.card p { margin: 0; color: var(--sub); font-size: var(--t-body); }
.ink .card p { color: var(--sub-on-ink); }
.card .big { font-family: var(--serif); font-size: var(--t-h2); font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; color: var(--ink); margin-top: auto; padding-top: var(--s-3); }
.ink .card .big { color: var(--white); }
.card .big small { font-family: var(--sans); font-size: var(--t-label); font-weight: 500; color: var(--sub); letter-spacing: 0; margin-left: 8px; }

/* 인용 */
.quote { font-family: var(--serif); font-size: var(--t-h1); font-weight: 700; line-height: 1.36; letter-spacing: -0.045em; margin: 0; }

/* 표 */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 20px 16px 20px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: var(--t-label); font-weight: 600; letter-spacing: .06em; color: var(--sub); border-bottom-color: var(--ink); white-space: nowrap; }
.tablewrap { overflow-x: auto; }

/* 양식 */
.field { display: grid; gap: 8px; }
.field label { font-size: var(--t-small); font-weight: 600; }
.field label small { font-weight: 400; color: var(--sub); }
.field input, .field textarea, .field select { font: inherit; color: var(--ink); background: var(--white); border: 1.5px solid transparent; border-radius: var(--r-field); padding: 16px 18px; width: 100%; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--ink); }
.field textarea { min-height: 150px; resize: vertical; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: var(--t-small); color: var(--sub); }
.check input { width: 20px; height: 20px; margin-top: 4px; accent-color: var(--accent); flex: none; }

/* 무늬: 겹친 고리 두 개. '조합'을 뜻하는 사람조합만의 그림 */
.rings { width: 100%; height: auto; }
.rings circle { fill: none; stroke: currentColor; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.rings .hot { stroke: var(--accent); }

/* 초안 표시 */
.draft-bar { display: none; }
body.draft .draft-bar { display: block; background: var(--ink); color: var(--white); font-size: var(--t-label); text-align: center; padding: 8px 16px; letter-spacing: .02em; }
.todo { background: #ffe9a8; color: #4a3b00; border-radius: 4px; padding: 0 5px; }

/* 스크롤하면 떠오르는 움직임 */
.rise { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.rise.on { opacity: 1; transform: none; }

/* 바닥 */
.bottom { background: var(--ink); color: var(--sub-on-ink); padding: var(--s-7) 0 var(--s-5); font-size: var(--t-small); }
.bottom .brand { color: var(--white); font-size: 1.75rem; }
.bottom a { color: var(--white); text-decoration: none; }

/* ---------- 5. 좁은 화면 ---------- */
@media (max-width: 960px) {
  .c-3, .c-4, .c-5 { grid-column-end: span 6; }
  .c-6, .c-7, .c-8 { grid-column-end: span 12; }
  .start-6, .start-7 { grid-column-start: auto; }
  .row { grid-template-columns: 48px 1fr; }
  .row > :nth-child(3) { grid-column: 2; }
}
@media (max-width: 640px) {
  .c-3, .c-4, .c-5 { grid-column-end: span 12; }
  .menu a:not(.btn) { display: none; }
  .top .wrap { height: 64px; }
  .btn { min-height: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { opacity: 1; transform: none; transition: none; }
  .btn, .btn .arrow { transition: none; }
}

/* 로고 심볼: ㄱ은 글자색을 따르고 ㄴ은 주홍 */
.mark { width: 1.35em; height: 1.35em; flex: none; }
