/* 2026-07-14 stability pass: final homepage and mobile header/hero rules. */
html,
body {
  overflow-x: hidden;
}

html body main#home .hero-redo-art {
  display: none !important;
}

@media (min-width: 901px) {
  body main#home section.hero,
  html body main#home section.hero .hero-pin {
    min-height: 100svh;
    height: 100svh;
  }

  html body main#home section.hero > img.hero-fixed-image {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100svh;
    object-fit: cover;
    object-position: center center;
  }

  html body main#home .hero-redo-copy {
    width: min(600px, 48vw);
    max-width: 600px;
  }
}

@media (max-width: 900px) {
  .reader-rail {
    display: none !important;
  }

  .site-header {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    justify-items: stretch !important;
    padding: 12px 14px 14px !important;
  }

  .brand {
    justify-self: start !important;
  }

  .main-nav {
    display: flex !important;
    width: 100% !important;
    gap: 14px !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    padding: 0 0 4px !important;
    scrollbar-width: none !important;
    flex-wrap: nowrap !important;
  }

  .main-nav::-webkit-scrollbar {
    display: none !important;
  }

  .main-nav a {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }

  .header-button {
    width: fit-content !important;
    justify-self: start !important;
  }

  html body main#home section.hero {
    min-height: auto !important;
    height: auto !important;
    overflow: hidden !important;
  }

  html body main#home section.hero::before {
    background: linear-gradient(180deg, rgba(15, 10, 8, 0.18) 0%, rgba(15, 10, 8, 0.32) 44%, rgba(15, 10, 8, 0.82) 100%) !important;
  }

  html body main#home section.hero > img.hero-fixed-image {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: 58% center !important;
  }

  html body main#home section.hero .hero-pin {
    width: min(100% - 32px, 720px) !important;
    min-height: 700px !important;
    height: auto !important;
    align-items: flex-end !important;
    padding: 84px 0 64px !important;
  }

  html body main#home .hero-redo-copy {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    padding: 22px !important;
    background: rgba(15, 10, 7, 0.58) !important;
  }

  html body main#home .hero-redo-copy h1 {
    font-size: clamp(2.9rem, 10vw, 4.8rem) !important;
    line-height: 0.94 !important;
  }

  html body main#home .hero-redo-lead {
    font-size: 1rem !important;
  }

  html body main#home .hero-redo-art {
    position: absolute !important;
    right: 16px !important;
    top: 88px !important;
    z-index: 4 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: none !important;
  }

  html body main#home .hero-redo-ladonna {
    display: none !important;
  }

  html body main#home .hero-redo-book {
    display: block !important;
    width: min(42vw, 190px) !important;
    pointer-events: auto !important;
  }

  html body main#home .hero-redo-book img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.35) !important;
  }

  html body main#home .book-card,
  body main#home .book-card.reveal,
  body main#home .book-card.reveal.is-visible {
    opacity: 1 !important;
    transform: none !important;
  }

  html body main#home .cover-link,
  body main#home .electric-book,
  html body main#home .cover-link img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  html body main#home .cover-link img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center center !important;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding-inline: 12px !important;
  }

  html body main#home section.hero .hero-pin {
    min-height: 660px !important;
    padding: 76px 0 54px !important;
  }

  html body main#home .hero-redo-copy {
    padding: 20px !important;
  }

  html body main#home .hero-redo-copy h1 {
    font-size: clamp(2.7rem, 14vw, 4rem) !important;
  }

  body main#home .hero-redo-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  body main#home .hero-redo-actions .button {
    width: 100% !important;
  }
}



@media (max-width: 900px) {
  html body main#home .intro-band,
  html body main#home .section,
  html body main#home .newsletter,
  html body main#home .contact-section,
  html body .site-footer {
    position: relative !important;
    z-index: 12 !important;
    background: #2a1d14 !important;
  }

  html body main#home .intro-band {
    background: rgba(251, 242, 228, 0.98) !important;
  }

  html body main#home .about-section,
  html body main#home .series-section,
  html body main#home .children-preview,
  html body main#home .reader-section,
  html body main#home .newsletter,
  html body main#home .contact-section {
    background: #2a1d14 !important;
  }
}
