/**
 * The Traffic Plans Company - Areas We Service (/areas-we-service/)
 * Rollout 3 - THEA-751
 *
 * ARCHITECTURE: this file is PAGE-SPECIFIC ONLY, ported from
 * 03-Rollout-3/hifi/areas-we-service.css. It assumes a shared foundation
 * stylesheet providing the band system (.band / .band-asphalt / .band-orange
 * / .band-panel_grey and the --primitive-* / --band-* custom properties),
 * .tpc-proof, .tpc-showcase, .tpc-close, .tpc-eyebrow, .tpc-section-head,
 * .tpc-btn and the render reveal/scroll hooks. AS OF THIS PORT, THAT
 * FOUNDATION DOES NOT YET EXIST ANYWHERE IN tpc-bridge (verified by grep
 * across every theme CSS file - no .band system, no .tpc-showcase, no
 * .tpc-proof, no .tpc-close, no design-token custom properties, no GSAP /
 * Lenis / Splide). This page will render unstyled until that foundation is
 * ported in, same as the hi-fi's own file depends on
 * 00-Rollout-0/hifi/design-tokens.css + components.css and
 * 01-Rollout-1/hifi/homepage.css being linked. See the hand-back report.
 *
 * Only change from the hi-fi source: `.btn` / `.btn--primary` renamed to
 * this theme's real button class, `.tpc-btn` / `.tpc-btn--primary` (the hi-fi
 * preview's bare `.btn` does not exist anywhere in this theme). The burger
 * menu's `.tpc-menu__footer a.is-current` rule is dropped: the nav drawer is
 * site furniture, not reproduced on this page template.
 */

/* ─────────────────────────────────────────────────────────────────────
   SHERO - split variant, internal-page tier. Copied from services.css
   v1.59 (.tpc-shero--split / .tpc-shero--orange), the founder-approved
   42vh/orange/no-CTA treatment every internal page uses.
   ───────────────────────────────────────────────────────────────────── */
.tpc-shero--split .band__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--primitive-space-8);
  align-items: center;
}
.tpc-shero--split .shero__inner { max-width: none; }

.tpc-shero--orange {
  --tpc-cone-orange: #E8611C;
  --band-bg: linear-gradient(180deg, var(--primitive-orange) 0%, var(--tpc-cone-orange) 100%);
  --band-heading-text: var(--primitive-white);
  --band-h2-text: var(--primitive-white);
  --band-body-text: var(--primitive-white);
}
.tpc-shero--orange.band {
  min-height: 42vh;
  min-height: 42svh;
  padding-block: var(--primitive-space-7);
  display: flex;
  align-items: center;
}

/* Crops the hero artwork at the band boundary instead of letting it paint
   over the trust strip below. */
.tpc-shero--orange.band { overflow: clip; }
/* No widows/orphans in the hero body copy: text-wrap: pretty plus an &nbsp;
   binding the last two words as a hard guarantee. */
.tpc-shero--orange .shero__intro { text-wrap: pretty; }
.tpc-shero--orange .shero__title {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
}
.tpc-shero--orange .shero__intro {
  font-size: 16px;
}

/* Hero media slot. 1531/1027 ratio so this hero measures the same height as
   every other internal-page hero regardless of what fills it. */
.tpc-shero__media {
  position: relative;
  aspect-ratio: 1531 / 1027;
}
/* Founder-supplied artwork: a rolled-out Traffic Management Plan drawing.
   top: calc((1 - scale) * headPct) pins the paper's top edge in place as the
   image grows, because the scale cancels out of the formula. headPct is
   11.7216% (topmost opaque row 160 of 1365, from an alpha scan of the
   source) - read, not guessed, or the pin lands on empty pixels. */
.tpc-shero__worker {
  /* 1.18: with the pin, the artwork's bottom edge sits at
     slotTop + 44.9 + 338.1*S, so the scale is the value where the whole
     rolled sheet clears the band boundary without the roll getting clipped. */
  --plan-scale: 1.18;
  display: block;
  position: absolute;
  left: 50%;
  top: calc((1 - var(--plan-scale)) * 11.7216%);   /* 11.7216% = top of the paper, from the alpha scan */
  height: calc(var(--plan-scale) * 100%);
  width: auto;
  transform: translateX(-50%);
}
@media (max-width: 1024px) {
  .tpc-shero__media { aspect-ratio: auto; min-height: 260px; }
  .tpc-shero__worker {
    position: static;
    height: auto;
    max-height: 46vh;
    width: auto;
    max-width: 100%;
    margin-inline: auto;
    transform: none;
  }
}
@media (max-width: 1024px) {
  .tpc-shero--split .band__inner { grid-template-columns: 1fr; gap: var(--primitive-space-6); }
  .tpc-shero__media { order: -1; }
}

/* ─────────────────────────────────────────────────────────────────────
   SECTION HEADING STACK TRAPS.
   .tpc-eyebrow--solo inherits uppercase from the small-caps eyebrow it is
   based on; all three headings on this page are full sentences/questions,
   not the uppercase caption treatment, so it is lifted per-section rather
   than on the class (which stays a real eyebrow elsewhere). .tpc-section-head
   caps at 68ch, a COPY measure - the coverage subheading needs more room to
   stay on one line, so the cap comes off the head and goes back on the body
   paragraph alone.
   ───────────────────────────────────────────────────────────────────── */
.tpc-headstack .tpc-eyebrow--solo { text-transform: none; }
.tpc-headstack .tpc-section-head { max-width: none; }
.tpc-headstack .tpc-section-intro { max-width: 68ch; margin-inline: auto; }

/* .tpc-hub__sub hardcodes asphalt text for its default (hub) context - the
   coverage section sits on an asphalt band, so asphalt-on-asphalt is
   invisible without this override. */
.band-asphalt .tpc-hub__sub { color: var(--band-heading-text); }

/* ─────────────────────────────────────────────────────────────────────
   TRUST STRIP - byte-identical from the shared internal-page benchmark.
   ───────────────────────────────────────────────────────────────────── */
.tpc-proof--strip {
  background: color-mix(in srgb, var(--primitive-signal-red) 76%, var(--primitive-asphalt));
  padding-block: clamp(14px, 1.8vh, 22px);
}
.tpc-proof--strip .tpc-proof__stat,
.tpc-proof--strip .tpc-proof__star,
.tpc-proof--strip .tpc-proof__label {
  color: color-mix(in srgb, var(--primitive-orange) 55%, var(--primitive-white));
}
.tpc-proof--strip .tpc-proof__item { gap: 2px; }
.tpc-proof--strip .tpc-proof__stat { font-size: clamp(20px, 1.9vw, 26px); }
.tpc-proof--strip .tpc-proof__stat--word { font-size: clamp(16px, 1.5vw, 20px); }
.tpc-proof--strip .tpc-proof__label { max-width: none; font-size: 12.5px; }

/* ─────────────────────────────────────────────────────────────────────
   1. COVERAGE CARDS - Victoria / New South Wales / Tasmania. Page-local
   component built from design-token primitives: nothing in the design
   system carries a label+title+body+credential shape. Uses the real
   .tpc-showcase / __slot / __tile / __media / __copy component by
   reference (same card Contact's routing tiles use), scoped --coverage
   for this page's own row/height rules.
   ───────────────────────────────────────────────────────────────────── */
.tpc-showcase--coverage { margin-top: var(--primitive-space-8); }

.tpc-showcase--coverage .tpc-showcase__media { position: relative; }
.tpc-showcase--coverage .tpc-showcase__media .render-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 22px;
}

/* Body copy stays LEFT aligned while the label and title take the component's
   centring - these descriptions run six lines plus a seven-line credential
   block, and centred ragged-both-edges text at that length is a genuine
   readability cost. */
.tpc-showcase--coverage .tpc-coverage__label,
.tpc-showcase--coverage .tpc-showcase__title { text-align: center; }
.tpc-showcase--coverage .tpc-showcase__desc,
.tpc-showcase--coverage .tpc-coverage__credential { text-align: left; }

/* ─────────────────────────────────────────────────────────────────────
   ROW ALIGNMENT ACROSS THE THREE TILES via SUBGRID: the five rows (media,
   label, title, lead, credential) are declared once on the shared parent,
   and each tile opts into the parent's row tracks instead of sizing its
   own, so every row takes the height of the tallest of the three - all
   three leads start on one line and all three credential dividers land on
   one line, automatically, whatever the copy says.
   ───────────────────────────────────────────────────────────────────── */
.tpc-showcase--coverage {
  grid-template-rows: auto auto auto auto auto;   /* media, label, title, lead, credential */
}
.tpc-showcase--coverage .tpc-showcase__slot {
  grid-row: span 5;
  display: grid;
  grid-template-rows: subgrid;
}
.tpc-showcase--coverage .tpc-showcase__tile {
  grid-row: span 5;
  display: grid;
  grid-template-rows: subgrid;
  row-gap: 0;
}
.tpc-showcase--coverage .tpc-showcase__copy { display: contents; }

.tpc-showcase--coverage .tpc-showcase__media       { grid-row: 1; order: 0; margin-bottom: clamp(16px, 1.4vw, 24px); }

.tpc-tile-img--victoria { object-position: 50% 50%; }
.tpc-tile-img--nsw      { object-position: 50% 50%; }
.tpc-tile-img--tasmania { object-position: 50% 50%; }
.tpc-showcase--coverage .tpc-coverage__label       { grid-row: 2; }
.tpc-showcase--coverage .tpc-showcase__title       { grid-row: 3; }
.tpc-showcase--coverage .tpc-showcase__desc        { grid-row: 4; }
.tpc-showcase--coverage .tpc-coverage__credential  { grid-row: 5; }

.tpc-showcase--coverage .tpc-showcase__desc { align-self: start; }

.tpc-coverage__label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primitive-orange);
  margin: 0 0 8px;
}
.tpc-coverage__lead {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--primitive-ink);
  margin: 0 0 20px;
}
.tpc-coverage__credential {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--primitive-ink);
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid rgba(34, 34, 34, 0.10);
}
.tpc-coverage__credential strong {
  display: block;
  color: var(--primitive-asphalt);
  margin-bottom: 2px;
  font-size: 15px;
}

/* ─────────────────────────────────────────────────────────────────────
   3. NOT SURE WE COVER YOUR SITE - dual filled CTAs, centred. HARD RULE:
   every CTA is FILLED, never a stroke around a transparent box.
   ───────────────────────────────────────────────────────────────────── */
.tpc-coverage__ctas {
  margin: var(--primitive-space-7) 0 0;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: var(--primitive-space-5);
  flex-wrap: wrap;
}

/* Both CTAs take the orange ground with a WHITE label - a page-scoped
   override, not a token change: design-tokens sets --btn-primary-text to
   asphalt ("orange ground text is always asphalt, never white"), and that
   default still governs every other orange CTA. Matches the same override
   homepage.css carries at .tpc-why__actions .tpc-btn--primary and
   contact.css's own coverage CTA. */
.tpc-coverage__ctas .btn--primary { color: var(--primitive-white); }

/* ─────────────────────────────────────────────────────────────────────
   BAND SEAM - asphalt (coverage) into panel grey (not sure we cover you).
   Two adjacent full-bleed sections landing on a fractional device pixel
   antialias both edges and leak the white body background through as a
   pale hairline across the join; top: -1px overlaps by a pixel and gains
   the pixel back in height to close it.
   ───────────────────────────────────────────────────────────────────── */
.tpc-sec.band-panel_grey { position: relative; }
.tpc-sec.band-panel_grey {
  padding-top: calc(clamp(140px, 22vh, 240px) + clamp(48px, 7vh, 96px));
}
.tpc-sec.band-panel_grey::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: -1px;
  z-index: 0;
  pointer-events: none;
  height: calc(clamp(140px, 22vh, 240px) + 1px);
  /* Painted in the PREVIOUS band's colour (asphalt), fading to transparent
     going down to reveal the real white beneath. */
  background: var(--primitive-asphalt);
  --seam-ramp:
    rgba(0, 0, 0, 0.0000) 0.0%,
    rgba(0, 0, 0, 0.0018) 2.5%,
    rgba(0, 0, 0, 0.0073) 5.0%,
    rgba(0, 0, 0, 0.0160) 7.5%,
    rgba(0, 0, 0, 0.0280) 10.0%,
    rgba(0, 0, 0, 0.0430) 12.5%,
    rgba(0, 0, 0, 0.0607) 15.0%,
    rgba(0, 0, 0, 0.0812) 17.5%,
    rgba(0, 0, 0, 0.1040) 20.0%,
    rgba(0, 0, 0, 0.1291) 22.5%,
    rgba(0, 0, 0, 0.1562) 25.0%,
    rgba(0, 0, 0, 0.1853) 27.5%,
    rgba(0, 0, 0, 0.2160) 30.0%,
    rgba(0, 0, 0, 0.2482) 32.5%,
    rgba(0, 0, 0, 0.2817) 35.0%,
    rgba(0, 0, 0, 0.3164) 37.5%,
    rgba(0, 0, 0, 0.3520) 40.0%,
    rgba(0, 0, 0, 0.3883) 42.5%,
    rgba(0, 0, 0, 0.4253) 45.0%,
    rgba(0, 0, 0, 0.4625) 47.5%,
    rgba(0, 0, 0, 0.5000) 50.0%,
    rgba(0, 0, 0, 0.5375) 52.5%,
    rgba(0, 0, 0, 0.5748) 55.0%,
    rgba(0, 0, 0, 0.6117) 57.5%,
    rgba(0, 0, 0, 0.6480) 60.0%,
    rgba(0, 0, 0, 0.6836) 62.5%,
    rgba(0, 0, 0, 0.7183) 65.0%,
    rgba(0, 0, 0, 0.7518) 67.5%,
    rgba(0, 0, 0, 0.7840) 70.0%,
    rgba(0, 0, 0, 0.8147) 72.5%,
    rgba(0, 0, 0, 0.8438) 75.0%,
    rgba(0, 0, 0, 0.8709) 77.5%,
    rgba(0, 0, 0, 0.8960) 80.0%,
    rgba(0, 0, 0, 0.9188) 82.5%,
    rgba(0, 0, 0, 0.9392) 85.0%,
    rgba(0, 0, 0, 0.9570) 87.5%,
    rgba(0, 0, 0, 0.9720) 90.0%,
    rgba(0, 0, 0, 0.9840) 92.5%,
    rgba(0, 0, 0, 0.9928) 95.0%,
    rgba(0, 0, 0, 0.9982) 97.5%,
    rgba(0, 0, 0, 1.0000) 100.0%;
  -webkit-mask-image: linear-gradient(to top, var(--seam-ramp));
          mask-image: linear-gradient(to top, var(--seam-ramp));
}
.tpc-sec.band-panel_grey > .band__inner { position: relative; z-index: 1; }

/* ─────────────────────────────────────────────────────────────────────
   CLOSE BAND - --split layout, the copy-beside-heading head shared with
   every other internal page's close band.
   ───────────────────────────────────────────────────────────────────── */
.tpc-close--split .tpc-close__head--split {
  --close-fig-w: calc(0.6538 * clamp(230px, 33vh, 358px));  /* 510/780 aspect */
  max-width: none;
  margin-inline: 0;
  margin-bottom: var(--primitive-space-7);
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(24px, 3vw, 56px);
  align-items: center;
  padding-left: calc(var(--close-fig-w) + clamp(16px, 2vw, 40px));
}
.tpc-close--split .tpc-close__title { margin-bottom: 0; }

@media (max-width: 900px) {
  .tpc-close--split .tpc-close__head--split {
    grid-template-columns: 1fr;
    padding-left: 0;
  }
}

.tpc-close--split .tpc-close__lead { color: var(--primitive-white); }

@media (max-width: 1024px) {
  .tpc-showcase--coverage { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────────────────────────────
   WIDOWS & ORPHANS - responsive pass. balance on headings, pretty on body
   copy: both hold at every column width where a hardcoded break would not.
   Note: "roads" alone on the H1's last line is a pre-existing defect in the
   approved frozen design at >=1366px desktop widths, not introduced here -
   kept as-is per "do not change anything visible at 1280px or wider".
   ───────────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .tpc-areas-main h1,
  .tpc-areas-main h2,
  .tpc-areas-main h3,
  .tpc-areas-main .tpc-hub__sub,
  .tpc-areas-main .tpc-coverage__label { text-wrap: balance; }

  .tpc-areas-main p,
  .tpc-areas-main .tpc-section-intro,
  .tpc-areas-main .tpc-close__lead,
  .tpc-areas-main .tpc-showcase__desc,
  .tpc-areas-main .tpc-coverage__credential { text-wrap: pretty; }
}

/* ══════════════════════════════════════════════════════════════════════
   MOBILE PARITY PASS. Desktop frozen: every rule below lives inside
   max-width:699px, per the founder's ruling that nothing already approved
   may change.
   ══════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────
   THE THREE STATE CARDS, BUILT AS A SWIPE CAROUSEL on phone width. A
   three-way state comparison (home turf / growing fast / smaller share) is
   read AS a comparison, which "one card, swipe for the next" preserves far
   better than a vertical stack of three long cards.

   NOTE: the mobile dot indicator under the carousel (.tpc-mcar-dots) is
   built by a small script on the hi-fi page, not ported here - see the
   hand-back report. The carousel itself (swipe/scroll-snap) is pure CSS
   and works without it.
   ───────────────────────────────────────────────────────────────────── */
@media (max-width: 699px) {
  .tpc-showcase--coverage {
    display: grid;
    grid-template-columns: none;
    grid-template-rows: none;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    /* 100% of the track's content box makes exactly one tile fill the
       frame, centred on the screen's centre line. */
    align-items: stretch;
    gap: 14px;
    overflow-x: auto;
    overflow-y: visible;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--primitive-space-5);
    scrollbar-width: none;
    margin-inline: calc(var(--primitive-space-5) * -1);
    padding: 8px var(--primitive-space-5) 16px;
  }
  .tpc-showcase--coverage::-webkit-scrollbar { display: none; }
  .tpc-showcase--coverage > * { scroll-snap-align: center; min-width: 0; }
  .tpc-showcase--coverage .tpc-showcase__slot,
  .tpc-showcase--coverage .tpc-showcase__tile {
    grid-row: auto;
    display: flex;
    flex-direction: column;
  }
  .tpc-showcase--coverage .tpc-showcase__copy { display: flex; flex-direction: column; }
}

@media (min-width: 700px) { .tpc-mcar-dots { display: none; } }

/* ─────────────────────────────────────────────────────────────────────
   FOUNDER RULING: "across the entire website all text needs to be centred
   for mobile." Marketing/content sections centre; long-form legal, blog
   post bodies and form fields stay left (none of those appear on this
   page, carve-outs kept for parity with the other page stylesheets).
   ───────────────────────────────────────────────────────────────────── */
@media (max-width: 699px) {
  .band__inner, .band__inner h1, .band__inner h2, .band__inner h3,
  .band__inner p, .band__inner li,
  .tpc-sec, .tpc-section-head, .tpc-showcase__tile, .tpc-showcase__copy {
    text-align: center;
  }
}

/* ─────────────────────────────────────────────────────────────────────
   MOBILE CARD HEIGHTS: the subgrid row alignment built for the 3-across
   desktop layout cannot work in the single-column carousel (its rows don't
   exist in the same axis once grid-auto-flow flips to column), so every
   tile falls back to its own content height and the three go uneven. The
   fix in a one-tile-per-frame carousel is simply to stretch.
   ───────────────────────────────────────────────────────────────────── */
@media (max-width: 699px) {
  .tpc-showcase--coverage { align-items: stretch; grid-auto-rows: 1fr; }
  .tpc-showcase--coverage .tpc-showcase__slot {
    grid-row: auto;
    display: flex;
    grid-template-rows: none;
    height: 100%;
  }
  .tpc-showcase--coverage .tpc-showcase__tile {
    grid-row: auto;
    display: flex;
    flex-direction: column;
    grid-template-rows: none;
    width: 100%;
    height: 100%;
  }
  .tpc-showcase--coverage .tpc-showcase__copy { display: flex; flex-direction: column; flex: 1; }
  .tpc-showcase--coverage .tpc-coverage__credential { margin-top: auto; }
}

/* ─────────────────────────────────────────────────────────────────────
   TABLET MEASURE FOR THE COVERAGE CARD COPY (700-1024px). The desktop
   353px column width would float as a too-narrow ribbon of text once the
   <=1024px rule collapses the grid to one column, so these two paragraphs
   take a wider 620px cap instead, bringing both to the mid-80s characters
   per line in line with the rest of the site's constrained body copy.
   ───────────────────────────────────────────────────────────────────── */
@media (min-width: 700px) and (max-width: 1024px) {
  .tpc-showcase--coverage .tpc-showcase__desc,
  .tpc-showcase--coverage .tpc-coverage__credential {
    max-width: 620px;
    margin-inline: auto;
  }
}
