/*
Theme Name: AuthorPress
Theme URI: https://store.bencreatesbooks.com/b/authorpress-wordpress-theme
Author: BenCreatesBooks
Author URI: https://bencreatesbooks.com
Description: A WordPress theme for authors. Book showcase, author bio sections, blog, and newsletter signup, with ready-made color palettes and Google Fonts controlled from the Customizer. Pair it with the free Ben Creates Books Author Toolkit plugin for the Books and Events post types, book and event detail fields, and the guided setup wizard with demo content import.
Version: 1.0.6
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: authorpress
Tags: blog, portfolio, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
  --ap-ivory: #faf6ef;
  --ap-cream: #f5ede4;
  --ap-burgundy: #6b1f2a;
  --ap-burgundy-dark: #4e1520;
  --ap-gold: #d9b98c;
  --ap-ink: #2b2b2b;
  --ap-muted: #6e6e6e;
  --ap-line: #e2d7c3;
  --ap-max: 1140px;
}

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

body {
  font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ap-ink);
  background: var(--ap-ivory);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Cardo', Georgia, serif;
  color: var(--ap-burgundy);
  line-height: 1.3;
  margin-bottom: 0.6em;
  font-weight: 700;
}
h1 { font-size: 2.6rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p { margin-bottom: 1em; }
a { color: var(--ap-burgundy); text-decoration: none; }
a:hover { color: var(--ap-burgundy-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; }

.wrap { max-width: var(--ap-max); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  background: var(--ap-ivory);
  border-bottom: 1px solid var(--ap-line);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; }
.site-brand { font-family: 'Cardo', serif; font-size: 1.6rem; font-weight: 700; color: var(--ap-burgundy); }
.site-brand:hover { text-decoration: none; }
.main-nav ul { display: flex; gap: 32px; list-style: none; }
.main-nav a { font-size: 0.95rem; letter-spacing: 0.04em; color: var(--ap-ink); font-weight: 500; }
.main-nav a:hover { color: var(--ap-burgundy); text-decoration: none; }

/* Hero */
.hero {
  background: var(--ap-burgundy);
  color: var(--ap-ivory);
  padding: 140px 0 130px;
  text-align: center;
}
.hero .kicker {
  font-size: 0.8rem; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--ap-gold); margin-bottom: 20px;
}
.hero h1 { color: var(--ap-ivory); font-size: 4.2rem; margin-bottom: 20px; }
.hero p.lead { font-size: 1.35rem; color: #efe3d0; max-width: 680px; margin: 0 auto 40px; }
.btn {
  display: inline-block; background: var(--ap-gold); color: #3a2415;
  padding: 14px 36px; border-radius: 3px; font-weight: 600; font-size: 1rem;
  border: none; cursor: pointer;
}
.btn:hover { background: #c9a878; color: #3a2415; text-decoration: none; }
.btn-disabled { background: #c9c2b4; cursor: default; }
.btn-disabled:hover { background: #c9c2b4; color: #fff; }
.btn-outline {
  background: transparent; color: var(--ap-ivory); border: 1px solid var(--ap-gold);
  margin-left: 12px;
}
.btn-outline:hover { background: rgba(217,185,140,0.15); color: var(--ap-ivory); }

/* Sections */
.section { padding: 100px 0; }
.section-alt { background: var(--ap-cream); }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head .kicker {
  font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ap-muted); margin-bottom: 10px;
}
.section-head h2 { font-size: 2.6rem; }

/* Books grid */
.books-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 40px; }
.book-card { text-align: center; }
.book-card .book-cover {
  aspect-ratio: 2/3; background: var(--ap-line); border-radius: 2px; overflow: hidden;
  margin-bottom: 16px; box-shadow: 0 12px 32px rgba(60,20,30,0.14);
}
.book-card .book-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.book-card h3 { font-size: 1.3rem; margin-bottom: 4px; }
.book-card h3 a { color: var(--ap-ink); }
.book-card .book-meta { font-size: 0.9rem; color: var(--ap-muted); }
.book-card .book-price { font-size: 0.95rem; font-weight: 600; color: var(--ap-burgundy); margin-top: 6px; }

/* Single book */
.book-single { display: grid; grid-template-columns: 320px 1fr; gap: 56px; padding: 64px 0; }
.book-single .book-cover img { box-shadow: 0 16px 48px rgba(60,20,30,0.18); border-radius: 2px; }
.book-single .buy-box {
  background: var(--ap-cream); border: 1px solid var(--ap-line); border-radius: 4px;
  padding: 24px; margin-top: 28px;
}
.book-single .buy-box .price { font-family: 'Cardo', serif; font-size: 1.8rem; color: var(--ap-burgundy); }

/* About */
.about-grid { display: grid; grid-template-columns: 280px 1fr; gap: 56px; align-items: center; }
.about-grid img { border-radius: 50%; aspect-ratio: 1; object-fit: cover; }

/* Posts */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px; }
.post-card { background: #fffdf8; border: 1px solid var(--ap-line); border-radius: 4px; overflow: hidden; }
.post-card .post-body { padding: 24px; }
.post-card .post-date { font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ap-muted); }
.post-card h3 { font-size: 1.35rem; margin: 8px 0; }
.post-card h3 a { color: var(--ap-ink); }

/* Newsletter */
.newsletter { background: var(--ap-burgundy); color: var(--ap-ivory); text-align: center; padding: 72px 0; }
.newsletter h2 { color: var(--ap-ivory); }
.newsletter p { color: #efe3d0; max-width: 560px; margin: 0 auto 24px; }
.newsletter form { display: flex; gap: 12px; max-width: 480px; margin: 0 auto; }
.newsletter input[type="email"] {
  flex: 1; padding: 14px 18px; border: none; border-radius: 3px; font-size: 1rem;
}

/* Content */
.content-area { padding: 64px 0; max-width: 760px; margin: 0 auto; }
.content-area ul, .content-area ol { margin: 0 0 1em 1.4em; }
blockquote {
  border-left: 3px solid var(--ap-gold); padding: 8px 0 8px 20px; margin: 1.5em 0;
  font-family: 'Cardo', serif; font-style: italic; font-size: 1.25rem; color: var(--ap-burgundy);
}

/* Footer */
.site-footer { background: #241014; color: #cbbfae; padding: 56px 0 28px; font-size: 0.95rem; }
.site-footer .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; }
.site-footer h4 { color: var(--ap-gold); font-size: 1rem; font-family: 'Inter', sans-serif; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer a { color: #cbbfae; }
.site-footer .copyright { text-align: center; margin-top: 40px; padding-top: 24px; border-top: 1px solid #3d2028; font-size: 0.85rem; }
.site-footer .footer-nav-wrap { display: block; margin-top: 40px; }
.footer-nav ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; list-style: none; }
.footer-nav a:hover { color: var(--ap-gold); text-decoration: none; }

/* Comments */
.comments-area { margin-top: 56px; border-top: 1px solid var(--ap-line); padding-top: 36px; }
.comments-title { font-size: 1.6rem; margin-bottom: 28px; }
.comment-list { list-style: none; margin: 0 0 32px; padding: 0; }
.comment-list .children { list-style: none; margin: 24px 0 0 72px; padding: 0; }
.comment-body {
  background: #fffdf8; border: 1px solid var(--ap-line); border-radius: 8px;
  padding: 24px; margin-bottom: 20px; position: relative;
}
.comment-author { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.comment-author img.avatar { border-radius: 50%; width: 56px; height: 56px; }
.comment-author .fn { font-weight: 600; font-style: normal; font-size: 1.05rem; }
.comment-author .fn a { color: var(--ap-ink); }
.comment-metadata { font-size: 0.85rem; color: var(--ap-muted); margin-bottom: 12px; }
.comment-metadata a { color: var(--ap-muted); }
.comment-content { font-size: 1rem; }
.comment-content p { margin-bottom: 0.8em; }
.reply { margin-top: 12px; }
.comment-reply-link {
  display: inline-block; font-size: 0.88rem; font-weight: 600; letter-spacing: 0.04em;
  color: var(--ap-burgundy); border: 1px solid var(--ap-line); border-radius: 20px;
  padding: 6px 18px; text-transform: uppercase;
}
.comment-reply-link:hover { background: var(--ap-burgundy); color: #fff; text-decoration: none; border-color: var(--ap-burgundy); }
.bypostauthor > .comment-body { border-color: var(--ap-gold); box-shadow: 0 0 0 1px var(--ap-gold); }
.comment-awaiting-moderation { font-style: italic; color: var(--ap-muted); font-size: 0.9rem; }

/* Comment form */
.comment-respond { background: var(--ap-cream); border-radius: 10px; padding: 36px; margin-top: 16px; }
.comment-respond h3 { font-size: 1.5rem; margin-bottom: 6px; }
.comment-respond .comment-notes { font-size: 0.92rem; color: var(--ap-muted); margin-bottom: 20px; }
.comment-form p { margin-bottom: 18px; }
.comment-form label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%; padding: 14px 16px; border: 1px solid var(--ap-line); border-radius: 6px;
  font-size: 1rem; font-family: inherit; background: #fff; color: var(--ap-ink);
}
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
  outline: none; border-color: var(--ap-burgundy); box-shadow: 0 0 0 3px rgba(107,31,42,.1);
}
.comment-form input[type="submit"]:focus {
  outline: 3px solid var(--ap-burgundy); outline-offset: 2px;
}
.comment-form-cookies-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; color: var(--ap-muted); }
.comment-form-cookies-consent input { margin-top: 5px; }
.comment-form .form-submit { margin-bottom: 0; }
.no-comments { font-style: italic; color: var(--ap-muted); }

/* Responsive */
@media (max-width: 800px) {
  .book-single, .about-grid { grid-template-columns: 1fr; }
}

/* Press strip */
.press-strip { background: var(--ap-ivory); border-top: 1px solid var(--ap-line); border-bottom: 1px solid var(--ap-line); padding: 36px 0; text-align: center; }
.press-label { font-size: 0.75rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ap-muted); margin-bottom: 22px; }
.press-logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 24px 56px; }
.press-logo { font-family: var(--ap-heading-font, Georgia), Georgia, serif; font-size: 1.35rem; letter-spacing: 0.06em; color: #8a7a5c; white-space: nowrap; }
.press-logo img { max-height: 44px; width: auto; display: block; }

/* Two-column page (About) */
.page-two-col { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; margin: 36px 0; }
.page-photo img { width: 100%; height: auto; border-radius: 4px; box-shadow: 0 16px 40px rgba(60,20,30,0.16); }

@media (max-width: 760px) {
  .page-two-col { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { font-size: 2.2rem; }
  .site-header .wrap { flex-wrap: wrap; row-gap: 12px; }
  .main-nav { order: 3; width: 100%; }
  .main-nav ul { flex-wrap: wrap; gap: 10px 18px; }
  .newsletter form { flex-direction: column; }
  .comment-list .children { margin-left: 24px; }
  .comment-respond { padding: 24px; }
}

/* Retailers */
.retailers { margin-top: 18px; }
.retailers-label { display: block; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ap-muted); margin-bottom: 10px; }
.retailer-btn { display: inline-block; margin: 0 8px 8px 0; padding: 10px 20px; border: 2px solid var(--retailer-color, var(--ap-burgundy)); color: var(--retailer-color, var(--ap-burgundy)); border-radius: 8px; font-weight: 600; text-decoration: none; transition: all 0.2s; }
.retailer-btn:hover { background: var(--retailer-color, var(--ap-burgundy)); color: #fff; }

/* Book quotes */
.book-quotes { margin: 64px 0; }
.book-quotes h2, .book-reviews h2 { margin-bottom: 28px; }
.book-quote { position: relative; margin: 0 0 36px; padding: 12px 0 12px 88px; border: none; }
.book-quote::before { content: "\201C"; position: absolute; left: 0; top: -24px; font-family: Cardo, Georgia, serif; font-size: 7rem; line-height: 1; color: var(--ap-gold); }
.book-quote p { font-family: Cardo, Georgia, serif; font-size: 1.45rem; line-height: 1.6; font-style: italic; color: var(--ap-ink); margin-bottom: 8px; }
.book-quote cite { font-style: normal; font-size: 0.95rem; color: var(--ap-muted); }

/* Reviews */
.book-reviews { margin: 64px 0; }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.review-card { background: #fff; border: 1px solid var(--ap-line); border-radius: 12px; padding: 28px; }
.review-stars { color: var(--ap-gold); font-size: 1.25rem; letter-spacing: 3px; margin-bottom: 12px; }
.review-quote { font-style: italic; margin-bottom: 16px; }
.review-byline strong { display: block; }
.review-byline span { font-size: 0.9rem; color: var(--ap-muted); }

/* Events */
.events-list { display: grid; gap: 20px; margin-top: 24px; }
.event-card { display: flex; gap: 24px; background: #fff; border: 1px solid var(--ap-line); border-radius: 12px; padding: 24px; align-items: center; }
.event-date { flex-shrink: 0; width: 92px; text-align: center; background: var(--ap-burgundy); color: #fff; border-radius: 10px; padding: 14px 8px; }
.event-day { display: block; font-family: Cardo, Georgia, serif; font-size: 2rem; line-height: 1; }
.event-month { display: block; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 4px; }
.event-body h3 { margin: 0 0 6px; font-size: 1.3rem; }
.event-body h3 a { color: var(--ap-ink); text-decoration: none; }
.event-body h3 a:hover { color: var(--ap-burgundy); }
.event-where { color: var(--ap-muted); margin: 0 0 12px; }
.events-past { opacity: 0.75; }
.event-single { max-width: 760px; }

/* Header CTA + footer socials */
.header-cta { margin-left: 24px; white-space: nowrap; }
.footer-socials { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.footer-socials a { display: inline-block; padding: 6px 14px; border: 1px solid rgba(255,255,255,0.35); border-radius: 20px; color: #fff; text-decoration: none; font-size: 0.85rem; }
.footer-socials a:hover { background: rgba(255,255,255,0.15); }

/* Scroll to top */
#ap-scroll-top { position: fixed; right: 28px; bottom: 28px; width: 52px; height: 52px; border-radius: 50%; border: none; background: var(--ap-burgundy); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0,0,0,0.25); z-index: 999; transition: opacity 0.25s, transform 0.25s; }
#ap-scroll-top[hidden] { display: none; }
#ap-scroll-top:hover { transform: translateY(-3px); }

@media (max-width: 800px) {
  .event-card { flex-direction: column; align-items: flex-start; }
  .book-quote { padding-left: 64px; }
  .book-quote::before { font-size: 5rem; top: -16px; }
  .header-cta { display: none; }
}

/* WordPress core classes */
.alignleft { float: left; margin: 0.4em 1.2em 1em 0; }
.alignright { float: right; margin: 0.4em 0 1em 1.2em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: #6b6b66; margin-top: 0.4em; text-align: center; }
.gallery-caption { font-size: 0.85rem; }
.sticky { }
.bypostauthor { }
.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; }
.screen-reader-text:focus { background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); clip: auto !important; clip-path: none; color: var(--ap-burgundy); display: block; font-size: 0.95rem; font-weight: 600; height: auto; left: 8px; line-height: normal; padding: 12px 20px; text-decoration: none; top: 8px; width: auto; z-index: 100000; }
