:root {
  --mp-cream: #eee5d3;
  --mp-paper: #f6f0e4;
  --mp-walnut: #2d211b;
  --mp-walnut-2: #443127;
  --mp-copper: #b66743;
  --mp-terra: #92543b;
  --mp-sage: #78826a;
  --mp-line: rgba(65, 43, 31, .22);
  --mp-shadow: 0 28px 60px rgba(45, 31, 23, .2);
  --mp-model-lift: drop-shadow(0 26px 30px rgba(58, 38, 26, .19)) drop-shadow(0 4px 7px rgba(58, 38, 26, .13));
  --mp-model-lift-dark: drop-shadow(0 26px 32px rgba(0, 0, 0, .42)) drop-shadow(0 3px 6px rgba(0, 0, 0, .3));
}

.service-page--planning {
  background: var(--mp-paper);
  color: var(--mp-walnut);
  overflow-x: clip;
}

.service-main--planning {
  overflow: clip;
}

.service-main--planning h1,
.service-main--planning h2 {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.service-page--planning button,
.service-page--planning a {
  -webkit-tap-highlight-color: transparent;
}

.service-page--planning :focus-visible {
  outline: 2px solid var(--mp-copper);
  outline-offset: 4px;
}

.mp-stage {
  position: relative;
  margin: 0;
}

.mp-model {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #e8dfcf;
  border: 1px solid var(--mp-line);
  box-shadow: 0 14px 36px rgba(58, 38, 26, .10);
}

.mp-model-render {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Keep the generated whole-site model visible at every breakpoint. */
.service-page--planning .svc-hero__media > img {
  aspect-ratio: 3 / 2;
  object-fit: contain;
  background: #e8dfcf;
}

.service-page--planning [data-uk-atmosphere="planning-scope"] {
  --uk-atm-image: url('/assets/images/services/master-planning/township/mp-landscape.webp');
}
.service-page--planning [data-uk-atmosphere="planning-closing"] {
  --uk-atm-image: url('/assets/images/services/master-planning/township/mp-closing.webp');
}

/* The selected service's name, then its two-sentence description below it
   (client feedback 2026-10-01: a fuller description for each service). */
.mp-stage-caption {
  display: grid;
  gap: 6px;
  padding: 14px 0 0;
  border-top: 1px solid var(--mp-line);
  font-family: var(--font-body);
}

.mp-stage-caption b {
  color: var(--mp-copper);
  font-size: 0.894rem;
  letter-spacing: 0;
}

.mp-stage-caption span {
  max-width: 62ch;
  color: rgba(45, 33, 27, .78);
  font-size: 14px;
  line-height: 1.6;
}

.mp-scope {
  padding: clamp(76px, 7vw, 108px) 0;
  scroll-margin-top: 110px;
  background: var(--mp-paper);
}

.mp-section-head {
  display: grid;
  grid-template-columns: minmax(300px, .8fr) minmax(440px, 1.2fr);
  align-items: end;
  gap: 48px;
  margin-bottom: 42px;
}

.mp-section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -.025em;
  font-size: calc(clamp(48px, 5.8vw, 84px) * var(--k-display));
  line-height: 1.05;
}

.mp-source {
  max-width: 690px;
  margin: 0;
  color: rgba(45, 33, 27, .68);
  font: 400 clamp(16px, 1.6vw, 21px)/1.55 var(--font-body);
}

.mp-scope-layout {
  display: grid;
  grid-template-columns: minmax(480px, 1.1fr) minmax(370px, .9fr);
  align-items: start;
  gap: clamp(42px, 6vw, 84px);
}

.mp-scope-stage {
  position: sticky;
  top: 118px;
  background: transparent;
}

.mp-scope-register {
  border-top: 1px solid var(--mp-line);
}

/* The sticky stage is pinned inside its grid area, and that area is only as
   tall as this column — the register — so the runway that keeps the model
   in view beside the last rows has to live here. Padding on the outer
   `.mp-scope` section sits outside the grid area and buys the sticky stage
   nothing: it used to carry clamp(210px, 17vw, 250px), which produced empty
   space below the register but did not stop the model sliding out from
   under row 12. */
@media (min-width: 981px) {
  .mp-scope-register {
    padding-bottom: clamp(200px, 26vh, 340px);
  }
}

.mp-scope-group {
  padding-top: 26px;
}

.mp-scope-group + .mp-scope-group {
  margin-top: 28px;
}

.mp-scope-group h3 {
  margin: 0 0 8px;
  color: var(--mp-copper);
  font: normal 400 clamp(1.35rem, 1.7vw, 1.6rem)/1.15 var(--font-display);
  letter-spacing: 0;
}

.mp-scope-group ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mp-scope-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 8px 4px;
  border: 0;
  border-bottom: 1px solid var(--mp-line);
  background: transparent;
  color: var(--mp-walnut);
  cursor: pointer;
  text-align: left;
}

.mp-scope-row span {
  color: rgba(45, 33, 27, .45);
  font: 500 12px/1 var(--font-body); font-variant-numeric: tabular-nums;
}

.mp-scope-row b {
  font: 500 15px/1.35 var(--font-body);
}

.mp-scope-row:hover,
.mp-scope-row.is-active {
  color: var(--mp-copper);
  background: linear-gradient(90deg, rgba(182, 103, 67, .09), transparent);
}

.mp-scope-mobile-state {
  display: none;
}

@media (max-width: 980px) {

  /* minmax(0, 1fr), not 1fr: the auto minimum lets the stage's intrinsic
     contribution size the single column to 492px inside a 362px frame, and
     the maquette is cut off past the right edge. Desktop is untouched. */
  .mp-section-head,
  .mp-scope-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .mp-section-head {
    gap: 20px;
  }


  /* Single column: the selected service's model and description open
     inline, directly under the row that was chosen (master-planning.js
     moves the panel), so the longer description is read beside its row
     rather than far above it. */
  .mp-scope-stage {
    display: none;
  }

  /* master-planning.js holds the tapped row in place itself when the plate
     moves; the browser's scroll anchoring would add a second correction */
  .mp-scope { overflow-anchor: none; }

  .mp-scope-mobile-state {
    display: block;
    margin: 10px 0 22px;
    background: transparent;
  }

  .mp-scope-mobile-state .mp-model {
    min-height: 0;
    aspect-ratio: 3 / 2;
  }

  .mp-scope-mobile-state p {
    margin: 12px 2px 2px;
    font-family: var(--font-body);
  }

  .mp-scope-mobile-state b,
  .mp-scope-mobile-state span {
    display: block;
  }

  .mp-scope-mobile-state b {
    color: var(--mp-copper);
    font-size: 0.894rem;
    letter-spacing: 0;
  }

  .mp-scope-mobile-state span {
    margin-top: 6px;
    color: rgba(45, 33, 27, .78);
    font-size: 14px;
    line-height: 1.6;
  }

  .mp-scope-mobile-state .mp-model {
    max-width: 560px;
  }
}

@media (max-width: 620px) {

  .mp-model {
    min-height: 0;
    aspect-ratio: 3 / 2;
  }

  .mp-scope {
    padding: 74px 0;
  }

  .mp-section-head {
    margin-bottom: 28px;
  }

  .mp-section-head h2 {
    font-size: calc(50px * var(--k-display));
  }

  .mp-source {
    font-size: 15px;
  }

  .mp-scope-group {
    padding-top: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-page--planning *,
  .service-page--planning *::before,
  .service-page--planning *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
