/* ══ Immersive body (Nov 2026 prototype) ═════════════════════════════════════════════════════════
   Billy: "Can we make the rest of that page also immersive in its own way". Loaded only by a page with
   `immersiveBody: true` (scripts/build-service-pages.js), and every rule sits under main.hx-immb, so
   no other page can change. Same words, same order: the layout carries the hero's dark down the page in
   bands, with real work and the real portal in between. Pictures here are lazy; motion follows the site's
   reveal system (js/hx.js [data-rv]) and stops under reduced motion. */

.hx-immb { --imm-ink: #120d1f; }

/* 1. Under the hero: the hero's dark carries on into a slow band of the sites we've built. */
.hx-immb .hx-band-work { position: relative; overflow: hidden; background: var(--imm-ink); padding: clamp(26px, 4vw, 54px) 0 clamp(70px, 9vw, 120px); }
.hx-immb .hx-band-work::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: clamp(40px, 6vw, 70px); pointer-events: none;
  background: linear-gradient(rgba(18, 13, 31, 0), var(--bg, var(--surface, #ffffff))); }
.hx-work-track { display: flex; width: max-content; animation: immWork 80s linear infinite; }
.hx-band-work:hover .hx-work-track { animation-play-state: paused; }
@keyframes immWork { to { transform: translateX(-50%); } }
/* Padding from the item's own width: a percentage would be of the whole moving track. */
.hx-work-item { --w: clamp(270px, 34vw, 540px); position: relative; flex: none; width: var(--w); margin-right: clamp(22px, 3vw, 44px); padding: 0 calc(var(--w) * .08) calc(var(--w) * .07) 0; box-sizing: border-box; }
.hx-work-dev { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: clamp(10px, 1vw, 14px); background: #fff;
  box-shadow: 0 40px 80px -36px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .08); }
.hx-work-dev img, .hx-work-ph img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.hx-work-ph { position: absolute; right: 0; bottom: 0; width: 24%; aspect-ratio: 390 / 844; overflow: hidden; border: clamp(4px, .5vw, 6px) solid #0d0f1a;
  border-radius: clamp(14px, 1.6vw, 22px); background: #0d0f1a; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .8); }

/* 2. The statement, bigger: it reads as the page's second headline. */
.hx-immb .hx-st-big { padding-top: clamp(40px, 6vw, 90px); }
.hx-immb .hx-st-big .hx-big { font-size: clamp(1.85rem, 4.6vw, 4rem); line-height: 1.1; letter-spacing: -.038em; max-width: 22ch; font-weight: 500; }
/* A long statement (the city pages run 250 to 400 characters) a size down, so it reads as a statement and
   not as a wall of display type (Billy, Nov 15, on Miami: about eleven lines on a phone). */
.hx-immb .hx-st-long .hx-big { font-size: clamp(1.45rem, 3.2vw, 2.6rem); line-height: 1.2; letter-spacing: -.03em; max-width: 30ch; }
@media (max-width: 700px) {
  .hx-immb .hx-st-big .hx-big { font-size: 24px; line-height: 1.22; letter-spacing: -.026em; max-width: none; }
  .hx-immb .hx-st-long .hx-big { font-size: 21px; line-height: 1.3; letter-spacing: -.02em; }
}

/* 3. Three ways in, as three pictures. Each keeps its words, its link and its feature card. */
.hx-immb .hx-cards { list-style: none; max-width: 1240px; margin: clamp(26px, 4vw, 46px) auto 0; padding: 0 var(--hx-gut);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 22px); }
.hx-immb .hx-card { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: clamp(380px, 38vw, 500px); border-radius: clamp(18px, 2vw, 26px); background: var(--imm-ink); color: #fff; text-decoration: none; }
.hx-immb .hx-card:hover { color: #fff; text-decoration: none; }
.hx-card-img { position: absolute; inset: 0; z-index: -2; }
.hx-card-img img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transition: transform 1.4s var(--hx-ease); }
.hx-immb .hx-card:hover .hx-card-img img { transform: scale(1.05); }
.hx-immb .hx-card::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(14, 10, 28, .02) 0%, rgba(14, 10, 28, .3) 38%, rgba(14, 10, 28, .9) 72%, rgba(14, 10, 28, .96) 100%); }
.hx-card-txt { display: grid; gap: 8px; padding: clamp(20px, 2.4vw, 30px); }
.hx-immb .hx-card .hx-row-t { font-size: clamp(1.4rem, 2.1vw, 1.8rem); font-weight: 600; letter-spacing: -.032em; line-height: 1.15; color: #fff; transform: none; }
.hx-immb .hx-card .hx-row-d { color: rgba(255, 255, 255, .88); font-size: 1rem; line-height: 1.5; }
.hx-immb .hx-card .hx-arrow { position: absolute; top: 16px; right: 16px; margin: 0; background: rgba(255, 255, 255, .94); border-color: transparent; color: #3d2766;
  transition: transform .45s var(--hx-ease); }
.hx-immb .hx-card:hover .hx-arrow { transform: rotate(90deg); }

/* 4. The strongest list on a dark band, the page's own picture faint behind it. */
.hx-immb .hx-band-dark { position: relative; isolation: isolate; overflow: hidden; margin-top: clamp(50px, 7vw, 100px);
  padding: clamp(70px, 9vw, 130px) 0; background: var(--imm-ink); color: #fff; }
.hx-immb .hx-band-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hx-immb .hx-band-dark .hx-band-bg { opacity: .2; }
.hx-immb .hx-band-dark::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(70% 60% at 85% 10%, rgba(120, 81, 169, .45), transparent 70%), linear-gradient(180deg, rgba(18, 13, 31, .4), rgba(18, 13, 31, .85)); }
.hx-immb .hx-band-dark .hx-h { color: #fff; font-size: clamp(2.3rem, 5.4vw, 4.6rem); }
.hx-immb .hx-band-dark .hx-sub { color: rgba(255, 255, 255, .74); }
.hx-immb .hx-band-dark .hx-rows { border-top-color: rgba(255, 255, 255, .16); }
.hx-immb .hx-band-dark .hx-rows li { border-bottom-color: rgba(255, 255, 255, .16); }
.hx-immb .hx-band-dark .hx-rows a, .hx-immb .hx-band-dark .hx-step, .hx-immb .hx-band-dark .hx-rows a:hover { color: #fff; }
.hx-immb .hx-band-dark .hx-rows a::before { background: rgba(255, 255, 255, .07); }
.hx-immb .hx-band-dark .hx-row-d { color: rgba(255, 255, 255, .74); }
.hx-immb .hx-band-dark .hx-arrow { border-color: rgba(255, 255, 255, .3); color: #fff; }
.hx-immb .hx-band-dark .hx-rows a:hover .hx-arrow { background: #fff; border-color: #fff; color: #3d2766; }

/* Bands that follow another coloured section touch it: their top margin is only for a white section above
   (Billy, Nov 15, on Miami: "dont like this gap ... dont leave this white gap"). */
.hx-immb :is(.hx-imm, .hx-imm-after, .hx-band-work, .hx-band-dark, .hx-band-photo, .hx-plans-sec, .hx-vs) + :is(.hx-band-dark, .hx-band-photo) { margin-top: 0; }

/* 5. Before the steps: the portal itself, five real screens, drifting as you scroll past. */
.hx-immb .hx-band-portal { overflow: hidden; padding: clamp(60px, 8vw, 110px) 0 clamp(6px, 1vw, 16px); }
.hx-portal-row { display: flex; justify-content: center; align-items: flex-start; gap: clamp(12px, 2vw, 28px); padding: 0 var(--hx-gut); }
.hx-pph { flex: none; width: clamp(128px, 15vw, 214px); aspect-ratio: 390 / 844; overflow: hidden; border: clamp(5px, .5vw, 7px) solid #0d0f1a;
  border-radius: clamp(20px, 2.2vw, 30px); background: #0d0f1a; box-shadow: 0 44px 70px -36px rgba(40, 20, 80, .6); }
.hx-pph:nth-child(even) { margin-top: clamp(28px, 4vw, 56px); }
.hx-pph img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hx-portal-row { animation: immRowDrift linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
    /* Its own name: a keyframes rule called immDrift here replaced the hero's immDrift in hx.css (same name, loaded later), so hero pictures slid 7% sideways unzoomed and showed a bare strip at the edge (Billy, Nov 15: "Why is this cut off???"). */
    @keyframes immRowDrift { from { transform: translateX(7%); } to { transform: translateX(-7%); } }
  }
}
/* The steps, set big and quiet under the phones. */
.hx-immb .hx-steps .hx-num { width: 54px; height: 54px; font-size: 1.15rem; }

/* 6. Pricing on a soft wash, so the page breathes between the two dark bands. */
.hx-immb .hx-plans-sec { background: radial-gradient(90% 70% at 50% 0%, rgba(120, 81, 169, .1), transparent 70%), var(--off-white, #f7f6f1); }

/* 7a. Areas that are pages: each one a picture. */
.hx-immb .hx-tiles { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 16px); }
.hx-immb .hx-tile-a { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end; aspect-ratio: 4 / 3;
  border-radius: clamp(14px, 1.6vw, 20px); background: var(--imm-ink); color: #fff; text-decoration: none; }
.hx-immb .hx-tile-a:hover { color: #fff; text-decoration: none; }
.hx-immb .hx-tile-a img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--hx-ease); }
.hx-immb .hx-tile-a:hover img { transform: scale(1.06); }
.hx-immb .hx-tile-a::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 40%, rgba(14, 10, 28, .86) 100%); }
.hx-immb .hx-tile-a span { padding: clamp(12px, 1.6vw, 18px) clamp(14px, 1.8vw, 20px); font-size: clamp(1.02rem, 1.7vw, 1.4rem); font-weight: 600; letter-spacing: -.025em; line-height: 1.2; }

/* 7b. Areas that are names: on the page's own picture, as a band. */
.hx-immb .hx-band-photo { position: relative; isolation: isolate; overflow: hidden; margin-top: clamp(40px, 6vw, 90px);
  padding: clamp(80px, 10vw, 150px) 0; background: var(--imm-ink); color: #fff; }
.hx-immb .hx-band-photo::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(14, 10, 28, .86) 0%, rgba(14, 10, 28, .66) 55%, rgba(14, 10, 28, .42) 100%); }
.hx-immb .hx-band-photo .hx-h { color: #fff; }
.hx-immb .hx-band-photo .hx-sub { color: rgba(255, 255, 255, .84); }
.hx-immb .hx-band-photo .hx-tags li:not(:last-child)::after { color: rgba(255, 255, 255, .4); }
.hx-immb .hx-band-photo .hx-tags li > span, .hx-immb .hx-band-photo .hx-tags li > a { color: #fff; }
.hx-immb .hx-band-photo .hx-tags li > a { text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .5); text-underline-offset: .14em; text-decoration-thickness: .05em; }
.hx-immb .hx-band-photo .hx-tags li > a:hover { text-decoration-color: #fff; }


@media (max-width: 860px) {
  .hx-immb .hx-cards { grid-template-columns: minmax(0, 1fr); }
  .hx-immb .hx-card { min-height: 330px; }
}
@media (max-width: 700px) {
  .hx-immb .hx-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-immb .hx-band-dark .hx-h { font-size: clamp(2.1rem, 9vw, 2.8rem); }
}
@media (prefers-reduced-motion: reduce) {
  .hx-work-track { animation: none; }
  .hx-immb .hx-band-work { overflow-x: auto; }
  .hx-card-img img, .hx-immb .hx-tile-a img { transition: none; }
}
