.nm-services-page {
  --services-gold: var(--nm-header-nav-bg, #e6a53c);
  --services-brown: #6e503e;
  --services-ink: #171717;
  --services-muted: #6c6863;
  --services-line: #e4ddd3;
  --services-cream: #f8f3e9;
  width: min(1416px, calc(100% - 32px));
  max-width: 1416px;
  margin: 18px auto 0;
  padding-bottom: 40px;
  color: var(--services-ink);
}

.nm-services-page *,
.nm-services-page *::before,
.nm-services-page *::after { box-sizing: border-box; }

.nm-services-page :is(h1, h2, p) { color: inherit; }

.nm-services-content { padding: 10px clamp(8px, 2vw, 30px) 0; }

.nm-services-eyebrow {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 22px;
  color: var(--services-brown) !important;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.nm-services-eyebrow span {
  width: 22px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--services-gold) 0 50%, var(--services-brown) 50%);
}

.nm-services-intro { max-width: 1240px; }

.nm-services-intro__grid {
  display: block;
}

.nm-services-intro h1 {
  width: max-content;
  max-width: 100%;
  margin: 0;
  font-family: var(--nm-font-display-xbold, "SVN Gilroy XBold", Arial, sans-serif);
  font-size: clamp(38px, 3.5vw, 54px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.02;
}

.nm-services-intro__grid > p {
  max-width: 1120px;
  margin: 16px 0 0;
  color: var(--services-muted) !important;
  font-size: 16px;
  line-height: 1.65;
}

.nm-services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.nm-service-card {
  display: flex;
  min-height: 410px;
  padding: clamp(25px, 2vw, 34px);
  flex-direction: column;
  border: 1px solid var(--services-line);
  border-radius: 10px;
  background: #fff;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.nm-service-card:hover {
  border-color: color-mix(in srgb, var(--services-gold) 65%, var(--services-line));
  box-shadow: 0 22px 50px rgba(73, 52, 35, .10);
  transform: translateY(-6px);
}

.nm-service-card:hover .nm-service-card__icon {
  transform: translateY(-4px) rotate(-2deg) scale(1.04);
}

.nm-service-card__top {
  display: block;
  color: var(--services-muted);
  font-size: 13px;
}

.nm-service-card__top > span::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 12px;
  border-radius: 50%;
  background: var(--services-gold);
  content: "";
  vertical-align: 2px;
}

.nm-service-card h2 {
  min-height: 48px;
  margin: 18px 0 22px;
  font-size: clamp(19px, 1.35vw, 23px);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.12;
}

.nm-service-card__icon {
  display: block;
  width: 62px;
  height: 62px;
  margin: 0 0 22px;
  object-fit: contain;
  transform-origin: 50% 70%;
  transition: transform .35s cubic-bezier(.2, .75, .25, 1);
}

.nm-service-card > p:has(> .nm-service-card__icon) {
  margin: 0;
  line-height: 1;
}

.nm-service-card > p {
  margin: 0;
  color: var(--services-muted) !important;
  font-size: 15px;
  line-height: 1.7;
}

.nm-service-card > a,
.nm-service-card > p:last-child > a,
.nm-service-contact-trigger {
  display: inline-flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  margin-top: auto;
  padding: 13px 18px;
  border: 1px solid var(--services-gold);
  border-radius: 999px;
  background: var(--services-gold);
  color: var(--services-ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}

.nm-service-card > p:last-child {
  margin-top: auto;
  margin-bottom: 0;
  text-align: center;
}

.nm-service-contact-trigger {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
}

.nm-service-card > a:hover,
.nm-service-card > p:last-child > a:hover,
.nm-service-contact-trigger:hover {
  border-color: var(--services-brown);
  background: var(--services-brown);
  color: #fff;
}

.nm-services-modal[hidden] { display: none; }

.nm-services-modal,
.nm-services-modal * { box-sizing: border-box; }

.nm-services-modal {
  position: fixed;
  z-index: 1000300;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  opacity: 0;
  transition: opacity .22s ease;
}

.nm-services-modal.is-open { opacity: 1; }
.nm-services-modal-open { overflow: hidden; }

.nm-services-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 15, 12, .64);
  backdrop-filter: blur(5px);
}

.nm-services-modal__dialog {
  position: relative;
  width: min(820px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  padding: clamp(28px, 4vw, 48px);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(20, 15, 12, .26);
  outline: 0;
  transform: translateY(18px) scale(.98);
  transition: transform .28s cubic-bezier(.2, .75, .25, 1);
}

.nm-services-modal.is-open .nm-services-modal__dialog { transform: translateY(0) scale(1); }

.nm-services-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--services-line);
  border-radius: 50%;
  background: #fff;
  color: var(--services-ink);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.nm-services-modal__eyebrow {
  margin: 0 0 10px !important;
  color: var(--services-brown) !important;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
}

.nm-services-modal__dialog h2 {
  width: max-content;
  max-width: 100%;
  margin: 0;
  font-family: var(--nm-font-display-xbold, "SVN Gilroy XBold", Arial, sans-serif);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.05;
}

.nm-services-modal__lead { margin: 12px 0 24px !important; color: var(--services-muted) !important; }
.nm-services-modal__notice { margin: 0 0 18px; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.nm-services-modal__notice.is-success { background: #edf7ef; color: #236b35; }
.nm-services-modal__notice.is-error { background: #fff0ed; color: #9b2f22; }

.nm-services-contact-form { display: grid; gap: 16px; }
.nm-services-contact-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.nm-services-contact-form label { display: grid; gap: 7px; color: var(--services-ink); font-size: 13px; font-weight: 700; }
.nm-services-contact-form__grid > label { min-width: 0; }
.nm-services-contact-form__label { display: block; color: var(--services-ink) !important; }
.nm-services-contact-form__label b { color: #b35238; }
.nm-services-contact-form input:not([type="checkbox"]),
.nm-services-contact-form textarea { width: 100%; border: 1px solid var(--services-line); border-radius: 10px; background: #fbfaf8; color: var(--services-ink); font: inherit; font-weight: 400; }
.nm-services-contact-form input:not([type="checkbox"]) { height: 46px; padding: 0 13px; }
.nm-services-contact-form textarea { min-height: 112px; padding: 12px 13px; resize: vertical; }
.nm-services-contact-form :is(input, textarea):focus { border-color: var(--services-gold); outline: 2px solid rgba(230, 165, 60, .18); }
.nm-services-contact-form__consent { display: flex !important; grid-template-columns: none; align-items: flex-start; gap: 10px !important; font-weight: 400 !important; line-height: 1.45; }
.nm-services-contact-form__consent input { flex: 0 0 auto; margin-top: 3px; }
.nm-services-contact-form__consent span { color: var(--services-muted) !important; }
.nm-services-contact-form__submit { min-height: 50px; border: 0; border-radius: 999px; background: var(--services-gold); color: var(--services-ink); font-size: 14px; font-weight: 800; cursor: pointer; transition: background .2s ease, color .2s ease; }
.nm-services-contact-form__submit:hover { background: var(--services-brown); color: #fff; }
.nm-services-contact-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.nm-service-card > a span,
.nm-service-card > p:last-child > a span {
  transition: transform .25s ease;
}

.nm-service-card > a:hover span,
.nm-service-card > p:last-child > a:hover span {
  transform: translateX(4px);
}

.nm-services-commitment {
  margin-top: clamp(38px, 4.5vw, 68px);
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.nm-services-commitment__grid {
  display: block;
}

.nm-services-commitment h2 {
  margin: 0;
  font-family: var(--nm-font-display-xbold, "SVN Gilroy XBold", Arial, sans-serif);
  color: var(--services-brown);
  font-size: clamp(27px, 2.5vw, 38px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.08;
}

.nm-services-commitment__grid p {
  max-width: 1280px;
  margin: 12px 0 0;
  color: var(--services-muted) !important;
  font-size: 15px;
  line-height: 1.6;
}

/* Scroll reveal is enabled by JS, keeping the page fully visible without it. */
.nm-services-motion-ready .nm-services-intro,
.nm-services-motion-ready .nm-service-card,
.nm-services-motion-ready .nm-services-commitment {
  opacity: 0;
  transform: translateY(26px);
}

.nm-services-motion-ready .nm-services-intro {
  transform: translateY(18px);
}

.nm-services-motion-ready .nm-service-card {
  transition:
    opacity .6s ease,
    transform .65s cubic-bezier(.2, .75, .25, 1),
    border-color .25s ease,
    box-shadow .25s ease;
  transition-delay: var(--nm-service-delay, 0ms);
}

.nm-services-motion-ready .nm-services-intro.is-visible,
.nm-services-motion-ready .nm-service-card.is-visible,
.nm-services-motion-ready .nm-services-commitment.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.nm-services-motion-ready .nm-services-intro,
.nm-services-motion-ready .nm-services-commitment {
  transition: opacity .65s ease, transform .7s cubic-bezier(.2, .75, .25, 1);
}

.nm-services-motion-ready .nm-services-commitment.is-visible .nm-services-eyebrow span {
  animation: nm-services-accent-pulse .75s .25s ease both;
}

@keyframes nm-services-accent-pulse {
  0% { transform: scaleX(.25); transform-origin: left; }
  65% { transform: scaleX(1.15); transform-origin: left; }
  100% { transform: scaleX(1); transform-origin: left; }
}

@media (max-width: 1100px) {
  .nm-services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nm-service-card { min-height: 380px; }
}

@media (max-width: 760px) {
  .nm-services-page { width: calc(100% - 24px); margin-top: 12px; margin-bottom: 0; padding-bottom: 40px; }
  .nm-services-content { padding: 10px 6px 0; }
  .nm-services-intro h1 { font-size: clamp(36px, 10vw, 46px); }
  .nm-services-intro__grid > p { font-size: 16px; }
  .nm-services-grid { grid-template-columns: 1fr; margin-top: 32px; }
  .nm-service-card { min-height: 370px; padding: 28px; }
  .nm-service-card h2 { min-height: 0; }
  .nm-services-commitment { margin-top: 42px; }
  .nm-services-commitment h2 { font-size: 29px; }
  .nm-services-modal { padding: 10px; }
  .nm-services-modal__dialog { width: calc(100vw - 20px); max-width: calc(100vw - 20px); max-height: calc(100vh - 20px); padding: 32px 20px 24px; border-radius: 18px; }
  .nm-services-contact-form__grid { grid-template-columns: 1fr; gap: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .nm-service-card,
  .nm-service-card__icon,
  .nm-service-card > a span,
  .nm-service-card > p:last-child > a span { transition: none; }
  .nm-service-card:hover { transform: none; }
  .nm-service-card:hover .nm-service-card__icon { transform: none; }
  .nm-services-motion-ready .nm-services-intro,
  .nm-services-motion-ready .nm-service-card,
  .nm-services-motion-ready .nm-services-commitment {
    opacity: 1;
    transform: none;
  }
  .nm-services-motion-ready .nm-services-commitment.is-visible .nm-services-eyebrow span { animation: none; }
}
