/* =========================================================
   SHASTRA WISDOM PUBLICATIONS — BRAND SYSTEM
   Version: 1.0
   Purpose: shared brand tokens + reusable page components
   ========================================================= 
*/

@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&family=Sansation:ital@0;1&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Oregano&family=Roboto:wght@300;400;500;600;700&family=Sansation:wght@300;400;700&display=swap");

:root {
  /* Brand palette */
  --sw-ink: #172033;
  --sw-ink-soft: #475569;
  --sw-ink-muted: #64748b;
  --sw-paper: #f8f6f1;
  --sw-paper-strong: #f4efe5;
  --sw-surface: #ffffff;
  --sw-surface-soft: #fbfaf7;
  --sw-line: #e2e8f0;
  --sw-line-warm: #ead8b2;

  --sw-gold: #b97714;
  --sw-gold-dark: #8f5b0c;
  --sw-gold-soft: #f8edd8;
  --sw-gold-pale: #fff8ea;

  --sw-footer: #09111f;
  --sw-footer-line: #334155;

  /* Typography */
  --sw-font-body: "Roboto", Arial, Helvetica, sans-serif;
  --sw-font-display: "Sansation", Arial, Helvetica, sans-serif;
  --sw-font-heading: var(--sw-font-display);
  --sw-font-ui: var(--sw-font-display);
  --sw-font-accent: "Oregano", cursive;

  /* Layout */
  --sw-container: 1100px;
  --sw-container-wide: 1240px;
  --sw-radius-sm: 10px;
  --sw-radius: 16px;
  --sw-radius-lg: 24px;
  --sw-radius-xl: 30px;

  /* Effects */
  --sw-shadow-sm: 0 8px 24px rgba(15, 23, 42, .06);
  --sw-shadow: 0 16px 40px rgba(15, 23, 42, .09);
  --sw-shadow-book: 0 28px 50px rgba(15, 23, 42, .20);
}

/* ---------- Reset / base ---------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--sw-paper);
  color: var(--sw-ink);
  font-family: var(--sw-font-body);
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

img {
  height: auto;
  display: block;
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

.sw-container {
  width: min(calc(100% - 32px), var(--sw-container));
  margin-inline: auto;
}

.sw-container-wide {
  width: min(calc(100% - 32px), var(--sw-container-wide));
  margin-inline: auto;
}

/* ---------- Header ---------- */
.sw-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 10px 0 6px;
  pointer-events: none;
}

.sw-header__bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 16px;
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: var(--sw-radius);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px) saturate(150%);
  box-shadow: var(--sw-shadow-sm);
}

.sw-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.sw-brand__logo {
  width: 36px;
  height: 36px;
  padding: 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff4dc, #f4d59b);
  box-shadow: 0 4px 14px rgba(180, 83, 9, .12);
  border: 2px solid #f2d29c;
}

.sw-brand__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
}

.sw-brand__name {
  font-family: var(--sw-font-ui);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .16em;
  white-space: nowrap;
}

.sw-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-family: var(--sw-font-ui);
  font-size: 15px;
  letter-spacing: .035em;
}

.sw-nav a {
  text-decoration: none;
  transition: color .18s ease;
}

.sw-nav a:hover {
  color: var(--sw-gold-dark);
}

.sw-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--sw-ink);
  color: white;
  cursor: pointer;
}

.sw-menu-button svg {
  width: 21px;
  height: 21px;
  margin: auto;
}

.sw-mobile-menu {
  display: none;
  pointer-events: auto;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--sw-line);
  border-radius: var(--sw-radius);
  background: rgba(255, 255, 255, .97);
  box-shadow: var(--sw-shadow-sm);
}

.sw-mobile-menu.is-open {
  display: grid;
}

.sw-mobile-menu a {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  font-family: var(--sw-font-ui);
  text-decoration: none;
}

.sw-mobile-menu a:hover {
  background: #f8fafc;
}

/* ---------- Type system ---------- */
.sw-kicker {
  margin: 0;
  color: var(--sw-gold-dark);
  font-family: var(--sw-font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.sw-title {
  margin: 8px 0 0;
  font-family: var(--sw-font-heading);
  font-size: clamp(36px, 4.6vw, 52px);
  line-height: 1.12;
  letter-spacing: -.025em;
  color: #101827;
}

.sw-subtitle {
  margin: 10px 0 0;
  color: #334155;
  font-size: clamp(18px, 2.2vw, 21px);
  line-height: 1.55;
}

.sw-lede {
  margin: 12px 0 0;
  max-width: 720px;
  color: var(--sw-ink-soft);
  font-size: 16px;
  line-height: 1.68;
}

.sw-section-heading {
  margin: 9px 0 0;
  font-family: var(--sw-font-heading);
  font-size: clamp(27px, 3.5vw, 34px);
  line-height: 1.25;
  color: #111827;
}

.sw-section-intro {
  margin: 9px auto 0;
  max-width: 720px;
  color: var(--sw-ink-soft);
  line-height: 1.75;
}

.sw-center {
  text-align: center;
}

.sw-rule {
  width: 48px;
  height: 2px;
  margin: 9px auto 0;
  background: var(--sw-gold);
  border-radius: 99px;
}

.sw-prose {
  max-width: 860px;
  margin: 16px auto 0;
  color: var(--sw-ink-soft);
}

.sw-prose p {
  margin: 0 0 10px;
}

.sw-prose p:last-child {
  margin-bottom: 0;
}

/* ---------- Buttons / chips ---------- */
.sw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 17px;
}

.sw-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: var(--sw-font-ui);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

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

.sw-btn--primary {
  background: var(--sw-ink);
  color: white;
  box-shadow: var(--sw-shadow-sm);
}

.sw-btn--primary:hover {
  background: #263247;
}

.sw-btn--gold {
  background: var(--sw-gold);
  color: white;
}

.sw-btn--gold:hover {
  background: var(--sw-gold-dark);
}

.sw-btn--light {
  background: rgba(255, 255, 255, .9);
  border-color: var(--sw-line-warm);
  color: var(--sw-ink);
}

.sw-btn--light:hover {
  background: var(--sw-gold-pale);
}

.sw-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 12px;
}

.sw-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 13px;
  border: 1px solid var(--sw-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  color: var(--sw-ink-soft);
  font-family: var(--sw-font-ui);
  font-size: 12px;
  letter-spacing: .025em;
}

/* ---------- Sections ---------- */
.sw-section {
  padding: 30px 0;
}

.sw-section--tight {
  padding: 22px 0;
}

/* ---------- Book hero ---------- */
.sw-book-hero {
  position: relative;
  overflow: hidden;
  padding: 18px 0 28px;
}

.sw-book-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 40%, rgba(185, 119, 20, .11), transparent 31%),
    radial-gradient(circle at 83% 13%, rgba(148, 163, 184, .13), transparent 28%);
}

.sw-book-hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.sw-cover-wrap {
  display: flex;
  justify-content: center;
}

.sw-cover {
  width: min(100%, 320px);
  border-radius: 14px;
  box-shadow: var(--sw-shadow-book);
}

.sw-volume {
  margin: 8px 0 0;
  color: var(--sw-gold-dark);
  font-family: var(--sw-font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

/* ---------- Quote ---------- */
.sw-quote-wrap {
  padding: 0 0 18px;
}

.sw-quote {
  max-width: 870px;
  margin: 0 auto;
  padding: 18px 28px;
  border: 1px solid var(--sw-line-warm);
  border-radius: var(--sw-radius-lg);
  background: rgba(255, 248, 234, .68);
  text-align: center;
}

.sw-quote p {
  margin: 0;
  color: #293449;
  font-family: var(--sw-font-accent);
  font-style: italic;
  font-size: clamp(20px, 2.6vw, 26px);
  line-height: 1.5;
}

/* ---------- Cards ---------- */
.sw-card {
  border: 1px solid var(--sw-line);
  border-radius: var(--sw-radius-lg);
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--sw-shadow-sm);
}

.sw-topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.sw-topic-card {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 16px 18px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.sw-topic-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sw-shadow);
  border-color: #dfbd7d;
}

.sw-topic-card__index {
  flex: 0 0 auto;
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--sw-gold-soft);
  color: var(--sw-gold-dark);
  font-family: var(--sw-font-ui);
  font-weight: 700;
  font-size: 13px;
}

.sw-topic-card h3 {
  margin: 1px 0 0;
  font-family: var(--sw-font-heading);
  font-size: 17px;
  line-height: 1.4;
}

.sw-topic-card p {
  margin: 4px 0 0;
  color: var(--sw-ink-soft);
  font-size: 14px;
  line-height: 1.65;
}

/* ---------- Audience ---------- */
.sw-audience {
  padding: 22px 26px;
  text-align: center;
}

.sw-audience .sw-section-intro {
  max-width: 820px;
}

.sw-audience .sw-chip-row {
  justify-content: center;
}

/* ---------- Details ---------- */
.sw-details {
  max-width: 880px;
  margin: 16px auto 0;
  overflow: hidden;
}

.sw-details__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sw-details__col {
  padding: 18px 24px;
}

.sw-details__col+.sw-details__col {
  border-left: 1px solid var(--sw-line);
}

.sw-detail {
  margin-bottom: 11px;
}

.sw-detail:last-child {
  margin-bottom: 0;
}

.sw-detail dt {
  margin: 0 0 4px;
  color: #94a3b8;
  font-family: var(--sw-font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.sw-detail dd {
  margin: 0;
  color: #3f4c5f;
  font-size: 15px;
  line-height: 1.65;
}

/* ---------- Buy CTA ---------- */
.sw-buy {
  padding: 26px 28px;
  border-radius: var(--sw-radius-xl);
  background: var(--sw-ink);
  box-shadow: var(--sw-shadow);
  text-align: center;
}

.sw-buy .sw-kicker {
  color: #f6d486;
}

.sw-buy .sw-section-heading {
  color: white;
}

.sw-buy p {
  max-width: 700px;
  margin: 9px auto 0;
  color: #cbd5e1;
}

.sw-buy .sw-actions {
  justify-content: center;
}

/* ---------- Related books ---------- */
.sw-related {
  text-align: center;
}

.sw-related .sw-actions {
  justify-content: center;
}

/* ---------- Publications home ---------- */
.sw-publications-hero {
  padding: 28px 0 12px;
}

.sw-publications-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 34px;
  align-items: center;
}

.sw-publisher-mark {
  padding: 14px;
  text-align: center;
}

.sw-publisher-mark img {
  width: min(100%, 285px);
  margin: 0 auto;
}

.sw-book-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 18px;
}

.sw-book-card {
  padding: 14px;
  text-align: center;
  transition: transform .18s ease, box-shadow .18s ease;
}

.sw-book-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sw-shadow);
}

.sw-book-card__cover {
  aspect-ratio: 2 / 3;
  width: 180px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--sw-line);
  border-radius: 14px;
  background: white;
}

.sw-book-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sw-book-card h3 {
  margin: 15px 0 0;
  font-family: var(--sw-font-heading);
  font-size: 16px;
  line-height: 1.45;
}

.sw-book-card p {
  margin: 8px 0 0;
  color: var(--sw-ink-soft);
  font-size: 13.5px;
  line-height: 1.65;
  min-height: 0;
}

.sw-book-card .sw-btn {
  margin-top: 14px;
}

.sw-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.sw-list-card {
  padding: 20px;
}

.sw-list-card h3 {
  margin: 0;
  font-family: var(--sw-font-heading);
  font-size: 21px;
}

.sw-list-card>p {
  color: var(--sw-ink-soft);
  font-size: 15px;
}

.sw-link-list {
  margin-top: 18px;
}

.sw-link-list a {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--sw-line);
  text-decoration: none;
  font-family: var(--sw-font-ui);
  font-size: 14px;
}

.sw-link-list a:hover {
  color: var(--sw-gold-dark);
}

.sw-note {
  padding: 20px;
}

/* ---------- Footer ---------- */
.sw-footer {
  padding: 34px 0 20px;
  background: var(--sw-footer);
  color: #e2e8f0;
  border-top: 1px solid var(--sw-footer-line);
  font-family: var(--sw-font-body);
}

.sw-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr .55fr .55fr;
  gap: 36px;
}

.sw-footer .sw-brand__name {
  color: white;
  letter-spacing: .1em;
}

.sw-footer p {
  font-size: 14px;
  line-height: 1.65;
}

.sw-footer__heading {
  margin: 0;
  color: white;
  font-size: 14px;
  font-weight: 700;
}

.sw-footer__mini-rule {
  width: 40px;
  height: 1px;
  margin: 8px 0 12px;
  background: #64748b;
}

.sw-footer nav {
  display: grid;
  gap: 8px;
}

.sw-footer nav a {
  color: #e2e8f0;
  font-size: 14px;
  text-decoration: none;
}

.sw-footer nav a:hover {
  color: white;
}

.sw-footer__partner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 650px;
}

.sw-footer__partner img {
  width: auto;
  height: 22px;
}

.sw-social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 11px;
}

.sw-social-row a {
  padding: 7px 11px;
  border: 1px solid #64748b;
  border-radius: 10px;
  color: white;
  font-size: 13px;
  text-decoration: none;
}

.sw-social-row a:hover {
  background: #172033;
}

.sw-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--sw-footer-line);
}

.sw-footer__bottom p {
  margin: 0;
}

.sw-footer__copyright {
  flex: 0 0 auto;
  color: white;
  font-weight: 600;
}


/* ---------- Shared page rhythm / utilities ---------- */
.sw-section-intro--left {
  margin-left: 0;
  margin-right: 0;
}

.sw-two-col--spaced {
  margin-top: 18px;
}

.sw-footer__partner-heading {
  margin-top: 22px;
}

.sw-footer__social {
  margin-top: 22px;
}

/* Book pages: compact, consistent vertical rhythm */
.sw-book-page .sw-book-hero {
  padding: 18px 0 28px;
}

.sw-book-page .sw-book-hero__grid {
  gap: 34px;
}

.sw-book-page .sw-title {
  margin-top: 7px;
}

.sw-book-page .sw-subtitle {
  margin-top: 9px;
}

.sw-book-page .sw-lede {
  margin-top: 12px;
}

.sw-book-page .sw-actions {
  margin-top: 17px;
}

.sw-book-page .sw-chip-row {
  margin-top: 12px;
}

.sw-book-page .sw-quote-wrap {
  padding-bottom: 18px;
}

.sw-book-page .sw-section {
  padding: 26px 0;
}

.sw-book-page .sw-section--tight {
  padding: 18px 0 26px;
}

.sw-book-page .sw-topic-grid {
  margin-top: 18px;
  gap: 12px;
}

.sw-book-page .sw-details {
  margin-top: 16px;
}

.sw-book-page #buy {
  padding-top: 22px;
  padding-bottom: 18px;
}

.sw-book-page .sw-buy {
  padding: 25px 28px;
}

.sw-book-page .sw-related .sw-actions {
  margin-top: 13px;
}

/* Publications landing page: remove compounded gaps */
.sw-publications-page .sw-publications-hero {
  padding: 28px 0 12px;
}

.sw-publications-page #books {
  padding-top: 22px;
  padding-bottom: 24px;
}

.sw-publications-page #digital {
  padding: 8px 0;
}

.sw-publications-page #digital .sw-note {
  padding-top: 18px;
  padding-bottom: 18px;
}

.sw-publications-page #podcast {
  padding-top: 20px;
  padding-bottom: 28px;
}

.sw-publications-page .sw-section--org-note {
  padding-top: 10px;
  padding-bottom: 24px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .sw-nav {
    display: none;
  }

  .sw-menu-button {
    display: grid;
    place-items: center;
  }

  .sw-book-hero__grid,
  .sw-publications-hero__grid {
    grid-template-columns: 1fr;
  }

  .sw-book-hero__grid {
    gap: 38px;
  }

  .sw-publications-hero__grid {
    gap: 28px;
  }

  .sw-book-hero__copy,
  .sw-publications-hero__copy {
    text-align: center;
  }

  .sw-book-hero__copy .sw-lede,
  .sw-publications-hero__copy .sw-lede {
    margin-left: auto;
    margin-right: auto;
  }

  .sw-book-hero__copy .sw-actions,
  .sw-book-hero__copy .sw-chip-row,
  .sw-publications-hero__copy .sw-actions {
    justify-content: center;
  }

  .sw-publisher-mark {
    max-width: 460px;
    margin: 0 auto;
  }

  .sw-book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sw-footer__grid {
    grid-template-columns: 1.2fr .8fr .8fr;
    gap: 30px;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
    line-height: 1.66;
  }

  .sw-container,
  .sw-container-wide {
    width: min(calc(100% - 24px), var(--sw-container));
  }

  .sw-header {
    padding-top: 8px;
  }

  .sw-header__bar {
    padding: 9px 11px;
  }

  .sw-brand__name {
    font-size: 14px;
    letter-spacing: .10em;
  }

  .sw-book-hero {
    padding: 14px 0 22px;
  }

  .sw-cover {
    width: min(68vw, 290px);
  }

  .sw-section {
    padding: 24px 0;
  }

  .sw-section--tight {
    padding: 16px 0;
  }

  .sw-topic-grid,
  .sw-details__grid,
  .sw-two-col,
  .sw-book-grid {
    grid-template-columns: 1fr;
  }

  .sw-details__col+.sw-details__col {
    border-left: 0;
    border-top: 1px solid var(--sw-line);
  }

  .sw-audience {
    padding: 20px 18px;
  }

  .sw-quote {
    padding: 16px 18px;
  }

  .sw-buy {
    padding: 24px 18px;
  }

  .sw-book-card p {
    min-height: auto;
  }

  .sw-footer__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .sw-footer__bottom {
    flex-direction: column;
    gap: 10px;
  }

  .sw-footer__partner {
    align-items: flex-start;
  }
}

@media (max-width: 420px) {
  .sw-actions .sw-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 720px) {
  .sw-book-page .sw-book-hero {
    padding: 12px 0 22px;
  }

  .sw-book-page .sw-book-hero__grid {
    gap: 22px;
  }

  .sw-book-page .sw-quote-wrap {
    padding-bottom: 14px;
  }

  .sw-book-page .sw-section {
    padding: 22px 0;
  }

  .sw-book-page .sw-section--tight {
    padding: 16px 0 22px;
  }

  .sw-publications-page #books,
  .sw-publications-page #podcast {
    padding-top: 18px;
    padding-bottom: 20px;
  }
}

/* ---------- Footer contact spacing ---------- */
.sw-footer__contact {
  margin-top: 28px;
}

.sw-footer__contact .sw-footer__heading {
  margin: 0;
}

.sw-footer__contact .sw-footer__mini-rule {
  margin-top: 8px;
  margin-bottom: 10px;
}

.sw-footer__contact-details {
  margin-top: 0;
}

.sw-footer__contact-details p {
  margin: 2px 0;
  line-height: 1.45;
}

.sw-footer__contact-details a {
  color: #e2e8f0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sw-footer__contact-details a:hover {
  color: #ffffff;
}

.sw-footer nav {
  gap: 7px;
}