/*
Theme Name: Storyteller Pro
Theme URI: https://theitsign.com
Author: Itsign Digital Agency
Author URI: https://theitsign.com
Description: A refined, fully customizable author & book showcase theme. Built-in Books, Testimonials, FAQs and Author Profile systems, one-click demo/old-site import, and a complete color customizer where every color (header, footer, links, buttons, sections) is choosable. Includes the Itsign Digital Agency control hub.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: storyteller-pro
Tags: author, books, portfolio, custom-colors, custom-menu, featured-images, translation-ready, block-styles
*/

/* =========================================================
   DESIGN TOKENS  (defaults; every value is overridden live
   by the Customizer via an inline <style> in the <head>)
   ========================================================= */
:root{
  --stp-bg:#f4efe4;
  --stp-ink:#2b2620;
  --stp-muted:#6f6858;
  --stp-heading:#1c2b2a;
  --stp-accent:#9a6a3c;
  --stp-accent-2:#3f6f6a;
  --stp-link:#3f6f6a;
  --stp-link-hover:#9a6a3c;
  --stp-header-bg:#1c2b2a;
  --stp-header-text:#f4efe4;
  --stp-header-link:#e8dfc9;
  --stp-header-link-hover:#c79a5c;
  --stp-footer-bg:#16211f;
  --stp-footer-text:#d8d2c4;
  --stp-footer-link:#c79a5c;
  --stp-card-bg:#fffdf8;
  --stp-border:#e3dccb;
  --stp-button-bg:#9a6a3c;
  --stp-button-text:#fbf7ee;
  --stp-button-hover-bg:#7d5730;
  --stp-section-alt-bg:#ece4d3;
  --stp-hero-overlay:rgba(20,33,31,.55);
  --stp-hero-text:#fdfaf3;

  --stp-font-body:"Spectral", Georgia, "Times New Roman", serif;
  --stp-font-display:"Cormorant Garamond", Georgia, serif;
  --stp-font-ui:"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --stp-maxw:1180px;
  --stp-radius:14px;
  --stp-radius-sm:8px;
  --stp-shadow:0 10px 34px rgba(28,43,42,.10);
  --stp-shadow-sm:0 4px 14px rgba(28,43,42,.08);
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:var(--stp-bg);
  color:var(--stp-ink);
  font-family:var(--stp-font-body);
  font-size:18px;
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
img{max-width:100%;height:auto;display:block}
a{color:var(--stp-link);text-decoration:none;transition:color .18s ease}
a:hover{color:var(--stp-link-hover)}
h1,h2,h3,h4{font-family:var(--stp-font-display);color:var(--stp-heading);line-height:1.12;font-weight:600;margin:0 0 .5em}
h1{font-size:clamp(2.4rem,5vw,3.9rem)}
h2{font-size:clamp(1.9rem,3.6vw,2.9rem)}
h3{font-size:clamp(1.35rem,2.2vw,1.7rem)}
p{margin:0 0 1.1em}
.stp-wrap{max-width:var(--stp-maxw);margin:0 auto;padding:0 22px}
.stp-eyebrow{font-family:var(--stp-font-ui);text-transform:uppercase;letter-spacing:.22em;font-size:.74rem;font-weight:600;color:var(--stp-accent);margin:0 0 .8rem}
.screen-reader-text{position:absolute!important;clip:rect(1px,1px,1px,1px);width:1px;height:1px;overflow:hidden}
.skip-link{position:absolute;left:-9999px;top:0;background:var(--stp-accent);color:#fff;padding:10px 16px;z-index:100000;font-family:var(--stp-font-ui)}
.skip-link:focus{left:12px;top:12px}

/* ---- Buttons ---- */
.stp-btn{
  display:inline-block;font-family:var(--stp-font-ui);font-weight:600;font-size:.95rem;
  letter-spacing:.01em;background:var(--stp-button-bg);color:var(--stp-button-text);
  padding:13px 26px;border-radius:var(--stp-radius-sm);border:0;cursor:pointer;
  transition:background .18s ease,transform .18s ease;
}
.stp-btn:hover{background:var(--stp-button-hover-bg);color:var(--stp-button-text);transform:translateY(-2px)}
.stp-btn--ghost{background:transparent;border:1.5px solid currentColor;color:var(--stp-accent)}
.stp-btn--ghost:hover{background:var(--stp-accent);color:var(--stp-button-text);border-color:var(--stp-accent)}

/* =========================================================
   HEADER / NAV
   ========================================================= */
.stp-header{background:var(--stp-header-bg);color:var(--stp-header-text);position:sticky;top:0;z-index:900;box-shadow:0 2px 0 rgba(0,0,0,.06)}
.stp-header__inner{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 0}
.stp-brand{display:flex;align-items:center;gap:14px;min-width:0}
.stp-brand__logo img{max-height:52px;width:auto}
.stp-brand__title{font-family:var(--stp-font-display);font-size:1.5rem;font-weight:600;color:var(--stp-header-text);white-space:nowrap}
.stp-brand__title a{color:inherit}
.stp-brand__tagline{font-family:var(--stp-font-ui);font-size:.72rem;letter-spacing:.14em;text-transform:uppercase;opacity:.7;margin-top:2px}
.stp-nav ul{list-style:none;display:flex;gap:6px;margin:0;padding:0;flex-wrap:wrap;font-family:var(--stp-font-ui)}
.stp-nav a{color:var(--stp-header-link);font-weight:500;font-size:.95rem;padding:8px 12px;border-radius:6px;display:block}
.stp-nav a:hover,.stp-nav .current-menu-item>a{color:var(--stp-header-link-hover);background:rgba(255,255,255,.06)}
.stp-nav .sub-menu{position:absolute;background:var(--stp-header-bg);flex-direction:column;padding:8px;border-radius:10px;box-shadow:var(--stp-shadow);display:none;min-width:210px;z-index:20}
.stp-nav li{position:relative}
.stp-nav li:hover>.sub-menu{display:flex}
.stp-nav-toggle{display:none;background:none;border:1.5px solid rgba(255,255,255,.35);color:var(--stp-header-text);border-radius:8px;padding:9px 12px;cursor:pointer;font-family:var(--stp-font-ui)}

/* =========================================================
   HERO
   ========================================================= */
.stp-hero{position:relative;color:var(--stp-hero-text);text-align:center;overflow:hidden}
.stp-hero__bg{position:absolute;inset:0;background-size:cover;background-position:center;z-index:0}
.stp-hero__bg::after{content:"";position:absolute;inset:0;background:var(--stp-hero-overlay)}
.stp-hero__inner{position:relative;z-index:1;max-width:820px;margin:0 auto;padding:120px 22px 128px}
.stp-hero h1{color:var(--stp-hero-text);margin-bottom:.3em}
.stp-hero__lead{font-size:1.28rem;opacity:.94;margin:0 auto 1.8em;max-width:640px}
.stp-hero .stp-eyebrow{color:var(--stp-hero-text);opacity:.85}
.stp-hero__cta{display:flex;gap:14px;justify-content:center;flex-wrap:wrap}

/* =========================================================
   SECTIONS
   ========================================================= */
.stp-section{padding:84px 0}
.stp-section--alt{background:var(--stp-section-alt-bg)}
.stp-section__head{text-align:center;max-width:720px;margin:0 auto 52px}
.stp-section__head p{color:var(--stp-muted);font-size:1.1rem;margin:0}

/* ---- Books ---- */
.stp-books{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:34px}
.stp-book{background:var(--stp-card-bg);border:1px solid var(--stp-border);border-radius:var(--stp-radius);overflow:hidden;box-shadow:var(--stp-shadow-sm);display:flex;flex-direction:column;transition:transform .2s ease,box-shadow .2s ease}
.stp-book:hover{transform:translateY(-5px);box-shadow:var(--stp-shadow)}
.stp-book__cover{aspect-ratio:2/3;background:var(--stp-section-alt-bg);overflow:hidden}
.stp-book__cover img{width:100%;height:100%;object-fit:cover}
.stp-book__body{padding:24px 24px 26px;display:flex;flex-direction:column;flex:1}
.stp-book__badge{align-self:flex-start;font-family:var(--stp-font-ui);font-size:.68rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;background:var(--stp-accent);color:var(--stp-button-text);padding:4px 10px;border-radius:100px;margin-bottom:12px}
.stp-book__title{font-size:1.5rem;margin:0 0 2px}
.stp-book__title a{color:var(--stp-heading)}
.stp-book__meta{font-family:var(--stp-font-ui);font-size:.85rem;color:var(--stp-muted);margin:0 0 12px}
.stp-book__excerpt{font-size:.98rem;color:var(--stp-ink);margin:0 0 18px}
.stp-book__buy{display:flex;flex-wrap:wrap;gap:8px;margin-top:auto}
.stp-book__buy a{font-family:var(--stp-font-ui);font-size:.82rem;font-weight:600;padding:7px 13px;border-radius:100px;border:1.5px solid var(--stp-accent-2);color:var(--stp-accent-2)}
.stp-book__buy a:hover{background:var(--stp-accent-2);color:#fff}

/* ---- Author ---- */
.stp-author{display:grid;grid-template-columns:minmax(240px,340px) 1fr;gap:48px;align-items:center}
.stp-author__photo img{border-radius:var(--stp-radius);box-shadow:var(--stp-shadow);width:100%}
.stp-author__quote{font-family:var(--stp-font-display);font-size:1.5rem;font-style:italic;color:var(--stp-accent);border-left:3px solid var(--stp-accent);padding-left:20px;margin:22px 0 0}

/* ---- Testimonials ---- */
.stp-tests{columns:2;column-gap:32px}
.stp-test{break-inside:avoid;background:var(--stp-card-bg);border:1px solid var(--stp-border);border-radius:var(--stp-radius);padding:26px 28px;margin:0 0 32px;box-shadow:var(--stp-shadow-sm)}
.stp-test__stars{color:var(--stp-accent);letter-spacing:2px;margin-bottom:10px;font-size:1rem}
.stp-test__text{font-size:1.05rem;font-style:italic;margin:0 0 14px}
.stp-test__cite{font-family:var(--stp-font-ui);font-size:.9rem;font-weight:600;color:var(--stp-heading)}
.stp-test__src{display:block;font-weight:400;color:var(--stp-muted);font-size:.82rem;margin-top:2px}
.stp-test__link{font-family:var(--stp-font-ui);font-size:.82rem;font-weight:600;margin-top:8px;display:inline-block}

/* ---- FAQs ---- */
.stp-faqs{max-width:820px;margin:0 auto}
.stp-faq{border-bottom:1px solid var(--stp-border)}
.stp-faq__q{width:100%;text-align:left;background:none;border:0;cursor:pointer;font-family:var(--stp-font-display);font-size:1.28rem;color:var(--stp-heading);padding:22px 44px 22px 0;position:relative}
.stp-faq__q::after{content:"+";position:absolute;right:6px;top:50%;transform:translateY(-50%);font-size:1.5rem;color:var(--stp-accent);transition:transform .2s ease}
.stp-faq[open] .stp-faq__q::after{content:"–"}
.stp-faq__a{padding:0 0 22px;color:var(--stp-ink);font-size:1.05rem}
details.stp-faq summary{list-style:none}
details.stp-faq summary::-webkit-details-marker{display:none}

/* ---- Contact CTA ---- */
.stp-cta-band{background:var(--stp-header-bg);color:var(--stp-header-text);text-align:center;padding:76px 0}
.stp-cta-band h2{color:var(--stp-header-text)}
.stp-cta-band p{opacity:.86;max-width:560px;margin:0 auto 26px}

/* =========================================================
   SINGLE / PAGE CONTENT
   ========================================================= */
.stp-content{max-width:800px;margin:56px auto;padding:0 22px}
.stp-content .entry-title{margin-bottom:.3em}
.stp-entry-meta{font-family:var(--stp-font-ui);color:var(--stp-muted);font-size:.9rem;margin-bottom:28px}
.stp-prose img{border-radius:var(--stp-radius-sm);margin:24px 0}
.stp-prose blockquote{border-left:3px solid var(--stp-accent);margin:24px 0;padding:6px 0 6px 22px;font-style:italic;color:var(--stp-muted)}
.stp-single-book{max-width:1000px;margin:56px auto;padding:0 22px;display:grid;grid-template-columns:340px 1fr;gap:44px}
.stp-single-book__cover img{border-radius:var(--stp-radius);box-shadow:var(--stp-shadow);width:100%}
.stp-single-book__buy{display:flex;flex-wrap:wrap;gap:10px;margin:20px 0 0}

/* =========================================================
   FOOTER
   ========================================================= */
.stp-footer{background:var(--stp-footer-bg);color:var(--stp-footer-text);padding:56px 0 26px;font-family:var(--stp-font-ui);font-size:.95rem}
.stp-footer a{color:var(--stp-footer-link)}
.stp-footer__cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:32px;margin-bottom:34px}
.stp-footer h4{color:var(--stp-footer-text);font-family:var(--stp-font-display);font-size:1.2rem;margin:0 0 14px}
.stp-footer ul{list-style:none;margin:0;padding:0}
.stp-footer li{margin:0 0 8px}
.stp-footer__bottom{border-top:1px solid rgba(255,255,255,.12);padding-top:20px;text-align:center;opacity:.85;font-size:.86rem}
.itsign-credit{text-align:center;padding:14px 10px;font-size:13px;opacity:.9}
.itsign-credit a{color:var(--stp-footer-link)}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media(max-width:860px){
  .stp-author{grid-template-columns:1fr;text-align:center}
  .stp-author__quote{border-left:0;padding-left:0;text-align:center}
  .stp-tests{columns:1}
  .stp-single-book{grid-template-columns:1fr}
  .stp-nav-toggle{display:block}
  .stp-nav{position:absolute;left:0;right:0;top:100%;background:var(--stp-header-bg);padding:12px 22px 18px;display:none}
  .stp-nav.is-open{display:block}
  .stp-nav ul{flex-direction:column;gap:2px}
  .stp-nav .sub-menu{position:static;display:flex;box-shadow:none;padding-left:14px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
