/*
Theme Name: Smart Stars Prep (GeneratePress Child)
Theme URI: https://smartstarsprep.com/
Description: Child theme of GeneratePress for smartstarsprep.com. Provides the site-wide navy Smart Stars chrome and the single-practice_test.php money-page template that renders every practice-test product from ACF fields. Self-hosted fonts, no page builders, no external CSS/JS.
Author: Smart Stars Prep
Author URI: https://smartstarsprep.com/
Template: generatepress
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: generatepress-child
*/

/* ============================================================
   Self-hosted fonts (latin subset, variable woff2)
   ------------------------------------------------------------
   Playfair Display + Source Sans 3 are shipped in /fonts/ so the
   theme makes no request to Google Fonts. font-display:swap keeps
   text visible while the files load.
   ============================================================ */
@font-face{
  font-family:"Playfair Display";
  font-style:normal;
  font-weight:400 900;
  font-display:swap;
  src:url("fonts/playfair-display-latin.woff2") format("woff2");
}
@font-face{
  font-family:"Playfair Display";
  font-style:italic;
  font-weight:400 900;
  font-display:swap;
  src:url("fonts/playfair-display-latin-italic.woff2") format("woff2");
}
@font-face{
  font-family:"Source Sans 3";
  font-style:normal;
  font-weight:300 700;
  font-display:swap;
  src:url("fonts/source-sans-3-latin.woff2") format("woff2");
}

/* ============================================================
   Design tokens (from the approved v7 mockup)
   ============================================================ */
:root{
  /* --cover-color is overridden per book via the ACF cover_color field
     (set inline on the hero + CTA band). This is the safe fallback. */
  --cover-color:#16233E;
  --navy:#16233E;
  --paper:#FBF9F3;
  --cream:#F2ECDC;
  --gold:#C9A24B;
  --gold-bright:#E3C270;
  --ink:#232B3D;
  --ink-soft:#5A6478;
  --line:#E4DECD;
  --serif:"Playfair Display", Georgia, serif;
  --sans:"Source Sans 3", -apple-system, "Segoe UI", sans-serif;
}

/* ============================================================
   Base
   ------------------------------------------------------------
   The reset is scoped to .smartstars (only the money page carries
   that body class) so GeneratePress's own pages are never touched.
   ============================================================ */
.smartstars *{margin:0;padding:0;box-sizing:border-box}
body.smartstars{font-family:var(--sans);color:var(--ink);background:var(--paper);line-height:1.6}
body.smartstars a{color:inherit}
body.smartstars img{max-width:100%;height:auto}
.screen-reader-text{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0;word-wrap:normal!important}
.skip-link{position:absolute;left:-9999px;top:0;z-index:100000;background:var(--gold);color:#1A2438;padding:.6rem 1rem;font-weight:700;text-decoration:none}
.skip-link:focus{left:8px;top:8px}

/* ============================================================
   Site header (navy, site-wide)
   ============================================================ */
.site-header,.site-footer{font-family:var(--sans)}
.site-header{background:var(--navy);padding:0.9rem 1.5rem;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.6rem}
.wordmark{color:var(--gold-bright);font-weight:600;font-size:0.95rem;letter-spacing:0.42em;text-decoration:none;white-space:nowrap}
.wordmark .star{font-size:0.8em;position:relative;top:-1px}
.site-nav{display:flex;gap:1.6rem;flex-wrap:wrap}
.site-nav ul{list-style:none;display:flex;gap:1.6rem;margin:0;padding:0;flex-wrap:wrap}
.site-nav a{color:var(--cream);text-decoration:none;font-size:0.85rem;letter-spacing:0.14em;text-transform:uppercase;opacity:.85}
.site-nav a:hover,.site-nav a:focus-visible{opacity:1;color:var(--gold-bright)}

/* ============================================================
   Hero band (background = per-book cover color)
   ============================================================ */
.hero{background:var(--cover-color);color:var(--cream);position:relative;overflow:hidden}
.hero-inner{max-width:1080px;margin:0 auto;padding:3rem 1.5rem 3.4rem;display:grid;grid-template-columns:1.25fr 0.75fr;gap:2.8rem;align-items:center}
.eyebrow{font-size:0.78rem;letter-spacing:0.38em;text-transform:uppercase;color:var(--gold-bright);margin-bottom:1.1rem}
.eyebrow::after{content:"";display:block;width:64px;height:1px;background:var(--gold);margin-top:0.8rem;opacity:.7}
.hero h1{font-family:var(--serif);font-weight:600;font-size:clamp(1.9rem,3.6vw,2.9rem);line-height:1.15;color:#F6F1E2;margin-bottom:1rem}
.context-strip{font-size:0.9rem;letter-spacing:0.06em;color:#C7CDDC;margin-bottom:1.8rem}
.context-strip b{color:var(--cream);font-weight:600}
.context-strip .dot{color:var(--gold);padding:0 .45rem}

/* ============================================================
   Buy cards (hero + CTA band)
   ============================================================ */
.buy-options{display:flex;flex-direction:column;gap:0.8rem;max-width:430px}
.buy-card{display:flex;align-items:center;justify-content:space-between;gap:1rem;text-decoration:none;border-radius:5px;padding:0.95rem 1.3rem;transition:transform .12s ease}
.buy-card:hover{transform:translateY(-1px)}
.buy-card:focus-visible{outline:3px solid var(--gold-bright);outline-offset:2px}
.buy-pdf{background:var(--gold);color:#1A2438}
.buy-pdf:hover{background:var(--gold-bright)}
.buy-amazon{background:transparent;border:1.5px solid rgba(242,236,220,.55);color:var(--cream)}
.buy-amazon:hover{border-color:var(--gold-bright);color:var(--gold-bright)}
.buy-label{font-weight:700;font-size:1rem;line-height:1.3}
.buy-sub{display:block;font-weight:400;font-size:0.8rem;opacity:.8}
.buy-price{font-family:var(--serif);font-weight:700;font-size:1.5rem;white-space:nowrap}

/* Cover image (hero right column) */
.cover-img{max-width:360px;width:100%;height:auto;margin:0 auto;display:block;border-radius:3px;box-shadow:0 18px 38px rgba(0,0,0,.42), 0 4px 10px rgba(0,0,0,.3)}

/* ============================================================
   Body ("About this book")
   ============================================================ */
.page-body{max-width:760px;margin:0 auto;padding:3.4rem 1.5rem 1rem}
.section-label{font-size:0.75rem;letter-spacing:0.34em;text-transform:uppercase;color:var(--gold);font-weight:700;margin-bottom:1rem}
.lede{font-family:var(--serif);font-size:1.35rem;line-height:1.5;margin-bottom:2.4rem}
.page-body h2{font-family:var(--serif);font-weight:600;font-size:1.55rem;margin:2.6rem 0 1rem}
.page-body h3{font-family:var(--serif);font-weight:600;font-size:1.2rem;margin:2rem 0 .8rem}
.page-body p{margin-bottom:1.1rem}

/* Star-bullet lists: any list authored in the body becomes gold stars.
   .star-list is kept as an explicit alias for use elsewhere. */
.page-body ul,.star-list{list-style:none;margin:0 0 1.4rem;padding:0}
.page-body ul li,.star-list li{padding-left:1.7rem;position:relative;margin-bottom:0.7rem}
.page-body ul li::before,.star-list li::before{content:"\2605";position:absolute;left:0;top:0;color:var(--gold);font-size:0.85rem}

/* Cream callout box with gold left border.
   Author: add the CSS class "callout" to a paragraph or group block. */
.callout{background:var(--cream);border-left:3px solid var(--gold);padding:1.2rem 1.4rem;margin:2rem 0;font-size:0.98rem}
.callout p:last-child{margin-bottom:0}

/* ============================================================
   "Take a look inside"
   ============================================================ */
.look-inside{max-width:760px;margin:2.4rem auto 0;padding:0 1.5rem}
.look-inside h2{font-family:var(--serif);font-weight:600;font-size:1.55rem;margin:2.6rem 0 1rem}
.look-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem;margin-top:1.2rem}
.look-page{aspect-ratio:8.5/11;width:100%;background:#fff;border:1px solid var(--line);border-radius:3px;box-shadow:0 6px 16px rgba(35,43,61,.12);object-fit:cover;display:block}
.look-caption{font-size:0.85rem;color:var(--ink-soft);text-align:center;margin-top:0.6rem}

/* ============================================================
   Bottom CTA band (background = per-book cover color)
   ============================================================ */
.cta-band{background:var(--cover-color);color:var(--cream);margin-top:3.2rem}
.cta-band-inner{max-width:760px;margin:0 auto;padding:2.6rem 1.5rem;display:flex;flex-direction:column;align-items:center}
.cta-band h2{font-family:var(--serif);font-weight:600;font-size:1.7rem;color:#F6F1E2;margin-bottom:1.2rem}
.cta-band .buy-options{width:100%}

/* ============================================================
   Taxonomy footer (money page)
   ============================================================ */
.tax-footer{border-top:1px solid var(--line);padding:1.8rem 1.5rem;text-align:center;font-size:0.85rem;color:var(--ink-soft)}
.tax-footer a{color:var(--navy);font-weight:600;text-decoration:none;border-bottom:1px solid var(--gold)}
.tax-footer a:hover{color:var(--gold)}

/* ============================================================
   Site footer (navy, site-wide)
   ============================================================ */
.site-footer{background:var(--navy);text-align:center;padding:1.6rem;color:#A9B2C6;font-size:0.8rem}
.site-footer .wordmark{display:block;margin-bottom:.5rem;font-size:0.8rem}

/* ============================================================
   Taxonomy archives (state / grade / subject)
   ------------------------------------------------------------
   Rendered standalone with the .smartstars body class, so these
   inherit the money-page paper ground, fonts, tokens, and reset.
   ============================================================ */
.ss-archive{width:100%}
.ss-archive-inner{max-width:1080px;margin:0 auto;padding:3rem 1.5rem 3.6rem}
.ss-archive-eyebrow{display:block;font-size:0.78rem;letter-spacing:0.34em;text-transform:uppercase;color:var(--gold);font-weight:700;margin-bottom:1rem}
.ss-archive-eyebrow::after{content:"";display:block;width:64px;height:1px;background:var(--gold);margin-top:0.8rem;opacity:.6}
.ss-archive-title{font-family:var(--serif);font-weight:600;font-size:clamp(1.9rem,3.6vw,2.7rem);line-height:1.15;color:var(--ink);margin-bottom:0.6rem}
.ss-archive-intro{font-family:var(--serif);font-size:1.15rem;line-height:1.5;color:var(--ink-soft);max-width:60ch;margin-bottom:0.5rem}

.ss-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:1.6rem;margin-top:2rem}
.ss-card{display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:4px;overflow:hidden;box-shadow:0 6px 16px rgba(35,43,61,.10);transition:transform .12s ease, box-shadow .12s ease}
.ss-card:hover{transform:translateY(-3px);box-shadow:0 12px 28px rgba(35,43,61,.16)}
.ss-card-cover{display:flex;align-items:flex-end;justify-content:center;background:var(--cream);padding:1.2rem 1.2rem 0;min-height:170px}
.ss-card-cover img{width:auto;max-width:100%;max-height:210px;height:auto;display:block;border-radius:2px;box-shadow:0 8px 20px rgba(0,0,0,.22)}
.ss-card-cover-empty{font-size:2.6rem;color:var(--gold);opacity:.55;line-height:1;padding-bottom:1.4rem}
.ss-card-body{display:flex;flex-direction:column;gap:0.5rem;padding:1rem 1.1rem 1.2rem;flex:1}
.ss-card-title{font-family:var(--serif);font-weight:600;font-size:1.05rem;line-height:1.25;color:var(--ink);text-decoration:none}
.ss-card-title:hover,.ss-card-title:focus-visible{color:var(--gold)}
.ss-card-context{font-size:0.8rem;color:var(--ink-soft);letter-spacing:.02em}
.ss-card-context .dot{color:var(--gold);padding:0 .35rem}
.ss-card-price{margin-top:auto;font-family:var(--serif);font-weight:700;font-size:1.05rem;color:var(--ink)}
.ss-card-price-note{font-family:var(--sans);font-weight:400;font-size:0.7rem;color:var(--ink-soft);letter-spacing:.05em;text-transform:uppercase}

.ss-archive-empty{font-family:var(--serif);font-size:1.2rem;line-height:1.5;color:var(--ink-soft);margin-top:1.5rem}
.ss-empty-star{color:var(--gold)}

.ss-pagination{margin-top:2.6rem}
.ss-pagination .nav-links{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:center}
.ss-pagination .page-numbers{display:inline-block;padding:.5rem .85rem;border:1px solid var(--line);border-radius:4px;color:var(--ink);text-decoration:none;font-size:.9rem}
.ss-pagination .page-numbers.current{background:var(--gold);color:#1A2438;border-color:var(--gold);font-weight:700}
.ss-pagination a.page-numbers:hover{border-color:var(--gold);color:var(--gold)}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width:840px){
  .hero-inner{grid-template-columns:1fr;gap:2.2rem;padding-top:2.2rem}
  .hero-inner > div:first-child{order:2}
  .cover-img{max-width:260px;order:1}
  .buy-options{max-width:none}
}
@media (max-width:520px){
  .ss-archive-inner{padding-left:1.1rem;padding-right:1.1rem}
  .ss-card-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:1rem}
}
@media (prefers-reduced-motion: reduce){ .buy-card{transition:none} }

/* ============================================================
   Site-wide chrome hardening
   ------------------------------------------------------------
   The navy header/footer apply to EVERY page. On GeneratePress-
   rendered pages, GP's own link / menu / footer CSS would otherwise
   win the cascade (higher-specificity selectors) and un-style the
   chrome. These unscoped rules use !important to override GP.

   Every value here is IDENTICAL to the money-page chrome declared
   above, so the standalone money page renders pixel-for-pixel the
   same — the !important simply pins the same result.
   ============================================================ */
.site-header{background:var(--navy)!important}
.site-header .wordmark,
.site-header .wordmark:hover,
.site-header .wordmark:focus{
  color:var(--gold-bright)!important;
  font-family:var(--sans)!important;
  font-weight:600!important;
  letter-spacing:0.42em!important;
  text-decoration:none!important;
}
.site-nav{background:transparent!important;border:0!important}
.site-nav ul,
.site-nav li,
.site-nav .menu-item{
  margin:0!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  list-style:none!important;
}
.site-nav a{
  color:var(--cream)!important;
  background:transparent!important;
  border:0!important;
  padding:0!important;
  font-family:var(--sans)!important;
  font-size:0.85rem!important;
  font-weight:400!important;
  letter-spacing:0.14em!important;
  text-transform:uppercase!important;
  text-decoration:none!important;
}
.site-nav a:hover,
.site-nav a:focus-visible{color:var(--gold-bright)!important}
.site-footer{
  background:var(--navy)!important;
  color:#A9B2C6!important;
  text-align:center!important;
  font-family:var(--sans)!important;
}
.site-footer .wordmark{color:var(--gold-bright)!important;display:block!important}
.site-footer a{color:var(--gold-bright)!important}
