html {
  scroll-padding-top: 132px;
}

body.case-page {
  overflow-x: hidden;
}

.case-header {
  position: fixed;
  z-index: 40;
  inset: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 16px 24px;
  padding: 14px 28px;
  background: rgba(8, 8, 10, 0.84);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.case-brand {
  display: grid;
  gap: 4px;
  justify-self: start;
  color: #fff;
  font-weight: 800;
}

.case-brand span {
  font-size: 1rem;
  line-height: 1.2;
}

.case-brand small {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.3;
}

.case-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.case-nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.case-nav a:hover,
.case-nav a:focus-visible {
  color: #fff;
  background: rgba(179, 136, 255, 0.12);
  border-color: rgba(179, 136, 255, 0.66);
}

.case-hero {
  padding-top: 94px;
}

.case-section,
.outcome-section,
.reflection-section {
  scroll-margin-top: 132px;
}

@media (max-width: 900px) {
  html {
    scroll-padding-top: 156px;
  }

  .case-header {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 14px 18px;
  }

  .case-nav {
    justify-content: flex-start;
  }

  .case-hero {
    padding-top: 128px;
  }

  .case-section,
  .outcome-section,
  .reflection-section {
    scroll-margin-top: 156px;
  }
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 150px;
  }

  .case-header {
    gap: 12px;
    padding: 12px 16px;
  }

  .case-brand span {
    font-size: 0.96rem;
  }

  .case-brand small {
    font-size: 0.72rem;
  }

  .case-nav {
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .case-nav::-webkit-scrollbar {
    display: none;
  }

  .case-nav a {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.78rem;
  }

  .case-hero {
    padding-top: 136px;
  }

  .case-section,
  .outcome-section,
  .reflection-section {
    scroll-margin-top: 150px;
  }
}
