/* ══════════════════════════════════════════════════════════
   SERVICES: the offer panel (assets/sections/services.css)
   One ink panel, three columns, one of them open. The open column
   takes the width, its photo comes up a stop, and its body rises out
   of a mask under the name. On wide screens the panel holds while the
   page scrolls one screen and the offers open in turn; the pointer or
   the keys can take over at any moment. Under 900px the columns stack
   and open on tap.
   The panel carries .on-dark, so every colour here is a site token
   already remapped for ink: --ink is paper, --rule is a paper hairline.
   ══════════════════════════════════════════════════════════ */

/* the runway: the stage is taller than the panel by --svc-run, the
   panel sticks in the middle of the screen while the page goes by */
.svc-stage{
  --svc-h:max(640px,min(80vh,760px));      /* 640 keeps the longest body inside on a short laptop */
  --svc-run:110vh;                          /* the scroll the panel holds for (two column changes) */
  --svc-top:max(0px,calc((100vh - var(--svc-h)) / 2));
  --svc-pad:clamp(20px,2.4vw,36px);
  height:calc(var(--svc-h) + var(--svc-run));
}
.svc-stage.is-free{height:auto}
/* without the hold the panel sizes to its content: an open body that outgrows the design
   height makes the panel taller instead of squeezing the header under it */
.svc-stage.is-free .svc-panel{position:static;height:auto;min-height:var(--svc-h)}

.svc-panel{
  display:flex;height:var(--svc-h);border-radius:var(--radius);overflow:hidden;
  background:var(--dark);color:var(--on-dark);
}
/* .on-dark sets position too; the extra selector weight keeps the hold whatever the sheet order */
.svc-stage .svc-panel{position:sticky;top:var(--svc-top)}

/* a column: the photo behind, the header (tab) filling the height with
   the label at its top and the name at its foot, the body (pane) below */
.svc-col{
  position:relative;isolation:isolate;overflow:hidden;flex:.8 1 0%;min-width:0;
  display:flex;flex-direction:column;padding:var(--svc-pad);background:var(--dark-2);
  transition:flex-grow .9s var(--e-house);
}
.svc-col + .svc-col{border-left:1px solid var(--rule)}
.svc-panel{--svc-grow-open:2.2}
.svc-seg{display:none}   /* the phone's control; see the end of this file */
.svc-col.is-active{flex-grow:var(--svc-grow-open)}
.svc-img{
  position:absolute;inset:0;z-index:0;width:100%;height:100%;object-fit:cover;
  filter:var(--grade-rest) brightness(.7);transform:scale(1);
  transition:filter .9s var(--e-house),transform 1.8s var(--e-house);
}
.svc-col.is-active .svc-img{filter:saturate(.94) contrast(1.04) brightness(.85);transform:scale(1.04)}
/* the one gradient: legibility over the photo's foot */
.svc-col::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(180deg,rgba(11,12,15,0) 35%,rgba(11,12,15,.78))}
.svc-tab,.svc-pane{position:relative;z-index:2}

.svc-tab{
  display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;gap:24px;
  flex:1 0 auto;min-height:0;width:100%;padding:0;text-align:left;color:inherit;cursor:pointer;
}
.svc-col.is-active .svc-tab{cursor:default}
.svc-label{font-size:12px;font-weight:500;letter-spacing:.08em;text-transform:uppercase;line-height:1.2;white-space:nowrap;color:var(--ink)}
/* the name is set twice, once at the closed width and once, larger, at the open
   width, and the two cross-fade in place: nothing re-wraps while the column moves */
.svc-title{display:grid;min-width:0;max-width:100%}
.svc-title > *{grid-area:1 / 1;align-self:end;min-width:0}
.svc-t-closed{width:var(--svc-closed-w,auto);transition:opacity .25s var(--e-house)}
.svc-t-open{width:var(--svc-open-w,auto);white-space:nowrap;opacity:0;transform:translateY(.12em);transition:opacity .3s var(--e-house),transform .5s var(--e-house)}
.svc-col.is-active .svc-t-closed{opacity:0}
.svc-col.is-active .svc-t-open{opacity:1;transform:none;transition:opacity .4s .18s var(--e-house),transform .7s .18s var(--e-house)}
.svc-name{display:block;font-size:clamp(20px,1.7vw,26px);font-weight:400;letter-spacing:-.03em;line-height:1.05;text-wrap:balance}
.svc-nw{white-space:nowrap}
.svc-name-big{display:block;font-size:clamp(24px,2.4vw,36px);font-weight:400;letter-spacing:-.03em;line-height:1.05}
.svc-line{display:block;margin-top:8px;font-size:15px;line-height:1.5;color:var(--ink-2)}

/* the body: a grid row that goes 0fr → 1fr, so the name rises as the
   body arrives; closed, it is also invisible, inert and out of the tree */
.svc-pane{
  display:grid;grid-template-rows:0fr;opacity:0;visibility:hidden;pointer-events:none;
  transition:grid-template-rows .9s var(--e-house),opacity .35s var(--e-house),visibility 0s .9s;
}
.svc-col.is-active .svc-pane{
  grid-template-rows:1fr;opacity:1;visibility:visible;pointer-events:auto;
  transition:grid-template-rows .9s var(--e-house),opacity .45s .34s var(--e-house),visibility 0s;
}
/* the 6/8px are room for the pill's focus ring, which the masks would otherwise cut */
.svc-pane-in{min-height:0;overflow:hidden;padding:0 6px 8px;margin:0 -6px -8px;width:var(--svc-open-w,auto);box-sizing:content-box}
.svc-m{overflow:hidden}
.svc-m:first-child{margin-top:22px}
.svc-m + .svc-m{margin-top:18px}
.svc-m-cta{margin:16px -6px -6px;padding:6px}
/* every element rises out of its own mask, a beat (40ms) apart; closing drops them together */
.svc-m > *{transform:translateY(100%);transition:transform .45s var(--e-house)}
.svc-col.is-active .svc-m > *{transform:none;transition:transform .8s var(--e-house);transition-delay:calc(.26s + var(--k,0) * 50ms)}

.svc-body{font-size:17px;line-height:1.5;max-width:44ch;color:var(--ink)}
.svc-includes{display:grid;grid-template-columns:1fr 1fr;column-gap:24px;font-size:15px;line-height:1.5;color:var(--ink-2)}
.svc-includes li{padding:9px 0;border-top:1px solid var(--rule)}
.svc-meta{display:grid;grid-template-columns:minmax(96px,auto) minmax(0,1fr);column-gap:24px;font-size:15px;line-height:1.5;color:var(--ink-2)}
.svc-meta dt,.svc-meta dd{padding:9px 0;border-top:1px solid var(--rule)}
.svc-meta dt{padding-top:11px;font-size:11px;font-weight:500;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-3)}
.svc-cta{margin:0}

/* focus: a ring inside the column; the button alone where :has() is missing */
.svc-tab:focus-visible{outline:2px solid var(--signal);outline-offset:-4px}
@supports selector(:has(a)){
  .svc-tab:focus-visible{outline:none}
  .svc-col:has(> .svc-tab:focus-visible){outline:2px solid var(--signal);outline-offset:-4px}
}

/* narrower desktops: the open column needs more of the width so the
   includes keep to one line each (two columns of them must fit) */
@media (max-width:1180px) and (min-width:901px){
  .svc-includes{font-size:14px}
}
@media (max-width:1100px) and (min-width:901px){
  .svc-panel{--svc-grow-open:2.4}
}
/* short viewports: the same body in less air */
@media (max-height:780px) and (min-width:901px){
  .svc-body{font-size:15px}
  .svc-includes,.svc-meta{font-size:14px}
  .svc-includes li,.svc-meta dd{padding:7px 0}
  .svc-meta dt{padding-top:9px}
  .svc-m:first-child{margin-top:16px}
  .svc-m + .svc-m{margin-top:14px}
  .svc-m-cta{margin-top:12px}
}

/* ── stacked: three cards, each opens on tap, no pin ───────── */
/* ── a phone: a segmented control and one card. The three offers share the
   card's cell and cross-fade; the card's height follows the open body,
   so nothing jumps and the page never scrolls on a switch ─────────── */
@media (max-width:900px){
  .svc-stage{height:auto}
  .svc-stage .svc-panel{position:static}
  .svc-seg{position:relative;display:flex;gap:4px;padding:4px;margin:0 0 12px;border-radius:999px;background:rgba(11,12,15,.06);isolation:isolate}
  .svc-seg-ind{position:absolute;left:4px;top:4px;bottom:4px;width:0;border-radius:999px;background:var(--dark);z-index:0;transition:transform .55s var(--e-house),width .55s var(--e-house)}
  .svc-seg-btn{position:relative;z-index:1;flex:1 1 auto;min-width:0;height:40px;padding:0 10px;border-radius:999px;font-size:10px;font-weight:500;letter-spacing:.06em;text-transform:uppercase;white-space:nowrap;color:var(--ink-2);transition:color .3s var(--e-out)}
  .svc-seg-btn[aria-pressed="true"]{color:var(--paper)}
  .svc-panel{display:grid;height:auto;min-height:0;border-radius:16px;background:var(--dark);overflow:hidden}
  .svc-col{
    grid-area:1 / 1;flex:none;min-height:0;padding:18px;border-radius:16px;
    opacity:0;visibility:hidden;transform:translateY(10px);pointer-events:none;
    transition:opacity .4s var(--e-house),transform .55s var(--e-house),visibility 0s .4s;
  }
  .svc-col.is-active{opacity:1;visibility:visible;transform:none;pointer-events:auto;transition:opacity .5s .1s var(--e-house),transform .7s .1s var(--e-house),visibility 0s}
  .svc-col + .svc-col{border-left:0;border-top:0}
  .svc-tab{flex:none;min-height:46vw;gap:16px;pointer-events:none}
  .svc-col::after{background:linear-gradient(180deg,rgba(11,12,15,.12) 0%,rgba(11,12,15,.5) 26%,rgba(11,12,15,.86) 52%,rgba(11,12,15,.94) 100%)}
  .svc-col.is-active .svc-img{filter:saturate(.9) contrast(1.02) brightness(.72)}
  .svc-name,.svc-name-big{font-size:clamp(22px,6vw,26px)}
  .svc-t-closed,.svc-t-open{width:auto}
  .svc-t-open{white-space:normal}
  .svc-m:first-child{margin-top:16px}
  .svc-body{font-size:15px}
  .svc-includes{grid-template-columns:1fr}
}

@media (prefers-reduced-motion:reduce){
  .svc-col,.svc-img,.svc-t-closed,.svc-t-open,.svc-m > *{transition:none}
  .svc-pane,.svc-col.is-active .svc-pane{transition:opacity .3s var(--e-house)}
}
