@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.min.css');

:root {
    --primary: #0f172a;
    --accent: #7C3AED;
    --accent-light: #EDE9FE;
    --accent-hover: #6D28D9;
    --bg: #ffffff;
    --surface: #F8F9FF;
    --surface2: #F1F5F9;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --white: #ffffff;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.06);
    --shadow-hover: 0 4px 6px rgba(0,0,0,0.06), 0 12px 32px rgba(0,0,0,0.10);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Pretendard Variable', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── 공통 레이아웃 ─────────────────────────────────── */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }

/* ── 네비게이션 ───────────────────────────────────── */
.nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}
.nav-logo {
    font-size: 1.25rem; font-weight: 800; letter-spacing: -0.03em;
    color: var(--primary);
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
    font-size: 0.9rem; font-weight: 500; color: var(--text-muted);
    transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-cta {
    display: inline-flex; align-items: center;
    padding: 8px 20px; border-radius: 8px;
    background: var(--accent); color: #fff;
    font-size: 0.88rem; font-weight: 600;
    transition: background 0.2s, transform 0.15s;
}
.nav-links a.nav-cta { color: #fff; }
.nav-cta:hover { background: var(--accent-hover); transform: translateY(-1px); color: #fff; }

/* 모바일 햄버거 */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--primary); margin: 5px 0; border-radius: 2px; transition: 0.3s; }

@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-links {
        display: none; flex-direction: column; gap: 0;
        position: absolute; top: 64px; left: 0; right: 0;
        background: #fff; border-bottom: 1px solid var(--border);
        padding: 16px 24px 24px;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 10px 0; border-bottom: 1px solid var(--border); width: 100%; }
    .nav-links a:last-child { border-bottom: none; }
    .nav-cta { margin-top: 12px; justify-content: center; }
}

/* ── 버튼 ─────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 12px 28px; border-radius: var(--radius);
    font-size: 0.95rem; font-weight: 600;
    cursor: pointer; border: none; transition: all 0.2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(124,58,237,0.3); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }

/* ── 섹션 헤더 ────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 56px; }
.section-label {
    display: inline-block;
    font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--accent);
    background: var(--accent-light); padding: 4px 12px; border-radius: 20px;
    margin-bottom: 16px;
}
.section-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800; letter-spacing: -0.03em;
    color: var(--primary); line-height: 1.25;
    margin-bottom: 16px;
}
.section-desc { font-size: 1rem; color: var(--text-muted); max-width: 560px; margin: 0 auto; }

/* ── 카드 ─────────────────────────────────────────── */
.card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); transition: box-shadow 0.25s, transform 0.25s;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }

/* ── 도서 커버 (CSS 생성) ────────────────────────── */
.book-cover {
    width: 100%; aspect-ratio: 3/4;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 24px; position: relative; overflow: hidden;
}
.book-cover::before {
    content: ''; position: absolute; inset: 0;
    background: rgba(0,0,0,0.15);
}
.book-cover-title {
    position: relative; z-index: 1;
    font-size: 1.1rem; font-weight: 800; color: #fff;
    text-align: center; line-height: 1.4; letter-spacing: -0.02em;
}
.book-cover-author {
    position: relative; z-index: 1;
    font-size: 0.75rem; color: rgba(255,255,255,0.8);
    margin-top: 12px; font-weight: 500;
}

/* ── 태그/배지 ────────────────────────────────────── */
.tag {
    display: inline-block;
    padding: 3px 10px; border-radius: 20px;
    font-size: 0.72rem; font-weight: 700;
    background: var(--accent-light); color: var(--accent);
}
.tag-gray { background: var(--surface2); color: var(--text-muted); }

/* ── 풋터 ─────────────────────────────────────────── */
.footer {
    background: var(--primary); color: rgba(255,255,255,0.6);
    padding: 48px 0 32px;
}
.footer-inner {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 40px; margin-bottom: 40px;
}
.footer-brand { max-width: 280px; }
.footer-logo {
    font-size: 1.2rem; font-weight: 800; color: #fff;
    letter-spacing: -0.03em; margin-bottom: 10px;
}
.footer-logo span { color: var(--accent); }
.footer-desc { font-size: 0.85rem; line-height: 1.7; }
.footer-links { display: flex; gap: 48px; }
.footer-col h4 { font-size: 0.8rem; font-weight: 700; color: #fff; margin-bottom: 14px; letter-spacing: 0.05em; text-transform: uppercase; }
.footer-col a { display: block; font-size: 0.85rem; color: rgba(255,255,255,0.5); margin-bottom: 8px; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    font-size: 0.8rem; color: rgba(255,255,255,0.3);
}
@media (max-width: 640px) {
    .footer-inner { flex-direction: column; }
    .footer-links { flex-direction: column; gap: 24px; }
}

/* ── 폼 ──────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-input, .form-textarea, .form-select {
    width: 100%; padding: 12px 16px;
    border: 1.5px solid var(--border); border-radius: 8px;
    font-size: 0.95rem; font-family: inherit;
    color: var(--text); background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}
.form-textarea { resize: vertical; min-height: 140px; }

/* ── 그리드 ───────────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* ── 페이지 히어로 (서브페이지) ──────────────────── */
.page-hero {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 64px 0 56px;
    text-align: center;
}
.page-hero-label {
    display: inline-block;
    font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--accent);
    margin-bottom: 14px;
}
.page-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800; letter-spacing: -0.03em;
    color: var(--primary); line-height: 1.2; margin-bottom: 14px;
}
.page-hero p { font-size: 1rem; color: var(--text-muted); max-width: 520px; margin: 0 auto; }

/* ── 유틸리티 ─────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-48 { margin-top: 48px; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
