/* ── Case study chapter layout: side panel nav, full-width chapter sections, callout boxes ── */

html { scroll-snap-type: y proximity; }
html:root { background-color: #F7F2E9 !important; }
.case-study-header { scroll-snap-align: start; }

/* Chapters: each major section is its own full-width band, alternating cream / beige */
html body section.chapter {
  scroll-snap-align: start;
  padding: 5.5rem 0 !important;
  background-image: none !important;
}
html body section.chapter-a { background: #F7F2E9 !important; }
html body section.chapter-b { background: #EBE6D8 !important; }
html body section.chapter > .container > .row { margin-bottom: 0 !important; }
html body section.chapter .col-lg-10 > :first-child { margin-top: 0 !important; }
html body section.chapter .col-lg-10 > :last-child { margin-bottom: 0 !important; }
html body section.chapter .col-lg-10 > h3 { margin-top: 0 !important; }

/* Chapters fade up as they scroll into view */
.js .chapter > .container { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .chapter.in > .container { opacity: 1; transform: none; }

/* Callout box (Design Challenge, Outcome, Core Problem ...) */
.design-challenge-box { border-radius: 14px; padding: 2.75rem 2rem; margin: 2rem 0 3rem; }
.chapter-a .design-challenge-box { background: #EBE6D8; }
.chapter-b .design-challenge-box { background: #F7F2E9; }
.design-challenge-box .dc-label { font-family: 'Inter', sans-serif; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #5C6048; margin-bottom: 0.5rem; }
.design-challenge-box .dc-question { font-family: 'Young Serif', Georgia, serif; font-size: 1.25rem; font-weight: 400; line-height: 1.5; color: #2E2C25; margin: 0; }
.design-challenge-box .dc-more { font-family: 'Inter', sans-serif; font-size: 1rem; line-height: 1.7; color: #6B6558; margin: 0.9rem 0 0; }

/* Side navigation: a fixed panel on the left (hidden on phones/tablets) */
@media (min-width: 992px) {
  html body #subNav,
  html body #subNav.navbar {
    position: fixed !important;
    top: var(--side-nav-top, 50vh) !important;
    left: 0.75rem !important;
    right: auto !important;
    bottom: auto !important;
    transform: none;
    width: auto !important;
    padding: 0.5rem !important;
    background: #FDFAF5 !important;
    background-color: #FDFAF5 !important;
    border: 0 !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    z-index: 1020 !important;
  }
  html body #subNav .container { padding: 0 !important; max-width: none !important; display: block; }
  html body #subNav .navbar-nav { flex-direction: column !important; align-items: stretch !important; margin: 0 !important; gap: 0.1rem; border: 0 !important; }
  html body #subNav .navbar-nav .nav-item .nav-link {
    padding: 0.5rem 0.9rem !important;
    font-size: 0.85rem;
    white-space: nowrap;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
  }
  html body #subNav .navbar-nav .nav-item .nav-link::after,
  html body #subNav .navbar-nav .nav-item .nav-link.active::after,
  html body #subNav .navbar-nav .nav-item .nav-link:hover::after { content: none !important; display: none !important; }
  html body #subNav .navbar-nav .nav-item .nav-link:hover,
  html body #subNav .navbar-nav .nav-item .nav-link.active { background-color: #EBE6D8 !important; }

  /* content column: centered with equal space each side, clear of the panel */
  html body section.case-study-header > .container,
  html body section.case-study-content > .container {
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: min(1160px, calc(100vw - 460px)) !important;
  }
  html body section.case-study-header > .container > .row > .col-lg-10,
  html body section.case-study-content > .container > .row > .col-lg-10 { flex: 0 0 100%; max-width: 100%; }
  html body section.case-study-content { overflow-x: clip; }
}
/* narrower desktops: shift the column right so it clears the panel */
@media (min-width: 992px) and (max-width: 1299.98px) {
  html body section.case-study-header > .container,
  html body section.case-study-content > .container {
    margin-left: 215px !important;
    margin-right: 24px !important;
    max-width: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-snap-type: none; }
  .js .chapter > .container { opacity: 1; transform: none; transition: none; }
}
@media (max-width: 991.98px) {
  html { scroll-snap-type: none; }
  html body section.chapter { padding: 3rem 0 !important; }
}

/* Quote in a rounded box (matches the callout boxes) */
.quote-box { border-radius: 14px; padding: 2.5rem 2rem; }
.chapter-a .quote-box { background: #EBE6D8; }
.chapter-b .quote-box { background: #F7F2E9; }
