/*
Theme Name:   Penerbit
Theme URI:    https://example.com/penerbit
Description:  Tema WordPress standalone untuk penerbit buku: landing page, katalog buku, dan blog dengan model single post yang rapi. Ringan, tanpa Google Fonts, siap SEO (schema Organization, Book, BlogPosting).
Author:       Penerbit
Version:      1.1.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  penerbit
Domain Path:  /languages
Tags:         blog, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */
:root {
    --pn-white:          #ffffff;
    --pn-bg:             #fbf9f5;
    --pn-bg-soft:        #f3eee6;
    --pn-border:         #e6dfd3;
    --pn-border-light:   #efe9de;

    --pn-text:           #1c1917;
    --pn-text-muted:     #6b645b;
    --pn-text-light:     #a39b8f;

    --pn-accent:         #9b2c2c;
    --pn-accent-hover:   #7a2020;
    --pn-highlight:      #9b2c2c;
    --pn-highlight-rgb:  155, 44, 44;
    --pn-highlight-soft: rgba(155, 44, 44, .08);
    --pn-ink:            #1c1917;
    --pn-gold:           #b7791f;

    --pn-font:        ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --pn-font-serif:  Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
    --pn-font-mono:   ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

    --pn-radius:      8px;
    --pn-radius-lg:   14px;
    --pn-shadow-sm:   0 1px 3px rgba(28,25,23,.08), 0 1px 2px rgba(28,25,23,.05);
    --pn-shadow-md:   0 6px 20px rgba(28,25,23,.1);
    --pn-shadow-lg:   0 14px 40px rgba(28,25,23,.14);
    --pn-transition:  .2s ease;
}

/* ==========================================================================
   BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

.screen-reader-text {
    border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
    height: 1px; margin: -1px; overflow: hidden; padding: 0;
    position: absolute; width: 1px; word-wrap: normal !important;
}

a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
    outline: 3px solid rgba(var(--pn-highlight-rgb), .45);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important; animation-iteration-count: 1 !important;
        scroll-behavior: auto !important; transition-duration: .01ms !important;
    }
}

body {
    margin: 0;
    background: var(--pn-bg);
    color: var(--pn-text);
    font-family: var(--pn-font);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--pn-accent); text-decoration: none; transition: color var(--pn-transition); }
a:hover { color: var(--pn-accent-hover); }

/* Judul memakai serif agar terasa editorial */
.pnb-post-title,
.pnb-blog-archive__title,
.pnb-page__title,
.pnb-archive-title,
.pnb-blog-row__title,
.pnb-error-page h1 { font-family: var(--pn-font-serif); }

/* ==========================================================================
   TOMBOL
   ========================================================================== */
.pnb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 26px;
    border: 2px solid transparent;
    border-radius: var(--pn-radius);
    font-family: var(--pn-font);
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--pn-transition), color var(--pn-transition), border-color var(--pn-transition), transform var(--pn-transition), box-shadow var(--pn-transition);
}

.pnb-btn:hover { transform: translateY(-1px); }

.pnb-btn--primary { background: var(--pn-accent); border-color: var(--pn-accent); color: #fff; }
.pnb-btn--primary:hover { background: var(--pn-accent-hover); border-color: var(--pn-accent-hover); color: #fff; box-shadow: var(--pn-shadow-md); }

.pnb-btn--ghost { background: transparent; border-color: var(--pn-text); color: var(--pn-text); }
.pnb-btn--ghost:hover { background: var(--pn-text); color: #fff; }

.pnb-btn--light { background: #fff; border-color: #fff; color: var(--pn-ink); }
.pnb-btn--light:hover { background: var(--pn-bg-soft); border-color: var(--pn-bg-soft); color: var(--pn-ink); }

.pnb-btn--sm { min-height: 42px; padding: 8px 18px; font-size: .875rem; }

/* ==========================================================================
   FORM PENCARIAN
   ========================================================================== */
.search-form { display: flex; gap: 10px; margin: 28px auto; max-width: 560px; }
.search-form label { flex: 1; }

.search-field {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 1.5px solid var(--pn-border);
    border-radius: var(--pn-radius);
    background: #fff;
    font: inherit;
}

.search-field:focus { outline: none; border-color: var(--pn-accent); box-shadow: 0 0 0 3px rgba(var(--pn-highlight-rgb), .12); }

.search-submit,
.pnb-error-page__home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 18px;
    border: 0;
    border-radius: var(--pn-radius);
    background: var(--pn-accent);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.search-submit:hover, .pnb-error-page__home:hover { background: var(--pn-accent-hover); color: #fff; }

/* ==========================================================================
   HALAMAN STANDAR & 404
   ========================================================================== */
.pnb-page,
.pnb-error-page { min-height: 60vh; padding: clamp(48px, 8vw, 96px) 24px; }

.pnb-page__inner,
.pnb-error-page__inner { width: min(100%, 760px); margin-inline: auto; }

.pnb-page__title,
.pnb-error-page h1 {
    margin: 0 0 24px;
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1.15;
    letter-spacing: -.02em;
}

.pnb-page__content { line-height: 1.8; }
.pnb-page__content img,
.pnb-page__featured img { max-width: 100%; height: auto; }

.pnb-error-page__inner { text-align: center; }
.pnb-error-page__code {
    margin: 0;
    color: var(--pn-accent);
    font-family: var(--pn-font-serif);
    font-size: clamp(4rem, 12vw, 8rem);
    font-weight: 700;
    line-height: 1;
}
.pnb-error-page__home { margin-top: 8px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background: var(--pn-ink);
    color: rgba(255,255,255,.7);
    padding: 56px 24px 28px;
}

.site-footer__inner {
    width: min(100%, 1140px);
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
}

.site-footer p { margin: 0; }
.site-footer__name { color: #fff; font-family: var(--pn-font-serif); font-size: 1.35rem; font-weight: 700; margin-bottom: 10px !important; }
.site-footer__about { max-width: 34ch; font-size: .92rem; line-height: 1.7; }
.site-footer__heading { color: #fff; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px !important; }

.site-footer__list,
.pnb-footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: .92rem; }
.pnb-footer-menu--social { margin-top: 18px; flex-direction: row; flex-wrap: wrap; gap: 8px 18px; }

.site-footer a { color: rgba(255,255,255,.7); }
.site-footer a:hover { color: #fff; }

.site-footer__copy {
    width: min(100%, 1140px);
    margin: 40px auto 0 !important;
    padding-top: 22px;
    border-top: 1px solid rgba(255,255,255,.12);
    font-size: .82rem;
    color: rgba(255,255,255,.5);
}

@media (max-width: 800px) {
    .site-footer { padding: 44px 20px 24px; }
    .site-footer__inner { grid-template-columns: 1fr; gap: 28px; }
}
