/* =========================================================
   SOLING BOOK
   White & Black · 여백 중심 · 박스 없음 · 사진이 곧 화면
   ========================================================= */

@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.css");

/* 강원교육튼튼 — 포인트 전용 */
@font-face {
  font-family: "GangwonEduPower";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2201-2@1.0/GangwonEduPowerExtraBoldA.woff")
      format("woff");
  font-weight: 800;
  font-display: swap;
}

:root {
  --ink: #000000;
  --gray: #6b6b71;
  --gray-l: #a3a3a8;
  --paper: #ffffff;
  --img: #eceae7;
  --gut: 44px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    system-ui, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 2.05;
  letter-spacing: 0.005em;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, li, figure, blockquote { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--ink); color: #fff; }

/* ---------- 공통 타이포 ---------- */
.en {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gray-l);
  line-height: 1.6;
}

.title {
  font-size: clamp(30px, 5.4vw, 62px);
  font-weight: 300;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.title-ko {
  font-size: clamp(21px, 2.8vw, 32px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.5;
}

.point {
  font-family: "GangwonEduPower", "Pretendard Variable", Pretendard, sans-serif;
  font-weight: 800;
  letter-spacing: 0.005em;
}

.body-text {
  font-size: 14px;
  line-height: 2.15;
  color: var(--gray);
  letter-spacing: -0.005em;
}
.body-text strong { font-weight: 600; color: var(--ink); }

.note {
  font-size: 11.5px;
  line-height: 1.9;
  color: var(--gray-l);
  letter-spacing: 0.01em;
}

/* ---------- 레이아웃 ---------- */
.page { padding: 290px 0 0; }
.center { text-align: center; }

.measure {
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
  padding-inline: var(--gut);
}

.frame { padding-inline: var(--gut); }

.block { margin-top: clamp(56px, 8vw, 118px); }
.block--sm { margin-top: clamp(28px, 4vw, 48px); }

/* ---------- 상단 고정 요소 ---------- */
/* 서브페이지: 고정 로고/메뉴 아래로 본문이 비쳐 지나가지 않도록 흰 페이드 */
body:not([data-page="home"])::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 268px;
  z-index: 55;
  pointer-events: none;
  background: linear-gradient(to bottom, #fff 62%, rgba(255, 255, 255, 0));
}

.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 26px var(--gut) 0;
  color: #000000;
}

.brand {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.1;
  white-space: nowrap;
}

.tnav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  /* 첫 항목이 세 번째 줄 위치에서 시작하도록 두 줄만큼 내림 */
  margin-top: 71px;
}
.tnav a {
  position: relative;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  color: #000000;
  transition: opacity 0.3s var(--ease);
}
.tnav a:hover { opacity: 0.4; }
.tnav a.is-here { font-weight: 600; }
.tnav a.is-here::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
}

/* ---------- 홈 : 가로 슬라이더 ---------- */
.stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--img);
}
.track {
  display: flex;
  height: 100%;
  transition: transform 0.95s var(--ease);
  will-change: transform;
}
.slide { position: relative; flex: 0 0 100%; height: 100%; background: var(--img); }

.stage-foot {
  position: absolute;
  left: var(--gut);
  right: var(--gut);
  bottom: 34px;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  color: #000000;
  pointer-events: none;
}
.stage-copy {
  font-size: clamp(11.5px, 1.05vw, 14px);
  font-weight: 200;
  letter-spacing: -0.02em;
  line-height: 1.7;
  max-width: 46ch;
}

.counter {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.16em;
  opacity: 0.85;
  pointer-events: auto;
}
.counter .bar {
  position: relative;
  width: 45px;
  height: 1px;
  background: rgba(0, 0, 0, 0.25);
}
.counter .bar span {
  position: absolute;
  inset: 0 auto 0 0;
  background: #000000;
  transition: width 0.6s var(--ease);
}
.counter button { color: #000000; letter-spacing: 0.16em; font-size: 10px; opacity: 0.7; transition: opacity 0.3s; }
.counter button:hover { opacity: 1; }

/* ---------- 이미지 ---------- */
.img { width: 100%; background: var(--img); overflow: hidden; }
.r-16x9 { aspect-ratio: 16 / 9; }
.r-3x2  { aspect-ratio: 3 / 2; }
.r-4x3  { aspect-ratio: 4 / 3; }
.r-1x1  { aspect-ratio: 1 / 1; }
.r-4x5  { aspect-ratio: 4 / 5; }
.r-3x4  { aspect-ratio: 3 / 4; }

figcaption { margin-top: 14px; }

/* ---------- 그리드 ---------- */
.g2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(10px, 1.4vw, 20px); }
.gal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(10px, 1.4vw, 20px); }
.gal-grid .full { grid-column: span 2; }

/* 가운데로 모이는 사진 줄 — 1장이거나 홀수여도 중앙 정렬 */
.gc {
  --g: clamp(10px, 1.4vw, 20px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--g);
}
.gc > * {
  flex: 0 1 calc(50% - var(--g) / 2);
  min-width: 0;
}
.g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 1.4vw, 20px); }
.g4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2.2vw, 34px); }

/* 대여 도서 표지 — 화면이 넓어도 표지가 과하게 커지지 않도록 가운데로 모읍니다 */
.books-grid { max-width: 720px; margin-inline: auto; }
@media (max-width: 900px) { .books-grid { max-width: 380px; } }

/* ---------- 링크 ---------- */
.ln {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ink);
  transition: opacity 0.3s var(--ease);
}
.ln:hover { opacity: 0.4; }

/* ---------- 리스트(불릿 없음) ---------- */
.lines li {
  font-size: 14px;
  line-height: 2.3;
  color: var(--gray);
  letter-spacing: -0.01em;
}
.lines li strong { font-weight: 600; color: var(--ink); }

.rows { width: 100%; }
.rows div {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 15px 0;
  border-top: 1px solid #eceae7;
  font-size: 13px;
  color: var(--gray);
}
.rows div:last-child { border-bottom: 1px solid #eceae7; }
.rows dt, .rows b {
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.14em;
  font-size: 10.5px;
  text-transform: uppercase;
  white-space: nowrap;
  padding-top: 4px;
}

/* ---------- 책 ---------- */
.bk { min-width: 0; }
.bk .img { background: var(--img); }
.bk.is-off .img { opacity: 0.5; }

/* 제목 · 지은이 · 출판사 — 모두 한 줄로만, 넘치면 … */
.bk-t,
.bk-a,
.bk-p {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bk-t {
  margin-top: 12px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: -0.02em;
}
.bk-a,
.bk-p {
  font-size: 11px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  color: var(--gray-l);
}
.bk-a { margin-top: 3px; }

.bk-st {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--gray-l);
}
.bk-st.st-out,
.bk-st.st-reserved,
.bk-st.st-requested { color: var(--ink); }

.bk-req {
  display: inline-block;
  margin-top: 9px;
  padding: 0 0 3px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: none;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--ink);
  cursor: pointer;
  transition: opacity 0.3s var(--ease);
}
.bk-req:hover { opacity: 0.4; }

/* ---------- 대여 신청 창 ---------- */
.dlg {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: none;
  overflow-y: auto;
}
.dlg.is-on { display: block; }
.dlg-bg {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
}
.dlg-box {
  position: relative;
  width: 100%;
  max-width: 430px;
  margin-inline: auto;
  padding: 14vh var(--gut) 70px;
}
.dlg-x {
  position: fixed;
  top: 24px;
  right: var(--gut);
  z-index: 2;
  font-size: 15px;
  line-height: 1;
  color: var(--ink);
}
.dlg-x:hover { opacity: 0.45; }
.dlg .title-ko { font-size: clamp(19px, 2.4vw, 26px); }

/* 대여 신청 창의 책 표지 */
.dlg-cover {
  width: 112px;
  aspect-ratio: 3 / 4;
  margin: 20px auto 0;
  background: var(--img);
  overflow: hidden;
}
.dlg-cover img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 폼 ---------- */
.form { display: grid; gap: 30px; text-align: left; }
.f label {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gray-l);
  margin-bottom: 6px;
}
.f input,
.f textarea,
.f select {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #e2e0dd;
  background: none;
  border-radius: 0;
  padding: 8px 0;
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: -0.01em;
  transition: border-color 0.3s var(--ease);
}
.f input::placeholder, .f textarea::placeholder { color: #cfcdc9; }
.f input:focus, .f textarea:focus, .f select:focus { outline: none; border-bottom-color: var(--ink); }
.f textarea { resize: vertical; min-height: 92px; }
.f select { appearance: none; cursor: pointer; }
.sel { position: relative; }
.sel::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 14px;
  width: 6px;
  height: 6px;
  border-right: 1px solid var(--gray-l);
  border-bottom: 1px solid var(--gray-l);
  transform: rotate(45deg);
  pointer-events: none;
}

.opts { display: flex; flex-wrap: wrap; gap: 8px 26px; padding-top: 4px; }
.opts label {
  font-size: 13.5px;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--gray);
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.opts input { width: auto; border: 0; accent-color: #101012; }
.opts label:has(input:checked) { color: var(--ink); font-weight: 600; }

.agree {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.8;
  color: var(--gray);
  cursor: pointer;
  letter-spacing: -0.01em;
}
.agree input { margin-top: 5px; width: 13px; height: 13px; flex: none; accent-color: #101012; }

.submit {
  width: 100%;
  padding: 16px 0 14px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
}
.submit:hover { background: var(--ink); color: #fff; }

.done {
  display: none;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--gray);
  letter-spacing: -0.01em;
}
.done.is-on { display: block; }

/* ---------- 푸터 ---------- */
.foot {
  margin-top: clamp(80px, 11vw, 160px);
  padding: 0 var(--gut) 44px;
  text-align: center;
}
.foot .en { display: block; }
.foot nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 26px; margin-bottom: 22px; }
.foot nav a { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gray); transition: color 0.3s; }
.foot nav a:hover { color: var(--ink); }

/* 관리자 입구 — 누구나 보이지만 운영진만 들어갈 수 있어요 */
.foot-admin {
  display: inline-block;
  margin-top: 14px;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--gray-l);
  border-bottom: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}
.foot-admin:hover { color: var(--gray); border-bottom-color: currentColor; }

/* ---------- 관리자 초안 미리보기 배지 ---------- */
.draft-badge {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 200;
  background: #000;
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1;
  padding: 11px 18px;
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0.9;
}
.draft-badge:hover { opacity: 1; }

/* ---------- 등장 ---------- */
.rv { opacity: 0; transform: translateY(14px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .track { transition: none; }
}

/* ---------- 반응형 ---------- */
@media (max-width: 900px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .top {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding-top: 24px;
    transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
  }
  body:not([data-page="home"])::before {
    transition: opacity 0.3s var(--ease);
  }

  /* 아래로 스크롤할 때는 메뉴를 감춰서 글·사진과 겹치지 않게 */
  body.nav-hide .top {
    transform: translateY(-115%);
    opacity: 0;
    pointer-events: none;
  }
  body.nav-hide:not([data-page="home"])::before { opacity: 0; }
  .tnav { align-self: stretch; align-items: flex-end; margin-top: 0; }
  body:not([data-page="home"])::before { height: 160px; }
  .page { padding-top: 190px; }
}

@media (max-width: 600px) {
  :root { --gut: 20px; }
  body { font-size: 13.5px; }
  .brand { font-size: 18px; }
  .tnav { gap: 11px; }
  .tnav a { font-size: 16px; }
  .stage-foot { flex-direction: column; align-items: flex-start; gap: 16px; bottom: 30px; }
  .g2 { gap: 8px; }
}
