/**
 * Case study hero + video + mobile nav
 */

body.n92-cs-redesign #content .n92-cs-hero {
  scroll-margin-top: clamp(4rem, 10vw, 5.5rem);
}

body.n92-cs-redesign #content .themify_builder_content .module_row.tb_first,
body.n92-cs-redesign #content .themify_builder_content .module_row.n92-cs-empty {
  display: none !important;
}

body.n92-cs-has-video #content .themify_builder_content .module_row[data-tbfullwidthvideo],
body.n92-cs-has-video #content .themify_builder_content .module_row.n92-cs-intro {
  display: none !important;
}

/* ── Hero ── */
.n92-cs-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(5rem, 11vh, 7rem) clamp(1.25rem, 4vw, 3rem) clamp(2.5rem, 5vh, 4rem);
  background: #171717;
  color: #efece8;
  overflow: visible;
}

body.n92-cs-has-video .n92-cs-hero {
  min-height: auto;
  padding-bottom: clamp(1.5rem, 3vh, 2.25rem);
}

.n92-cs-hero__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 12% 0%, rgba(255, 51, 119, 0.16), transparent 58%),
    radial-gradient(ellipse 50% 40% at 88% 18%, rgba(122, 201, 67, 0.08), transparent 55%);
  pointer-events: none;
}

.n92-cs-hero__inner {
  position: relative;
  z-index: 1;
  max-width: min(1680px, 94vw);
  margin-inline: auto;
  width: 100%;
}

.n92-cs-hero__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.n92-cs-hero__back {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: rgba(239, 236, 232, 0.58);
  text-decoration: none;
  transition: color 0.2s ease;
}

.n92-cs-hero__back:hover,
.n92-cs-hero__back:focus-visible {
  color: #ff3377;
}

.n92-cs-hero__category {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: #7ac943;
}

.n92-cs-hero__client {
  margin: 0;
  font-size: clamp(3rem, 11vw, 6.5rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-transform: lowercase;
  color: #efece8;
}

.n92-cs-hero__project {
  margin: 0.65rem 0 0;
  font-size: clamp(1.15rem, 2.5vw, 1.65rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: lowercase;
  color: rgba(239, 236, 232, 0.72);
}

.n92-cs-hero__headline-block {
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.n92-cs-hero__grid {
  display: grid;
  gap: clamp(1.75rem, 4vw, 2.75rem);
  align-items: end;
}

@media (min-width: 960px) {
  .n92-cs-hero__grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.8fr);
  }
}

.n92-cs-hero__excerpt {
  margin: 0 0 1.75rem;
  max-width: 58ch;
  font-size: clamp(1.05rem, 1.7vw, 1.2rem);
  line-height: 1.68;
  color: rgba(239, 236, 232, 0.9);
}

.n92-cs-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.n92-cs-hero__cta,
.n92-cs-hero__cta-secondary {
  display: inline-flex;
  align-items: center;
  padding: 0.8em 1.45em;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  text-decoration: none;
  border-radius: 3px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.n92-cs-hero__cta {
  background: #ff3377;
  color: #fff;
  box-shadow: 0 6px 24px rgba(255, 51, 119, 0.3);
}

.n92-cs-hero__cta:hover {
  background: #ff0062;
  transform: translateY(-1px);
}

.n92-cs-hero__cta-secondary {
  border: 1px solid rgba(239, 236, 232, 0.22);
  color: #efece8;
}

.n92-cs-hero__cta-secondary:hover {
  border-color: rgba(239, 236, 232, 0.45);
}

.n92-cs-hero__meta {
  margin: 0;
  display: grid;
  gap: 0.85rem;
  padding: clamp(1.1rem, 2.5vw, 1.5rem);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}

.n92-cs-hero__meta-item {
  margin: 0;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.n92-cs-hero__meta-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.n92-cs-hero__meta dt {
  margin: 0 0 0.2rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  color: #ff3377;
}

.n92-cs-hero__meta dd {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(239, 236, 232, 0.92);
}

.n92-cs-hero__rule {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff3377 0%, #ff6b9d 40%, transparent 100%);
}

/* ── Video header ── */
.n92-cs-video-header {
  position: relative;
  width: 100%;
  background: #0d0d0d;
  overflow: visible;
  line-height: 0;
}

.n92-cs-video-header__media {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(75vh, 900px);
  object-fit: contain;
  object-position: center;
  background: #0d0d0d;
}

.n92-cs-video-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(23, 23, 23, 0.65) 100%);
  pointer-events: none;
  z-index: 1;
}

.n92-cs-video-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff3377, #ff6b9d 55%, transparent);
  pointer-events: none;
  z-index: 2;
}

/* Intro row hidden when video present — handled above */

body.n92-cs-redesign #content .themify_builder_content .module_row.n92-cs-intro .module_column.last {
  display: none !important;
}

body.n92-cs-redesign #content .themify_builder_content .module_row.n92-cs-intro .row_inner.tb_col_count_2 {
  grid-template-columns: minmax(0, 1fr) !important;
}

body.n92-cs-redesign #content .themify_builder_content .module_row.n92-cs-intro .module_column.first .module-text:first-child {
  display: none !important;
}

body.n92-cs-redesign #content .themify_builder_content .module_row.n92-cs-intro .module_column.first h3,
body.n92-cs-redesign #content .themify_builder_content .module_row.n92-cs-intro .module_column.first .n92-case-subtitle {
  display: none !important;
}

/* ── Mobile chapter pills ── */
.n92-cs-mobile-toc {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99980;
  padding: 0.65rem clamp(0.75rem, 3vw, 1.25rem) max(0.65rem, env(safe-area-inset-bottom));
  background: linear-gradient(
    180deg,
    rgba(23, 23, 23, 0) 0%,
    rgba(23, 23, 23, 0.92) 35%,
    rgba(23, 23, 23, 0.98) 100%
  );
  opacity: 0;
  transform: translateY(0.75rem);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.n92-cs-mobile-toc.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.n92-cs-mobile-toc__track {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.15rem;
}

.n92-cs-mobile-toc__track::-webkit-scrollbar {
  display: none;
}

.n92-cs-mobile-toc__pill {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(239, 236, 232, 0.82);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  padding: 0.45em 0.85em;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.n92-cs-mobile-toc__pill:hover,
.n92-cs-mobile-toc__pill:focus-visible {
  border-color: rgba(255, 51, 119, 0.55);
  color: #efece8;
}

.n92-cs-mobile-toc__pill.is-active {
  border-color: #ff3377;
  background: rgba(255, 51, 119, 0.14);
  color: #efece8;
}

@media (min-width: 1025px) and (hover: hover) {
  .n92-cs-mobile-toc {
    display: none !important;
  }
}

@media (max-width: 1024px), (hover: none), (pointer: coarse) {
  body.n92-cs-redesign .n92-cs-sticky-cta {
    bottom: calc(4.25rem + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .n92-cs-mobile-toc,
  .n92-cs-hero__back,
  .n92-cs-hero__cta,
  .n92-cs-process-band__card {
    transition: none !important;
  }
}
