/* Neumeier Drilling Fluids case study. Page-scoped presentation; shared site chrome is unchanged. */
.nm-case {
  --nm-ink: #15181b;
  --nm-charcoal: #2a2e33;
  --nm-red: #cf152d;
  --nm-red-bright: #f0384d;
  --nm-muted: #525b63;
  --nm-rule: #d6d8d8;
  --nm-space: clamp(3.5rem, 7.5vw, 7rem);
}
.nm-case .nm-label {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nm-red);
}

/* Hero */
.nm-hero {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  color: #fff;
  background: var(--nm-ink);
}
.nm-hero__copy {
  align-self: center;
  padding: clamp(3rem, 5.5vw, 5.5rem) clamp(1.5rem, 3.5vw, 4rem);
  padding-left: max(2.5vw, calc((100vw - 1440px) / 2));
}
.nm-hero .nm-label { color: var(--nm-red-bright); }
.nm-hero h1 {
  margin: 0;
  max-width: 13ch;
  font-size: clamp(2.75rem, 4.25vw, 4.6rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.035em;
}
.nm-hero h1 span { color: var(--nm-red-bright); }
.nm-hero__copy > p:not(.nm-label) {
  max-width: 40ch;
  margin: 1.75rem 0 0;
  font-size: clamp(1rem, 1.15vw, 1.15rem);
  line-height: 1.7;
  color: #d3d8dc;
}
.nm-text-link {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #7a8187;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}
.nm-text-link:hover { color: var(--nm-red-bright); border-color: currentColor; }
.nm-text-link span { font-size: 1.25rem; }
.nm-hero__image {
  position: relative;
  min-width: 0;
  min-height: 660px;
  margin: 0;
  overflow: hidden;
}
.nm-hero__image > img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
}
.nm-hero__image figcaption {
  position: absolute;
  inset: auto 0 0;
  max-width: none;
  padding: 4rem 2rem 1.5rem;
  background: linear-gradient(transparent, rgb(21 24 27 / 0.9));
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.5;
}
.nm-hero__image figcaption span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: #e3e6e8;
}

/* Overview */
.nm-overview { border-bottom: 1px solid var(--nm-rule); }
.nm-facts {
  display: grid;
  grid-template-columns: 1.15fr 1.15fr 1.35fr 0.75fr 0.8fr;
  gap: 2rem;
  padding-block: 1.75rem;
}
.nm-facts dt {
  margin-bottom: 0.5rem;
  color: var(--nm-muted);
  font-size: 0.75rem;
  line-height: 1.4;
}
.nm-facts dd {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.6;
}
.nm-facts a { text-underline-offset: 0.3em; }
.nm-facts a span[aria-hidden] { margin-left: 0.5rem; }

/* Shared section rhythm */
.nm-section { padding-block: var(--nm-space); }
.nm-section h2 {
  margin: 0;
  font-size: clamp(2rem, 3.5vw, 3.5rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.nm-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 7rem);
}
.nm-copy { align-self: end; }
.nm-copy p {
  margin: 0;
  max-width: 50ch;
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  line-height: 1.8;
  color: var(--nm-muted);
}
.nm-copy p + p { margin-top: 1.25rem; }

/* Challenge */
.nm-questions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  padding: 0;
  margin: clamp(2.5rem, 5vw, 4.5rem) 0 0;
  list-style: none;
}
.nm-questions li {
  border-top: 1px solid var(--nm-rule);
  padding-top: 1.5rem;
}
.nm-questions .nm-label { display: block; color: var(--nm-muted); }
.nm-questions p {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

/* Website showcase */
.nm-section--ink { background: var(--nm-ink); color: #fff; }
.nm-section--ink .nm-label { color: var(--nm-red-bright); }
.nm-section--ink .nm-copy p { color: #c9cfd4; }
#nm-website { scroll-margin-top: 5.5rem; }
.nm-browser {
  margin: clamp(2rem, 4vw, 3.5rem) 0 0;
  min-width: 0;
}
.nm-browser__bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.5rem 4rem;
  border-radius: 0.6rem 0.6rem 0 0;
  background: #e4e6e7;
  color: #343a40;
  font-size: 0.75rem;
  line-height: 1.5;
}
.nm-browser__dots {
  position: absolute;
  left: 1rem;
  display: flex;
  gap: 0.3rem;
}
.nm-browser__dots i {
  width: 0.45rem;
  height: 0.45rem;
  background: #8c949a;
  border-radius: 50%;
}
.nm-browser > img { display: block; width: 100%; height: auto; }
.nm-browser figcaption {
  margin-top: 1rem;
  max-width: none;
  color: #bcc4ca;
  font-size: 0.75rem;
  line-height: 1.6;
}
.nm-decisions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
}
.nm-decisions li { border-top: 1px solid #454b51; padding-top: 1.25rem; }
.nm-step { display: block; margin-bottom: 1rem; color: var(--nm-red-bright); font-size: 0.75rem; font-weight: 700; }
.nm-decisions h3 { margin: 0 0 0.75rem; font-size: 1.125rem; line-height: 1.4; font-weight: 700; }
.nm-decisions p { margin: 0; color: #c9cfd4; font-size: 0.9375rem; line-height: 1.8; }

/* Inside the site */
.nm-section--surface { background: #ebeae6; }
.nm-pages {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}
.nm-pages .nm-browser { margin: 0; }
.nm-pages__main { grid-column: 1 / -1; }
.nm-nowrap { white-space: nowrap; }
.nm-browser--light > img { box-shadow: 0 1px 0 #d2d4d4; }
.nm-browser--light figcaption { color: var(--nm-muted); }

/* Infrastructure */
.nm-section--red { background: var(--nm-red); color: #fff; }
.nm-section--red .nm-label { color: #fff; }
.nm-section--red .nm-copy p { color: #fff; }
.nm-sites {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  padding: 0;
  list-style: none;
}
.nm-sites > li {
  padding: clamp(1.25rem, 2vw, 1.75rem);
  background: var(--nm-charcoal);
}
.nm-sites h3 {
  margin: 0 0 1.75rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
}
.nm-sites h3 span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #c9cfd4;
}
.nm-sites__big {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.6vw, 2.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.nm-sites__unit {
  margin: 0.35rem 0 0;
  color: #c9cfd4;
  font-size: 0.8125rem;
  line-height: 1.5;
}
.nm-sites ul {
  margin: 1.5rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid #4a5056;
  list-style: none;
}
.nm-sites ul li {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.8;
}
.nm-source {
  margin: 1.5rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #fff;
}
.nm-source a { color: #fff; text-underline-offset: 0.25em; }

/* Field photography */
.nm-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: clamp(2rem, 4vw, 3.5rem);
}
.nm-photo { margin: 0; min-width: 0; }
.nm-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.nm-photo figcaption { margin-top: 1rem; font-size: 0.75rem; line-height: 1.6; color: var(--nm-muted); }

/* Outcome */
.nm-outcome { border-top: 1px solid var(--nm-rule); }
.nm-outcome h2 { font-size: clamp(2.1rem, 4.2vw, 4.25rem); text-wrap: balance; }
.nm-outcome h2 span { color: var(--nm-red); }
.nm-outcome > .shell > p:not(.nm-label) { max-width: 58ch; margin: 2rem 0 0; color: var(--nm-muted); font-size: 1.125rem; line-height: 1.8; }
.nm-service-links { display: flex; flex-wrap: wrap; gap: 1rem 2rem; list-style: none; padding: 0; margin: 2.5rem 0 0; }
.nm-service-links a { display: inline-flex; gap: 1rem; padding-bottom: 0.4rem; border-bottom: 1px solid #a9b0b4; font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.nm-service-links a:hover { color: var(--nm-red); border-color: currentColor; }

@media (min-width: 1700px) {
  .nm-hero__image { min-height: 740px; }
}
@media (max-width: 1100px) {
  .nm-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nm-sites { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1050px) {
  .nm-hero h1 { font-size: clamp(2.4rem, 4.3vw, 3rem); }
  .nm-hero__image { min-height: 570px; }
  .nm-hero__copy { padding-left: 2rem; }
}
@media (max-width: 860px) {
  .nm-pages { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nm-hero { grid-template-columns: 1fr; }
  .nm-hero__copy { padding: 3rem 1.5rem; }
  .nm-hero h1 { max-width: 16ch; font-size: clamp(2.35rem, 8.5vw, 3.5rem); }
  .nm-hero__image { min-height: 0; aspect-ratio: 4 / 3; }
  .nm-hero__image > img { object-position: center; }
  .nm-hero__image figcaption { padding: 3rem 1.5rem 1rem; }
  .nm-facts { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .nm-facts dd { font-size: 0.8125rem; }
  .nm-intro { grid-template-columns: 1fr; gap: 1.75rem; }
  .nm-questions { gap: 1rem; }
  .nm-questions p { font-size: 1rem; line-height: 1.5; }
  .nm-questions .nm-label { font-size: 0.75rem; letter-spacing: 0; margin-bottom: 0.75rem; }
  .nm-decisions { grid-template-columns: 1fr; gap: 1.5rem; margin-top: 2rem; }
  .nm-step { margin-bottom: 0.5rem; }
  .nm-photos { grid-template-columns: 1fr; }
  .nm-service-links { flex-direction: column; align-items: flex-start; }
  .nm-outcome h2 br { display: none; }
  .nm-outcome h2 span { display: block; margin-top: 0.15em; }
}
@media (max-width: 480px) {
  .nm-sites { gap: 0.75rem; }
  .nm-sites > li { padding: 1rem; }
  .nm-sites h3 { margin-bottom: 1rem; font-size: 0.9375rem; }
  .nm-sites__big { font-size: 1.4rem; }
  .nm-sites__unit { font-size: 0.75rem; }
  .nm-sites ul { margin-top: 1rem; padding-top: 0.75rem; }
  .nm-sites ul li { font-size: 0.8125rem; line-height: 1.6; }
  .nm-browser__bar { padding-inline: 3.25rem; }
}
@media (max-width: 340px) {
  .nm-sites { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .nm-hero__copy { padding-inline: 1.25rem; }
  .nm-questions { grid-template-columns: 1fr; gap: 1.5rem; }
  .nm-questions p { font-size: 1.2rem; }
  .nm-questions p br { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .nm-case .reveal { opacity: 1; transform: none; }
}
