/* =============================================================================
   Blackrock Drill & Blast · css/sections/services.css
   B · photo tiles (two services side by side + the dark "Discuss a Project" tile under them, clip wipe;
   .srv-b__grid--two). Each tile's photo is a section toggle (photo-prod / photo-dev): one .srv-b__media + one
   .ph-tag per candidate, inside a display: contents wrapper. (A · numbered rows archived 2026-10-15.)
   C · bubble cards with a huge header (rounded on purpose: the Castonguay reference)
   Contextual tokens only. Nothing is hidden without JS: hover states are gated on the class
   js/sections/services.js adds (.srv-b--enh). Hover-only bits hide by clip/translate or on
   pseudo-elements, never by opacity 0 on an element (keeps --reveal screenshots honest).
   ============================================================================= */

/* ============================== shared: the sectors line in the head ============================== */
.srv-sectors { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; font-size: 13px; letter-spacing: .12em; color: var(--fg); }
.srv-sectors__k { color: var(--accent); }
.srv-sectors__k::after { content: ""; display: inline-block; width: 24px; height: 1px; margin-left: 14px; vertical-align: middle; background: var(--accent); }
@media (min-width: 901px) { .sec-head--split .srv-sectors { justify-self: end; padding-bottom: .5em; } }

/* ============================== B · photo tiles ============================== */
.srv-b__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.1vw, 16px); }
.srv-b__cell { min-width: 0; }
.srv-b__cell--cta { grid-column: span 2; }
.srv-b__tile { position: relative; display: block; aspect-ratio: 4 / 3.3; overflow: clip; color: var(--bone); background: var(--bg-2); outline: none; }
.srv-b__wipe { position: absolute; inset: 0; }
.srv-b__media { position: absolute; inset: 0; overflow: clip; }
.srv-b__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.srv-b__scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15, 17, 19, .9) 0%, rgba(15, 17, 19, .62) 32%, rgba(15, 17, 19, .06) 64%, rgba(15, 17, 19, .28) 100%); }
.srv-b__scrim::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(15, 17, 19, .55), rgba(15, 17, 19, .2)); opacity: 0; transition: opacity .45s ease; }
.srv-b__idx { position: absolute; left: clamp(14px, 1.4vw, 22px); top: clamp(14px, 1.4vw, 20px); padding: 6px 8px 5px; font-size: 11px; line-height: 1; color: var(--bone); background: rgba(15, 17, 19, .62); }
.srv-b__brackets { position: absolute; inset: 12px; pointer-events: none; }
.srv-b__brackets::after { --b: var(--amber); --l: 16px; opacity: 0; transform: scale(1.035); transition: opacity .35s ease, transform .55s cubic-bezier(.2, .7, .2, 1); }
.srv-b__text { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(18px, 1.8vw, 28px); transition: transform .55s cubic-bezier(.2, .7, .2, 1); }
.srv-b__title { max-width: 15ch; font-size: clamp(26px, 2.25vw, 36px); line-height: .94; color: var(--bone); }
.srv-b__desc { max-width: 40ch; margin-top: 12px; font-size: 15px; line-height: 1.45; color: var(--stone); transition: opacity .45s ease; }
.srv-b__tile:is(:hover, :focus-visible) .srv-b__media img { transform: scale(1.05); }
.srv-b__tile:is(:hover, :focus-visible) .srv-b__scrim::after { opacity: 1; }
.srv-b__tile:is(:hover, :focus-visible) .srv-b__brackets::after { opacity: 1; transform: none; }
.srv-b__tile:focus-visible .srv-b__brackets { outline: 2px solid var(--amber); outline-offset: 0; }
/* with JS on hover devices, the scope sits below the frame edge until hover / focus */
@media (hover: hover) and (pointer: fine) and (min-width: 601px) {
  .srv-b--enh .srv-b__text { transform: translateY(var(--srv-b-shift, 0px)); }
  .srv-b--enh .srv-b__desc { opacity: .2; clip-path: inset(0 0 100% 0); transition: opacity .45s ease, clip-path .55s cubic-bezier(.2, .7, .2, 1); }
  .srv-b--enh .srv-b__tile:is(:hover, :focus-visible) .srv-b__text { transform: none; }
  .srv-b--enh .srv-b__tile:is(:hover, :focus-visible) .srv-b__desc { opacity: 1; clip-path: inset(0 0 0 0); }
}

/* two services: two large tiles side by side, the CTA tile full width under them */
.srv-b__grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.srv-b__grid--two .srv-b__cell--cta { grid-column: 1 / -1; }
.srv-b__grid--two .srv-b__tile { aspect-ratio: 4 / 3; }
.srv-b__grid--two .srv-b__title { max-width: 18ch; font-size: clamp(28px, 2.6vw, 42px); }
.srv-b__grid--two .srv-b__desc { max-width: 52ch; font-size: 16px; }
.srv-b__tile .ph-tag { top: clamp(14px, 1.4vw, 20px); bottom: auto; left: auto; right: clamp(14px, 1.4vw, 22px); max-width: calc(100% - 96px); }

/* the wide "all services" tile: dark panel + a bench pattern firing from the centre hole */
.srv-b__cta { --fg: var(--bone); --fg-2: var(--stone); --fg-3: var(--muted); --rule: var(--line); --accent: var(--amber);
  position: relative; height: 100%; min-height: 100%; overflow: clip; color: var(--fg); background: var(--ink-1); }
.srv-b__cta .srv-b__wipe { position: relative; inset: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); align-items: end; gap: 32px; height: 100%; padding: clamp(22px, 2.4vw, 40px); }
.srv-b__cta-label { font-size: 12px; letter-spacing: .14em; color: var(--accent); }
.srv-b__cta-title { margin-top: 16px; font-size: clamp(36px, 3.7vw, 62px); line-height: .9; }
.srv-b__cta-line { max-width: 52ch; margin-top: 16px; font-size: 16px; color: var(--fg-2); }
.srv-b__cta-line a { color: var(--fg); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent); text-underline-offset: 3px; }
.srv-b__cta-line a:hover { color: var(--accent); }
.srv-b__sep { margin: 0 .5em; color: var(--fg-3); }
.srv-b__cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 26px; }
.srv-b__pattern { justify-self: end; align-self: center; width: 100%; max-width: 340px; overflow: visible; }
.srv-b__holes circle { fill: none; stroke: color-mix(in srgb, var(--bone) 34%, transparent); stroke-width: 1.2; }
.srv-b__fire circle { fill: var(--amber); }
.srv-b__fire circle[fill="none"] { fill: none; stroke: var(--amber); stroke-width: 1; opacity: .55; }
.srv-b__delays text { font: 500 9.5px var(--mono); letter-spacing: .06em; fill: var(--muted); text-anchor: middle; }

@media (max-width: 900px) {
  .srv-b__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .srv-b__cell--cta { grid-column: auto; }
  .srv-b__grid--two { grid-template-columns: minmax(0, 1fr); }
  .srv-b__grid--two .srv-b__tile { aspect-ratio: 16 / 10; }
  .srv-b__cta .srv-b__wipe { grid-template-columns: minmax(0, 1fr); }
  .srv-b__pattern { display: none; }
}
@media (max-width: 600px) {
  .srv-b__grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .srv-b__tile { aspect-ratio: 4 / 3.75; }
  /* the copy always shows on touch screens, so the lower half carries a near-solid scrim (the spillway plate is bright;
     mobile pass 2026-10-19) and the photo keeps the upper third clear */
  .srv-b__scrim { background: linear-gradient(to top, rgba(15, 17, 19, .97) 0%, rgba(15, 17, 19, .9) 34%, rgba(15, 17, 19, .55) 56%, rgba(15, 17, 19, .1) 78%, rgba(15, 17, 19, .25) 100%); }
  .srv-b__title { font-size: 30px; }
  .srv-b__desc { color: var(--bone-2); }
  .srv-b__grid--two .srv-b__tile { aspect-ratio: 4 / 4.9; }
  .srv-b__grid--two .srv-b__title { font-size: 30px; }
  .srv-b__grid--two .srv-b__desc { font-size: 15px; }
  .srv-b__tile .ph-tag { font-size: 9px; letter-spacing: .06em; padding: 4px 6px; max-width: calc(100% - 76px); }
  .srv-b__cta-line > span { display: block; }
  .srv-b__cta-line .srv-b__sep { display: none; }
  .srv-b__cta .srv-b__wipe { padding: 26px 22px 28px; }
}

/* ============================== C · bubble cards ============================== */
.services--c { --srv-c-stagger: clamp(0px, 7vw, 112px); --srv-c-ease: cubic-bezier(.2, .7, .2, 1); }
.srv-c__head { margin-bottom: clamp(40px, 6vw, 96px); }
.services--c .srv-c__h2 { max-width: 14ch; font-size: clamp(48px, 7vw, 120px); line-height: .88; }
.srv-c__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 1.3vw, 20px); padding-bottom: var(--srv-c-stagger); }
.srv-c__slot { min-width: 0; }
.srv-c__slot--wide { grid-column: 1 / -1; }
.srv-c__slot:nth-child(2n + 3) { transform: translateY(var(--srv-c-stagger)); }
.srv-c__card { --fg: var(--ink-text); --fg-2: var(--ink-muted); --fg-3: var(--ink-muted); --rule: var(--line-bone); --accent: var(--amber-deep);
  position: relative; isolation: isolate; display: flex; flex-direction: column; height: 100%; min-height: clamp(400px, 34vw, 540px);
  padding: clamp(26px, 3vw, 48px); border-radius: 28px; color: var(--fg); background: var(--bone-2); }
.srv-c__card::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--bone); opacity: 0; transition: opacity .45s ease; }
.srv-c__top { display: flex; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--rule); font-size: 12px; color: var(--fg-2); }
.srv-c__idx { color: var(--fg); }
.srv-c__main { margin: clamp(32px, 4.4vw, 72px) 0 40px; }
.srv-c__title { font-size: clamp(34px, 4vw, 64px); line-height: .9; }
.srv-c__desc { max-width: 40ch; margin-top: 20px; font-size: clamp(16px, 1.25vw, 18px); color: var(--fg-2); }
.srv-c__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-top: auto; padding-top: 22px; border-top: 1px solid var(--rule); }
.srv-c__link { position: static; } /* [data-placeholder] sets relative; the ::before must cover the card */
.srv-c__link::before { content: ""; position: absolute; inset: 0; border-radius: 28px; }
.srv-c__link:focus-visible { outline-offset: 6px; }
.srv-c__icon { flex: none; width: 56px; height: 56px; margin: -4px -4px 0 0; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .7s var(--srv-c-ease); }
.srv-c__icon * { vector-effect: non-scaling-stroke; }
.srv-c__card:is(:hover, :has(:focus-visible))::before { opacity: 1; }
.srv-c__card:is(:hover, :has(:focus-visible)) .srv-c__icon { transform: translateY(-6px); }
.srv-c__card:hover .link::after { transform: translateX(4px); }

@media (min-width: 901px) {
  .srv-c__slot--wide .srv-c__card { min-height: clamp(360px, 28vw, 440px); }
  .srv-c__slot--wide .srv-c__main { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: end; }
  .srv-c__slot--wide .srv-c__desc { margin: 0; font-size: clamp(18px, 1.4vw, 21px); line-height: 1.45; }
}
@media (max-width: 750px) {
  .services--c { --srv-c-stagger: 0px; }
  .srv-c__grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .srv-c__card { min-height: 0; padding: 24px 22px 22px; border-radius: 22px; }
  .srv-c__link::before { border-radius: 22px; }
  .srv-c__main { margin: 40px 0 36px; }
  .srv-c__icon { width: 48px; height: 48px; }
}
