/* SiteComms — polish layer. Loaded last. Spacing, rhythm, type steps and states only:
   no layout or copy changes. Breakpoints: phone < 700, tablet 700–1099, desktop 1100+. */

/* ============ rhythm ============ */
/* section headings sit flush on the section's padding (the old 14px eyebrow gap is gone),
   so every section break reads the same: 140 desktop, 112 tablet, 80 phone */
main>section>.h2:first-child,
main>section>.stack:first-child>div:first-child>.h2:first-child{margin-top:0 !important}
@media (min-width:1100px){
  main>section[style*="padding-top: 130px"]{padding-top:140px !important}
  /* the logo strip carries its own 34px of air below the marks */
  main>section.mq-sec+section{padding-top:112px !important}
}
@media (min-width:700px) and (max-width:1099px){
  main>section.mq-sec+section{padding-top:88px !important}
  /* hero to first content stays tighter than a section break, as on desktop */
  main>section[style*="padding-top: 72px"]{padding-top:56px !important}
}
@media (max-width:699px){
  main>section.mq-sec+section{padding-top:64px !important}
  main>section[style*="padding-top: 72px"]:not(.mq-sec){padding-top:44px !important}
}
/* services page: the half-width cards continue the list, they are not a new section */
main>section[style*="padding-top: 20px"]{padding-top:20px !important}
main>section[style*="padding-top: 20px"] .g2{gap:20px !important}

/* ============ cards ============ */
/* role cards: one measure for all three descriptions */
@media (min-width:700px){.rl-c p{max-width:none !important}}
/* services: the half-width cards use the same 20px picture inset as the full-width rows;
   text keeps its 36px inset */
@media (min-width:900px){
  .sc{padding:20px}
  .sc .sv-b{padding:36px 16px 16px}
}

/* ============ desktop 1100–1299: the three-up cards are narrow, type steps down ============ */
@media (min-width:1100px) and (max-width:1299px){
  .qt-q{font-size:23px !important;line-height:1.18 !important}
  .qt-in{padding:26px !important}
  .qw .h2{font-size:48px !important}
  .rl-t{font-size:28px !important}
}

/* ============ tablet hero: keep the desktop proportion instead of a thin strip ============ */
@media (min-width:700px) and (max-width:1099px){
  .hero-media{min-height:0 !important;aspect-ratio:8 / 5}
}

/* ============ footer: the two columns share one line pitch so rows align ============ */
footer .ft-l a,
footer .stack>div>div:last-child>span{line-height:22px}

/* ============ states ============ */
/* press feedback on every pill button (V4: .sx-btn already does this) */
.btn,.ct-go,.ct-copy,.pl,.mn-call,.pm-all-m{transition:background var(--t-base) var(--e-out),color var(--t-base) var(--e-out),transform var(--t-fast) var(--e-out)}
.btn:active,.ct-go:active,.ct-copy:active,.pl:active,.mn-call:active,.menu-btn:active{transform:scale(.97)}
.menu-btn{transition:background var(--t-fast) var(--e-out),transform var(--t-fast) var(--e-out)}
/* focus rings that show on dark surfaces */
.qw :focus-visible,.ct-f :focus-visible,.sx:focus-visible,.pm-all:focus-visible{outline-color:#ffffff}
.sx:focus-visible{outline:2px solid #000000;outline-offset:3px}
.btn:focus-visible,.call:focus-visible,.menu-btn:focus-visible,.nv:focus-visible,.sx-btn:focus-visible{outline:2px solid #000000;outline-offset:3px}
.pm-all:focus-visible{outline:2px solid #000000;outline-offset:3px}
.ft-l a:focus-visible,.mn-tel:focus-visible,.ct-tel:focus-visible,.ct-em:focus-visible,.ct-mail:focus-visible,.lead-tel:focus-visible{outline-offset:2px;border-radius:2px}
/* project rows keep the black bar for keyboard focus, plus a ring so it never reads as hover */
.pr:focus-visible::before,.nx:focus-visible::before{box-shadow:0 0 0 2px #ffffff,0 0 0 4px #000000}
.pl,.ct-go,.ct-copy,.sx-btn,.menu-btn{cursor:pointer}

/* services slider: the black panel wipes up on its own layer so the edge stays crisp */
.sx-p{will-change:clip-path}

/* ============ type ============ */
/* large headings: optical kerning and no synthetic bold anywhere */
.h1,.h2,.sv-t,.rl-t,.qt-q,.nx-n,.pr-n,.sx-t,.sx-n{font-kerning:normal;font-synthesis:none}
/* figures line up in stats and phone numbers */
.qw-n,.pp-n,.ct-tel,.mp-tel,.lead-tel,.mn-tel{font-variant-numeric:tabular-nums}
/* the open panel overshoots its box by a pixel so no photo edge shows along the top */
.sx:hover .sx-p,.sx:focus-visible .sx-p{clip-path:inset(-1px -1px -1px -1px)}

/* ======================================================================================
   INTERACTION STATES (7 Nov pass). One family: --t-fast 140 for presses and pill fills,
   --t-base 240 for colour and opacity, ease-out. Nothing here moves layout.
   Hover only exists for a mouse; touch gets press feedback instead and never keeps a
   hover after the finger lifts. Values follow Site Programs V4 / SiteProductions.
   ====================================================================================== */

/* ---- focus: one ring (2px ink, 3px out); white on the two dark surfaces ---- */
.ct-f .ct-go:focus-visible,.ct-f .pl:focus-visible,.qw a:focus-visible,.qw button:focus-visible{outline:2px solid #ffffff;outline-offset:3px}
/* form fields keep their underline language: focus doubles the line, never a box */
.fl input,.fl textarea{transition:border-color var(--t-base) var(--e-out),box-shadow var(--t-base) var(--e-out)}
.fl input:focus,.fl textarea:focus{box-shadow:0 1px 0 0 #ffffff}
.fl input[aria-invalid="true"]:focus{box-shadow:0 1px 0 0 #00A5A1}
/* the error line arrives with a fade instead of popping in */
.fl-err:not(:empty){animation:rise var(--t-base) var(--e-out)}
/* links that carry a ring get rounded corners so the ring reads as one shape */
.mark:focus-visible,.mp-tel:focus-visible,.mp-em:focus-visible,.mn-links a:focus-visible{outline-offset:3px;border-radius:4px}

/* ---- logo: V4 dims the mark on hover ---- */
.mark{transition:opacity var(--t-fast) var(--e-out)}
/* text links: one hover value across the site (V4 a:hover .72) */
.ct-tel,.ct-em,.ct-mail,.mn-tel,.lead-tel,.mp-tel,.mp-em{transition:opacity var(--t-base) var(--e-out)}

@media (hover:hover) and (pointer:fine){
  .mark:hover{opacity:.72}
  .ct-tel:hover,.ct-em:hover,.ct-mail:hover,.mn-tel:hover,.lead-tel:hover,.mp-tel:hover,.mp-em:hover{opacity:.72}
  /* the phone-layout "All projects" pill had no hover (no inline colour for the V4 rule to match) */
  .pm-all-m:hover{background:rgba(0,0,0,.8) !important}
  /* form: the underline firms up under the pointer, the focus line stays the strongest */
  .fl input:not(:focus):not([aria-invalid="true"]):hover,.fl textarea:not(:focus):hover{border-bottom-color:rgba(255,255,255,.42)}
}

/* ---- press: one scale for pills, a dip for text ---- */
.pm-all-m:active,.pm-all:active{transform:scale(.97)}
.ct-tel:active,.ct-em:active,.ct-mail:active,.mn-tel:active,.lead-tel:active,.mp-tel:active,.mp-em:active,
.ft-l a:active,.mark:active,.mn-links a:active{opacity:.55;transition-duration:0s}

/* ---- project rows ---- */
/* rows that open a case get the black bar; rows with no page get V4's quiet slab, so the
   bar only ever promises a click */
div.pr:not(.pr-h)::before{background:#f4f4f4}
div.pr:hover .pr-n,div.pr:hover .pr-r{color:#000000 !important}
div.pr:hover .pr-c{color:var(--grey) !important}
/* the hovered row sits above its neighbours, so a picture fading out of the row you just
   left never lies over the row you are on; leaving is quicker than arriving */
.pr:hover,.pr:focus-visible{z-index:2}
.pr-i{transition:opacity 140ms var(--e-out),transform 520ms var(--e-kt)}
.pr:hover .pr-i,.pr:focus-visible .pr-i{transition:opacity 260ms var(--e-kt),transform 520ms var(--e-kt)}

/* ---- services slider: the black panel wipes up crisp and quick; it leaves a touch faster ---- */
@media (hover:hover) and (pointer:fine){
  .sx-p{transition:clip-path 340ms var(--e-kt)}
  .sx:hover .sx-p,.sx:focus-visible .sx-p{transition:clip-path 420ms var(--e-kt)}
}

/* ---- touch: no hover survives a tap (iOS keeps :hover on the last thing touched) ---- */
@media (hover:none){
  .nv:not([aria-current]):hover{background:transparent}
  .btn[style*="background: #000000"]:hover,.pm-all-m:hover{background:#000000 !important}
  .btn[style*="rgba(0,0,0,0.05)"]:hover{background:rgba(0,0,0,.05) !important}
  .btn:hover .ar,.nx:hover .ar{transform:none}
  .call:hover,.mn-call:hover{background:#000000 !important}
  .menu-btn:hover,.mn-close:hover{background:#ffffff !important}
  .sx:hover img{transform:none}
  .sx-btn:hover{background:rgba(0,0,0,.05)}
  .ft-l a:hover{background-size:0 1px}
  .mn-links:hover a:not(:hover){opacity:1}
  .ct-tel:hover,.ct-em:hover,.ct-mail:hover,.mn-tel:hover,.lead-tel:hover{opacity:1}
  .pl[aria-pressed="false"]:hover{background:rgba(255,255,255,.08) !important}
  .ct-go:hover{background:#ffffff !important}
  .ct-copy:hover{background:#000000}
  /* rows: no bar left behind; a light wash under the finger is the tap feedback */
  .pr:not(.pr-h):hover::before,.nx:hover::before{opacity:0}
  .pr:hover .pr-n,.pr:hover .pr-r{color:#000000}
  .pr:hover .pr-c{color:var(--grey)}
  .nx:hover{color:#000000}
  .nx:hover .nx-k{color:#636363}
  .nx:hover .nx-n{transform:none}
  a.pr:active::before,.nx:active::before{opacity:.06 !important;transition-duration:0s}
  .sx:active{opacity:.92}
}
@media (hover:none) and (max-width:899px){
  .menu-btn:hover{background:#f4f4f4 !important}
}

/* ---- touch targets: stage pills and the copy button reach 44px without changing size ---- */
.pl,.ct-copy{position:relative}
.pl::after,.ct-copy::after{content:"";position:absolute;left:0;right:0;top:50%;height:48px;transform:translateY(-50%)}
/* no double-tap zoom wait on controls */
a,button,input,textarea,label{touch-action:manipulation}

/* ---- QA: emails stay on one line in the narrow two-up contact cards (360px) ---- */
@media (max-width:699px){
  .ct-em{font-size:clamp(11px,calc((100vw - 84px) / 22.6),13px) !important;letter-spacing:-.01em !important}
}
