/*
 * Homepage — Services ("The standard in practice").
 *
 * Structure:
 *   .services-start                    spacer + scroll anchor above the section
 *   .services > .services-primary > .services-stack
 *     .services-heading-card           title card
 *     .service-card--primary × 4       Advisory / Tile / Mosaic / Stone
 *     .service-system-row              four integrated-system cards
 *     .services-closing                closing line + "Make an enquiry"
 *   .services-tail                     spacing before the final stage
 *
 * Routes (identical to the original):
 *   desktop   (min-width: 1025px) unless a compact touch landscape tablet
 *   720p+     (min-width: 1281px) and (min-height: 721px): the primary cards
 *             scale as a whole from the 1280×720 composition (--s720)
 *   1080p     1600–2200 × 900–1250: fixed supporting-card values
 *   1440p+    (min-width: 1921px) and (min-height: 1081px): heading/system
 *             type grows with the smaller viewport ratio
 *   2160p     3200–4400 × 1800–2500: supporting cards also scale by --s720
 *   mobile    (max-width: 900px) or compact touch landscape
 */

.services-start {
  display: block;
  height: clamp(28px, 4vw, 58px);
  pointer-events: none;
}

/* The original enclosed Exhibit C, the verdict and Services in one 95vw
   column (full width on the mobile experience). */
.services {
  --svc-stack-gap: clamp(28px, 3.4vw, 40px);
  position: relative;
  width: 95vw;
  margin-inline: auto;
}

.services-primary {
  --svc-primary-rail: 80vw;
  --svc-text-pad-top: clamp(8px, 1vw, 14px);
  --svc-text-pad-bottom: clamp(10px, 1.4vw, 16px);
  --svc-text-pad-inline: clamp(16px, 2.6vw, 28px);
  --svc-text-gap: clamp(6px, 0.6vw, 8px);
  --svc-divider-h: clamp(14px, 1.15vw, 20px);
  --svc-divider-w: clamp(220px, 24vw, 360px);
  --svc-inset: clamp(8px, 1vw, 12px);
  --svc-parallax-bleed: clamp(90px, 12vw, 140px);
  --svc-radius: 8px;
  --svc-primary-card-width: var(--svc-primary-rail);
  --svc-primary-media-ratio: 1180 / 462;
  --svc-primary-copy-size: clamp(15.5px, 1.65vw, 20px);
  --svc-primary-secondary-size: clamp(14.5px, 1.5vw, 18px);
  --svc-primary-copy-line-height: 1.44;
  --svc-primary-secondary-line-height: 1.42;
  --svc-primary-secondary-white-space: nowrap;
  --svc-primary-cta-size: clamp(13px, 1.05vw, 15px);
  --svc-primary-material-display: inline;
}

.services-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--svc-stack-gap);
}

/* ── Card shell (heading, primary, system and closing cards) ── */

.services-heading-card,
.services-primary .service-card {
  position: relative;
  width: var(--svc-primary-rail);
  max-width: none;
  margin: 0 auto;
  background: url("../../images/004-dt-services-card-inner-bg.webp") center / cover no-repeat;
  border: 1px solid rgb(224 163 83 / 0.92);
  border-radius: var(--svc-radius);
  box-shadow:
    0 32px 90px rgb(0 0 0 / 0.5),
    inset 0 1px 0 rgb(255 255 255 / 0.05);
}

.services-primary .service-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.services-primary .service-card--primary {
  width: var(--svc-primary-card-width);
}

.services-primary .service-advisory {
  background-image: url("../../images/006-dt-services-card-inner-bg.webp");
}

.services-primary .service-system-card {
  background-image: url("../../images/005-dt-services-card-inner-bg.webp");
}

/* ── Heading card ── */

.services-heading-card {
  isolation: isolate;
  overflow: visible;
}

.services-heading-text {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: clamp(22px, 2.6vw, 32px) clamp(20px, 3vw, 36px) clamp(18px, 2.2vw, 26px);
  color: rgb(255 255 255 / 0.84);
  text-align: center;
}

.services-heading-eyebrow {
  margin: 0;
  color: rgb(217 154 82 / 0.84);
  font-family: var(--font-sans);
  font-size: clamp(11px, 0.86vw, 14px);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.54);
}

.services-heading-rule {
  width: min(210px, 42vw);
  height: 1px;
  margin: clamp(10px, 1.2vh, 14px) auto clamp(12px, 1.4vh, 18px);
  background: linear-gradient(90deg, transparent 0%, rgb(193 132 69 / 0.28) 18%, rgb(243 208 151 / 0.84) 50%, rgb(193 132 69 / 0.28) 82%, transparent 100%);
  box-shadow: 0 0 18px rgb(243 208 151 / 0.16);
}

.services-heading-title {
  --title-glow: radial-gradient(ellipse at center, rgb(255 255 255 / 0.12) 0%, rgb(255 255 255 / 0.05) 34%, rgb(190 145 92 / 0.045) 58%, transparent 78%);
  position: relative;
  display: block;
  max-width: none;
  margin: 0 auto;
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-wrap: balance;
}

.services-heading-title span {
  display: block;
  overflow: visible;
}

.services-heading-title-ivory {
  color: rgb(244 238 228 / 0.96);
  font-size: clamp(38px, 8vw, 62px);
  text-shadow:
    0 2px 4px rgb(0 0 0 / 0.52),
    0 10px 34px rgb(0 0 0 / 0.46);
}

.services-heading-title-gold {
  margin-top: clamp(4px, 0.5vw, 8px);
  color: transparent;
  -webkit-text-fill-color: transparent;
  background: linear-gradient(92deg, #9d6331 0%, #e0ad66 34%, #f3d097 54%, #8b5226 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: clamp(42px, 8.8vw, 72px);
  text-shadow: 0 18px 44px rgb(0 0 0 / 0.42);
}

/* Soft glow behind the title and a short luminous underline. */
.services-heading-title::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -1;
  width: 135%;
  height: 95%;
  background: var(--title-glow);
  filter: blur(10px);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.services-heading-title::after {
  content: "";
  position: absolute;
  bottom: -16px;
  left: 50%;
  width: min(220px, 78%);
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgb(255 255 255 / 0.18) 12%, rgb(255 255 255 / 0.62) 50%, rgb(255 255 255 / 0.18) 88%, transparent 100%);
  box-shadow:
    0 0 12px rgb(255 255 255 / 0.22),
    0 0 28px rgb(184 155 118 / 0.16);
  transform: translateX(-50%);
}

.services-heading-sub {
  max-width: 48ch;
  margin: clamp(16px, 1.8vw, 22px) auto 0;
  color: rgb(232 228 220 / 0.78);
  font-family: var(--font-serif);
  font-size: clamp(13px, 1.15vw, 16px);
  font-weight: 500;
  line-height: 1.42;
  letter-spacing: 0.04em;
  text-shadow:
    0 1px 2px rgb(0 0 0 / 0.62),
    0 0 14px rgb(255 255 255 / 0.08);
}

/* ── Primary service cards ── */

.services-primary .service-image {
  position: relative;
  flex: 0 0 auto;
  min-height: 0;
  padding: var(--svc-inset) var(--svc-inset) 0;
  overflow: hidden;
  border-top-left-radius: var(--svc-radius);
  border-top-right-radius: var(--svc-radius);
}

.services-primary .service-media {
  position: relative;
  aspect-ratio: var(--svc-primary-media-ratio);
  overflow: hidden;
  border: 1px solid rgb(224 163 83 / 0.72);
  border-top-left-radius: var(--svc-radius);
  border-top-right-radius: var(--svc-radius);
}

/* The image is taller than its frame so the desktop parallax
   (js/home/services.js → --svc-parallax-y) never reveals an edge. */
.services-primary .service-media img {
  position: absolute;
  bottom: 0;
  left: 0;
  display: block;
  width: 100%;
  height: calc(100% + var(--svc-parallax-bleed));
  object-fit: cover;
  object-position: center bottom;
  transform: translate3d(0, var(--svc-parallax-y, 0px), 0) scale(var(--svc-parallax-scale, 1.08));
  will-change: transform;
  backface-visibility: hidden;
}

.services-primary .service-tile .service-media img {
  filter: brightness(0.87) contrast(1.48) saturate(1) sepia(0.1);
}

.services-primary .service-mosaic .service-media img {
  object-position: left center;
  filter: brightness(0.95) contrast(1.06) saturate(1.02) sepia(0.06);
}

.services-primary .service-stone .service-media img {
  object-position: right center;
}

/* Material caption in the image's lower-right corner. */
.services-primary .service-material {
  position: absolute;
  right: calc(var(--svc-inset) + 16px);
  bottom: 10px;
  display: var(--svc-primary-material-display);
  padding: 6px 10px;
  border-radius: 5px;
  background: radial-gradient(140% 120% at 50% 50%, rgb(0 0 0 / 0.58), rgb(0 0 0 / 0.46) 55%, rgb(0 0 0 / 0.34) 100%);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: rgb(222 205 182 / 0.9);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.055em;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgb(0 0 0 / 0.42);
  pointer-events: none;
  user-select: none;
}

.services-primary .service-text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--svc-text-gap);
  min-height: 0;
  padding: var(--svc-text-pad-top) var(--svc-text-pad-inline) var(--svc-text-pad-bottom);
  color: rgb(222 205 182 / 0.94);
  letter-spacing: 0.06em;
  text-align: center;
}

.services-primary .service-title {
  position: relative;
  margin: 0;
  color: rgb(215 168 96 / 0.94);
  font-family: var(--font-serif);
  font-size: clamp(50px, 4.5vw, 70px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  -webkit-text-stroke: 0.45px rgb(255 232 180 / 0.24);
  text-shadow:
    0 1px 0 rgb(255 255 255 / 0.18),
    0 0 22px rgb(214 164 91 / 0.14),
    2.5px 3.5px 6.5px rgb(0 0 0 / 0.5),
    0 0 14px rgb(255 218 148 / 0.11);
}

.services-primary .service-title::before {
  content: "";
  position: absolute;
  top: 52%;
  left: 50%;
  z-index: -1;
  width: 128%;
  height: 88%;
  background: radial-gradient(ellipse at center, rgb(255 226 168 / 0.09), rgb(214 164 91 / 0.05) 42%, transparent 72%);
  filter: blur(10px);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.services-primary .service-divider {
  flex-shrink: 0;
  width: var(--svc-divider-w);
  height: var(--svc-divider-h);
  margin: clamp(4px, 0.45vw, 6px) auto clamp(6px, 0.7vw, 8px);
  background: url("../../images/008-dt-ornamental-divider.svg") center / 100% 100% no-repeat;
  opacity: 0.94;
  filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.48)) drop-shadow(0 0 9px rgb(255 211 106 / 0.18));
}

.services-primary .service-micro {
  max-width: 64ch;
  margin: 0;
  color: rgb(241 216 181 / 0.98);
  font-family: var(--font-sans);
  font-size: var(--svc-primary-copy-size);
  line-height: var(--svc-primary-copy-line-height);
  letter-spacing: 0.025em;
  text-wrap: balance;
}

.services-primary .service-micro--secondary {
  color: rgb(232 204 166 / 0.96);
  font-size: var(--svc-primary-secondary-size);
  line-height: var(--svc-primary-secondary-line-height);
  letter-spacing: 0.02em;
  opacity: 0.96;
  -webkit-text-stroke: 0.25px rgb(255 228 176 / 0.22);
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.55);
}

.services-primary .service-advisory .service-micro--secondary {
  max-width: none;
  white-space: var(--svc-primary-secondary-white-space);
}

.services-primary .service-card--primary .kt-svc-cta,
.services-primary .services-closing .kt-svc-cta {
  padding-block: clamp(12px, 1.1vw, 14px);
  border-width: 2px;
  font-weight: 550;
}

.services-primary .service-card--primary .kt-svc-cta {
  font-size: var(--svc-primary-cta-size);
}

/* ── Integrated-system cards ── */

.services-primary .service-system-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 1.2vw, 18px);
  width: var(--svc-primary-rail);
  margin: 0 auto;
}

.services-primary .service-system-card {
  --system-media-h: clamp(175px, 15vw, 245px);
  gap: clamp(11px, 1vw, 15px);
  width: auto;
  min-width: 0;
  min-height: clamp(330px, 27vw, 430px);
  margin: 0;
  padding: var(--svc-inset);
}

.services-primary .service-system-card__media {
  position: relative;
  display: grid;
  flex: 0 0 var(--system-media-h);
  place-items: center;
  width: 100%;
  height: var(--system-media-h);
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgb(224 163 83 / 0.58);
  border-radius: 6px 6px 0 0;
  background:
    linear-gradient(135deg, rgb(224 163 83 / 0.08), transparent 48%),
    radial-gradient(circle at 50% 35%, rgb(232 202 166 / 0.08), transparent 62%),
    rgb(8 7 6 / 0.42);
  box-shadow:
    inset 0 1px 0 rgb(255 244 224 / 0.06),
    inset 0 0 38px rgb(0 0 0 / 0.28);
}

.services-primary .service-system-card__media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.services-primary .service-system-card--failure .service-system-card__media img {
  object-position: center top;
}

.services-primary .service-system-card__content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: clamp(10px, 0.9vw, 14px);
  min-height: 0;
  text-align: center;
}

.services-primary .service-system-card__title {
  display: grid;
  place-items: center;
  min-height: 2.35em;
  margin: 0;
  color: rgb(215 168 96 / 0.94);
  font-family: var(--font-serif);
  font-size: clamp(16px, 1.34vw, 22px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow:
    0 1px 0 rgb(255 255 255 / 0.12),
    2px 3px 6px rgb(0 0 0 / 0.48);
}

.services-primary .service-system-card__description {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 22ch;
  min-height: 2.8em;
  margin: auto 0 0;
  color: rgb(241 216 181 / 0.98);
  font-family: var(--font-sans);
  font-size: clamp(12.5px, 1.05vw, 15.5px);
  font-weight: 650;
  line-height: 1.42;
  letter-spacing: 0.025em;
  text-align: center;
  text-wrap: balance;
}

.services-primary .service-system-card .kt-svc-cta {
  width: 90%;
  min-width: 0;
  margin: 0;
  padding: clamp(10px, 0.8vw, 12px) clamp(8px, 0.8vw, 14px);
  border-width: 2px;
  font-size: clamp(9px, 0.72vw, 12px);
  letter-spacing: 0.13em;
  white-space: nowrap;
}

/* ── Closing card ── */

.services-primary .services-closing .service-text {
  flex: 0 0 auto;
  padding: clamp(14px, 1.8vw, 22px) clamp(28px, 3.8vw, 48px) clamp(16px, 2vw, 24px);
}

.services-primary .services-closing .kt-svc-cta {
  padding-block: clamp(11px, 0.9vw, 14px);
}

.services-closing__line {
  max-width: 28ch;
  margin: 0 auto;
  color: rgb(241 216 181 / 0.98);
  font-family: var(--font-serif);
  font-size: clamp(21px, 2.22vw, 30px);
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: 0.04em;
  text-wrap: balance;
  text-shadow:
    0 1px 0 rgb(255 255 255 / 0.05),
    0 14px 36px rgb(0 0 0 / 0.42);
}

/* Spacing before the final stage (includes the 62px foot of the original
   exhibit wrapper that enclosed the services). */
.services-tail {
  height: clamp(120px, 12vw, 230px);
  margin-bottom: 62px;
  pointer-events: none;
}

/* ═════════════ Responsive routes ═════════════ */

@media (max-width: 820px) {
  .services-primary .service-system-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Phones. */
@media (max-width: 767px) {
  .services-primary {
    --svc-primary-copy-size: 20px;
    --svc-primary-secondary-size: 20px;
    --svc-primary-copy-line-height: 1.55;
    --svc-primary-secondary-line-height: 1.55;
    --svc-primary-cta-size: 20px;
  }

  .services-heading-eyebrow {
    font-size: 16px;
    line-height: 1.3;
    letter-spacing: 0.2em;
  }

  .services-heading-title-ivory {
    font-size: clamp(46px, 10vw, 68px);
  }

  .services-heading-title-gold {
    font-size: clamp(50px, 11vw, 78px);
  }

  .services-heading-text {
    padding: 32px 22px 30px;
  }

  .services-heading-rule {
    margin: 14px auto 20px;
  }

  .services-heading-sub {
    margin-top: 24px;
    font-size: 20px;
    line-height: 1.55;
  }

  /* One sentence on phones: "…alignment - applied to…". */
  .services-heading-sub-break {
    display: none;
  }

  .services-heading-sub-join::before {
    content: " - ";
  }

  .services-primary .service-mosaic .service-media img {
    object-position: 23% 30%;
  }

  .services-primary .service-stone .service-media img {
    object-position: 78% 0%;
  }

  /* Lighter, warmer gold for the corner accents. */
  .services-primary .service-card--primary .kt-svc-cta,
  .services-primary .service-system-card .kt-svc-cta {
    --svc-cta-gold: 238 186 118;
  }

  .services-primary .service-card--primary .kt-svc-cta {
    letter-spacing: 0.12em;
  }

  .services-primary .service-system-row {
    grid-template-columns: 1fr;
    width: var(--svc-primary-card-width);
  }

  .services-primary .service-stone + .service-system-row,
  .services-primary .service-system-row + .services-closing {
    margin-top: 14px;
  }

  .services-primary .service-system-card {
    width: 100%;
  }

  .services-primary .service-system-card__title {
    font-size: 26px;
    line-height: 1.2;
  }

  .services-primary .service-system-card__description {
    font-size: 22px;
    line-height: 1.5;
  }

  .services-primary .service-system-card .kt-svc-cta {
    width: 100%;
    min-height: 56px;
    padding: 15px 18px;
    font-size: 20px;
    line-height: 1.25;
    letter-spacing: 0.12em;
    white-space: normal;
  }

  .services-primary .services-closing {
    width: var(--svc-primary-card-width);
  }

  .services-closing__line {
    font-size: 28px;
    line-height: 1.35;
  }

  .services-primary .services-closing .kt-svc-cta {
    width: 100%;
    min-height: 60px;
    padding: 16px 20px;
    font-size: 20px;
    line-height: 1.25;
    letter-spacing: 0.1em;
  }

  .services-tail {
    height: 32px;
  }
}

@media (max-width: 600px) {
  .services-primary {
    --svc-primary-card-width: calc(100vw - 20px);
    --svc-primary-media-ratio: 19 / 20;
    --svc-primary-secondary-white-space: normal;
    --svc-primary-material-display: none;
  }

  .services-heading-card {
    width: var(--svc-primary-card-width);
  }
}

@media (max-width: 520px) {
  .services-primary .service-system-card {
    --system-media-h: 190px;
  }
}

/* Tablet portrait: full-bleed primary cards and images. */
@media (min-width: 700px) and (max-width: 1100px) and (orientation: portrait) {
  .services-primary {
    --svc-primary-rail: 100vw;
    --svc-primary-card-width: 100vw;
    --svc-inset: 0px;
  }

  .services-primary .service-system-row,
  .services-primary .services-closing {
    width: calc(100vw - 120px);
  }
}

/* Mobile experience: CTAs stay tappable without double-tap zoom. */
@media (max-width: 900px),
       (pointer: coarse) and (orientation: landscape) and
       (min-width: 1100px) and (max-width: 1180px) and (max-height: 780px) {
  .services {
    width: 100%;
  }

  .services-primary .kt-svc-cta {
    touch-action: manipulation;
  }
}

/* Phone landscape and compact touch landscape: larger labels. */
@media (max-width: 900px) and (orientation: landscape),
       (pointer: coarse) and (orientation: landscape) and
       (min-width: 1100px) and (max-width: 1180px) and (max-height: 780px) {
  .services-heading-eyebrow {
    font-size: clamp(15px, 2vw, 19px);
    line-height: 1.3;
    letter-spacing: 0.28em;
  }

  .services-heading-sub {
    max-width: 52ch;
    margin-top: 20px;
    font-size: clamp(17px, 2.3vw, 22px);
    line-height: 1.5;
  }

  .services-primary .service-card--primary .kt-svc-cta,
  .services-primary .service-system-card .kt-svc-cta {
    --svc-cta-gold: 240 192 124;
  }

  .services-primary .service-card--primary .kt-svc-cta {
    padding-block: clamp(12px, 1.3vw, 15px);
    padding-inline: clamp(22px, 3vw, 36px);
    font-size: clamp(15px, 1.9vw, 18px);
    font-weight: 600;
    letter-spacing: 0.16em;
  }

  .services-primary .service-system-card .kt-svc-cta {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    font-size: clamp(13px, 1.55vw, 16px);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.12em;
    white-space: normal;
  }
}

/* Desktop (and tablets that receive the desktop layout). */
@media (min-width: 1181px),
       (min-width: 1025px) and (max-width: 1099px),
       (min-width: 1025px) and (pointer: fine),
       (min-width: 1025px) and (orientation: portrait),
       (min-width: 1025px) and (min-height: 781px) {
  .services-stack {
    width: var(--svc-primary-rail);
    margin-inline: auto;
  }

  .services-heading-title {
    --title-glow: radial-gradient(ellipse at center, rgb(255 255 255 / 0.1) 0%, rgb(190 145 92 / 0.05) 38%, transparent 76%);
    z-index: 3;
  }

  .services-heading-title::before {
    width: 128%;
    height: 108%;
  }

  .services-heading-title::after {
    bottom: -18px;
    width: min(240px, 72%);
    height: clamp(3px, 0.35vw, 4px);
    border-radius: 999px;
    background: linear-gradient(90deg, rgb(139 82 38 / 0.55) 0%, rgb(243 208 151 / 0.92) 50%, rgb(139 82 38 / 0.55) 100%);
    box-shadow:
      0 0 16px rgb(193 132 69 / 0.34),
      inset 0 1px 0 rgb(255 255 255 / 0.22);
  }

  .services-heading-title-ivory {
    font-size: clamp(48px, 4.4vw, 76px);
  }

  .services-heading-title-gold {
    font-size: clamp(52px, 4.8vw, 84px);
  }

  .services-heading-sub {
    position: relative;
    z-index: 3;
    max-width: none;
    margin: clamp(18px, 2vw, 26px) auto 0;
    color: inherit;
    font-size: clamp(15px, 1.15vw, 18px);
    letter-spacing: 0.06em;
    white-space: nowrap;
    text-shadow:
      0 1px 0 rgb(255 255 255 / 0.04),
      0 12px 36px rgb(0 0 0 / 0.44);
  }
}

@media (min-width: 1181px),
       (min-width: 1101px) and (pointer: fine),
       (min-width: 1101px) and (orientation: portrait),
       (min-width: 1101px) and (min-height: 781px) {
  .services-closing__line {
    width: 100%;
    max-width: none;
    font-size: clamp(18px, 1.65vw, 26px);
    white-space: nowrap;
  }

  .services-primary .services-closing .kt-svc-cta {
    margin-top: clamp(2px, 0.25vw, 4px);
  }
}

/* 720p and larger: primary cards scale as one composition from 1280×720. */
@media (min-width: 1281px) and (min-height: 721px) {
  .services-primary {
    --s720: min(calc(100vw / 1280), calc(100vh / 720));
  }

  .services-primary .service-card--primary {
    --svc-text-pad-top: calc(12.8 * var(--s720));
    --svc-text-pad-inline: calc(28 * var(--s720));
    --svc-text-pad-bottom: calc(16 * var(--s720));
    --svc-text-gap: calc(7.68 * var(--s720));
    --svc-divider-w: calc(307.2 * var(--s720));
    --svc-divider-h: calc(14.72 * var(--s720));
    --svc-inset: calc(12 * var(--s720));
    --svc-parallax-bleed: calc(140 * var(--s720));
    --svc-primary-copy-size: calc(20 * var(--s720));
    --svc-primary-secondary-size: calc(18 * var(--s720));
    --svc-primary-cta-size: calc(13.44 * var(--s720));
    --svc-radius: calc(8 * var(--s720));
    border-width: var(--s720);
  }

  .services-primary .service-card--primary .service-title {
    font-size: calc(57.6 * var(--s720));
  }

  .services-primary .service-card--primary .service-divider {
    margin: calc(5.76 * var(--s720)) auto calc(8 * var(--s720));
  }

  .services-primary .service-card--primary .service-media {
    border-width: var(--s720);
  }

  /* The scaled edge-rule size also lands on the single-layer luxe fill and
     tiles it into a flat bronze tone — this is how the original renders. */
  .services-primary .service-card--primary .kt-svc-cta {
    --cta-line: var(--s720);
    --cta-corner: calc(10.88 * var(--s720));
    min-width: min(100%, calc(260 * var(--s720)));
    margin-top: calc(17.92 * var(--s720));
    padding: calc(14 * var(--s720)) calc(53.76 * var(--s720));
    border-width: calc(2 * var(--s720));
    background-size: calc(24 * var(--s720)) var(--s720);
  }

  .services-primary .service-card--primary .service-material {
    right: calc(28 * var(--s720));
    bottom: calc(10 * var(--s720));
    padding: calc(6 * var(--s720)) calc(10 * var(--s720));
    border-radius: calc(5 * var(--s720));
    font-size: calc(11 * var(--s720));
  }
}

/* 1080p: supporting cards keep the approved fixed values. */
@media (min-width: 1600px) and (max-width: 2200px) and (min-height: 900px) and (max-height: 1250px) {
  .services-heading-text {
    padding: 48px 54px 39px;
  }

  .services-heading-eyebrow {
    font-size: 16.512px;
  }

  .services-heading-rule {
    width: 315px;
    height: 1.5px;
    margin: 15px auto 18px;
  }

  .services-heading-title-ivory {
    font-size: 84.48px;
  }

  .services-heading-title-gold {
    margin-top: 9.6px;
    font-size: 92.16px;
  }

  .services-heading-sub {
    margin-top: 38.4px;
    font-size: 22.5px;
  }

  .services-primary .service-system-row {
    gap: 23.04px;
  }

  .services-primary .service-system-card {
    --system-media-h: 288px;
    gap: 19.2px;
    padding: 18px;
    border-radius: 12px;
  }

  .services-primary .service-system-card__content {
    gap: 17.28px;
  }

  .services-primary .service-system-card__title {
    font-size: 25.728px;
  }

  .services-primary .service-system-card__description {
    font-size: 20.16px;
  }

  .services-primary .service-system-card .kt-svc-cta {
    width: 294.914px;
    padding: 15.36px;
    border-width: 3px;
    font-size: 13.824px;
  }

  .services-primary .services-closing .service-text {
    gap: 11.52px;
    padding: 33px 72px 36px;
  }

  .services-closing__line {
    font-size: 31.68px;
  }

  .services-primary .services-closing .service-divider {
    width: 460.8px;
    height: 22.08px;
    margin: 8.64px auto 12px;
  }

  .services-primary .services-closing .kt-svc-cta {
    min-width: 439.219px;
    margin-top: 4.8px;
    padding: 17.28px 80.64px;
    border-width: 3px;
    font-size: 20.16px;
  }
}

/* 1080p and 2160p: the wrapper's 62px foot scales with the composition. */
@media (min-width: 1600px) and (max-width: 2200px) and (min-height: 900px) and (max-height: 1250px),
       (min-width: 3200px) and (max-width: 4400px) and (min-height: 1800px) and (max-height: 2500px) {
  .services-tail {
    margin-bottom: calc(62 * min(calc(100vw / 1280), calc(100vh / 720)));
  }
}

/* 1440p and up: heading and system type follow the smaller viewport ratio. */
@media (min-width: 1921px) and (min-height: 1081px) {
  .services-heading-eyebrow {
    font-size: min(0.729167vw, 1.296296vh);
  }

  .services-heading-title-ivory {
    font-size: min(3.958333vw, 7.037037vh);
  }

  .services-heading-title-gold {
    font-size: min(4.375vw, 7.777778vh);
  }

  .services-heading-sub {
    font-size: min(0.9375vw, 1.666667vh);
  }

  .services-primary .service-system-card__title {
    font-size: min(1.145833vw, 2.037037vh);
  }

  .services-primary .service-system-card__description {
    font-size: min(0.807292vw, 1.435185vh);
  }

  .services-primary .service-system-card .kt-svc-cta {
    font-size: min(0.625vw, 1.111111vh);
  }
}

/* 2160p: the supporting cards also scale from the 1280×720 composition. */
@media (min-width: 3200px) and (max-width: 4400px) and (min-height: 1800px) and (max-height: 2500px) {
  .services-heading-card {
    border-width: var(--s720);
    border-radius: calc(8 * var(--s720));
  }

  .services-heading-text {
    padding: calc(32 * var(--s720)) calc(36 * var(--s720)) calc(26 * var(--s720));
  }

  .services-heading-eyebrow {
    font-size: calc(11.008 * var(--s720));
  }

  .services-heading-rule {
    width: calc(210 * var(--s720));
    height: var(--s720);
    margin: calc(10 * var(--s720)) auto calc(12 * var(--s720));
  }

  .services-heading-title-ivory {
    font-size: calc(56.32 * var(--s720));
  }

  .services-heading-title-gold {
    margin-top: calc(6.4 * var(--s720));
    font-size: calc(61.44 * var(--s720));
  }

  .services-heading-title::before {
    filter: blur(calc(10 * var(--s720)));
  }

  .services-heading-title::after {
    bottom: calc(-16 * var(--s720));
    width: min(calc(220 * var(--s720)), 78%);
    height: var(--s720);
  }

  .services-heading-sub {
    margin-top: calc(25.6 * var(--s720));
    font-size: calc(15 * var(--s720));
  }

  .services-primary .service-system-row {
    gap: calc(15.36 * var(--s720));
  }

  .services-primary .service-system-card,
  .services-primary .services-closing {
    border-width: var(--s720);
    border-radius: calc(8 * var(--s720));
  }

  .services-primary .service-system-card {
    --system-media-h: calc(192 * var(--s720));
    gap: calc(12.8 * var(--s720));
    padding: calc(12 * var(--s720));
  }

  .services-primary .service-system-card__media {
    border-width: var(--s720);
    border-radius: calc(6 * var(--s720)) calc(6 * var(--s720)) 0 0;
  }

  .services-primary .service-system-card__content {
    gap: calc(11.52 * var(--s720));
  }

  .services-primary .service-system-card__title {
    font-size: calc(17.152 * var(--s720));
  }

  .services-primary .service-system-card__description {
    font-size: calc(13.44 * var(--s720));
  }

  .services-primary .service-system-card .kt-svc-cta,
  .services-primary .services-closing .kt-svc-cta {
    --cta-line: var(--s720);
    --cta-corner: calc(10.88 * var(--s720));
    border-width: calc(2 * var(--s720));
    background-size: calc(24 * var(--s720)) var(--s720);
  }

  .services-primary .service-system-card .kt-svc-cta {
    width: calc(196.609 * var(--s720));
    padding: calc(10.24 * var(--s720));
    font-size: calc(9.216 * var(--s720));
  }

  .services-primary .services-closing .service-text {
    gap: calc(7.68 * var(--s720));
    padding: calc(22 * var(--s720)) calc(48 * var(--s720)) calc(24 * var(--s720));
  }

  .services-closing__line {
    font-size: calc(21.12 * var(--s720));
  }

  .services-primary .services-closing .service-divider {
    width: calc(307.2 * var(--s720));
    height: calc(14.72 * var(--s720));
    margin: calc(5.76 * var(--s720)) auto calc(8 * var(--s720));
  }

  .services-primary .services-closing .kt-svc-cta {
    min-width: calc(292.813 * var(--s720));
    margin-top: calc(3.2 * var(--s720));
    padding: calc(11.52 * var(--s720)) calc(53.76 * var(--s720));
    font-size: calc(13.44 * var(--s720));
  }
}

/* Touch devices: the heading glow (135% of the title) must not widen the
   document — the rebuild scrolls the document, and a mobile browser zooms
   out to fit any horizontal overflow (the original's <body> scroller hid it). */
@media (max-width: 1180px), (pointer: coarse) {
  .services {
    overflow-x: clip;
  }
}

/* Touch tablets and phones: no backdrop blur or compositor hints
   (Safari repaints filtered layers aggressively). */
@media (max-width: 1180px), (pointer: coarse) and (min-width: 768px) {
  .services-primary .service-material {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .services-primary .service-media img {
    will-change: auto;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .services-primary .service-material {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
