:root {
  --primary: #1a1a1a;
  --accent: #444;
  --light-bg: #f4f4f4;
  --text: #222;
  --muted: #999;
  --white: #fff;
  --border: #ddd;
}

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

/* 드래그 / 이미지 저장 금지 */
* {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

body {
  font-family: 'Nanum Myeongjo', 'Georgia', serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.8;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  height: 64px;
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1a2e9e;
  letter-spacing: 2px;
  text-decoration: none;
  font-family: 'Nanum Gothic', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo img {
  height: 36px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: #000;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: 1px;
  font-family: 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  transition: color .2s;
}

.nav-links a:hover,
.nav-links a.active { color: #1a2e9e; }

/* ── HERO ── */
#hero {
  background: var(--light-bg);
  color: var(--primary);
  text-align: center;
  padding: 80px 5% 60px;
}

#hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  letter-spacing: 6px;
  margin-bottom: 1rem;
  color: #1a2e9e;
  font-family: 'Nanum Gothic', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  font-weight: 800;
}

#hero p {
  font-size: 1.1rem;
  color: #b5295e;
  max-width: 520px;
  margin: 0 auto 2.5rem;
}

.btn {
  display: inline-block;
  padding: .75rem 2.2rem;
  border: 1.5px solid #1a1a1a;
  color: #1a1a1a;
  text-decoration: none;
  font-size: .9rem;
  letter-spacing: 2px;
  transition: background .2s, color .2s;
  border-radius: 2px;
}

.btn:hover {
  background: #1a1a1a;
  color: var(--white);
}

/* ── PAGE COMMON ── */
.page-body {
  padding: 80px 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2rem;
  letter-spacing: 4px;
  color: var(--primary);
  margin-bottom: .5rem;
  font-family: 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
}

.section-header .en {
  font-size: .85rem;
  color: #b5295e;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.divider {
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin: 1rem auto 0;
}

/* ── 회사 소개 ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  max-width: 680px;
  margin: 0 auto;
}

.about-img {
  background: transparent;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.about-values {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.value-card {
  flex: 1;
  text-align: center;
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--white);
}

.value-card .icon { font-size: 1.8rem; margin-bottom: .5rem; }
.value-card p { font-size: .85rem; color: var(--muted); margin: 0; }
.value-card strong { display: block; font-size: .9rem; color: var(--primary); margin-bottom: .2rem; }

/* ── 포트폴리오 ── */
.category-section {
  margin-bottom: 48px;
}

.category-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #1a3a8f;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #1a3a8f;
  font-family: 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
}

.category-row {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

.category-row::-webkit-scrollbar { height: 4px; }
.category-row::-webkit-scrollbar-track { background: transparent; }
.category-row::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

.book-card {
  cursor: pointer;
  flex: 0 0 180px;
  transition: transform .25s;
}

.book-card:hover { transform: translateY(-6px); }

.book-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--primary);
  border-radius: 4px 8px 8px 4px;
  box-shadow: -4px 4px 16px rgba(0,0,0,.25), inset -6px 0 12px rgba(0,0,0,.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.book-cover::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 12px;
  background: rgba(0,0,0,.22);
}

.book-cover .cover-title {
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 1px;
  line-height: 1.4;
  z-index: 1;
  margin-bottom: .5rem;
}

.book-cover .cover-author {
  font-size: .75rem;
  color: rgba(255,255,255,.65);
  z-index: 1;
}

.c1 { background: linear-gradient(135deg, #2c3e50, #3d6b8c); }
.c2 { background: linear-gradient(135deg, #6b2c2c, #a04040); }
.c3 { background: linear-gradient(135deg, #2c5c3e, #3d8c5e); }
.c4 { background: linear-gradient(135deg, #5c4a2c, #8c7040); }
.c5 { background: linear-gradient(135deg, #3c2c5c, #6040a0); }
.c6 { background: linear-gradient(135deg, #2c4c5c, #3d7080); }

.book-info {
  padding: .9rem .2rem .3rem;
}

.book-info .title {
  font-size: .92rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .2rem;
  letter-spacing: .5px;
  font-family: 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
}

.book-info .author { font-size: .8rem; color: #111; }
.book-info .price { font-size: .82rem; color: #b5295e; margin-top: .3rem; }

/* ── 모달 ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--white);
  border-radius: 8px;
  max-width: 960px;
  width: 100%;
  display: grid;
  grid-template-columns: 320px 1fr;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}

.modal-cover {
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  padding: 1.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
}

.modal-body { padding: 2rem; }
.modal-body h3 { font-size: 1.4rem; color: var(--primary); margin-bottom: .3rem; }
.modal-body .m-author { color: #111; font-size: .9rem; margin-bottom: 1.2rem; }
.modal-body .m-desc { font-size: .92rem; color: #111; line-height: 1.9; margin-bottom: 1.5rem; }
.modal-body .m-tag { font-size: .88rem; color: #c0392b; font-weight: 700; margin-bottom: 1rem; }
.modal-body .m-price { font-size: 1.1rem; color: #b5295e; font-weight: 700; margin-bottom: 1.5rem; }

#mStores {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.store-btn {
  display: inline-block;
  padding: .5rem 1.2rem;
  background: var(--primary);
  color: var(--white);
  text-decoration: none;
  font-size: .85rem;
  border-radius: 3px;
  letter-spacing: .5px;
  transition: background .2s;
  font-family: 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
}

.store-btn:hover { background: #444; }

.modal-close {
  position: absolute;
  top: 1rem; right: 1.2rem;
  font-size: 1.8rem;
  color: var(--white);
  cursor: pointer;
  line-height: 1;
}

/* ── 구매/연락 ── */
.purchase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  max-width: 600px;
  margin: 0 auto;
}

.purchase-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2.2rem 1.8rem;
  text-align: center;
  transition: box-shadow .2s;
}

.purchase-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.1); }
.purchase-card .icon { font-size: 2.4rem; margin-bottom: 1rem; }
.purchase-card h4 { font-size: 1.05rem; color: var(--primary); letter-spacing: 1px; margin-bottom: .8rem; }
.purchase-card p { font-size: .88rem; color: #666; margin-bottom: 1.2rem; }

/* ── FOOTER ── */
footer {
  background: var(--light-bg);
  color: #999;
  text-align: center;
  padding: 2.5rem 5%;
  font-size: .82rem;
  letter-spacing: 1px;
  border-top: 1px solid var(--border);
}

footer strong { color: #444; }

/* ── 햄버거 버튼 ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
}

.nav-hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: all .3s;
}

.menu-text {
  display: none;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--primary);
  font-family: 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  margin-top: 2px;
  width: 25px;
  text-align: center;
  height: auto;
  background: none;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {

  /* 네비 */
  nav {
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .nav-hamburger { display: flex; }
  .menu-text { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--border);
    border-bottom: 2px solid var(--border);
    box-shadow: 0 6px 16px rgba(0,0,0,.1);
    z-index: 999;
  }

  .nav-links.open { display: flex; }

  .nav-links li { border-bottom: 1px solid var(--border); }

  .nav-links li:last-child { border-bottom: none; }

  .nav-links li a {
    display: block;
    padding: 1rem 6%;
    font-size: 1rem;
    letter-spacing: .5px;
  }

  /* 소개 */
  .about-grid { grid-template-columns: 1fr; }
  .about-img { height: 200px; }

  /* 페이지 여백 */
  .page-body { padding: 40px 4%; }

  /* 섹션 헤더 */
  .section-header { margin-bottom: 36px; }
  .section-header h2 { font-size: 1.5rem; }

  /* 책 카드 */
  .book-card { flex: 0 0 130px; }

  /* 모달 */
  .modal-overlay { padding: .5rem; }
  .modal {
    grid-template-columns: 1fr;
    max-height: 90vh;
    overflow-y: auto;
  }
  .modal-cover { aspect-ratio: unset; height: 200px; }
  .modal-body { padding: 1.2rem; }
  .modal-body h3 { font-size: 1.1rem; }

  /* 히어로 */
  #hero { padding: 40px 5% 30px; }
  #hero h1 { font-size: 2rem; }
  #hero p { font-size: 1rem; }

  /* 구매 카드 */
  .purchase-grid { grid-template-columns: 1fr; }
}
