:root {
  --sn-maroon: #8d171d;
  --sn-maroon-deep: #651015;
  --sn-saffron: #df7b10;
  --sn-gold: #c38a22;
  --sn-cream: #fffaf1;
  --sn-paper: #fffdf8;
  --sn-ink: #38251e;
  --sn-muted: #745f53;
  --sn-line: rgba(184, 125, 31, .24);
  --sn-shadow: 0 18px 50px rgba(92, 50, 20, .10);
  --sn-radius: 20px;
}

html { scroll-behavior: smooth; }
body.sn-themed {
  background-color: var(--sn-cream);
  background-image: url('/images/manuscript-paper.webp');
  background-position: center top;
  background-size: 1800px auto;
  background-attachment: fixed;
  color: var(--sn-ink);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.sn-themed ::selection { background: rgba(215, 163, 61, .3); color: var(--sn-maroon-deep); }
body.sn-themed :where(h1, h2, h3) { text-wrap: balance; }
body.sn-themed :where(p, li) { text-wrap: pretty; }
body.sn-themed :where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid rgba(141, 23, 29, .34) !important;
  outline-offset: 3px !important;
}

/* Shared editorial rhythm */
body.sn-themed :where(.section-label, .eyebrow, .hero-badge, .archive-badge, .kicker) {
  color: var(--sn-saffron) !important;
  font-weight: 750 !important;
  letter-spacing: .18em !important;
}
body.sn-themed :where(h1, h2, .blog-card-title, .included-title, .course-title) {
  font-family: "Lora", Georgia, serif !important;
}
/* Individual heroes own their heading color; shared content headings use maroon. */
body.sn-themed :where(main, .wrap, .container, .section, .page-shell) h2 { color: var(--sn-maroon); }
body.sn-themed :where(.wrap, .container, .section, .page-shell, main) { isolation: isolate; }

/* Cards and meaningful content blocks */
body.sn-themed :where(.card, .course-card, .team-card, .value-card, .outcome-card,
  .included-card, .t-card, .feedback-card, .teaser-card, .missed-card,
  .form-card, .interest-card, .story-card, .lesson-card, .blog-card) {
  border-color: var(--sn-line) !important;
  border-radius: var(--sn-radius) !important;
  background-color: rgba(255, 253, 248, .96) !important;
  box-shadow: var(--sn-shadow) !important;
}
body.sn-marketing-page :where(.course-card, .team-card, .value-card, .outcome-card,
  .included-card, .t-card, .blog-card) {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease !important;
}
body.sn-marketing-page :where(.course-card, .team-card, .value-card, .outcome-card,
  .included-card, .t-card, .blog-card):hover {
  transform: translateY(-4px);
  border-color: rgba(195, 138, 34, .48) !important;
  box-shadow: 0 24px 60px rgba(92, 50, 20, .15) !important;
}

/* Homepage-style, image-led heroes for the two primary story pages. */
body.sn-cinematic-page :is(.site-banner, .gita-banner) {
  position: relative !important;
  display: grid !important;
  width: 100% !important;
  height: clamp(520px, 48vw, 680px) !important;
  min-height: 520px !important;
  overflow: hidden !important;
  background: #4a2118 !important;
}
body.sn-cinematic-page :is(.site-banner, .gita-banner) > img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  filter: saturate(1.03) contrast(1.02) !important;
}
body.sn-cinematic-page :is(.site-banner, .gita-banner)::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  background: rgba(49, 20, 13, .48) !important;
  pointer-events: none !important;
}
body.sn-cinematic-page .sn-cinematic-content {
  position: relative !important;
  z-index: 2 !important;
  display: flex !important;
  width: min(100% - 40px, 1320px) !important;
  height: 100% !important;
  margin: 0 auto !important;
  padding: clamp(72px, 9vw, 124px) 0 54px !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  text-align: left !important;
}
body.sn-cinematic-page .sn-cinematic-content .logo-wrap,
body.sn-cinematic-page > .sn-hero-brand { display: none !important; }
body.sn-cinematic-page .sn-cinematic-content h1 {
  max-width: 690px !important;
  margin: 0 0 22px !important;
  color: #fffaf0 !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: #fffaf0 !important;
  font-size: clamp(44px, 5.4vw, 76px) !important;
  line-height: 1.04 !important;
  letter-spacing: -.035em !important;
  text-shadow: 0 5px 24px rgba(26, 7, 4, .36) !important;
}
body.sn-cinematic-page .sn-cinematic-content :where(.header-sub, .lede, .hero-promise, .hero-sub) {
  max-width: 620px !important;
  margin: 0 !important;
  color: #fff7e8 !important;
  font-size: clamp(17px, 1.6vw, 21px) !important;
  font-style: normal !important;
  line-height: 1.65 !important;
  opacity: 1 !important;
  text-shadow: 0 3px 16px rgba(26, 7, 4, .48) !important;
}
body.sn-cinematic-page .sn-cinematic-content :where(.badge-row, .pill-row, .course-meta) {
  justify-content: flex-start !important;
  margin-top: 25px !important;
}
body.sn-cinematic-page .sn-cinematic-content :where(.badge-pill, .pill, .meta-pill, .hero-badge) {
  border-color: rgba(255, 238, 201, .54) !important;
  background: rgba(255, 250, 241, .92) !important;
  color: #603b28 !important;
  box-shadow: 0 7px 22px rgba(32, 8, 4, .15) !important;
}
body.sn-cinematic-page > .wrap {
  max-width: 1060px !important;
  padding-top: clamp(64px, 7vw, 96px) !important;
}
body.sn-gita-page .gita-banner .sacred-mark { z-index: 3 !important; color: #ffe6ae !important; }
body.sn-gita-page .gita-banner h1 span { display: block; color: #ffe2a2 !important; font-size: .56em !important; margin-top: 12px !important; }
body.sn-gita-page .gita-banner .chant-line { color: #ffe7ba !important; font-weight: 750 !important; margin: 0 0 14px !important; }
body.sn-gita-page .form-card > #form-panel > .form-title { color: #fffaf0 !important; }
body.sn-hanuman-course-page .site-banner .hero-badge { margin-bottom: 20px !important; }
body.sn-hanuman-course-page .site-banner .hero-promise em { display: block; color: #ffe2a2 !important; }
body.sn-hanuman-course-page .site-banner .course-meta { max-width: 760px !important; }
body.sn-cinematic-page .stats-strip { grid-template-columns: repeat(5, 1fr) !important; gap: 16px !important; }
body.sn-cinematic-page .stat {
  min-height: 140px;
  display: grid;
  align-content: center;
  background: #fffdf8 !important;
  border-color: var(--sn-line) !important;
  box-shadow: 0 14px 38px rgba(92, 50, 20, .09) !important;
}
body.sn-cinematic-page :where(.mission-block, .story-block, .enroll-form-wrap, .testimonial) {
  padding: clamp(28px, 4vw, 48px) !important;
}
body.sn-cinematic-page .team-grid { gap: 28px !important; }
body.sn-cinematic-page .team-photo-wrap { aspect-ratio: 4 / 3 !important; }
body.sn-cinematic-page .courses-grid { gap: 28px !important; }
body.sn-cinematic-page .course-card { padding: clamp(28px, 4vw, 42px) !important; }

body.sn-themed:not(.sn-product-page) > :where(.wrap, main) {
  background-color: rgba(255, 250, 241, .76);
}
body.sn-themed :where(.divider) { opacity: .58 !important; }

/* Illuminated-storybook chapter openings for workshops and the replay library. */
body.sn-illustrated-chapter > .wrap {
  max-width: 1120px !important;
  padding-top: clamp(52px, 7vw, 92px) !important;
}
body.sn-illustrated-chapter .sn-storybook-hero {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .82fr) !important;
  gap: clamp(36px, 6vw, 76px) !important;
  align-items: center !important;
  min-height: 470px !important;
  margin: 0 0 clamp(70px, 8vw, 110px) !important;
  padding: clamp(38px, 6vw, 72px) !important;
  border: 1px solid rgba(174, 115, 26, .32) !important;
  border-radius: 36px 36px 120px 36px !important;
  background: rgba(255, 252, 243, .84) !important;
  box-shadow: 0 30px 75px rgba(92, 50, 20, .13) !important;
  overflow: hidden !important;
  text-align: left !important;
}
body.sn-illustrated-chapter .sn-storybook-hero > :not(.sn-chapter-visual) {
  grid-column: 1 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  text-align: left !important;
}
body.sn-illustrated-chapter .sn-storybook-hero h1 {
  max-width: 620px !important;
  color: var(--sn-maroon) !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: var(--sn-maroon) !important;
  font-size: clamp(38px, 4.7vw, 66px) !important;
  line-height: 1.06 !important;
  letter-spacing: -.035em !important;
}
body.sn-illustrated-chapter .sn-storybook-hero :where(.hero-sub, .header-sub, p) {
  color: #60483b !important;
  font-size: clamp(16px, 1.5vw, 19px) !important;
  line-height: 1.72 !important;
}
body.sn-illustrated-chapter .sn-chapter-kicker {
  margin-bottom: 14px !important;
  color: var(--sn-saffron) !important;
  font: 750 11px/1.4 "Inter", system-ui, sans-serif !important;
  letter-spacing: .2em !important;
  text-transform: uppercase !important;
}
body.sn-illustrated-chapter .sn-chapter-visual {
  grid-column: 2 !important;
  grid-row: 1 / span 12 !important;
  align-self: stretch !important;
  min-height: 370px !important;
  margin: 0 !important;
  border: 1px solid rgba(174, 115, 26, .3) !important;
  border-radius: 180px 180px 28px 28px !important;
  overflow: hidden !important;
  box-shadow: 0 22px 54px rgba(72, 36, 14, .2) !important;
}
body.sn-illustrated-chapter .sn-chapter-visual img {
  width: 100% !important;
  height: 100% !important;
  min-height: 370px !important;
  object-fit: cover !important;
  object-position: center !important;
  filter: saturate(.92) sepia(.08) !important;
}
body.sn-illustrated-chapter .logo-wrap { display: none !important; }
body.sn-illustrated-chapter .hero-emoji { display: none !important; }
body.sn-hanuman-bundle-page .sn-chapter-visual img { object-position: center top !important; }

/* Parchment reading surfaces carry the selected concept below each hero. */
body.sn-themed :where(.mission-block, .story-block, .taught-block, .missed-card, .form-card, .interest-card) {
  background-color: rgba(255, 253, 247, .9) !important;
  background-image: url('/images/manuscript-paper.webp') !important;
  background-position: center !important;
  background-size: cover !important;
}
body.sn-article-page .article {
  margin-top: 54px !important;
  margin-bottom: 72px !important;
  padding: clamp(34px, 6vw, 72px) !important;
  border: 1px solid rgba(174, 115, 26, .25) !important;
  border-radius: 28px !important;
  background: rgba(255, 252, 244, .9) url('/images/manuscript-paper.webp') center top / cover !important;
  box-shadow: 0 28px 70px rgba(87, 45, 18, .11) !important;
}
body.sn-marketing-page :where(.section-title, .section-label, .eyebrow) { margin-bottom: 14px !important; }
body.sn-marketing-page :where(.section-heading, h2) { letter-spacing: -.025em; }

/* Buttons and actions */
body.sn-themed :where(button, .btn, .button, .cta-btn, .primary-btn, input[type="submit"]) {
  min-height: 48px;
  border-radius: 12px !important;
  font-family: "Inter", system-ui, sans-serif !important;
  font-weight: 750 !important;
}
body.sn-themed :where(.btn-primary, .primary-btn, .cta-btn, button[type="submit"], input[type="submit"]) {
  border-color: var(--sn-maroon) !important;
  background-color: var(--sn-maroon) !important;
  color: #fff !important;
  box-shadow: 0 12px 28px rgba(141, 23, 29, .2) !important;
}
body.sn-themed :where(.btn-primary, .primary-btn, .cta-btn, button[type="submit"], input[type="submit"]):hover {
  background-color: var(--sn-maroon-deep) !important;
  transform: translateY(-2px);
}

/* Forms */
body.sn-themed :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  min-height: 48px;
  border: 1px solid rgba(124, 81, 44, .24) !important;
  border-radius: 11px !important;
  background: #fffefa !important;
  color: var(--sn-ink) !important;
}
body.sn-themed :where(input, select, textarea)::placeholder { color: #9b8b80; opacity: 1; }
body.sn-themed :where(input, select, textarea):focus {
  border-color: var(--sn-gold) !important;
  box-shadow: 0 0 0 4px rgba(195, 138, 34, .12) !important;
}
body.sn-themed label { color: #6b4938; font-weight: 700; }

/* Calm application surfaces */
body.sn-product-page {
  min-height: 100vh;
  background-color: #fffaf2 !important;
}
body.sn-product-page > :where(.wrap, .container, main, .page-shell) {
  width: min(100% - 32px, 920px);
  margin-inline: auto;
}
body.sn-product-page :where(.card, .form-card) {
  border: 1px solid var(--sn-line) !important;
}
body.sn-product-page :where(h1) { letter-spacing: -.025em; }

/* Long-form articles */
body.sn-article-page .article {
  width: min(100% - 36px, 780px) !important;
  margin-inline: auto !important;
}
body.sn-article-page .article :where(p, li) {
  color: #4d3a31;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.85;
}
body.sn-article-page .article :where(h2, h3) {
  margin-top: 1.8em;
  color: var(--sn-maroon) !important;
  line-height: 1.25;
}
body.sn-article-page :where(blockquote, .story-card, .lesson-card) {
  border-left: 4px solid var(--sn-gold) !important;
}

/* Consistent footer finish */
body.sn-themed :where(.site-footer, footer) {
  border-top: 1px solid var(--sn-line) !important;
  background-color: rgba(255, 253, 248, .92) !important;
  color: var(--sn-muted) !important;
}
body.sn-themed :where(.site-footer, footer) a { color: var(--sn-maroon) !important; }

/* Never leave scroll-reveal content permanently invisible when scripts fail. */
body.sn-themed.reduced-effects :where(.reveal, [data-reveal]) {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

@media (max-width: 760px) {
  body.sn-themed { font-size: 16px; }
  body.sn-themed { background-attachment: scroll; background-size: 1100px auto; }
  body.sn-themed :where(.wrap, .container, .section, .page-shell) { padding-inline: 18px; }
  body.sn-themed :where(.card, .course-card, .team-card, .value-card, .outcome-card,
    .included-card, .t-card, .feedback-card, .teaser-card, .missed-card,
    .form-card, .interest-card, .story-card, .lesson-card, .blog-card) {
    border-radius: 16px !important;
  }
  body.sn-cinematic-page :is(.site-banner, .gita-banner) {
    height: 560px !important;
    min-height: 560px !important;
  }
  body.sn-cinematic-page :is(.site-banner, .gita-banner) > img { object-position: 62% center !important; }
  body.sn-cinematic-page :is(.site-banner, .gita-banner)::after { background: rgba(46, 17, 11, .58) !important; }
  body.sn-cinematic-page .sn-cinematic-content {
    width: min(100% - 36px, 620px) !important;
    padding: 58px 0 48px !important;
    justify-content: flex-end !important;
  }
  body.sn-cinematic-page .sn-cinematic-content h1 { font-size: clamp(38px, 12vw, 54px) !important; }
  body.sn-cinematic-page .sn-cinematic-content :where(.header-sub, .lede, .hero-promise, .hero-sub) { font-size: 16px !important; }
  body.sn-cinematic-page .sn-cinematic-content :where(.badge-row, .pill-row, .course-meta) { gap: 8px !important; }
  body.sn-cinematic-page .sn-cinematic-content :where(.badge-pill, .pill, .meta-pill, .hero-badge) { font-size: 12px !important; }
  body.sn-hanuman-course-page :is(.site-banner, .gita-banner) { height: 680px !important; min-height: 680px !important; }
  body.sn-cinematic-page .stats-strip { grid-template-columns: repeat(2, 1fr) !important; }
  body.sn-cinematic-page .stats-strip .stat:last-child { grid-column: 1 / -1; }
  body.sn-illustrated-chapter .sn-storybook-hero {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    min-height: 0 !important;
    padding: 24px !important;
    border-radius: 24px 24px 70px 24px !important;
  }
  body.sn-illustrated-chapter .sn-chapter-visual {
    grid-column: 1 !important;
    grid-row: auto !important;
    min-height: 320px !important;
    border-radius: 140px 140px 22px 22px !important;
  }
  body.sn-illustrated-chapter .sn-chapter-visual img { min-height: 320px !important; }
  body.sn-illustrated-chapter .sn-storybook-hero > :not(.sn-chapter-visual) { grid-column: 1 !important; }
  body.sn-article-page .article { width: min(100% - 22px, 780px) !important; padding: 30px 22px !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body.sn-themed * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
