/* 북코드 — 미니멀 화이트 템플릿 */

:root {
  --white: #ffffff;
  --bg: #fafafa;
  --text: #111111;
  --muted: #666666;
  --line: #e5e5e5;
  --blue: #2563eb;
  --blue-light: #eff6ff;
  --font: 'Noto Sans KR', sans-serif;
  --font-display: 'DM Sans', sans-serif;
  --max: 1140px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--text);
  line-height: 1.65;
}

img { display: block; max-width: 100%; height: auto; object-fit: cover; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.skip-link {
  position: absolute; top: -100px; left: 1rem;
  background: var(--text); color: var(--white);
  padding: 0.5rem 1rem; z-index: 9999;
}
.skip-link:focus { top: 1rem; }

/* Header */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  z-index: 1000;
}

.header-bar {
  max-width: var(--max); margin: 0 auto; height: 100%;
  padding: 0 1.5rem; display: flex; align-items: center; gap: 2rem;
}

.logo {
  display: flex; align-items: center; gap: 0.5rem;
  text-decoration: none; color: var(--text); font-weight: 700;
  font-family: var(--font-display); font-size: 1.1rem;
}

.logo-icon { font-size: 1.3rem; color: var(--blue); }

.main-nav { display: flex; gap: 2rem; margin-left: auto; }
.main-nav a {
  color: var(--muted); font-size: 0.875rem; text-decoration: none;
  transition: color 0.15s;
}
.main-nav a:hover { color: var(--text); text-decoration: none; }

.header-cta {
  background: var(--text); color: var(--white);
  padding: 0.5rem 1.1rem; font-size: 0.8rem; font-weight: 500;
  text-decoration: none; transition: background 0.15s;
}
.header-cta:hover { background: var(--blue); text-decoration: none; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
}
.nav-toggle span { width: 20px; height: 1.5px; background: var(--text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center;
  padding: 0.7rem 1.4rem; font-family: var(--font);
  font-size: 0.875rem; font-weight: 500;
  border: none; cursor: pointer; transition: all 0.15s;
}
.btn-primary { background: var(--blue); color: var(--white); text-decoration: none; }
.btn-primary:hover { background: #1d4ed8; text-decoration: none; }
.btn-small {
  padding: 0.4rem 0.9rem; font-size: 0.8rem;
  background: var(--white); color: var(--text);
  border: 1px solid var(--line);
}
.btn-small:hover { border-color: var(--blue); color: var(--blue); }

/* Hero */
.hero {
  padding-top: calc(var(--header-h) + 4rem);
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--line);
}

.hero-wrap {
  max-width: var(--max); margin: 0 auto; padding: 0 1.5rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: end;
}

.hero-kicker { font-size: 0.8rem; color: var(--muted); margin-bottom: 1rem; letter-spacing: 0.05em; }

.hero-text h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 700; line-height: 1.1; letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-lead { color: var(--muted); max-width: 400px; margin-bottom: 2rem; font-size: 1rem; }

.hero-stats-row {
  grid-column: 1; display: flex; gap: 2rem; margin-top: 3rem;
  padding-top: 2rem; border-top: 1px solid var(--line);
}

.stat-box { display: flex; flex-direction: column; }
.stat-num { font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; }
.stat-label { font-size: 0.8rem; color: var(--muted); }

.hero-image {
  grid-row: 1 / 3; grid-column: 2;
  overflow: hidden;
}
.hero-image img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }

/* Sections */
.section {
  max-width: var(--max); margin: 0 auto;
  padding: 5rem 1.5rem;
}

.section-top { margin-bottom: 3rem; }
.section-top h2 {
  font-family: var(--font-display);
  font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}
.section-top p { color: var(--muted); font-size: 0.9rem; }

/* Books */
.books-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem 1.5rem;
}

.book-item figure {
  aspect-ratio: 3/4; overflow: hidden;
  background: var(--bg); margin-bottom: 1rem;
}
.book-item figure img { width: 100%; height: 100%; transition: transform 0.3s; }
.book-item:hover figure img { transform: scale(1.03); }

.book-detail .label {
  display: inline-block; font-size: 0.7rem; font-weight: 600;
  color: var(--blue); text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}
.book-detail h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.2rem; }
.book-detail .meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.5rem; }
.book-detail .price { font-family: var(--font-display); font-weight: 700; margin-bottom: 0.75rem; }

.book-item.featured {
  grid-column: span 1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
  align-items: center;
  padding-bottom: 2rem; border-bottom: 1px solid var(--line);
  grid-column: 1 / -1;
}
.book-item.featured figure { margin-bottom: 0; aspect-ratio: 4/5; max-height: 360px; }

/* Categories */
.categories-section {
  background: var(--bg); max-width: none;
}
.cat-wrap { max-width: var(--max); margin: 0 auto; padding: 5rem 1.5rem; }

.cat-wrap h2 {
  font-family: var(--font-display); font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

.cat-pills { display: flex; gap: 0.5rem; margin-bottom: 2rem; flex-wrap: wrap; }

.cat-pill {
  background: var(--white); border: 1px solid var(--line);
  padding: 0.5rem 1.1rem; font-family: var(--font); font-size: 0.85rem;
  cursor: pointer; transition: all 0.15s;
}
.cat-pill.active, .cat-pill:hover {
  background: var(--text); color: var(--white); border-color: var(--text);
}

.cat-content { padding: 2rem; background: var(--white); border: 1px solid var(--line); }
.cat-desc { color: var(--muted); margin-bottom: 1.5rem; }

.cat-stats { display: flex; gap: 2rem; flex-wrap: wrap; }
.cat-stat { font-size: 0.9rem; color: var(--muted); }
.cat-stat span {
  display: block; font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 700; color: var(--text);
}

/* About */
.about-split { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }

.about-copy h2 {
  font-family: var(--font-display); font-size: 1.75rem; margin-bottom: 1.25rem;
}
.about-copy p { color: var(--muted); margin-bottom: 1rem; }

.values-list { list-style: none; margin-top: 1.5rem; }
.values-list li { padding: 0.4rem 0; font-size: 0.9rem; }

.about-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.about-photos figure { overflow: hidden; background: var(--bg); }
.about-photos img { width: 100%; aspect-ratio: 4/3; }

/* Reviews */
.reviews-section h2 {
  font-family: var(--font-display); font-size: 1.75rem; margin-bottom: 2rem;
}

.reviews-list {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border: 1px solid var(--line);
}

.reviews-list blockquote {
  padding: 2rem; border-right: 1px solid var(--line);
}
.reviews-list blockquote:last-child { border-right: none; }
.reviews-list p { font-size: 0.9rem; color: var(--muted); margin-bottom: 1rem; line-height: 1.7; }
.reviews-list cite { font-size: 0.8rem; font-style: normal; color: var(--text); font-weight: 500; }

/* Policy */
.policy-section h2 {
  font-family: var(--font-display); font-size: 1.75rem; margin-bottom: 2rem;
}

.policy-list {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0;
  border: 1px solid var(--line);
}

.policy-list article {
  padding: 1.75rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.policy-list article:nth-child(2n) { border-right: none; }
.policy-list article:nth-last-child(-n+2) { border-bottom: none; }

.policy-list h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.6rem; }
.policy-list p { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }

/* Contact */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }

.contact-left h2 {
  font-family: var(--font-display); font-size: 1.75rem; margin-bottom: 1rem;
}
.contact-left p { color: var(--muted); margin-bottom: 1.5rem; font-size: 0.9rem; }
.contact-left address { font-style: normal; font-size: 0.875rem; line-height: 1.8; }

.contact-form label { display: block; font-size: 0.8rem; font-weight: 500; margin-bottom: 0.3rem; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; border: 1px solid var(--line); padding: 0.65rem 0.85rem;
  font-family: var(--font); font-size: 0.875rem; margin-bottom: 1rem;
  background: var(--white); transition: border-color 0.15s;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--blue);
}
.checkbox-label { display: flex; gap: 0.5rem; font-size: 0.85rem; align-items: flex-start; cursor: pointer; }
.checkbox-label input { width: auto; margin-top: 3px; }

.form-note { font-size: 0.85rem; margin-top: 0.5rem; }
.form-note.error { color: #dc2626; }
.form-note.success { color: #16a34a; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 1.5rem;
}

.footer-wrap {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; gap: 2rem; flex-wrap: wrap;
}

.footer-logo {
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
}

.footer-nav { display: flex; gap: 1.5rem; margin-left: auto; flex-wrap: wrap; }
.footer-nav a { color: var(--muted); font-size: 0.8rem; text-decoration: none; }
.footer-nav a:hover { color: var(--text); }

.footer-copy { font-size: 0.8rem; color: var(--muted); }

/* Cookie & Toast */
.cookie-banner {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--white);
  padding: 0.85rem 1.25rem; display: flex; align-items: center; gap: 1rem;
  z-index: 2000; font-size: 0.85rem; max-width: 90%;
}
.cookie-banner a { color: var(--white); text-decoration: underline; }

.toast {
  position: fixed; bottom: 2rem; right: 2rem;
  background: var(--text); color: var(--white);
  padding: 0.75rem 1.25rem; font-size: 0.875rem; z-index: 3000;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-wrap { grid-template-columns: 1fr; }
  .hero-image { grid-row: auto; grid-column: 1; order: -1; max-height: 300px; }
  .hero-stats-row { margin-top: 1.5rem; }
  .books-row { grid-template-columns: repeat(2, 1fr); }
  .book-item.featured { grid-template-columns: 1fr; }
  .about-split, .contact-wrap { grid-template-columns: 1fr; }
  .reviews-list, .policy-list { grid-template-columns: 1fr; }
  .reviews-list blockquote, .policy-list article { border-right: none; }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; margin-left: auto; }
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: var(--white); flex-direction: column; padding: 1.5rem;
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%); transition: transform 0.3s;
  }
  .main-nav.open { transform: translateY(0); }
  .header-cta { display: none; }
  .books-row { grid-template-columns: 1fr; }
  .hero-stats-row { flex-direction: column; gap: 1rem; }
}
