/* ============================================
   CODHZ Case-Study / Framework-Doc Template
   Shared by agents/*.html and cases/*.html
   ============================================ */
/* Case page overrides — white, sidebar layout, elegant */
.case-body { background: #fff; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Hero */
.case-hero-content {
  max-width: 1060px;
  margin: 0 auto;
  padding: 10rem 2rem 4rem calc(180px + 5.5rem);
  position: relative; z-index: 2; width: 100%;
}

/* Sidebar + content layout */
.case-layout {
  display: flex;
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 2rem;
}
.case-sidebar {
  width: 180px;
  flex-shrink: 0;
  padding: 2.5rem 0;
  padding-right: 2rem;
  border-right: 1px solid rgba(141,153,174,0.1);
}
.case-sidebar nav {
  position: sticky;
  top: 80px;
  /* Reset base nav styles */
  left: auto; right: auto;
  z-index: auto;
  padding: 0;
  display: block;
  align-items: initial;
  justify-content: initial;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
}
.case-nav-link {
  display: block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.73rem;
  font-weight: 500;
  color: #555C68;
  text-decoration: none;
  padding: 0.85rem 0;
  transition: color 0.25s;
  line-height: 1.45;
}
.case-nav-link:hover { color: #2B2D42; }
.case-nav-link.active { color: #D90429; font-weight: 600; }

.case-main {
  flex: 1;
  min-width: 0;
  max-width: 740px;
  padding-left: 3.5rem;
}

/* Override section styles within case */
.case-body .section {
  padding: 3rem 0;
  background: #fff;
}
.case-body .section-inner {
  max-width: none;
  padding: 0;
}
.case-body .section h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  color: #2B2D42;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.case-body .section p, .case-body .case-glance p {
  font-size: 0.92rem;
  color: #555;
  line-height: 1.85;
  margin-bottom: 1rem;
}
.case-body .section p:last-child { margin-bottom: 0; }
.case-body .section p em { color: #2B2D42; font-style: italic; }

/* Section labels — dark red */
.case-body .section-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #D90429;
  margin-bottom: 0.8rem;
}
.case-body .doc-protocol .section-label { color: #B80323; }

/* Paradigm blocks → card aesthetic */
.case-body .paradigm-block {
  padding: 1.6rem 1.8rem;
  background: #fff;
  border: 1px solid rgba(141,153,174,0.25);
  border-radius: 14px;
  margin-bottom: 1rem;
  transition: all 0.35s ease;
  box-shadow: 0 1px 3px rgba(43,45,66,0.03);
}
.case-body .paradigm-block:hover {
  border-color: rgba(141,153,174,0.25);
  box-shadow: 0 6px 24px rgba(43,45,66,0.06);
  transform: translateY(-1px);
}
.case-body .paradigm-block-header {
  margin-bottom: 0.6rem;
  padding-bottom: 0;
  border-bottom: none;
  background: none;
  padding: 0;
}
.case-body .paradigm-block-header h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  color: #2B2D42;
  margin: 0;
}
.case-body .paradigm-block-number {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  color: #D90429;
  letter-spacing: 0.1em;
  display: inline-block;
  margin-bottom: 0.3rem;
}
/* Sole-source variant: ratings, cross-reference codes, and paradigm names with
   no restatement elsewhere on the page — same voice, above the legibility floor. */
.case-body .paradigm-ref-number {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #D90429;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 0.3rem;
}
.case-body .paradigm-block p {
  font-size: 0.92rem;
  color: #666;
  line-height: 1.75;
  margin-bottom: 0.6rem;
}
.case-body .paradigm-block p:last-child { margin-bottom: 0; }
.case-body .paradigm-block ul {
  padding-left: 1.2rem;
  margin: 0.5rem 0 0;
}
.case-body .paradigm-block li {
  font-size: 0.92rem;
  color: #666;
  line-height: 1.75;
  margin-bottom: 0.5rem;
}
.case-body .paradigm-block li strong { color: #2B2D42; }

/* Research blocks and examples → accent box */
.case-body .research-example,
.case-body .research-block {
  margin: 1rem 0;
  padding: 1.2rem 1.5rem;
  background: #FAFBFC;
  border-left: 3px solid #2B2D42;
  border-radius: 4px 14px 14px 4px;
  box-shadow: 0 1px 3px rgba(43,45,66,0.03);
}
.case-body .research-example p,
.case-body .research-block p {
  font-size: 0.84rem;
  color: #555;
  line-height: 1.8;
  margin-bottom: 0;
}

/* At a glance section */
.case-glance {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid rgba(141,153,174,0.08);
}
.case-glance p:last-child { margin-bottom: 0; }
.case-glance p em { color: #2B2D42; }
.case-glance p strong { color: #2B2D42; }
.case-glance .section-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: #D90429; margin-bottom: 0.8rem;
}

/* Smooth slide-up reveal */
.case-body .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25,0.46,0.45,0.94), transform 0.8s cubic-bezier(0.25,0.46,0.45,0.94);
}
.case-body .reveal.visible { opacity: 1; transform: translateY(0); }
.case-body .reveal:nth-child(2) { transition-delay: 0.08s; }
.case-body .reveal:nth-child(3) { transition-delay: 0.16s; }
.case-body .reveal:nth-child(4) { transition-delay: 0.24s; }

/* Footer override */
.case-body footer { margin-top: 2rem; }

/* Responsive */
@media (max-width: 900px) {
  .case-layout { flex-direction: column; padding: 0; }
  .case-sidebar {
    width: 100%; padding: 0 1.2rem;
    border-right: none;
    border-bottom: 1px solid rgba(141,153,174,0.1);
    position: sticky; top: 60px; z-index: 100;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  }
  .case-sidebar nav {
    position: static;
    left: auto; right: auto;
    z-index: auto;
    align-items: initial;
    justify-content: initial;
    background: none;
    box-shadow: none;
    backdrop-filter: none;
    display: flex; overflow-x: auto;
    gap: 1.2rem; padding: 0.8rem 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .case-sidebar nav::-webkit-scrollbar { display: none; }
  .case-nav-link { white-space: nowrap; }
  .case-main { padding: 0 1.2rem; max-width: none; }
  .case-hero-content { padding: 7rem 1.2rem 3rem; }
  .case-body [id] { scroll-margin-top: 140px; }
}
@media (max-width: 420px) {
  .case-hero-content { padding: 6rem 1rem 2.5rem; }
  .case-main { padding: 0 1rem; }
  .case-sidebar { padding: 0 1rem; }
}
