:root {
  --jm-primary: #79010c;
  --jm-red: #bf0101;
  --jm-pink: #f4346f;
  --jm-rose: #eea0bf;
  --jm-brown: #342018;
  --jm-cream: #eae4df;
  --jm-text: #251414;
  --jm-bg: #fff8f5;
  --jm-white: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(52, 32, 24, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  color: var(--jm-text);
  font-family: 'Manrope', system-ui, sans-serif;
  line-height: 1.6;
  background:
    radial-gradient(circle at 90% -10%, rgba(244, 52, 111, 0.2), transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(121, 1, 12, 0.14), transparent 35%),
    var(--jm-bg);
}

a {
  color: var(--jm-primary);
}

h1,
h2,
h3 {
  font-family: 'Cinzel Decorative', Georgia, serif;
  line-height: 1.1;
  margin: 0 0 0.5rem;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
}

h2 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(234, 228, 223, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(121, 1, 12, 0.12);
}

.is-home .site-header {
  position: absolute;
  inset: 0 0 auto;
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
}

.is-home .brand__name,
.is-home .site-nav a,
.is-home .header-home-btn,
.is-home .nav-toggle {
  color: var(--jm-white);
}

.is-home .header-home-btn,
.is-home .nav-toggle {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.22);
}

.site-header__inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  text-decoration: none;
}

.brand__name {
  color: var(--jm-primary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.header-home-btn {
  text-decoration: none;
  border: 1px solid rgba(121, 1, 12, 0.35);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-weight: 700;
  color: var(--jm-primary);
  background: rgba(255, 255, 255, 0.72);
}

.site-nav .menu {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  font-weight: 600;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--jm-primary);
  border-radius: 999px;
  background: transparent;
  padding: 0.4rem 0.8rem;
}

.hero {
  padding: 9.4rem 0 5.4rem;
  position: relative;
  overflow: hidden;
  background: var(--hero-image, radial-gradient(circle at 90% -10%, rgba(244, 52, 111, 0.3), transparent 42%));
  background-size: cover;
  background-position: center;
  color: var(--jm-white);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(112deg, rgba(52, 32, 24, 0.8), rgba(121, 1, 12, 0.66));
}

.hero__inner {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.01em;
}

.hero .eyebrow {
  color: var(--jm-rose);
}

.hero .btn--ghost {
  border-color: var(--jm-white);
  color: var(--jm-white);
}

.hero__lead {
  max-width: 56ch;
  font-size: 1.1rem;
  text-wrap: balance;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--jm-red);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.section {
  padding: 4.5rem 0;
}

.section--tint {
  background: linear-gradient(120deg, rgba(238, 160, 191, 0.35), rgba(234, 228, 223, 0.55));
}

.section--dark {
  background: linear-gradient(120deg, var(--jm-brown), var(--jm-primary));
  color: var(--jm-white);
}

.section-head p {
  max-width: 68ch;
}

.section-head--center {
  text-align: center;
}

.section-head--center p {
  margin-inline: auto;
}

.home-v2 .section-head h2 {
  position: relative;
  padding-bottom: 0.5rem;
}

.home-v2 .section-head h2::after {
  content: '';
  display: block;
  width: 84px;
  height: 3px;
  margin-top: 0.35rem;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--jm-primary), var(--jm-pink));
}

.home-v2 .section-head--center h2::after {
  margin-inline: auto;
}

.card {
  border-radius: var(--radius);
  padding: 1.4rem;
  background: var(--jm-white);
  box-shadow: var(--shadow);
}

.card--dark {
  background: rgba(255, 255, 255, 0.07);
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.home-v2 .card {
  border: 1px solid rgba(121, 1, 12, 0.12);
}

.section--meet .card:first-child {
  transform: translateY(-28px);
}

.section--feature .book-card {
  border: 1px solid rgba(121, 1, 12, 0.16);
  box-shadow: 0 14px 40px rgba(52, 32, 24, 0.16);
}

.section--feature .book-card img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.section--carousel .jm-carousel__track {
  padding-block: 0.4rem 0.9rem;
}

.section--discover .topic-card {
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.section--discover .topic-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(52, 32, 24, 0.18);
}

.section--freebie .card:first-child {
  background: linear-gradient(140deg, #fff, #fff6fa);
}

.section--promise .card {
  text-align: center;
  border: 1px solid rgba(121, 1, 12, 0.22);
}

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

.three-col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
}

.btn--primary {
  background: var(--jm-primary);
  color: var(--jm-white);
}

.btn--ghost {
  border-color: var(--jm-primary);
  color: var(--jm-primary);
}

.text-link {
  font-weight: 700;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.jm-carousel-section {
  margin-top: 1rem;
}

.jm-carousel {
  position: relative;
}

.jm-carousel__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding-bottom: 0.6rem;
}

.jm-carousel__item {
  scroll-snap-align: start;
}

.jm-carousel__control {
  position: absolute;
  top: calc(50% - 1.1rem);
  transform: translateY(-50%);
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid rgba(121, 1, 12, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--jm-primary);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.jm-carousel__control--prev {
  left: -1rem;
}

.jm-carousel__control--next {
  right: -1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.stats-grid h3 {
  margin-bottom: 0.2rem;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.topic-card {
  background: var(--jm-white);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  border-top: 3px solid rgba(121, 1, 12, 0.45);
}

.feature-list {
  margin: 0;
  padding-left: 1.1rem;
}

.feature-list li {
  margin-bottom: 0.45rem;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  background: var(--jm-white);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  box-shadow: var(--shadow);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
}

.faq-item p {
  margin: 0.6rem 0 0;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.book-card {
  background: var(--jm-white);
  border-radius: var(--radius);
  padding: 0.9rem;
  box-shadow: var(--shadow);
}

.post-card {
  background: var(--jm-white);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.post-card img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.post-meta {
  font-size: 0.9rem;
  color: rgba(37, 20, 20, 0.75);
}

.pagination-wrap {
  margin-top: 1.2rem;
}

.book-card img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.book-card__details {
  margin-top: 0.6rem;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(6px);
  transition: opacity 180ms ease, transform 180ms ease, max-height 220ms ease;
}

.book-card__details h2 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.book-card__details p {
  margin: 0;
}

.book-card:hover .book-card__details,
.book-card:focus-within .book-card__details {
  opacity: 1;
  max-height: 180px;
  transform: translateY(0);
}

.book-single {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.4rem;
}

.meta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.prose > *:first-child {
  margin-top: 0;
}

.prose > *:last-child {
  margin-bottom: 0;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.filters input,
.filters select,
.jm-form input,
.jm-form textarea {
  width: 100%;
  border: 1px solid rgba(52, 32, 24, 0.25);
  border-radius: 10px;
  padding: 0.7rem;
  font: inherit;
}

.jm-form {
  display: grid;
  gap: 0.7rem;
}

.jm-form button {
  width: fit-content;
}

.site-footer {
  border-top: 1px solid rgba(121, 1, 12, 0.12);
  padding: 2rem 0;
  background: rgba(234, 228, 223, 0.7);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}

.jm-age-notice {
  position: fixed;
  inset: auto 0 0;
  background: var(--jm-primary);
  color: var(--jm-white);
  z-index: 90;
  padding: 0.75rem;
}

.jm-age-notice__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.jm-age-notice button {
  background: var(--jm-white);
  color: var(--jm-primary);
  border: none;
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  font-weight: 700;
}

@media (max-width: 980px) {
  .jm-carousel__track {
    grid-auto-columns: minmax(200px, 1fr);
  }

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

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

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

@media (max-width: 820px) {
  .two-col,
  .three-col,
  .book-single,
  .filters {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    display: none;
    width: 100%;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav .menu {
    flex-direction: column;
    padding: 0.4rem 0 1rem;
  }

  .site-header__inner {
    flex-wrap: wrap;
  }

  .header-home-btn {
    order: 3;
  }

  .section--meet .card:first-child {
    transform: none;
  }

  .jm-carousel__control {
    display: none;
  }
}

@media (max-width: 680px) {
  .book-card__details {
    opacity: 1;
    max-height: none;
    transform: none;
    overflow: visible;
  }

  .stats-grid,
  .topic-grid {
    grid-template-columns: 1fr;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

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