/* =====================================================================
   Shared stylesheet: tokens, base type, header/nav, footer, and the
   reusable components every page uses. Page-specific section layout
   lives in each page's own <style> block.

   Breakpoints (match the original layout model):
     >= 981px  desktop: columns side by side, full nav
     <= 980px  tablet: columns stack, compact header + menu panel
     <= 767px  phone: type and spacing scale down
   ===================================================================== */

/* Metric-matched fallbacks so text does not reflow when web fonts arrive. */
@font-face { font-family: "Work Sans Fallback"; src: local("Arial"); size-adjust: 109.5%; }
@font-face { font-family: "Anton Fallback"; src: local("Arial"); size-adjust: 88.9%; }
@font-face { font-family: "Hind Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Arial"); size-adjust: 93.9%; }
@font-face { font-family: "Bebas Fallback"; src: local("Arial"); size-adjust: 73.8%; }

:root {
  /* Brand */
  --maroon: #7A0030;
  --maroon-dark: #5c0024;
  --blue: #0043AA;           /* "From Thunder Hill Press" style accent */
  --royal: #1470C4;          /* order bands on book pages */
  --red: #D63328;            /* red CTA buttons on book pages */
  --gold: #F2C230;
  --link-blue: #2EA3F2;      /* the site's default quote-bar blue */
  --link-text: #0C7AC5;      /* same hue, darkened to pass AA text contrast on white */

  /* Neutrals */
  --ink: #000;
  --ink-2: #333;
  --ink-soft: #535353;
  --charcoal: #2B2B2B;
  --slate: #2C3239;
  --paper: #fff;
  --cream: #F4F0EB;
  --gray-box: #424242;
  --rule: rgba(0, 0, 0, .12);

  /* Type */
  --sans: "Work Sans", "Work Sans Fallback", Helvetica, Arial, sans-serif;
  --display: Anton, "Anton Fallback", Impact, "Arial Narrow", sans-serif;
  --name: "Bebas Neue", "Bebas Fallback", Impact, sans-serif;
  --nav: Hind, "Hind Fallback", Helvetica, Arial, sans-serif;
  --arial: Arial, Helvetica, sans-serif;
  --georgia: Georgia, "Times New Roman", serif;
  --times: "Times New Roman", Times, Georgia, serif;

  /* Layout */
  --header-h: 64px;
  --row: 1080px;
  --gutter: 5.5%;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 500 18px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--link-text); text-decoration: none; }
a:hover { opacity: .85; }
a:has(img):hover { opacity: 1; }
p { margin: 0; padding-bottom: 1em; }
p:last-child { padding-bottom: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; padding-bottom: 10px; font-weight: 500; line-height: 1em; color: inherit; }
strong, b { font-weight: 700; }
ul, ol { margin: 0; padding: 0 0 23px 1em; line-height: 26px; }
ol { padding-left: 1.3em; }
blockquote { margin: 20px 0 30px; padding-left: 20px; border-left: 5px solid var(--link-blue); }
button { font: inherit; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; background: #fff; color: #000; padding: 10px 16px; border-radius: 4px; font-weight: 700; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid #F2C230; outline-offset: 2px; }

.ico { width: 1em; height: 1em; fill: currentColor; flex: none; }

/* ---------- Layout primitives ---------- */
main { display: block; }
.section { position: relative; padding: 54px 0; background-size: cover; background-position: center; }
.row { position: relative; width: 80%; max-width: var(--row); margin: 0 auto; padding: 27px 0; }
.row--wide { max-width: 1400px; }
.row--full { width: 100%; max-width: none; }
.cols { display: grid; column-gap: var(--gutter); row-gap: 0; align-items: start; }
.cols--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cols--1-2 { grid-template-columns: 1fr 2fr; }
.cols--2-1 { grid-template-columns: 2fr 1fr; }
.cols--1-3 { grid-template-columns: 1fr 3fr; }
.cols--3-1 { grid-template-columns: 3fr 1fr; }
.cols--stretch { align-items: stretch; }
.cols--center { align-items: center; }
.mod + .mod { margin-top: 2.75%; }
.center { text-align: center; }
.right { text-align: right; }
.fig img { width: 100%; }
.fig--center img { margin: 0 auto; }

/* Visibility per breakpoint (mirrors content that only shows on some devices). */
@media (min-width: 981px) { .hide-desktop { display: none !important; } }
@media (min-width: 768px) and (max-width: 980px) { .hide-tablet { display: none !important; } }
@media (max-width: 767px) { .hide-phone { display: none !important; } }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-block;
  padding: 6px 20px;
  border: 2px solid #fff;
  border-radius: 3px;
  background: var(--maroon);
  color: #fff;
  font: 500 20px/1.7 var(--sans);
  text-align: center;
  cursor: pointer;
  transition: all .3s ease;
}
.btn::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 11h12.17l-5.59-5.59L12 4l8 8-8 8-1.41-1.41L16.17 13H4v-2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 11h12.17l-5.59-5.59L12 4l8 8-8 8-1.41-1.41L16.17 13H4v-2z'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0;
  transition: opacity .3s ease;
}
.btn:hover { opacity: 1; background: #000; border-color: transparent; padding: 6px 40px 6px 14px; }
.btn:hover::after { opacity: 1; }
.btn--outline { background: #fff; color: var(--maroon); border-color: var(--maroon); border-radius: 4px; font-weight: 700; }
.btn--outline:hover { color: #fff; }
.btn--black { background: #000; }
.btn--ghost { background: transparent; }
.btn--lg { font-size: 24px; border-width: 5px; padding: 5px 24px 7px; }
.btn--lg:hover { padding: 5px 44px 7px 16px; }
.btn--pill { background: var(--charcoal); border: 4px solid #fff; border-radius: 16px; font-size: 22px; font-weight: 600; padding: 0 22px 6px; }
.btn--pill:hover { padding: 0 42px 6px 14px; }
.btn--sm { font-size: 16px; padding: 4px 14px; }
.btn--sm:hover { padding: 4px 32px 4px 10px; }
.btn--sm::after { width: 16px; height: 16px; margin-top: -8px; right: 8px; }
.btn-wrap { margin: 0; padding-bottom: 0; }
.btn-wrap--center { text-align: center; }
.btn-wrap--right { text-align: right; }

/* ---------- Header / navigation ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--maroon);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .1);
  transition: box-shadow .3s ease;
}
.site-header.is-scrolled { box-shadow: 0 0 7px rgba(0, 0, 0, .1); }
.site-header__inner { display: flex; align-items: center; justify-content: flex-end; height: 100%; padding: 0 32px 0 30px; }
.brand { display: none; color: #fff; font: 400 30px/1 var(--name); letter-spacing: 1.5px; margin-right: auto; }
.brand:hover { opacity: .85; }
.nav-toggle { display: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; line-height: 1; }
.nav-list { display: flex; align-items: center; }
.nav-list > li { position: relative; padding-right: 22px; }
.nav-list > li:last-child { padding-right: 0; }
.nav-list > li > a, .nav-list > li > .nav-parent > a {
  display: flex;
  align-items: center;
  height: var(--header-h);
  color: #fff;
  font: 700 15px/1 var(--nav);
  transition: opacity .3s ease;
}
.nav-list a:hover { opacity: .7; }
.nav-list a[aria-current="page"] { color: #A8A8A8; }
.nav-parent { display: flex; align-items: center; }
.sub-toggle { display: flex; align-items: center; justify-content: center; margin: 0 0 0 2px; padding: 0; border: 0; background: none; color: #fff; cursor: pointer; }
.sub-toggle .ico { width: 16px; height: 16px; }
@media (min-width: 981px) { .sub-toggle { width: 24px; height: 24px; margin-left: -2px; } }
.sub-menu {
  position: absolute;
  top: calc(var(--header-h) - 10px);
  left: 0;
  z-index: 10;
  width: 240px;
  padding: 20px 0;
  background: var(--maroon);
  border-top: 3px solid #A8A8A8;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .1);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.has-sub:hover > .sub-menu, .has-sub:focus-within > .sub-menu, .has-sub.is-open > .sub-menu { opacity: 1; visibility: visible; }
.sub-menu a { display: block; padding: 6px 20px; color: #fff; font: 700 15px/28px var(--nav); }
.nav-backdrop { display: none; }
.page { padding-top: var(--header-h); }

@media (max-width: 1100px) and (min-width: 981px) {
  .nav-list > li { padding-right: 14px; }
  .nav-list > li > a, .nav-list > li > .nav-parent > a { font-size: 14px; }
}

@media (max-width: 980px) {
  :root { --header-h: 60px; }
  .site-header { position: sticky; }
  .page { padding-top: 0; }
  .site-header__inner { justify-content: space-between; padding: 0 16px 0 20px; }
  .brand { display: block; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-right: -6px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #fff;
    cursor: pointer;
  }
  .nav-toggle__bars { position: relative; width: 24px; height: 2px; background: currentColor; border-radius: 2px; transition: background .2s ease; }
  .nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; width: 24px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .25s ease, top .25s ease; }
  .nav-toggle__bars::before { top: -7px; }
  .nav-toggle__bars::after { top: 7px; }
  .nav-open .nav-toggle__bars { background: transparent; }
  .nav-open .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
  .nav-open .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

  .site-nav {
    position: absolute;
    top: 100%;
    right: 12px;
    width: min(340px, calc(100vw - 24px));
    max-height: calc(100vh - var(--header-h) - 24px);
    overflow-y: auto;
    background: #fff;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  }
  .nav-open .site-nav { opacity: 1; visibility: visible; transform: none; }
  .nav-list { display: block; padding: 8px 0; }
  .nav-list > li { padding: 0; border-bottom: 1px solid #eee; }
  .nav-list > li:last-child { border-bottom: 0; }
  .nav-list > li > a, .nav-list > li > .nav-parent > a {
    height: auto;
    padding: 13px 20px;
    color: #222;
    font: 600 16px/1.3 var(--sans);
    flex: 1;
  }
  .nav-list a[aria-current="page"] { color: var(--maroon); }
  .nav-list a:hover { opacity: 1; color: var(--maroon); }
  .sub-toggle { width: 48px; height: 46px; color: #222; border-left: 1px solid #eee; margin: 0; }
  .sub-toggle .ico { transition: transform .2s ease; }
  .has-sub.is-open .sub-toggle .ico { transform: rotate(180deg); }
  .sub-menu {
    position: static;
    width: auto;
    padding: 0 0 8px;
    background: #faf6f7;
    border-top: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    display: none;
  }
  .has-sub:hover > .sub-menu, .has-sub:focus-within > .sub-menu { display: none; }
  .has-sub.is-open > .sub-menu { display: block; }
  .sub-menu a { padding: 10px 20px 10px 32px; color: #333; font: 500 15px/1.35 var(--sans); }
  .nav-backdrop { display: block; position: fixed; inset: 0; top: var(--header-h); z-index: 90; background: rgba(0, 0, 0, .35); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease; }
  .nav-open .nav-backdrop { opacity: 1; visibility: visible; }
  body.nav-open { overflow: hidden; }
}

/* ---------- Section banner (maroon strip with display type) ---------- */
.banner { background: var(--maroon); padding: 24px 0; }
.banner .row { padding: 0; }
.banner__title {
  color: #fff;
  font: 700 35px/1.7 var(--display);
  letter-spacing: 4px;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 2.8px 2.8px 2.8px rgba(0, 0, 0, .4);
  padding: 0;
}
.rule-band { height: 25px; background: var(--maroon); }

/* ---------- Social follow icons ---------- */
.social { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; margin: 0; padding: 0; line-height: 1; }
.social a { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 3px; color: #fff; }
.social a:hover { opacity: .8; }
.social .ico { width: 16px; height: 16px; }
.social .linkedin { background: #007BB6; }
.social .youtube { background: #A82400; }
.social .facebook { background: #3B5998; }
.social .x { background: #000; }
.social .instagram { background: #EA2C59; }
.social .tiktok { background: #FE2C55; }
.site-footer .social .x { background: #000; box-shadow: inset 0 0 0 1px #000; }
.site-footer .social { display: grid; grid-template-columns: repeat(3, 32px); justify-content: center; }

/* ---------- Share row ---------- */
.share { padding: 22px 20px 26px; }
.share__title { font: 700 12px/1.2 var(--sans); padding: 0 0 12px; }
.share__list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; line-height: 1; }
.share__list a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px 5px 9px;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 0 0 1px rgba(0, 0, 0, .12);
  color: #2C3338;
  font: 500 13px/23px var(--arial);
}
.share__list a:hover { box-shadow: 0 1px 2px rgba(0, 0, 0, .22), 0 0 0 1px rgba(0, 0, 0, .22); opacity: 1; }
.share__list .ico { width: 15px; height: 15px; }

/* ---------- Footer ---------- */
.site-footer { background: #000; color: #fff; padding: 30px 0 0; }
.footer-row { width: 90%; max-width: 1557px; margin: 0 auto; padding: 27px 0; }
.footer-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; }
.footer-pill {
  margin-bottom: 18px;
  padding: 3px;
  border: 3px solid #fff;
  border-radius: 20px;
  font: 500 17px/30.6px var(--arial);
  letter-spacing: 1px;
  text-align: center;
}
.footer-book { display: block; background: var(--gray-box); }
.footer-book img { width: 100%; aspect-ratio: 174 / 134; object-fit: contain; }
.footer-links { border-top: 1px solid rgba(255, 255, 255, .18); margin-top: 20px; padding: 40px 30px 34px; }
.footer-links__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 4%; max-width: 1200px; margin: 0 auto; }
.footer-links__title { font: 700 14px/1.2 var(--sans); letter-spacing: 2px; text-transform: uppercase; color: #fff; padding: 0 0 12px; }
.footer-links ul { list-style: none; padding: 0; margin: 0; line-height: 1.4; }
.footer-links li { padding: 2px 0; }
.footer-links a { color: #d9d9d9; font: 500 15px/1.4 var(--sans); }
.footer-links a:hover { color: #fff; opacity: 1; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .18); padding: 18px 20px 22px; text-align: center; color: #bdbdbd; font: 500 14px/1.5 var(--sans); }

@media (max-width: 980px) {
  .site-footer { padding-top: 30px; }
  .footer-row { width: 80%; }
  .footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 30px; }
  .footer-grid > :first-child { grid-column: 1 / -1; max-width: 360px; justify-self: center; width: 100%; }
  .footer-links__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .footer-row { width: 100%; padding: 27px 16px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  .footer-links__grid { grid-template-columns: 1fr 1fr; }
  .footer-links { padding: 32px 16px 26px; }
}
@media (max-width: 420px) {
  .footer-links__grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- Media embeds ---------- */
.video { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.kit-embed { min-height: 60px; }

/* ---------- Slider ---------- */
.slider { position: relative; overflow: hidden; }
.slider__track { position: relative; display: grid; }
.slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s ease; }
.slide.is-active { opacity: 1; visibility: visible; position: relative; z-index: 1; }
.slider__arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity .3s ease, left .3s ease, right .3s ease;
}
.slider__arrow .ico { width: 48px; height: 48px; }
.slider__arrow--prev { left: -22px; }
.slider__arrow--next { right: -22px; }
.slider:hover .slider__arrow, .slider:focus-within .slider__arrow { opacity: 1; }
.slider:hover .slider__arrow--prev, .slider:focus-within .slider__arrow--prev { left: 22px; }
.slider:hover .slider__arrow--next, .slider:focus-within .slider__arrow--next { right: 22px; }
@media (hover: none) { .slider__arrow { opacity: 1; } .slider__arrow--prev { left: 6px; } .slider__arrow--next { right: 6px; } }

/* ---------- Testimonial card (quote icon, round portrait) ---------- */
.quote-icon { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin: 0 auto -16px; position: relative; z-index: 1; border-radius: 50%; background: #0c1b4a; color: #fff; }
.quote-icon .ico { width: 24px; height: 24px; }
.portrait { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; box-shadow: inset 0 0 3px rgba(0, 0, 0, .3); }

/* ---------- Scroll reveal (progressive enhancement, respects reduced motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transition: opacity 1s ease-in-out, transform 1s ease-in-out; }
  .js [data-reveal="slide-left"] { transform: translateX(40px); }
  .js [data-reveal="slide-right"] { transform: translateX(-40px); }
  .js [data-reveal="slide-up"] { transform: translateY(40px); }
  .js [data-reveal="zoom"] { transform: scale(.85); }
  .js [data-reveal].is-revealed { opacity: 1; transform: none; }
}

/* ---------- Responsive base ---------- */
@media (max-width: 980px) {
  .section { padding: 50px 0; }
  .row { padding: 30px 0; }
  .cols--2, .cols--3, .cols--4, .cols--1-2, .cols--2-1, .cols--1-3, .cols--3-1 { grid-template-columns: minmax(0, 1fr); row-gap: 30px; }
  .cols--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 30px; }
  .mod + .mod { margin-top: 30px; }
  .banner { padding: 33px 0; }
  .banner__title { font-size: 20px; line-height: 34px; }
}
@media (max-width: 767px) {
  .cols--6 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Sitewide motion (added by site.js; skipped when reduced motion is preferred) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease-out, transform .7s ease-out; transition-delay: var(--reveal-delay, 0s); }
  .reveal.is-revealed { opacity: 1; transform: none; }
  .btn:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0, 0, 0, .18); }
  .social a { transition: transform .2s ease, opacity .2s ease; }
  .social a:hover { transform: translateY(-3px); }
  .footer-links a { transition: color .2s ease; }
}
