:root {
    --ink: #17130f;
    --ink-soft: #4a4234;
    --muted: #8a8171;
    --paper: #faf7f0;
    --paper-alt: #f1ead6;
    --accent: #a97a1f;
    --accent-dark: #82600f;
    --gold-light: #e8c157;
    --navy: #2c4a68;
    --line: #e6dcc3;
    --white: #ffffff;
    --radius: 10px;
    --shadow: 0 10px 30px rgba(23, 19, 15, 0.08);
    --font-head: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; margin: 0 0 0.5em; line-height: 1.2; }
p { margin: 0 0 1em; color: var(--ink-soft); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 50px; width: auto; display: block; border-radius: 8px; flex-shrink: 0; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 19px; color: var(--ink); }
.brand-name em { font-style: normal; color: var(--accent); }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a { font-size: 15px; font-weight: 500; color: var(--ink-soft); }
.main-nav a:hover { color: var(--accent); }
.main-nav a.active { color: var(--accent); font-weight: 700; }
.nav-cta { background: var(--ink); color: var(--white) !important; padding: 9px 18px; border-radius: 999px; }
.nav-cta:hover { background: var(--accent) !important; }
.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); display: block; }

/* Hero / banner */
.hero { position: relative; background: var(--ink); color: var(--white); overflow: hidden; }
.hero img { width: 100%; height: 460px; object-fit: cover; opacity: 0.55; }
.hero-content { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.hero-content .container { width: 100%; }
.hero-content h1 { font-size: 44px; max-width: 620px; color: var(--white); }
.hero-content p { color: #e9e2d6; font-size: 18px; max-width: 520px; }

.page-hero { background: var(--paper-alt); padding: 64px 0 48px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: 36px; }
.page-hero p { max-width: 640px; font-size: 17px; }

.logo-panel { flex-shrink: 0; display: inline-block; background: var(--ink); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.logo-panel img { width: 160px; height: auto; display: block; }
.about-intro { display: flex; align-items: center; gap: 40px; }
.about-intro p { max-width: 640px; }
@media (max-width: 720px) {
    .logo-panel img { width: 120px; }
    .about-intro { flex-direction: column; align-items: flex-start; gap: 24px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 999px; font-weight: 600; font-size: 15px; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-light { background: var(--white); color: var(--ink); }

/* Sections */
section { padding: 64px 0; }
.section-alt { background: var(--paper-alt); }
.section-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 32px; gap: 24px; flex-wrap: wrap; }
.section-header h2 { font-size: 30px; margin: 0; }
.section-header .lead { color: var(--muted); max-width: 520px; margin: 8px 0 0; }
.section-link { font-weight: 600; color: var(--accent); white-space: nowrap; }

/* Book grid */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px; }
.book-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.2s ease; }
.book-card:hover { transform: translateY(-4px); }
.book-cover { aspect-ratio: 3/4.2; overflow: hidden; background: var(--paper-alt); }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-info { padding: 16px 18px 20px; }
.book-badges { display: flex; gap: 6px; margin-bottom: 8px; }
.badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 9px; border-radius: 999px; }
.badge-featured { background: #f3e6c9; color: var(--accent-dark); }
.badge-new { background: #dbe6ee; color: var(--navy); }
.muted-note { opacity: 0.75; font-size: 0.85em; }
.book-info h3 { font-size: 17px; margin-bottom: 2px; }
.book-info .author { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.book-info .price { font-weight: 700; color: var(--ink); }

/* Filters */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.filter-bar a { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; font-weight: 500; color: var(--ink-soft); }
.filter-bar a.active, .filter-bar a:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.search-box { display: flex; margin-bottom: 24px; max-width: 420px; }
.search-box input { flex: 1; padding: 11px 16px; border: 1px solid var(--line); border-radius: 999px 0 0 999px; font-family: var(--font-body); font-size: 14px; }
.search-box button { border-radius: 0 999px 999px 0; padding: 0 20px; }

/* Book detail */
.book-detail { display: grid; grid-template-columns: 340px 1fr; gap: 48px; align-items: start; }
.book-detail .book-cover { border-radius: var(--radius); box-shadow: var(--shadow); }
.book-detail-meta { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.meta-pill { background: var(--paper-alt); padding: 8px 14px; border-radius: 8px; font-size: 13px; color: var(--ink-soft); }
.detail-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.author-strip { display: flex; align-items: center; gap: 14px; margin-top: 32px; padding: 18px; background: var(--paper-alt); border-radius: var(--radius); }
.author-strip img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }

/* Authors */
.author-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 28px; }
.author-card { background: var(--white); border-radius: var(--radius); padding: 26px; text-align: center; box-shadow: var(--shadow); }
.author-card img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto 16px; }
.author-card h3 { font-size: 18px; margin-bottom: 4px; }
.author-card .book-count { font-size: 13px; color: var(--muted); margin-bottom: 10px; }

.author-detail { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: start; }
.author-detail img { border-radius: 50%; width: 200px; height: 200px; object-fit: cover; box-shadow: var(--shadow); }

/* Services */
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.service-card { background: var(--white); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.service-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--paper-alt); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; font-weight: 700; font-family: var(--font-head); }
.service-card h3 { font-size: 18px; }

/* Certifications */
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
.cert-card { background: var(--white); border-radius: var(--radius); padding: 20px; text-align: center; box-shadow: var(--shadow); }
.cert-card img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; margin: 0 auto 12px; }
.cert-card h4 { font-size: 15px; margin-bottom: 4px; }
.cert-card p { font-size: 13px; }

/* Testimonials */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.testimonial-card { background: var(--white); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.testimonial-stars { color: var(--accent); font-size: 14px; margin-bottom: 10px; }
.testimonial-person { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.testimonial-person img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.testimonial-person strong { display: block; font-size: 14px; }
.testimonial-person span { font-size: 12px; color: var(--muted); }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 18px; }
.form-group.full { grid-column: 1 / -1; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
input[type=text], input[type=email], input[type=tel], input[type=search], input[type=password], input[type=number], textarea, select {
    width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px;
    font-family: var(--font-body); font-size: 14px; background: var(--white); color: var(--ink);
}
textarea { resize: vertical; min-height: 120px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }

.alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.alert-success { background: #dcede0; color: #245933; }
.alert-error { background: #f6dede; color: #7a2323; }

.request-access-card { margin-top: 32px; padding: 24px; background: var(--paper-alt); border: 1px solid var(--line); border-radius: var(--radius); max-width: 440px; }
.request-access-card h3 { margin-top: 0; }
.request-access-card > p { font-size: 14px; color: var(--ink-soft); }
.request-access-form .form-group { margin-bottom: 14px; }
.request-access-form .form-group:last-of-type { margin-bottom: 0; }
.request-access-form button { margin-top: 4px; }

/* Contact page */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-info-card { background: var(--ink); color: var(--white); border-radius: var(--radius); padding: 32px; }
.contact-info-card h3 { color: var(--white); }
.contact-info-card p { color: #cfc6ba; }
.contact-info-card .row { display: flex; gap: 12px; margin-bottom: 16px; align-items: flex-start; }

/* PDF viewer */
.pdf-frame { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }

/* Footer */
.site-footer { background: var(--ink); color: #cfc6ba; margin-top: 64px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-top: 56px; padding-bottom: 40px; }
.footer-brand .brand-logo { height: 56px; border-radius: 8px; }
.footer-brand p { margin-top: 16px; font-size: 14px; color: #cfc6ba; }
.footer-links h4, .footer-contact h4 { color: var(--white); font-family: var(--font-body); font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.footer-links a { display: block; margin-bottom: 10px; font-size: 14px; color: #cfc6ba; }
.footer-links a:hover { color: var(--white); }
.footer-contact p { font-size: 14px; margin-bottom: 8px; color: #cfc6ba; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 18px 0; font-size: 13px; text-align: center; color: #9c9284; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }

@media (max-width: 860px) {
    .main-nav { position: fixed; top: 80px; left: 0; right: 0; background: var(--white); flex-direction: column; align-items: flex-start; padding: 20px 24px; gap: 16px; border-bottom: 1px solid var(--line); display: none; }
    .main-nav.open { display: flex; }
    .nav-toggle { display: flex; }
    .book-detail, .author-detail, .contact-layout, .footer-inner, .form-grid { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 32px; }
}
