/* ===================================================================
   "Space" design layer — loaded after style.css by every page
   (<body class="space">, plus "subpage" on service and case-study
   pages).

   Pure black, white type in light-weight DM Sans with trailing words
   fading to grey, dark glass panels with hairline borders, thin rails
   down the page edges, and a soft blue accent used sparingly.
   =================================================================== */

body.space {
  --bg: #000000;
  --bg-2: #07080c;
  --text: #ffffff;
  --dim: rgba(255, 255, 255, 0.56);
  --dim-2: rgba(255, 255, 255, 0.38);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --accent-s: #7ab1fe;
  --glass: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
  --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 30px 80px rgba(0, 0, 0, 0.55);
  --radius: 24px;
  --ease-s: cubic-bezier(0.2, 0.8, 0.2, 1);
  --rail-w: 1320px;

  --font-display: "DM Sans", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --fg: var(--text);
  --fg-muted: var(--dim);

  background: var(--bg);
  color: var(--text);
}

.space ::selection {
  background: var(--accent-s);
  color: #000000;
}

/* Rails: two hairlines running the full page at the container edges. */
body.space::after {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 0;
  width: min(calc(100% - 1.5rem), var(--rail-w));
  transform: translateX(-50%);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

@media (max-width: 1399.98px) {
  body.space { --rail-w: 1140px; }
}

@media (max-width: 1199.98px) {
  body.space { --rail-w: 960px; }
}

@media (max-width: 991.98px) {
  body.space::after { display: none; }
}

/* ---------- Type ---------- */
.space h1,
.space h2,
.space h3,
.space h4,
.space h5,
.space .hero-heading,
.space .page-hero-title,
.space .service-title,
.space .case-title {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 1.06;
  color: var(--text);
  text-shadow: none;
}

.space h3,
.space .service-title,
.space .case-title {
  font-weight: 400;
  letter-spacing: -0.02em;
}

/* Trailing words of a headline fade to grey (set by motion.js). */
.space .word.is-dim {
  color: var(--dim);
}

/* Words blur into focus instead of sliding up, so the mask can breathe. */
.space .word-mask {
  overflow: visible;
}

/* Eyebrows become small glass pills with a glowing dot. */
.space .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.38rem 0.85rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--dim);
}

.space .eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.55);
}

.space .eyebrow-light {
  color: var(--dim);
}

.space .case-tag,
.space .trust-label,
.space .industries-label,
.space .mega-col-title {
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dim-2);
}

.space .learn-more,
.space .work-ext,
.space .inline-link {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.space .learn-more:hover,
.space .work-ext:hover,
.space .inline-link:hover {
  color: var(--accent-s);
  border-color: var(--accent-s);
  transform: none;
}

.space .work-ext.is-muted {
  color: var(--dim-2);
  border-bottom: 0;
}

/* ---------- Sections ---------- */
.space .section-padding {
  padding: clamp(6rem, 12vw, 10rem) 0;
}

.space .bg-panel-a,
.space .bg-panel-b,
.space .bg-glow-cyan,
.space .bg-glow-purple,
.space .section-ink {
  background: transparent;
  background-image: none;
  border: 0;
  color: var(--text);
}

.space main,
.space main > section {
  position: relative;
}

.space .section-head h2,
.space .section-ink .section-head h2 {
  color: var(--text);
}

.space .section-head p,
.space .section-ink .section-head p {
  color: var(--dim);
}

/* Title left, intro right, a hairline underneath. */
.space .section-head-split {
  display: grid;
  gap: 1.25rem;
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  text-align: left;
}

@media (min-width: 992px) {
  .space .section-head-split {
    grid-template-columns: 7fr 4fr;
    align-items: end;
    column-gap: 4rem;
  }
}

.space .section-head-split .eyebrow {
  margin-bottom: 1.5rem;
}

.space .section-head-split h2 {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
}

.space .section-head-split p {
  max-width: 36ch;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ---------- Glass panels (shared look) ---------- */
.space .glass-card,
.space .result-card,
.space .service-panel,
.space .work-card,
.space .blog-card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  color: var(--text);
}

.space .glass-card p,
.space .result-card p,
.space .work-body p,
.space .blog-card p {
  color: var(--dim);
}

.space .glass-card:hover,
.space .result-card:hover,
.space .work-card:hover {
  border-color: var(--line-2);
  background: var(--glass);
  box-shadow: var(--glass-shadow);
}

/* Panels that tilt in with scroll (motion.js) must not fight a CSS
   transform transition. */
.space .tilt-in {
  transition: border-color 0.3s ease !important;
  transform-origin: 50% 100%;
  will-change: transform;
}

/* No glow spotlight; the look stays flat and cool. */
.space .has-spotlight::before {
  display: none;
}

/* ---------- Buttons ---------- */
.space .btn-accent,
.space .hero-section .btn-accent,
.space .page-hero .btn-accent {
  background: #ffffff;
  color: #000000;
  border: 1px solid #ffffff;
  border-radius: 999px;
  padding: 0.9rem 1.8rem;
  font-weight: 500;
  font-size: 0.95rem;
  box-shadow: 0 0 0 rgba(255, 255, 255, 0);
}

.space .btn-accent:hover,
.space .btn-accent:focus-visible,
.space .btn-accent:active,
.space .hero-section .btn-accent:hover,
.space .hero-section .btn-accent:focus-visible,
.space .page-hero .btn-accent:hover,
.space .page-hero .btn-accent:focus-visible {
  background: #e9efff !important;
  border-color: #e9efff;
  color: #000000 !important;
  box-shadow: 0 0 36px rgba(160, 190, 255, 0.35);
}

.space .btn-outline-light-glass,
.space .btn-outline-glass,
.space .page-hero .btn-outline-glass {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--text);
  padding: 0.9rem 1.8rem;
  font-weight: 500;
  box-shadow: none;
  backdrop-filter: blur(8px);
}

.space .btn-outline-light-glass:hover,
.space .btn-outline-glass:hover,
.space .page-hero .btn-outline-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text);
}

/* ---------- Header ---------- */
.space .glass-nav {
  background: rgba(0, 0, 0, 0.55);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(140%);
}

/* The logo artwork is navy; render it white on black. */
.space .glass-nav .logo-img {
  filter: brightness(0) invert(1);
}

.space .navbar-toggler {
  border-color: var(--line-2);
  filter: invert(1);
}

.space .nav-link {
  color: rgba(255, 255, 255, 0.72) !important;
  font-weight: 500;
  font-size: 0.92rem;
}

.space .nav-link:hover,
.space .nav-link.active-link {
  color: #ffffff !important;
}

.space .nav-cta .btn-accent {
  padding: 0.55rem 1.25rem;
  font-size: 0.88rem;
}

.space .glass-dropdown {
  background: rgba(12, 13, 18, 0.96);
  border: 1px solid var(--line-2);
  border-radius: 18px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px);
}

.space .glass-dropdown .dropdown-item {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
  border-radius: 10px;
}

.space .glass-dropdown .dropdown-item:hover,
.space .glass-dropdown .dropdown-item:focus,
.space .glass-dropdown .dropdown-item.active-link {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.space .mega-item-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #ffffff;
}

@media (max-width: 991.98px) {
  .space .navbar-collapse {
    background: rgba(10, 11, 15, 0.98);
    border: 1px solid var(--line-2);
    border-radius: 18px;
  }

  .space .glass-dropdown {
    background: transparent;
    border: 0;
    box-shadow: none;
  }
}

/* ---------- Homepage hero ---------- */
.space .hero-section {
  background: var(--bg);
  color: var(--text);
  padding: clamp(5rem, 14vh, 9rem) 0 clamp(5rem, 12vh, 8rem);
}

.space .hero-bg,
.space .page-hero-bg,
.space .hero-section.has-webgl::after {
  display: none;
}

/* Fade the scene out at the hero's bottom edge so the planet doesn't
   end in a hard line where the next section starts. */
.space .hero-canvas {
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
}

.space .hero-section .eyebrow {
  margin-bottom: 2rem;
}

.space .hero-heading {
  max-width: 15ch;
  margin: 0 auto 1.75rem;
  font-size: clamp(3rem, 7.5vw, 6.4rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

/* "Scale faster." stays on its own line, fading to grey. */
.space .hero-heading .accent-text .word {
  background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0.45));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.space .hero-heading .accent-text {
  color: var(--dim);
}

.space .hero-sub {
  max-width: 46ch;
  color: var(--dim);
  font-size: clamp(1.02rem, 1.3vw, 1.15rem);
}

.space .trust-strip {
  margin-top: clamp(4rem, 9vh, 6rem);
}

.space .trust-label {
  margin-bottom: 1.1rem;
}

.space .trust-logos img {
  height: 46px;
  padding: 5px 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: none;
  filter: grayscale(1);
  opacity: 0.55;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.space .trust-logos img:hover {
  filter: none;
  opacity: 1;
}

.space .hero-scroll-cue {
  border-color: rgba(255, 255, 255, 0.35);
}

/* ---------- Fixed backdrop (homepage): stars + planet ---------- */
.space-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  isolation: isolate;
  pointer-events: none;
}

.space .space-backdrop .hero-canvas {
  z-index: 0;
  -webkit-mask-image: none;
  mask-image: none;
}

/* Content scrolls over the backdrop. */
.space main,
.space .site-footer {
  position: relative;
  z-index: 1;
}

.space .hero-section {
  background: transparent;
}

/* ---------- Journey (homepage): one sticky stage, scenes by scroll ---------- */
.space .journey.is-animated {
  height: 460vh;
}

@media (max-width: 767.98px) {
  .space .journey.is-animated {
    height: 330vh;
  }
}

.space .journey.is-animated .journey-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

/* Every scene fills the stage and sits centred; motion.js crossfades them. */
.space .journey.is-animated .journey-radar,
.space .journey.is-animated .journey-statement,
.space .journey.is-animated .journey-prompt,
.space .journey.is-animated .funnel-canvas {
  position: absolute;
  inset: 0;
}

.space .journey.is-animated .journey-statement,
.space .journey.is-animated .journey-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  text-align: center;
}

.space .journey.is-animated .journey-prompt {
  /* Sits a little above centre, so the well's throat shows beneath it. */
  justify-content: flex-start;
  padding-top: 24vh;
}

/* Without the animation (no GSAP, or reduced motion) the scenes simply
   stack as ordinary blocks. */
.space .journey:not(.is-animated) .journey-statement,
.space .journey:not(.is-animated) .journey-prompt {
  position: relative;
  padding: clamp(5rem, 10vw, 8rem) 0;
  text-align: center;
}

.space .journey:not(.is-animated) .journey-radar,
.space .journey:not(.is-animated) .funnel-canvas {
  display: none;
}

.space .journey-radar {
  overflow: hidden;
  pointer-events: none;
}

.space .radar-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 170vmax;
  height: 170vmax;
  /* `translate`, not `transform`: GSAP owns transform for the scale. */
  translate: -50% -50%;
  pointer-events: none;
  /* Concentric rings, a crosshair and two dashed diagonals. */
  background:
    repeating-radial-gradient(circle at center, transparent 0 calc(11vmax - 1px), rgba(255, 255, 255, 0.09) calc(11vmax - 1px) 11vmax),
    linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(255, 255, 255, 0.1) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(0deg, transparent calc(50% - 0.5px), rgba(255, 255, 255, 0.08) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px));
  -webkit-mask-image: radial-gradient(circle at center, #000 0 28%, transparent 62%);
  mask-image: radial-gradient(circle at center, #000 0 28%, transparent 62%);
}

.space .radar-bg::before,
.space .radar-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.09) 0 6px, transparent 6px 14px) center / 100% 1px no-repeat;
  transform: rotate(45deg);
}

.space .radar-bg::after {
  transform: rotate(-45deg);
}

.space .radar-line {
  position: relative;
  max-width: 20ch;
  margin: 0 auto;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.2rem, 5.4vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--text);
}

/* The full stop the guide dot lands on. */
.space .radar-dot {
  display: inline-block;
  width: 0.2em;
  height: 0.2em;
  margin-left: 0.12em;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  vertical-align: 0.05em;
}

/* ---------- Stats: one glass strip ---------- */
.space .stats-bar-wrap {
  margin-top: 0;
  margin-bottom: 0;
}

.space .stats-bar,
.space .stats-bar:hover {
  padding: 2.25rem 1rem;
  border-radius: var(--radius);
  backdrop-filter: none;
}

.space .stat-icon-wrap {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: #ffffff;
}

.space .stat-number {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  letter-spacing: -0.04em;
  color: var(--text);
}

.space .stat-label {
  color: var(--dim);
}

@media (min-width: 992px) {
  .space .stats-bar .row > div + div {
    border-left: 1px solid var(--line);
  }
}

.space .stats-bar-wrap + .section-ink {
  padding-top: clamp(5rem, 10vw, 8rem);
}

/* ---------- Word marquee ---------- */
.space .marquee {
  overflow: hidden;
  margin-bottom: clamp(4rem, 8vw, 6rem);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.space .marquee-track {
  display: flex;
  width: max-content;
  animation: space-marquee 60s linear infinite;
}

.space .marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding-right: 0.5em;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.8rem, 7vw, 6rem);
  letter-spacing: -0.04em;
  line-height: 1.15;
  white-space: nowrap;
  color: var(--text);
}

.space .marquee-track span:nth-child(even) {
  color: var(--dim-2);
}

.space .marquee-track span::after {
  content: "";
  width: 0.14em;
  height: 0.14em;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 12px 3px rgba(255, 255, 255, 0.5);
}

@keyframes space-marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Results ---------- */
.space #results {
  counter-reset: result;
}

.space .result-card {
  counter-increment: result;
  padding: clamp(1.75rem, 3vw, 2.5rem);
}

.space .result-head::after {
  content: "0" counter(result);
  margin-left: auto;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 0.72rem;
  color: var(--dim);
}

.space .case-logo {
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
}

.space .result-card .case-tag {
  color: var(--dim-2);
}

.space .result-card .case-title {
  font-size: clamp(1.5rem, 2.4vw, 1.95rem);
  line-height: 1.18;
  color: var(--text);
}

.space .result-stats {
  border-color: var(--line);
}

.space .result-stats dd {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: -0.04em;
  color: var(--text);
}

.space .result-stats dt {
  color: var(--dim-2);
}

.space .result-card .learn-more {
  color: var(--text);
}

/* ---------- Services ---------- */
.space .service-panel {
  padding: clamp(1.5rem, 3vw, 2.25rem);
}

.space .service-panel-head {
  border-bottom: 1px solid var(--line);
}

.space .service-panel-head h3 {
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  font-weight: 300;
  letter-spacing: -0.03em;
}

.space .service-panel-head p {
  color: var(--dim);
}

.space .service-panel-icon {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-2);
  color: #ffffff;
}

.space .service-list a {
  border-radius: 14px;
  color: var(--text);
}

.space .service-list a:hover,
.space .service-list a:focus-visible {
  background: rgba(255, 255, 255, 0.05);
}

.space .service-list .card-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: #ffffff;
}

.space .service-list strong {
  font-family: var(--font-display);
  font-weight: 500;
}

.space .service-list small {
  color: var(--dim);
}

.space .service-list .chevron {
  color: var(--dim-2);
}

.space .service-list a:hover .chevron {
  color: #ffffff;
}

.space .industries-label {
  margin-bottom: 1.1rem;
}

.space .chip-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.space .chip-marquee-track {
  display: flex;
  width: max-content;
  animation: space-marquee 40s linear infinite;
}

.space .chip-marquee:hover .chip-marquee-track {
  animation-play-state: paused;
}

.space .chip-marquee .chip-list {
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 0.75rem;
  padding-right: 0.75rem;
}

.space .chip-list li {
  padding: 0.7rem 1.25rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
  color: var(--text);
}

.space .chip-list .icon {
  color: var(--accent-s);
}

/* ---------- Process: timeline with glowing nodes ---------- */
.space #process {
  background: transparent;
}

.space #process .process-card {
  padding: 2rem 1.75rem;
}

.space #process .process-num {
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
  color: var(--dim);
  transition: color 0.4s ease, border-color 0.4s ease, background-color 0.4s ease;
}

.space #process .service-title {
  font-size: 1.5rem;
  font-weight: 400;
}

.space #process .is-active .process-num {
  color: #000000;
  background: #ffffff;
  border-color: #ffffff;
}

@media (min-width: 992px) {
  .space #process .process-steps {
    --progress: 0;
    position: relative;
    margin-top: 0;
    padding-top: 3rem;
  }

  .space #process .process-steps > * {
    margin-top: 0;
  }

  .space #process .process-steps::before,
  .space #process .process-steps::after {
    content: "";
    position: absolute;
    top: 1.5rem;
    left: calc(var(--bs-gutter-x) * 0.5);
    right: calc(var(--bs-gutter-x) * 0.5);
    height: 1px;
  }

  .space #process .process-steps::before {
    background: var(--line-2);
  }

  .space #process .process-steps::after {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), #ffffff);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
    transform: scaleX(var(--progress));
    transform-origin: 0 50%;
  }

  .space #process .process-card::after {
    content: "";
    position: absolute;
    top: calc(-1.5rem - 4px);
    left: 1.75rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.45);
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
  }

  .space #process .is-active .process-card::after {
    background: #ffffff;
    box-shadow: 0 0 12px 3px rgba(255, 255, 255, 0.6);
  }
}

/* ---------- Our Work: horizontal gallery ---------- */
.space #portfolio {
  overflow: hidden;
}

.space .work-viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin: 0 calc(var(--bs-gutter-x, 1.5rem) * -0.5);
  padding: 0.5rem calc(var(--bs-gutter-x, 1.5rem) * 0.5) 1rem;
}

.space .work-viewport::-webkit-scrollbar {
  display: none;
}

.space .work-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
}

.space .work-slide {
  flex: 0 0 auto;
  width: min(400px, 80vw);
  scroll-snap-align: start;
}

.space #portfolio.is-pinned-gallery .work-viewport {
  overflow: visible;
}

.space #portfolio.is-pinned-gallery .work-track {
  will-change: transform;
}

.space .work-card {
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.6s var(--ease-s);
}

.space .work-card:hover {
  transform: translateY(-6px);
}

/* Thumbnails sit as a framed "screen" inside the glass card. */
.space .work-thumb {
  margin: 0.6rem 0.6rem 0;
  border-radius: 16px;
  aspect-ratio: 4 / 3;
  filter: saturate(0.75) brightness(0.85);
  transition: filter 0.5s ease;
}

.space .work-card:hover .work-thumb {
  filter: none;
}

.space .work-thumb-bar {
  background: rgba(10, 11, 15, 0.9);
  color: var(--dim-2);
}

.space .work-thumb-bar i {
  background: rgba(255, 255, 255, 0.25);
}

.space .work-body .service-title {
  font-size: 1.35rem;
}

.space .work-body .service-title a {
  color: var(--text);
}

.space .tech-tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-2);
  color: var(--dim);
}

.space .work-progress {
  height: 1px;
  margin-top: 2.5rem;
  max-width: 260px;
  background: var(--line-2);
  overflow: hidden;
}

.space .work-progress span {
  display: block;
  height: 100%;
  background: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
  transform: scaleX(0.08);
  transform-origin: 0 50%;
}

/* ---------- Journey: gravity well and prompt ---------- */
.space .funnel-canvas {
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 55%, #000 40%, transparent 85%);
  mask-image: radial-gradient(ellipse 75% 75% at 50% 55%, #000 40%, transparent 85%);
}

.space .funnel-canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.space .journey-prompt {
  z-index: 1;
}

.space .funnel-title {
  max-width: 18ch;
  margin: 0 auto 2.25rem;
  font-size: clamp(2.2rem, 4.6vw, 3.8rem);
}

.space .funnel-title .dim {
  color: var(--dim);
}

.space .prompt-box {
  width: 100%;
}

/* A chat-style input whose text is typed by scroll. */
.space .prompt-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 720px;
  min-height: 72px;
  margin: 0 auto;
  padding: 0.75rem 0.75rem 0.75rem 1.75rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(16, 17, 22, 0.82);
  backdrop-filter: blur(10px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--text);
  text-align: left;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.space .prompt-box:hover,
.space .prompt-box:focus-visible {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(160, 190, 255, 0.18);
}

.space .prompt-text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
}

.space .prompt-caret {
  flex: 0 0 auto;
  width: 1.5px;
  height: 1.3em;
  margin-left: -0.5rem;
  background: #ffffff;
  animation: prompt-blink 1s steps(1) infinite;
}

@keyframes prompt-blink {
  50% {
    opacity: 0;
  }
}

.space .prompt-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  margin-left: auto;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  font-size: 1.1rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.space .prompt-box:hover .prompt-send {
  background: #ffffff;
  color: #000000;
}

.space .prompt-hint {
  margin-top: 1.25rem;
  color: var(--dim-2);
  font-size: 0.88rem;
}

/* Marker over the funnel's throat for the guide dot (placed by
   funnel-scene.js; hidden while the well isn't showing). */
.funnel-throat {
  position: fixed;
  display: none;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* ---------- Guide dot: one light travelling down the page ---------- */
.guide-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1001;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 10px 3px rgba(255, 255, 255, 0.7), 0 0 34px 10px rgba(190, 210, 255, 0.28);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.guide-dot.is-on {
  opacity: 1;
}

/* ---------- Results: a dot grid the cards rise out of ---------- */
/* While tilted back, the grid's 3D box is wider than the page; clip it. */
.space #results {
  overflow: hidden;
}

.space #results .row {
  position: relative;
}

.space #results .container {
  position: relative;
}

.space #results .container::before {
  content: "";
  position: absolute;
  inset: 8rem -4rem -4rem;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.35) 1.2px, transparent 1.6px),
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 120px 120px;
  background-position: -0.5px -0.5px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, #000 30%, transparent 80%);
}

/* ---------- FAQ ---------- */
@media (min-width: 992px) {
  .space #faq .section-head {
    position: sticky;
    top: calc(var(--nav-h) + 2rem);
  }
}

.space #faq .section-head .eyebrow {
  margin-bottom: 1.5rem;
}

.space #faq .section-head h2 {
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
}

.space .faq-accordion {
  border-top: 1px solid var(--line);
}

.space .faq-accordion .accordion-item {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0 !important;
}

.space .faq-accordion .accordion-button,
.space .faq-accordion .accordion-button:not(.collapsed) {
  gap: 1rem;
  padding: 1.6rem 0;
  background: transparent;
  box-shadow: none;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  letter-spacing: -0.02em;
  color: var(--text);
}

.space .faq-accordion .accordion-button::after {
  content: "+";
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background-image: none;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--text);
  transition: transform 0.4s var(--ease-s), background-color 0.3s ease, color 0.3s ease;
}

.space .faq-accordion .accordion-button:not(.collapsed)::after {
  background-image: none;
  background-color: #ffffff;
  color: #000000;
  transform: rotate(45deg);
}

.space .faq-accordion .accordion-body {
  max-width: 62ch;
  padding: 0 3rem 1.75rem 0;
  color: var(--dim);
}

/* ---------- Contact ---------- */
.space .contact-intro .eyebrow {
  margin-bottom: 1.5rem;
}

.space .contact-intro h2 {
  font-size: clamp(2.4rem, 5vw, 4rem);
}

.space .contact-intro > p {
  color: var(--dim);
}

.space .contact-points li {
  color: var(--text);
  font-weight: 500;
}

.space .contact-points .card-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-2);
  color: #ffffff;
}

.space .contact-points small {
  color: var(--dim-2);
}

.space .contact-points a {
  color: var(--text);
}

.space .map-frame {
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--bg-2);
}

/* Dark-tinted map. */
.space .map-frame iframe {
  filter: invert(0.92) hue-rotate(180deg) saturate(0.2) brightness(0.9) contrast(0.95);
}

.space .contact-card {
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.space .contact-card:hover {
  transform: none;
}

.space .form-label {
  color: rgba(255, 255, 255, 0.82);
}

.space .form-label .optional,
.space .form-note {
  color: var(--dim-2);
}

.space .glass-input {
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background-color: rgba(255, 255, 255, 0.035);
  color: var(--text);
}

.space .glass-input:focus {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: rgba(122, 177, 254, 0.7);
  box-shadow: 0 0 0 4px rgba(122, 177, 254, 0.15);
  color: var(--text);
}

.space .glass-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.space .form-select {
  --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.space .form-select.glass-input:invalid {
  color: rgba(255, 255, 255, 0.4);
}

/* The native option list stays light, so its text goes dark again. */
.space .glass-input option {
  color: #111111;
}

.space .form-status-success {
  background: rgba(122, 177, 254, 0.1);
  border-color: rgba(122, 177, 254, 0.4);
  color: #cfe0ff;
}

.space .form-status-error {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fecdd3;
}

/* ---------- Footer ---------- */
.space .site-footer {
  background: var(--bg);
  background-image: none;
  border-top: 1px solid var(--line);
  color: var(--dim);
}

.space .footer-cta {
  border-bottom-color: var(--line);
}

.space .footer-cta .eyebrow {
  /* Its own line above the big link, not inline beside it. */
  display: flex;
  width: max-content;
  margin-bottom: 1.5rem;
}

.space .footer-cta-link {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3.6rem, 12vw, 10rem);
  letter-spacing: -0.06em;
  color: var(--text);
}

.space .footer-cta-link > span:first-child {
  background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0.4));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.space .footer-cta-arrow {
  background: #ffffff;
  color: #000000;
}

.space .footer-cta-link:hover .footer-cta-arrow,
.space .footer-cta-link:focus-visible .footer-cta-arrow {
  background: #e9efff;
  box-shadow: 0 0 40px rgba(160, 190, 255, 0.45);
}

.space .footer-heading {
  color: var(--dim-2);
}

.space .footer-text,
.space .footer-list li,
.space .footer-list a {
  color: var(--dim);
}

.space .footer-list a:hover,
.space .footer-list a.footer-email {
  color: var(--text);
}

.space .footer-contact .icon {
  color: var(--dim-2);
}

.space .site-footer .btn-accent {
  background: #ffffff;
  color: #000000;
}

.space .footer-divider {
  border-color: var(--line);
}

.space .footer-copy {
  color: var(--dim-2);
}

/* Subpages end with their own CTA band, so the footer skips its own. */
.space.subpage .site-footer > .container:first-child {
  display: none;
}

.space.subpage .site-footer {
  padding-top: 4rem;
}

/* ---------- Small chrome ---------- */
.space .back-to-top {
  background: rgba(20, 21, 27, 0.9);
  border: 1px solid var(--line-2);
  color: #ffffff;
  box-shadow: none;
  backdrop-filter: blur(8px);
}

.space .back-to-top:hover,
.space .back-to-top:focus-visible {
  background: #ffffff;
  color: #000000;
}

.space .scroll-progress {
  height: 1px;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* =================================================================
   Service and case-study pages
   ================================================================= */

.space .page-hero {
  min-height: 72vh;
  display: flex;
  align-items: center;
  padding-top: clamp(5rem, 10vw, 8rem);
  padding-bottom: clamp(5rem, 9vw, 7rem);
  background: var(--bg);
  color: var(--text);
}

.space .page-hero > .container {
  position: relative;
  z-index: 1;
}

.space .page-hero-icon {
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  box-shadow: 0 0 40px rgba(160, 190, 255, 0.12);
}

.space .page-hero .case-tag {
  display: block;
}

.space .page-hero-title {
  max-width: 16ch;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(2.8rem, 6.5vw, 5.4rem);
  letter-spacing: -0.045em;
}

.space .page-hero-sub {
  max-width: 46ch;
  color: var(--dim);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
}

.space .page-hero .tech-tag {
  padding: 0.3rem 0.8rem;
}

/* Overview */
.space .sub-overview h2,
.space .sub-story h2 {
  max-width: 15ch;
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
}

.space .sub-overview .eyebrow {
  margin-bottom: 1.5rem;
}

.space .body-text {
  color: var(--dim);
  font-size: 1.06rem;
  line-height: 1.75;
}

.space .sub-overview .glass-card {
  padding: clamp(1.5rem, 3vw, 2.25rem);
}

.space .sub-overview .glass-card:hover {
  transform: none;
}

.space .overview-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0;
  padding: 1rem 0 1rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-weight: 500;
}

.space .overview-list li:last-child {
  border-bottom: 0;
}

.space .overview-list li::before {
  content: "";
  position: static;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 10px 3px rgba(255, 255, 255, 0.45);
}

/* What we offer: one glass panel split by hairlines into cells. */
.space .sub-offer .row {
  --bs-gutter-x: 0;
  --bs-gutter-y: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--glass-shadow);
}

.space .sub-offer .row > * {
  box-shadow: 1px 1px 0 var(--line);
}

.space .sub-offer .glass-card,
.space .sub-offer .glass-card:hover {
  padding: 2.25rem 2rem 2.5rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease, background-color 0.35s ease;
}

.space .sub-offer .glass-card:hover {
  background: rgba(255, 255, 255, 0.03);
}

.space .sub-offer .card-icon {
  margin-bottom: 2rem;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.space .sub-offer .service-title {
  font-size: 1.3rem;
}

/* Work lists */
.space .blog-card {
  padding: 1.75rem;
  transition: border-color 0.3s ease, transform 0.6s var(--ease-s);
}

.space .blog-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-2);
}

.space .blog-card .service-title {
  margin: 0.75rem 0 0.6rem;
  font-size: 1.4rem;
}

.space .blog-card .learn-more {
  margin-top: auto;
  padding-top: 0.5rem;
  align-self: flex-start;
}

/* Case-study story + snapshot */
.space .sub-story .case-card {
  padding: 2rem;
}

.space .sub-story .case-card:hover {
  transform: none;
}

@media (min-width: 992px) {
  .space .sub-story .case-card {
    position: sticky;
    top: calc(var(--nav-h) + 2rem);
  }
}

.space .sub-story .case-card .overview-list li {
  display: block;
  padding: 0.85rem 0;
  font-weight: 400;
  font-size: 0.96rem;
}

.space .sub-story .case-card .overview-list li::before {
  display: none;
}

.space .sub-story .case-card .overview-list strong {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dim-2);
}

.space .what-we-did {
  margin-top: 1.5rem;
  font-size: 1.3rem;
}

.space .check-list {
  color: var(--dim);
}

.space .check-list li::before {
  color: var(--accent-s);
}

/* Case-study results */
.space .sub-results .case-card {
  max-width: none !important;
  padding: clamp(2rem, 4vw, 3rem) 1rem;
}

.space .sub-results .case-card:hover {
  transform: none;
}

.space .sub-results .case-card .row > div + div {
  border-left: 1px solid var(--line);
}

.space .case-stat {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
  background: linear-gradient(180deg, #ffffff, rgba(255, 255, 255, 0.5));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.space .case-stat-label {
  margin-top: 0.5rem;
  color: var(--dim-2);
}

/* Case-study outcome: a statement on the radar */
.space .sub-outcome {
  position: relative;
  overflow: hidden;
  text-align: center;
}

.space .sub-outcome::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 140vmax;
  height: 140vmax;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background:
    repeating-radial-gradient(circle at center, transparent 0 calc(10vmax - 1px), rgba(255, 255, 255, 0.07) calc(10vmax - 1px) 10vmax),
    linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(255, 255, 255, 0.08) calc(50% - 0.5px) calc(50% + 0.5px), transparent calc(50% + 0.5px));
  -webkit-mask-image: radial-gradient(circle at center, #000 0 20%, transparent 55%);
  mask-image: radial-gradient(circle at center, #000 0 20%, transparent 55%);
}

.space .outcome-statement {
  position: relative;
}

.space .outcome-statement .eyebrow {
  margin-bottom: 1.75rem;
}

.space .outcome-text {
  max-width: 22ch;
  margin: 0 auto;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--text);
}

/* Closing CTA */
.space .sub-cta {
  position: relative;
  overflow: hidden;
}

.space .sub-cta::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -40%;
  width: 900px;
  height: 600px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(160, 190, 255, 0.16), transparent 65%);
  pointer-events: none;
}

.space .cta-banner {
  position: relative;
}

.space .cta-banner h2 {
  max-width: 18ch;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(2.4rem, 5.5vw, 4.6rem);
}

.space .cta-banner p {
  color: var(--dim);
  font-size: 1.08rem;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .space .marquee-track,
  .space .prompt-caret {
    animation: none;
  }

  .space .chip-marquee {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .space .chip-marquee-track {
    width: auto;
    animation: none;
  }

  .space .chip-marquee .chip-list {
    flex-wrap: wrap;
    justify-content: center;
  }

  .space .chip-marquee .chip-list[aria-hidden="true"] {
    display: none;
  }
}

/* ===================================================================
   Colour layer: a small spectrum (blue, violet, pink, teal, amber)
   laid over the black. Backgrounds stay dark; colour lives in icons,
   numbers, glows and a few gradients so each section gets its own hue.
   =================================================================== */
body.space {
  --c-blue: #7ab1fe;
  --c-violet: #a78bfa;
  --c-pink: #f472b6;
  --c-teal: #5eead4;
  --c-amber: #fbbf24;
  --spectrum: linear-gradient(90deg, var(--c-blue), var(--c-violet) 50%, var(--c-pink));
  --hue: var(--c-blue);
}

/* Each section picks a hue; children read it through var(--hue). */
.space #results   { --hue: var(--c-violet); }
.space #services  { --hue: var(--c-blue); }
.space #process   { --hue: var(--c-teal); }
.space #portfolio { --hue: var(--c-pink); }
.space #faq       { --hue: var(--c-amber); }
.space #contact   { --hue: var(--c-violet); }

/* Soft coloured light pooling behind sections, fading to black. */
.space #results {
  background-image: radial-gradient(ellipse 55% 40% at 85% 15%, rgba(167, 139, 250, 0.12), transparent 70%);
}

.space #services {
  background-image:
    radial-gradient(ellipse 45% 35% at 10% 20%, rgba(122, 177, 254, 0.12), transparent 70%),
    radial-gradient(ellipse 40% 35% at 95% 85%, rgba(244, 114, 182, 0.08), transparent 70%);
}

.space #process {
  background-image: radial-gradient(ellipse 50% 40% at 50% 100%, rgba(94, 234, 212, 0.09), transparent 70%);
}

.space #portfolio {
  background-image: radial-gradient(ellipse 50% 40% at 15% 30%, rgba(244, 114, 182, 0.09), transparent 70%);
}

.space #faq {
  background-image: radial-gradient(ellipse 40% 40% at 5% 30%, rgba(251, 191, 36, 0.07), transparent 70%);
}

.space #contact {
  background-image:
    radial-gradient(ellipse 45% 40% at 90% 20%, rgba(167, 139, 250, 0.11), transparent 70%),
    radial-gradient(ellipse 40% 35% at 5% 90%, rgba(94, 234, 212, 0.07), transparent 70%);
}

/* Eyebrow dot glows in the section's hue. */
.space .eyebrow::before {
  background: var(--hue);
  box-shadow: 0 0 8px 2px color-mix(in srgb, var(--hue) 60%, transparent);
}

/* Hero: the second line picks up the spectrum. */
.space .hero-heading .accent-text .word {
  background: linear-gradient(90deg, var(--c-blue), var(--c-violet) 55%, var(--c-pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Section headings: the dimmed trailing words take a faint tint. */
.space main > section .word.is-dim {
  color: color-mix(in srgb, var(--hue) 55%, rgba(255, 255, 255, 0.5));
}

/* Buttons: white stays, the hover glow becomes the spectrum. */
.space .btn-accent:hover,
.space .btn-accent:focus-visible,
.space .hero-section .btn-accent:hover,
.space .hero-section .btn-accent:focus-visible,
.space .page-hero .btn-accent:hover,
.space .page-hero .btn-accent:focus-visible {
  box-shadow: -10px 0 30px rgba(122, 177, 254, 0.35), 10px 0 30px rgba(244, 114, 182, 0.3);
}

/* Tinted icon tile: --tint on the element, else the section hue. */
.space .stat-icon-wrap,
.space .service-panel-icon,
.space .card-icon,
.space .service-list .card-icon,
.space .contact-points .card-icon,
.space .page-hero-icon {
  --t: var(--tint, var(--hue));
  background: color-mix(in srgb, var(--t) 14%, transparent);
  border-color: color-mix(in srgb, var(--t) 32%, transparent);
  color: var(--t);
}

.space .service-panel-icon,
.space .page-hero-icon {
  box-shadow: 0 0 40px color-mix(in srgb, var(--t) 22%, transparent);
}

/* Stats: one hue per figure. */
.space .stats-bar .row > div:nth-child(1) { --tint: var(--c-blue); }
.space .stats-bar .row > div:nth-child(2) { --tint: var(--c-violet); }
.space .stats-bar .row > div:nth-child(3) { --tint: var(--c-pink); }
.space .stats-bar .row > div:nth-child(4) { --tint: var(--c-teal); }

.space .stats-bar .stat-number {
  background: linear-gradient(180deg, #ffffff 30%, var(--tint, #ffffff));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Marquee: some words in colour. */
.space .marquee-track span:nth-child(4n + 2) { color: var(--c-blue); }
.space .marquee-track span:nth-child(4n) { color: var(--c-violet); }

/* Results: numbers, counter badge and top edge in each card's hue. */
.space #results [class*="col"]:nth-child(4n + 1) .result-card { --hue: var(--c-violet); }
.space #results [class*="col"]:nth-child(4n + 2) .result-card { --hue: var(--c-blue); }
.space #results [class*="col"]:nth-child(4n + 3) .result-card { --hue: var(--c-teal); }
.space #results [class*="col"]:nth-child(4n + 4) .result-card { --hue: var(--c-pink); }

.space .result-card {
  border-top-color: color-mix(in srgb, var(--hue) 45%, transparent);
}

.space .result-stats dd {
  color: color-mix(in srgb, var(--hue) 70%, #ffffff);
}

.space .result-head::after {
  border-color: color-mix(in srgb, var(--hue) 40%, transparent);
  color: var(--hue);
}

/* Services: the two panels take different hues, list icons cycle. */
.space #services [class*="col"]:nth-child(1) .service-panel { --hue: var(--c-blue); }
.space #services [class*="col"]:nth-child(2) .service-panel { --hue: var(--c-pink); }

.space .service-panel {
  border-top-color: color-mix(in srgb, var(--hue) 45%, transparent);
}

.space .service-list li:nth-child(3n + 2) .card-icon { --tint: var(--c-violet); }
.space .service-list li:nth-child(3n + 3) .card-icon { --tint: var(--c-teal); }

.space .service-list a:hover,
.space .service-list a:focus-visible {
  background: color-mix(in srgb, var(--hue) 8%, transparent);
}

.space .service-list a:hover .chevron {
  color: var(--hue);
}

.space .chip-list li:nth-child(4n + 1) .icon { color: var(--c-blue); }
.space .chip-list li:nth-child(4n + 2) .icon { color: var(--c-violet); }
.space .chip-list li:nth-child(4n + 3) .icon { color: var(--c-pink); }
.space .chip-list li:nth-child(4n + 4) .icon { color: var(--c-teal); }

/* Process: the active step lights up in teal. */
.space #process .is-active .process-num {
  color: #000000;
  background: var(--c-teal);
  border-color: var(--c-teal);
  box-shadow: 0 0 20px color-mix(in srgb, var(--c-teal) 50%, transparent);
}

/* Work: tags and hovered cards in pink. */
.space .tech-tag {
  background: color-mix(in srgb, var(--hue) 8%, transparent);
  border-color: color-mix(in srgb, var(--hue) 28%, transparent);
  color: color-mix(in srgb, var(--hue) 55%, #ffffff);
}

.space .work-card:hover {
  border-color: color-mix(in srgb, var(--hue) 40%, transparent);
}

/* FAQ: the open question in amber. */
.space .faq-accordion .accordion-button:not(.collapsed) {
  color: color-mix(in srgb, var(--hue) 40%, #ffffff);
}

/* Contact: point icons cycle; focused inputs ring in the section hue. */
.space .contact-points li:nth-child(1) .card-icon { --tint: var(--c-violet); }
.space .contact-points li:nth-child(2) .card-icon { --tint: var(--c-pink); }
.space .contact-points li:nth-child(3) .card-icon { --tint: var(--c-teal); }

.space .glass-input:focus {
  border-color: color-mix(in srgb, var(--hue) 60%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hue) 18%, transparent);
}

/* Footer: the big CTA and its arrow carry the spectrum. */
.space .footer-cta-link > span:first-child {
  background: linear-gradient(90deg, #ffffff 10%, var(--c-blue) 45%, var(--c-violet) 70%, var(--c-pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.space .footer-cta-link:hover .footer-cta-arrow,
.space .footer-cta-link:focus-visible .footer-cta-arrow {
  background: var(--spectrum);
  color: #ffffff;
  box-shadow: 0 0 40px rgba(167, 139, 250, 0.45);
}

/* Chrome: scroll progress and selection. */
.space .scroll-progress {
  height: 2px;
  background: var(--spectrum);
}

.space ::selection {
  background: var(--c-violet);
}

/* Subpages: a coloured glow behind the hero. */
.space .page-hero {
  background-image:
    radial-gradient(ellipse 45% 50% at 20% 0%, rgba(122, 177, 254, 0.14), transparent 70%),
    radial-gradient(ellipse 40% 45% at 85% 10%, rgba(167, 139, 250, 0.12), transparent 70%);
}

/* ---------- Work thumbnails: real screenshots ---------- */
/* Website captures fill the "browser" frame under its address bar. */
.space .work-thumb-body > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s var(--ease-s);
}

.space .work-thumb-body:has(> img) {
  overflow: hidden;
  background: #0a0b0f;
}

.space .work-card:hover .work-thumb-body:has(> img) {
  transform: none;
}

.space .work-card:hover .work-thumb-body > img {
  transform: scale(1.03);
}

/* App store screenshots stand upright on the gradient, rising from the base. */
.space .work-thumb > img.work-thumb-shot {
  width: auto;
  height: 88%;
  margin-top: auto;
  border-radius: 14px 14px 0 0;
  object-fit: contain;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35);
  transition: transform 0.4s ease;
}

.space .work-card:hover .work-thumb > img.work-thumb-shot {
  transform: translateY(-4px);
}
