/* ============================================================
   PURPLE SPACE — Design System v3  ·  "Mission" (SpaceX-inspired)
   Cinematic, dark, full-bleed. Space-black dominant, white text,
   magenta as the signal accent. Keeps the Purple Space DNA
   (aubergine + magenta) inside a SpaceX-style shell.
   Display: Saira (uppercase, tracked) · Body/UI: Mulish · Data: DM Mono.
   Class names are preserved from v2 so all pages + CMS keep working.
   ============================================================ */

/* ---------- 0. D-DIN (self-hosted, SIL OFL) — the SpaceX display face ---------- */
@font-face {
  font-family: "D-DIN";
  src: url("../fonts/D-DIN.woff2") format("woff2"), url("../fonts/D-DIN.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "D-DIN";
  src: url("../fonts/D-DIN-Bold.woff2") format("woff2"), url("../fonts/D-DIN-Bold.woff") format("woff");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---------- 1. Tokens ---------- */
:root {
  /* space palette */
  --ps-space:   #07040f;   /* deepest background */
  --ps-space-2: #0e0a1c;   /* lifted section */
  --ps-space-3: #150e28;   /* card / elevated surface */
  --ps-aubergine: #2e1b47; /* brand aubergine — accents/panels */
  --ps-magenta: #ef0c69;   /* signal accent */
  --ps-magenta-2:#ff3d86;  /* brighter magenta for small text on dark */
  --ps-plum:    #85106f;

  --ps-white:   #ffffff;
  --ps-text:    rgba(255, 255, 255, 0.92);
  --ps-muted:   rgba(255, 255, 255, 0.60);  /* secondary text */
  --ps-faint:   rgba(255, 255, 255, 0.40);  /* labels / captions */
  --ps-violet:  #9b8bc7;                     /* muted brand tint */

  --ps-line:      rgba(255, 255, 255, 0.12); /* hairline */
  --ps-line-soft: rgba(255, 255, 255, 0.07);
  --ps-line-strong: rgba(255, 255, 255, 0.28);

  --ps-glow-magenta: rgba(239, 12, 105, 0.35);
  --ps-glow-aubergine: rgba(120, 60, 200, 0.28);

  /* elevated card / frame surfaces (flip in light mode) */
  --ps-elev:   rgba(255, 255, 255, 0.04);
  --ps-elev-2: rgba(255, 255, 255, 0.02);

  --font-display: "D-DIN", "Saira", "Arial Narrow", system-ui, sans-serif;
  --font-sans:    "Mulish", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:    "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius:    4px;
  --radius-lg: 8px;

  --ease: cubic-bezier(0.33, 0.1, 0.2, 1);
  --nav-h: 4.75rem;

  /* legacy aliases */
  --ink: var(--ps-white);
  --paper: var(--ps-space-2);
  --text: var(--ps-text);
  --muted: var(--ps-muted);
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 400;
  color: var(--ps-text);
  background: var(--ps-space);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Site-wide deep-space backdrop: a fixed star canvas (cosmic.js) sits at z -2,
   with a faint vignette at z -1, content above. */
.space-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(80% 60% at 50% -10%, rgba(133, 16, 111, 0.22), transparent 60%),
    radial-gradient(70% 50% at 100% 100%, rgba(239, 12, 105, 0.10), transparent 60%),
    var(--ps-space);
}
.space-bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

img, svg, video, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul[role="list"], ol[role="list"] { list-style: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(239, 12, 105, 0.30); color: #fff; }

/* Headings — Saira, UPPERCASE, tracked. Hierarchy by size + weight. */
h1, h2, .display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ps-white);
  text-wrap: balance;
}
h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ps-white);
}

h1 { font-size: clamp(2.5rem, 6vw, 5.5rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3.25rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; letter-spacing: 0.04em; }

.lead {
  font-family: var(--font-sans);
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.72;
  color: var(--ps-text);
  max-width: 42em;
  text-transform: none;
}

/* grad-text → magenta accent (the brand pop in cinematic mode) */
.grad-text { color: var(--ps-magenta); }
.accent { color: var(--ps-magenta); }

/* ---------- 3. Layout primitives ---------- */
.container { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.container--narrow { width: min(780px, 100% - 2.5rem); margin-inline: auto; }
.container--wide { width: min(1360px, 100% - 2.5rem); margin-inline: auto; }

.section { position: relative; padding-block: clamp(3.75rem, 7vw, 6.5rem); }
.section--tight { position: relative; padding-block: clamp(2.75rem, 5vw, 4.25rem); }

/* Alternating dark surfaces (all dark now) */
.section--paper { background: var(--ps-space-2); }
.section--dark { position: relative; background: var(--ps-space-2); color: var(--ps-muted); }
.section--panel { background: var(--ps-space-2); border-block: 1px solid var(--ps-line-soft); }

.section-head { max-width: 50em; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .lead { margin-inline: auto; }
.section-head .lead { margin-top: 1.1rem; }

/* Eyebrow — mono technical label with a magenta tick */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ps-faint);
}
.eyebrow::before {
  content: "";
  width: 1.6rem; height: 1px;
  background: var(--ps-magenta);
}
.section-head--center .eyebrow::before { width: 1rem; }

/* Orbs removed (legacy) */
.orb { display: none !important; }

/* Section glow helper */
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}
.glow--magenta { background: radial-gradient(circle, var(--ps-glow-magenta), transparent 70%); }
.glow--aubergine { background: radial-gradient(circle, var(--ps-glow-aubergine), transparent 70%); }

/* ---------- 4. Buttons (SpaceX-style: uppercase, tracked) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.6rem;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease),
              border-color 0.35s var(--ease), box-shadow 0.35s var(--ease), transform 0.2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn__ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1rem; height: 1rem; flex: none;
  transition: transform 0.35s var(--ease);
}
.btn__ico svg { width: 0.8rem; height: 0.8rem; }
.btn:hover .btn__ico { transform: translateX(4px); }

/* Primary = solid white, dark text; hover = magenta */
.btn--primary { background: var(--ps-white); color: var(--ps-space); }
.btn--primary:hover { background: var(--ps-magenta); color: #fff; box-shadow: 0 0 30px -6px var(--ps-glow-magenta); }

/* Ghost = hairline border */
.btn--ghost { color: var(--ps-white); box-shadow: inset 0 0 0 1px var(--ps-line-strong); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--ps-white); background: rgba(255,255,255,0.06); }

/* Light = same as primary (used on dark sections) */
.btn--light { background: var(--ps-white); color: var(--ps-space); }
.btn--light:hover { background: var(--ps-magenta); color: #fff; }

/* Accent = magenta fill */
.btn--accent { background: var(--ps-magenta); color: #fff; }
.btn--accent:hover { background: #ff2a7a; box-shadow: 0 0 30px -6px var(--ps-glow-magenta); }

.btn--sm { padding: 0.7rem 1.15rem; font-size: 0.72rem; }

/* Text arrow link */
.arrow-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ps-white);
}
.arrow-link svg { width: 0.8rem; height: 0.8rem; transition: transform 0.35s var(--ease); color: var(--ps-magenta); }
.arrow-link:hover { color: var(--ps-magenta); }
.arrow-link:hover svg { transform: translateX(4px); }

/* ---------- 5. Navigation — cinematic ---------- */
.nav-wrap {
  position: fixed;
  left: 0; right: 0; top: 0;
  z-index: 90;
  background: rgba(7, 4, 15, 0.7);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--ps-line-soft);
  transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease), backdrop-filter 0.5s var(--ease);
}
.nav {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  height: var(--nav-h);
  width: min(1360px, 100% - 2.5rem);
  margin-inline: auto;
}
.nav__logo {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ps-white);
  margin-right: auto;
}
.nav__logo img { height: 1.9rem; width: auto; }

.nav__links { display: flex; align-items: center; gap: 0.25rem; list-style: none; }
.nav__links a {
  display: block;
  padding: 0.5rem 0.85rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ps-muted);
  transition: color 0.3s var(--ease);
}
.nav__links a:hover { color: var(--ps-white); }
.nav__links a.is-active { color: var(--ps-white); }
.nav__links a.is-active::after {
  content: ""; display: block; height: 1.5px; margin: 0.3rem 0.85rem 0; background: var(--ps-magenta);
}

.nav__cta { margin-left: 0.5rem; }

.nav__burger {
  position: relative; display: none;
  width: 2.75rem; height: 2.75rem; border-radius: var(--radius);
  border: 1px solid var(--ps-line); flex: none;
}
.nav__burger span {
  position: absolute; left: 50%; top: 50%;
  width: 1.1rem; height: 1.5px; background: var(--ps-white); border-radius: 2px;
  transition: transform 0.45s var(--ease);
}
.nav__burger span:nth-child(1) { transform: translate(-50%, calc(-50% - 4px)); }
.nav__burger span:nth-child(2) { transform: translate(-50%, calc(-50% + 4px)); }
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { transform: translate(-50%, -50%) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 85;
  display: flex; flex-direction: column; justify-content: flex-start;
  padding: 6.5rem 2rem 3rem;
  background: rgba(7, 4, 15, 0.96);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  opacity: 0; visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0s 0.5s;
}
/* Centre the links when they fit, but allow scrolling when they don't. */
.mobile-menu__links { margin-block: auto; }
.mobile-menu.is-open { opacity: 1; visibility: visible; transition: opacity 0.5s var(--ease); }
.mobile-menu__links { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.mobile-menu__links a {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 6.5vw, 2.4rem);
  font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ps-white);
}
.mobile-menu__links a.is-active { color: var(--ps-magenta); }
.mobile-menu__links li { opacity: 0; transform: translateY(1rem); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.mobile-menu.is-open .mobile-menu__links li { opacity: 1; transform: translateY(0); }
.mobile-menu.is-open .mobile-menu__links li:nth-child(1) { transition-delay: 0.06s; }
.mobile-menu.is-open .mobile-menu__links li:nth-child(2) { transition-delay: 0.10s; }
.mobile-menu.is-open .mobile-menu__links li:nth-child(3) { transition-delay: 0.14s; }
.mobile-menu.is-open .mobile-menu__links li:nth-child(4) { transition-delay: 0.18s; }
.mobile-menu.is-open .mobile-menu__links li:nth-child(5) { transition-delay: 0.22s; }
.mobile-menu.is-open .mobile-menu__links li:nth-child(6) { transition-delay: 0.26s; }
.mobile-menu.is-open .mobile-menu__links li:nth-child(7) { transition-delay: 0.30s; }
.mobile-menu__cta { margin-top: 2.5rem; opacity: 0; transform: translateY(1rem); transition: opacity 0.6s var(--ease) 0.36s, transform 0.6s var(--ease) 0.36s; }
.mobile-menu.is-open .mobile-menu__cta { opacity: 1; transform: translateY(0); }

/* ---------- 6. Cards (dark panels) ---------- */
.bezel {
  position: relative;
  background: var(--ps-elev);
  border: 1px solid var(--ps-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.bezel__core { position: relative; background: transparent; border-radius: inherit; overflow: hidden; }
.bezel--dark { background: var(--ps-elev-2); }

.lift { transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.lift:hover {
  transform: translateY(-4px);
  border-color: var(--ps-line-strong);
  box-shadow: 0 0 0 1px rgba(239,12,105,0.18), 0 30px 60px -30px rgba(0,0,0,0.8);
}

/* ---------- 7. Grids ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.card-pad { padding: clamp(1.5rem, 2.6vw, 2.25rem); }

/* Icon chip — technical square */
.icon-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.9rem; height: 2.9rem; border-radius: var(--radius);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--ps-line);
  color: var(--ps-magenta);
  margin-bottom: 1.3rem;
}
.icon-chip svg { width: 1.4rem; height: 1.4rem; }

/* ---------- 8. Logo strip ---------- */
.logo-strip {
  overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.logo-strip__track { display: flex; align-items: center; gap: clamp(3rem, 6vw, 5.5rem); width: max-content; animation: marquee 80s linear infinite; }
.logo-strip:hover .logo-strip__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.client-logo { flex: none; height: 1.8rem; width: auto; opacity: 0.45; color: var(--ps-white); transition: opacity 0.4s var(--ease); }
.client-logo:hover { opacity: 0.9; }
.logo-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 2rem 3rem; }
.logo-grid .client-logo { height: 1.6rem; }

/* ---------- 9. Accordion ---------- */
.accordion { display: flex; flex-direction: column; }
.acc-item { border-bottom: 1px solid var(--ps-line); }
.acc-item__btn {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  width: 100%; padding: 1.5rem 0.25rem; text-align: left;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  letter-spacing: 0.02em; text-transform: uppercase; color: var(--ps-white);
}
.acc-item__chev {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 1.6rem; height: 1.6rem; color: var(--ps-magenta);
  transition: transform 0.45s var(--ease);
}
.acc-item__chev svg { width: 0.8rem; height: 0.8rem; }
.acc-item.is-open .acc-item__chev { transform: rotate(45deg); }
.acc-item__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s var(--ease); }
.acc-item.is-open .acc-item__panel { grid-template-rows: 1fr; }
.acc-item__inner { overflow: hidden; }
.acc-item__inner p { padding: 0 0.25rem 1.5rem; color: var(--ps-muted); max-width: 66ch; }

/* ---------- 10. Forms ---------- */
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label {
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ps-faint);
}
.field input, .field select, .field textarea {
  width: 100%; padding: 0.9rem 1rem;
  border: 1px solid var(--ps-line); border-radius: var(--radius);
  background: rgba(255,255,255,0.03); color: var(--ps-white);
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ps-faint); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--ps-magenta); background: rgba(255,255,255,0.05);
}
.field textarea { resize: vertical; min-height: 8.5rem; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%23ef0c69' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
}
.field select option { background: var(--ps-space-2); color: #fff; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form-grid .field--full { grid-column: 1 / -1; }

.form-success {
  display: none; padding: 1rem 1.25rem; border-radius: var(--radius);
  background: rgba(239,12,105,0.1); border: 1px solid rgba(239,12,105,0.35);
  color: #fff; font-weight: 600; font-size: 0.95rem;
}
.form-success.is-visible { display: block; }

.newsletter-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.newsletter-row input {
  flex: 1; min-width: 0; padding: 0.8rem 1rem;
  border: 1px solid var(--ps-line); border-radius: var(--radius);
  background: rgba(255,255,255,0.03); color: #fff;
}
.newsletter-row input::placeholder { color: var(--ps-faint); }
.newsletter-row input:focus { outline: none; border-color: var(--ps-magenta); }

/* ---------- 11. Filter pills ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: clamp(2rem, 4vw, 2.75rem); }
.filter-pill {
  padding: 0.55rem 1.1rem; border-radius: 999px;
  font-family: var(--font-display); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ps-muted); background: transparent; border: 1px solid var(--ps-line);
  transition: color 0.3s var(--ease), background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.filter-pill:hover { color: var(--ps-white); border-color: var(--ps-line-strong); }
.filter-pill.is-active { color: var(--ps-space); background: var(--ps-white); border-color: var(--ps-white); }
.filterable.is-hidden { display: none; }

/* Grouped, auto-generated filter bar (Industry / Service) */
.filters--grouped { flex-direction: column; align-items: flex-start; gap: 1.15rem; }
.filter-group { display: flex; flex-direction: column; gap: 0.65rem; width: 100%; }
.filter-group__label {
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--ps-faint);
}
.filter-group__pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---------- 12. Tags ---------- */
.tag {
  display: inline-flex; align-items: center; padding: 0.28rem 0.7rem; border-radius: 999px;
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ps-muted); background: rgba(255,255,255,0.04); border: 1px solid var(--ps-line);
}
.tag--pink { color: var(--ps-magenta-2); border-color: rgba(239,12,105,0.4); background: rgba(239,12,105,0.08); }
.tag--dark { color: var(--ps-muted); background: rgba(255,255,255,0.05); }

/* ---------- 13. Stats ---------- */
.stat { display: flex; flex-direction: column; gap: 0.4rem; }
.stat__num {
  font-family: var(--font-display); font-size: clamp(2.6rem, 5vw, 3.75rem);
  font-weight: 600; line-height: 1; letter-spacing: 0.01em; color: var(--ps-white);
}
.stat__label { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.06em; color: var(--ps-faint); text-transform: uppercase; }

/* ---------- 14. Testimonials ---------- */
.quote-card { display: flex; flex-direction: column; gap: 1.4rem; height: 100%; }
.quote-card__mark { font-family: var(--font-display); font-size: 2.5rem; line-height: 0.5; padding-top: 1rem; color: var(--ps-magenta); }
.quote-card__text { font-size: 1.15rem; line-height: 1.6; color: var(--ps-text); flex: 1; }
.quote-card__person { display: flex; align-items: center; gap: 0.85rem; }
.quote-card__name { font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ps-white); line-height: 1.3; }
.quote-card__role { font-size: 0.82rem; color: var(--ps-muted); }
.avatar {
  flex: none; width: 2.85rem; height: 2.85rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.04em;
  color: #fff; background: rgba(255,255,255,0.06); border: 1px solid var(--ps-line);
}

/* ---------- 15. Media placeholders ---------- */
.media-ph {
  position: relative; display: flex; align-items: center; justify-content: center;
  aspect-ratio: 16 / 9; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)),
    var(--ps-space-3);
  border-bottom: 1px solid var(--ps-line);
  color: var(--ps-faint);
}
.media-ph::before {
  /* technical grid texture */
  content: ""; position: absolute; inset: 0; opacity: 0.5;
  background-image:
    linear-gradient(var(--ps-line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--ps-line-soft) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(80% 80% at 50% 50%, #000, transparent);
  mask-image: radial-gradient(80% 80% at 50% 50%, #000, transparent);
}
.media-ph img, .media-ph video { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.media-ph--video::after {
  content: ""; position: relative; z-index: 2;
  width: 4rem; height: 4rem; border-radius: 50%;
  border: 1px solid var(--ps-line-strong);
  background: rgba(7,4,15,0.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M9 6.5v11l9-5.5-9-5.5z'/%3E%3C/svg%3E") center / 1.4rem no-repeat;
}
.media-ph__label {
  position: absolute; bottom: 0.9rem; left: 1.1rem; z-index: 2;
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.7;
}
.media-ph--tall { aspect-ratio: 4 / 4.6; }
.media-ph--square { aspect-ratio: 1; }

/* Case study detail: hide the template until cms.js hydrates the real study,
   so the static placeholder never flashes. Revealed via body.cms-ready. */
.page-case-study main { opacity: 0; transition: opacity 0.35s var(--ease); }
.page-case-study.cms-ready main { opacity: 1; }

/* Case study header: shared cosmic image with the client logo overlaid.
   Static by design, no reveal fade, no hover. */
.cs-hero-media { border-bottom: 0; }
.cs-hero-media, .cs-hero-media * { transition: none !important; }
.cs-hero-media__logo { pointer-events: none; }
.cs-hero-media__scrim {
  position: absolute; inset: 0; z-index: 2;
  background:
    radial-gradient(58% 54% at 50% 46%, rgba(7,4,15,0.5) 0%, rgba(7,4,15,0) 72%),
    linear-gradient(180deg, rgba(7,4,15,0.4), rgba(7,4,15,0.5));
}
.cs-hero-media__logo {
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  filter: drop-shadow(0 12px 30px rgba(0,0,0,0.7));
}
.cs-hero-media__logo .client-logo {
  width: auto; height: auto;
  max-width: min(46%, 360px); max-height: 42%;
  object-fit: contain;
  opacity: 1; /* override the dimmed marquee .client-logo default */
}
/* Larger, full-strength logo on the case study card thumbnails. */
.lift .cs-hero-media__logo { padding: clamp(1rem, 5%, 1.75rem); }
.lift .cs-hero-media__logo .client-logo {
  max-width: min(72%, 300px); max-height: 58%;
}

/* ---------- 16. CTA banner ---------- */
.cta-banner {
  position: relative; overflow: hidden; text-align: center;
  border-radius: var(--radius-lg);
  padding: clamp(3.5rem, 7vw, 6rem) clamp(1.75rem, 5vw, 4rem);
  background:
    radial-gradient(130% 130% at 50% -20%, rgba(133, 16, 111, 0.22), transparent 55%),
    linear-gradient(180deg, var(--ps-space-3), var(--ps-space-2));
  border: none;
  color: var(--ps-muted);
}
/* CTA eyebrow: plain tick + label, no boxed border (overrides inline styles). */
.cta-banner .eyebrow { background: transparent !important; box-shadow: none !important; padding: 0 !important; }
.cta-banner h2 { color: #fff; max-width: 16em; margin-inline: auto; }
.cta-banner p { max-width: 38em; margin: 1.2rem auto 0; }
.cta-banner .btn { margin-top: 2rem; }

/* ---------- 17. Footer ---------- */
.footer { position: relative; background: var(--ps-space); border-top: 1px solid var(--ps-line); padding: clamp(4rem, 8vw, 6rem) 0 2.5rem; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.6fr; gap: 3rem; padding-bottom: 3rem; border-bottom: 1px solid var(--ps-line); }
.footer__brand p { margin-top: 1rem; font-size: 0.92rem; max-width: 30ch; color: var(--ps-muted); }
.footer__logo { display: inline-flex; align-items: center; gap: 0.55rem; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: 0.16em; text-transform: uppercase; color: #fff; }
.footer__logo img { height: 1.8rem; width: auto; }
.footer__descriptor { margin-top: 0.5rem; font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ps-faint); }
.footer h4 { color: #fff; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 1.2rem; }
.footer__links { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer__links a { font-size: 0.92rem; color: var(--ps-muted); transition: color 0.3s var(--ease); }
.footer__links a:hover { color: #fff; }
.footer__news p { font-size: 0.92rem; margin-bottom: 1rem; color: var(--ps-muted); }
.footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 2rem; font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.04em; color: var(--ps-faint); }
.footer__legal { display: flex; gap: 1.5rem; list-style: none; }
.footer__legal a:hover { color: #fff; }
.socials { display: flex; gap: 0.6rem; margin-top: 1.4rem; }
.socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.4rem; height: 2.4rem; border-radius: var(--radius);
  border: 1px solid var(--ps-line); color: var(--ps-muted);
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease), background-color 0.35s var(--ease);
}
.socials a:hover { color: #fff; border-color: var(--ps-line-strong); background: rgba(255,255,255,0.05); }
.socials svg { width: 1rem; height: 1rem; }

/* ---------- 18. Scroll reveal ---------- */
.rv { opacity: 0; transform: translateY(1.75rem); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: var(--d, 0s); will-change: transform, opacity; }
.rv.in { opacity: 1; transform: translateY(0); }

/* ---------- 19. Hero ---------- */
.hero { position: relative; padding-top: clamp(4rem, 8vw, 7rem); padding-bottom: clamp(4rem, 8vw, 7rem); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.5rem; }

/* Full-bleed cinematic page hero used across pages */
.page-hero {
  position: relative; overflow: hidden;
  padding-top: calc(var(--nav-h) + clamp(4rem, 8vw, 7rem));
  padding-bottom: clamp(3.5rem, 7vw, 5.5rem);
  border-bottom: 1px solid var(--ps-line-soft);
}
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(70% 80% at 50% 0%, rgba(133,16,111,0.22), transparent 60%);
}

/* ---------- 20. Meta rows ---------- */
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.1rem; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.04em; color: var(--ps-faint); }
.meta-row .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.6; }

/* ---------- 21. Timeline ---------- */
.timeline { display: flex; flex-direction: column; position: relative; }
.timeline::before { content: ""; position: absolute; left: 1.35rem; top: 1rem; bottom: 1rem; width: 1px; background: var(--ps-line); }
.timeline__item { position: relative; display: flex; gap: 1.6rem; padding: 1.35rem 0; }
.timeline__num {
  flex: none; width: 2.7rem; height: 2.7rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  color: var(--ps-magenta); background: var(--ps-space); border: 1px solid var(--ps-line); z-index: 1;
}
.timeline__body h4 { margin-bottom: 0.35rem; }
.timeline__body p { color: var(--ps-muted); font-size: 0.97rem; max-width: 58ch; }

/* ---------- 22. TOC + prose ---------- */
.toc { position: sticky; top: calc(var(--nav-h) + 2rem); }
.toc h4 { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ps-faint); margin-bottom: 1rem; }
.toc ol { list-style: none; display: flex; flex-direction: column; gap: 0.3rem; border-left: 1px solid var(--ps-line); }
.toc a { display: block; padding: 0.3rem 0 0.3rem 1rem; margin-left: -1px; border-left: 2px solid transparent; font-size: 0.9rem; color: var(--ps-muted); transition: color 0.3s var(--ease), border-color 0.3s var(--ease); }
.toc a:hover, .toc a.is-active { color: var(--ps-magenta); border-color: var(--ps-magenta); }

.prose { max-width: 70ch; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 2.75rem 0 1rem; scroll-margin-top: calc(var(--nav-h) + 1.5rem); }
.prose h3 { font-size: 1.2rem; margin: 2rem 0 0.75rem; scroll-margin-top: calc(var(--nav-h) + 1.5rem); }
.prose p { margin-bottom: 1.25rem; color: var(--ps-muted); }
.prose ul, .prose ol { margin: 0 0 1.25rem 1.4rem; color: var(--ps-muted); }
.prose li { margin-bottom: 0.5rem; }
.prose blockquote {
  margin: 2rem 0; padding: 0.5rem 0 0.5rem 1.5rem; border-left: 2px solid var(--ps-magenta);
  font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; line-height: 1.4; text-transform: none;
  color: var(--ps-white);
}
.prose strong { color: var(--ps-white); font-weight: 700; }
.prose a { color: var(--ps-magenta-2); text-decoration: underline; text-underline-offset: 3px; }

/* In-content editorial links: any classless anchor inside body copy is made
   clearly clickable (the base `a` is colour:inherit, which hides prose links).
   Component anchors all carry a class, so :not([class]) leaves them untouched;
   breadcrumbs use <ol>, so `main ul` won't catch them. */
main p a:not([class]),
main .lead a:not([class]),
main li a:not([class]):not(.breadcrumbs__item *),
main ul a:not([class]) {
  color: var(--ps-magenta-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(255, 61, 134, 0.45);
  transition: color 0.25s var(--ease), text-decoration-color 0.25s var(--ease);
}
main p a:not([class]):hover,
main .lead a:not([class]):hover,
main li a:not([class]):hover,
main ul a:not([class]):hover {
  color: var(--ps-magenta);
  text-decoration-color: currentColor;
}

/* ---------- 23. Job rows ---------- */
.job-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: clamp(1.4rem, 3vw, 2rem); }
.job-row__meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }

/* ---------- 24. Utility ---------- */
.center { text-align: center; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; } .mt-5 { margin-top: 4rem; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.muted { color: var(--ps-muted); }
.small { font-size: 0.9rem; }
.mono { font-family: var(--font-mono); }

/* ============================================================
   COSMIC HERO (homepage) + full-bleed media
   ============================================================ */
.nav-wrap.is-over-hero { background: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }

.hero--cosmic {
  position: relative; display: flex; align-items: center;
  min-height: clamp(660px, 96vh, 1000px);
  padding-top: calc(var(--nav-h) + clamp(2rem, 5vw, 4rem));
  padding-bottom: clamp(4rem, 8vw, 7rem);
  overflow: hidden; isolation: isolate;
  background: var(--ps-space);
}
.hero--cosmic .cosmic { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; pointer-events: none; }
/* Optional CMS full-bleed media behind the starfield */
.hero__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__media img, .hero__media video { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.hero--cosmic::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 16%, transparent 38%, rgba(5,3,12,0.66) 100%),
    linear-gradient(180deg, transparent 60%, var(--ps-space) 100%);
}
.hero__content { position: relative; z-index: 2; will-change: transform; }
.hero__title { font-size: clamp(3rem, 9vw, 7rem); line-height: 0.98; letter-spacing: 0.005em; color: #fff; }
.hero--cosmic .lead { color: var(--ps-muted); max-width: 38em; }

.hero__scroll { position: absolute; left: 50%; bottom: 1.75rem; transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.hero__scroll-label { font-family: var(--font-mono); font-size: 0.62rem; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ps-faint); }
.hero__scroll-line { position: relative; width: 1px; height: 46px; background: var(--ps-line); overflow: hidden; }
.hero__scroll-line::after { content: ""; position: absolute; left: 0; top: -50%; width: 1px; height: 50%; background: var(--ps-magenta); animation: scroll-cue 2.4s var(--ease) infinite; }
@keyframes scroll-cue { 0% { transform: translateY(-100%); opacity: 0; } 35% { opacity: 1; } 100% { transform: translateY(320%); opacity: 0; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 920px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: block; }
  .nav { gap: 1rem; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .section { padding-block: 4.5rem; }
  .job-row { flex-direction: column; align-items: flex-start; }
  .toc { position: static; margin-bottom: 2.5rem; }
  .hero--cosmic { min-height: clamp(560px, 90vh, 800px); }
  .hero--cosmic .grid--4 { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; }
  /* Case study stat bands stay 2 by 2 on mobile rather than a single column. */
  .page-case-study .grid--4 { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; }
  .hero__scroll { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; }
  .hero__scroll-line::after { display: none; }
  /* The blanket rule above would force the logo marquee to ~0s, making it spin
     wildly. Keep it at its intended slow, gentle speed instead (hover still pauses). */
  .logo-strip__track { animation-duration: 80s !important; }
}

/* ---------- Readability: brighter, comfortable body copy on dark ---------- */
.prose p, .prose ul, .prose ol { color: var(--ps-text); font-size: 1.0625rem; line-height: 1.85; }
.prose li { margin-bottom: 0.6rem; }
.timeline__body p { color: var(--ps-text); }
.acc-item__inner p { color: var(--ps-text); line-height: 1.75; }
.quote-card__text { color: var(--ps-text); }
.muted { color: var(--ps-muted); }

/* Client logos: render uploaded image logos as uniform white silhouettes */
img.client-logo { filter: brightness(0) invert(1); }

/* ---------- Case study gallery ---------- */
.cs-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: clamp(0.75rem, 1.5vw, 1.1rem);
}
/* Keep a 2-up gallery on phones rather than dropping to a single column. */
@media (max-width: 640px) {
  .cs-gallery { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
}
.cs-gallery__item {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--ps-line);
  background: var(--ps-elev);
  aspect-ratio: 4 / 3;
}
.cs-gallery__item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.5s var(--ease);
}
.cs-gallery__item:hover img { transform: scale(1.04); }
.cs-gallery__cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.5rem 1rem 0.75rem;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(7,4,15,0.8));
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(5, 3, 12, 0.92);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.lightbox.is-open { display: flex; }
.lightbox__img {
  max-width: 100%; max-height: 100%;
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 100px -30px rgba(0,0,0,0.8);
}
.lightbox__close {
  position: absolute; top: 1.25rem; right: 1.5rem;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; line-height: 1; color: #fff;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2);
  transition: background-color 0.3s var(--ease);
}
.lightbox__close:hover { background: rgba(255,255,255,0.18); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { margin-bottom: 1.4rem; }
.breadcrumbs__list {
  list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.breadcrumbs__item { display: inline-flex; align-items: center; gap: 0.45rem; }
.breadcrumbs a { color: var(--ps-faint); transition: color 0.3s var(--ease); }
.breadcrumbs a:hover { color: var(--ps-magenta); }
.breadcrumbs [aria-current="page"] { color: var(--ps-muted); }
.breadcrumbs__sep { color: var(--ps-faint); opacity: 0.45; }

/* ---------- Mega menu ("What we do") ---------- */
.has-mega > a { display: inline-flex; align-items: center; }
.has-mega > a::after {
  content: ""; display: inline-block; width: 0.36em; height: 0.36em; margin-left: 0.4em;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.12em) rotate(45deg); opacity: 0.55;
}
.mega {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 80;
  background: rgba(7, 4, 15, 0.97);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--ps-line); border-bottom: 1px solid var(--ps-line);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s 0.3s;
  max-height: 78vh; overflow-y: auto;
}
.nav-wrap.mega-open .mega {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
/* Condensed master-detail layout: services on the left, the active service's
   sub-services on the right (only one set shown at a time). */
.mega__inner {
  width: min(1080px, 100% - 2.5rem); margin-inline: auto;
  display: grid; grid-template-columns: 250px 1fr; align-items: stretch;
}
.mega__nav {
  list-style: none; display: flex; flex-direction: column; gap: 0.1rem;
  padding: 1.5rem 1rem; border-right: 1px solid var(--ps-line);
}
.mega__svc {
  display: block; padding: 0.55rem 0.85rem; border-radius: 6px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.78rem;
  letter-spacing: 0.07em; text-transform: uppercase; color: var(--ps-muted);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.mega__svc:hover, .mega__svc.is-active { color: var(--ps-white); background: rgba(255, 255, 255, 0.06); }
/* Featured service highlight */
.mega__svc--feature {
  color: var(--ps-magenta-2);
  background: rgba(239, 12, 105, 0.08);
  box-shadow: inset 2px 0 0 var(--ps-magenta);
}
.mega__svc--feature::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 0.5rem;
  border-radius: 50%; background: var(--ps-magenta); vertical-align: middle;
}
.mega__svc--feature:hover, .mega__svc--feature.is-active { color: #fff; background: rgba(239, 12, 105, 0.16); }
.mobile-mega a.m-feature { color: var(--ps-magenta-2); font-weight: 600; }
.mega__panel { display: none; padding: 1.7rem 2rem; }
.mega__panel.is-active { display: block; }
.mega__panel-head {
  display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: 1.15rem;
  font-family: var(--font-display); font-weight: 600; font-size: 0.78rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ps-magenta-2);
}
.mega__panel-subs {
  list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem 1.75rem;
}
.mega__panel-subs a { font-size: 0.88rem; color: var(--ps-muted); transition: color 0.2s var(--ease); }
.mega__panel-subs a:hover { color: var(--ps-white); }
.mega__panel-note { color: var(--ps-muted); font-size: 0.9rem; max-width: 34ch; }
.mega__foot { border-top: 1px solid var(--ps-line); background: rgba(255, 255, 255, 0.02); }
.mega__foot a {
  display: block; width: min(1080px, 100% - 2.5rem); margin-inline: auto; padding: 0.9rem 0;
  font-family: var(--font-display); font-size: 0.76rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ps-magenta-2);
}
/* "What we do" collapsible dropdown inside the mobile menu */
.m-has-sub { display: flex; flex-wrap: wrap; align-items: center; }
.m-sub-toggle {
  margin-left: auto; display: inline-flex; align-items: center; justify-content: center;
  width: 2.6rem; height: 2.6rem; color: var(--ps-white); background: none; border: none; cursor: pointer;
}
.m-sub-toggle svg { width: 1.1rem; height: 1.1rem; transition: transform 0.3s var(--ease); }
.m-has-sub.m-sub-open .m-sub-toggle svg { transform: rotate(180deg); }
.mobile-mega {
  flex-basis: 100%; width: 100%; list-style: none;
  margin: 0.4rem 0 0.6rem; padding-left: 1rem;
  display: none; flex-direction: column; gap: 0.6rem; border-left: 1px solid var(--ps-line);
}
.m-has-sub.m-sub-open .mobile-mega { display: flex; }
.mobile-mega a {
  font-family: var(--font-sans); font-size: 1.05rem; font-weight: 400;
  letter-spacing: 0; text-transform: none; color: var(--ps-muted);
}
.mobile-mega a:hover { color: var(--ps-white); }
@media (max-width: 980px) { .mega { display: none; } .has-mega > a::after { display: none; } }
@media (min-width: 981px) { .mobile-mega { display: none; } }

/* ---------- Cookie consent bar ---------- */
.cookie-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  padding: 1rem clamp(1rem, 4vw, 2rem);
  background: rgba(7, 4, 15, 0.94);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  transform: translateY(110%);
  transition: transform 0.45s var(--ease);
}
.cookie-bar.is-in { transform: translateY(0); }
.cookie-bar__inner {
  max-width: 1100px; margin-inline: auto;
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
}
.cookie-bar__text {
  flex: 1; min-width: 15rem; margin: 0;
  font-size: 0.9rem; line-height: 1.5; color: rgba(255, 255, 255, 0.72);
}
.cookie-bar__text a { color: var(--ps-magenta-2); text-decoration: underline; text-underline-offset: 3px; }
.cookie-bar__actions { display: flex; gap: 0.6rem; flex-shrink: 0; }
@media (max-width: 560px) {
  .cookie-bar__actions { width: 100%; }
  .cookie-bar__actions .btn { flex: 1; justify-content: center; }
}

/* ---------- Theme toggle button (nav) ---------- */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.4rem; height: 2.4rem; border-radius: 50%; flex: none;
  border: 1px solid var(--ps-line); color: var(--ps-white);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.theme-toggle:hover { border-color: var(--ps-line-strong); background: var(--ps-elev); }
.theme-toggle svg { width: 1.05rem; height: 1.05rem; }
.theme-toggle__moon { display: none; }
:root[data-theme="light"] .theme-toggle__sun { display: none; }
:root[data-theme="light"] .theme-toggle__moon { display: block; }

/* Desktop: sit the theme toggle next to the logo, push the rest right. */
@media (min-width: 921px) {
  .nav__logo { margin-right: 0; order: 1; }
  .theme-toggle { order: 2; margin-right: auto; }
  .nav > nav { order: 3; }
  .nav__cta { order: 4; }
}

/* ============================================================
   LIGHT THEME — opt-in via <html data-theme="light">.
   Dark-first design: light mode flips the page surfaces and text,
   while genuinely dark elements (floating nav, homepage hero,
   dark feature sections, footer, CTA banner) stay dark with white
   text by re-scoping the tokens locally.
   ============================================================ */
:root[data-theme="light"] {
  --ps-space:   #f6f4fb;
  --ps-space-2: #ffffff;
  --ps-space-3: #ffffff;
  --ps-white:   #1b1030;   /* primary ink in light mode */
  --ps-text:    rgba(27, 16, 48, 0.86);
  --ps-muted:   rgba(27, 16, 48, 0.60);
  --ps-faint:   rgba(27, 16, 48, 0.46);
  --ps-line:        rgba(27, 16, 48, 0.12);
  --ps-line-soft:   rgba(27, 16, 48, 0.07);
  --ps-line-strong: rgba(27, 16, 48, 0.26);
  --ps-elev:   #ffffff;
  --ps-elev-2: #ffffff;
  --ink: var(--ps-white);
  --text: var(--ps-text);
  --muted: var(--ps-muted);
  --paper: var(--ps-space-2);
}

/* Light page backdrop: drop the starfield, keep a soft tinted wash. */
:root[data-theme="light"] body { background: var(--ps-space); }
:root[data-theme="light"] .space-bg {
  background:
    radial-gradient(80% 60% at 50% -10%, rgba(133, 16, 111, 0.10), transparent 60%),
    radial-gradient(70% 50% at 100% 100%, rgba(239, 12, 105, 0.05), transparent 60%),
    var(--ps-space);
}
:root[data-theme="light"] .space-bg canvas { display: none; }

/* Elevated light cards get a real surface + soft shadow. */
:root[data-theme="light"] .bezel { box-shadow: 0 1px 2px rgba(27,16,48,0.04), 0 20px 45px -32px rgba(27,16,48,0.30); }
:root[data-theme="light"] .lift:hover { box-shadow: 0 0 0 1px rgba(239,12,105,0.18), 0 26px 55px -34px rgba(27,16,48,0.35); }
:root[data-theme="light"] .form-success { color: var(--ps-white); }

/* Genuinely dark elements keep their dark treatment + white text. */
:root[data-theme="light"] .nav-wrap,
:root[data-theme="light"] .mobile-menu,
:root[data-theme="light"] .hero--cosmic,
:root[data-theme="light"] .section--dark,
:root[data-theme="light"] .footer,
:root[data-theme="light"] .cta-banner,
:root[data-theme="light"] .cookie-bar {
  --ps-space:   #07040f;
  --ps-space-2: #0e0a1c;
  --ps-space-3: #150e28;
  --ps-white:   #ffffff;
  --ps-text:    rgba(255, 255, 255, 0.92);
  --ps-muted:   rgba(255, 255, 255, 0.60);
  --ps-faint:   rgba(255, 255, 255, 0.40);
  --ps-line:        rgba(255, 255, 255, 0.12);
  --ps-line-soft:   rgba(255, 255, 255, 0.07);
  --ps-line-strong: rgba(255, 255, 255, 0.28);
  --ps-elev:   rgba(255, 255, 255, 0.04);
  --ps-elev-2: rgba(255, 255, 255, 0.02);
  --ink: #ffffff;
  --text: var(--ps-text);
  --muted: var(--ps-muted);
}

/* Client logos: dark on light surfaces, but stay white on dark ones. */
:root[data-theme="light"] img.client-logo { filter: brightness(0); }
:root[data-theme="light"] .nav-wrap img.client-logo,
:root[data-theme="light"] .footer img.client-logo,
:root[data-theme="light"] .hero--cosmic img.client-logo,
:root[data-theme="light"] .section--dark img.client-logo,
:root[data-theme="light"] .cs-hero-media img.client-logo {
  filter: brightness(0) invert(1);
}

/* ============================================================
   RESOURCE TOOLS — calculator, checkers, checklist, cheat sheet, jargon
   ============================================================ */
.socials svg { width: 1.05rem; height: 1.05rem; }

/* Shared tool scaffolding */
.tool-wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 2rem; align-items: start; }
@media (max-width: 860px) { .tool-wrap { grid-template-columns: 1fr; } }
.tool-field { margin-bottom: 1.6rem; }
.tool-field > label, .tool-legend { display: block; font-family: var(--font-display); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ps-muted); margin-bottom: 0.7rem; }
.tool-field .tool-help { color: var(--ps-faint); font-size: 0.82rem; margin-top: 0.45rem; }

/* Segmented option buttons */
.opt-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.opt-row .opt {
  border: 1px solid var(--ps-line); background: var(--ps-elev); color: var(--ps-text);
  border-radius: 999px; padding: 0.5rem 0.95rem; font-size: 0.85rem; cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}
.opt-row .opt:hover { border-color: var(--ps-line-strong); }
.opt-row .opt.is-on { border-color: var(--ps-magenta); background: rgba(239,12,105,0.14); color: #fff; }

/* Range slider */
.tool-range { width: 100%; accent-color: var(--ps-magenta); }
.tool-range-val { font-family: var(--font-mono); color: #fff; font-size: 0.95rem; }

/* Result panel */
.tool-result { position: sticky; top: calc(var(--nav-h) + 1rem); }
.tool-result .result-figure { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.1rem, 4vw, 3rem); color: #fff; line-height: 1.05; }
.tool-result .result-sub { color: var(--ps-muted); font-size: 0.9rem; margin-top: 0.4rem; }
.tool-result ul { list-style: none; margin-top: 1.2rem; display: flex; flex-direction: column; gap: 0.6rem; }
.tool-result ul li { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.9rem; color: var(--ps-text); border-bottom: 1px dashed var(--ps-line); padding-bottom: 0.55rem; }
.tool-result ul li span:last-child { font-family: var(--font-mono); color: #fff; white-space: nowrap; }

/* Score meter (health check) */
.score-meter { height: 12px; border-radius: 999px; background: var(--ps-elev); overflow: hidden; border: 1px solid var(--ps-line); }
.score-meter > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ef0c69, #b249ff); transition: width 0.6s var(--ease); }
.score-grade { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 4vw, 2.8rem); color: #fff; }

/* Interactive checklist */
.checklist { display: flex; flex-direction: column; gap: 0.4rem; }
.checklist .ck-group { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.74rem; color: var(--ps-magenta); margin: 1.4rem 0 0.5rem; }
.ck-item { display: flex; gap: 0.8rem; align-items: flex-start; padding: 0.7rem 0.85rem; border: 1px solid var(--ps-line); border-radius: 12px; background: var(--ps-elev); cursor: pointer; transition: border-color 0.2s var(--ease); }
.ck-item:hover { border-color: var(--ps-line-strong); }
.ck-item input { margin-top: 0.2rem; width: 1.05rem; height: 1.05rem; accent-color: var(--ps-magenta); flex: none; }
.ck-item.is-done { opacity: 0.55; }
.ck-item.is-done .ck-text { text-decoration: line-through; }
.ck-text small { display: block; color: var(--ps-faint); font-size: 0.82rem; margin-top: 0.15rem; text-decoration: none; }
.ck-progress { font-family: var(--font-mono); color: #fff; }

/* Reference tables (cheat sheet) */
.ref-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.ref-table th, .ref-table td { text-align: left; padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--ps-line); }
.ref-table th { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; color: var(--ps-muted); }
.ref-table td:last-child { font-family: var(--font-mono); color: #fff; white-space: nowrap; }
.ref-table tr:last-child td { border-bottom: 0; }
.ref-scroll { overflow-x: auto; }

/* Jargon glossary */
.jargon-search { width: 100%; padding: 0.85rem 1rem; border-radius: 12px; border: 1px solid var(--ps-line); background: var(--ps-elev); color: var(--ps-text); margin-bottom: 1.5rem; }
.jargon-search:focus { outline: none; border-color: var(--ps-magenta); }
.jargon-list { display: flex; flex-direction: column; gap: 0.9rem; }
.jargon-term { border: 1px solid var(--ps-line); border-radius: 14px; padding: 1.1rem 1.25rem; background: var(--ps-elev); }
.jargon-term h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.jargon-term .jargon-aka { font-family: var(--font-mono); font-size: 0.74rem; color: var(--ps-magenta); text-transform: uppercase; letter-spacing: 0.06em; }
.jargon-term p { color: var(--ps-muted); font-size: 0.92rem; margin-top: 0.35rem; }
.jargon-empty { color: var(--ps-faint); padding: 1rem 0; }

/* ============================================================
   WORK / CATEGORY PAGES — tighter hero, bottom-aligned card CTAs
   ============================================================ */
/* Sit the breadcrumb closer to the top on the Work + category views. */
/* Work page hero uses the base .page-hero padding, matching the other category pages */

/* Equal-height work cards so every "Read the story" lines up at the bottom. */
#cs-grid .bezel,
#home-work-grid .bezel { height: 100%; }
#cs-grid .bezel__core,
#home-work-grid .bezel__core { display: flex; flex-direction: column; height: 100%; }
#cs-grid .card-pad,
#home-work-grid .card-pad { display: flex; flex-direction: column; flex: 1 1 auto; }
#cs-grid .card-pad .arrow-link,
#home-work-grid .card-pad .arrow-link { margin-top: auto; padding-top: 1rem; }

/* ============================================================
   WORKFLOW DIAGRAMS — animated node/edge canvas (Make/n8n style)
   ============================================================ */
/* Flex column (not grid) so cards stay capped to the container and the
   canvas scrolls horizontally instead of blowing out the page width. */
.flow-stack { display: flex; flex-direction: column; gap: clamp(1.75rem, 3.5vw, 2.75rem); }
.flow-card { min-width: 0; }
.flow-card__head { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.flow-card__head h3 { font-size: 1.2rem; }
.flow-card__head span { font-size: 0.9rem; color: var(--ps-muted); }

.flow-canvas {
  min-width: 0; max-width: 100%;
  border: 1px solid var(--ps-line); border-radius: var(--radius-lg);
  background:
    radial-gradient(circle, rgba(255,255,255,0.045) 1px, transparent 1.5px) 0 0 / 22px 22px,
    var(--ps-space-2);
  padding: clamp(1rem, 2.5vw, 1.75rem); overflow: hidden;
}

.psflow {
  --dur: 4.5s; --step: 0.8s;
  display: flex; align-items: stretch; gap: 0; min-width: 0;
  overflow-x: auto; padding-block: 1.5rem; scrollbar-width: thin;
}
.psflow__node {
  flex: 0 0 auto; width: clamp(134px, 14vw, 160px);
  display: flex; flex-direction: column; gap: 0.55rem;
  padding: 0.9rem 1rem; border-radius: 14px;
  border: 1px solid var(--ps-line); background: var(--ps-space-3);
  animation: psNode var(--dur) ease-out infinite;
  animation-delay: calc(var(--i) * var(--step));
}
.psflow__chip {
  width: 2rem; height: 2rem; border-radius: 9px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(239,12,105,0.12); border: 1px solid rgba(239,12,105,0.32); color: var(--ps-magenta-2);
}
.psflow__chip svg { width: 1.05rem; height: 1.05rem; }
.psflow__tag {
  font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ps-muted);
}
.psflow__node b { font-size: 0.88rem; color: #fff; font-weight: 700; line-height: 1.25; }

.psflow__edge {
  flex: 0 0 clamp(28px, 4.5vw, 56px); align-self: center; position: relative; height: 2px;
  background: var(--ps-line); overflow: visible;
}
.psflow__edge::after {
  content: ""; position: absolute; top: 50%; left: 0; width: 8px; height: 8px; margin-top: -4px;
  border-radius: 50%; background: #fff;
  box-shadow: 0 0 8px 1px var(--ps-magenta), -8px 0 9px -2px rgba(239,12,105,0.75), -15px 0 11px -4px rgba(239,12,105,0.4);
  opacity: 0; animation: psPacket var(--dur) linear infinite;
  animation-delay: calc(var(--i) * var(--step));
}

@keyframes psNode {
  0% { box-shadow: none; border-color: var(--ps-line); transform: scale(1); }
  4% { box-shadow: 0 0 0 1px rgba(239,12,105,0.45), 0 0 28px -8px var(--ps-magenta); border-color: var(--ps-magenta); transform: scale(1.03); }
  14% { box-shadow: 0 0 0 1px rgba(239,12,105,0.10); border-color: var(--ps-line-strong); transform: scale(1); }
  46%, 100% { box-shadow: none; border-color: var(--ps-line); transform: scale(1); }
}
@keyframes psPacket {
  0% { left: 0%; opacity: 0; }
  4% { opacity: 1; }
  15% { opacity: 1; }
  17.8% { left: 100%; opacity: 0; }
  100% { left: 100%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .psflow__node, .psflow__edge::after { animation: none !important; }
  .psflow__edge { background: linear-gradient(90deg, var(--ps-magenta), var(--ps-magenta-2)) !important; }
  .psflow__edge::after { opacity: 0 !important; }
}

/* Complex workflow SVG: scale to fill desktop, scroll on mobile. */
.flow-scroll { overflow-x: auto; scrollbar-width: thin; }
.cflow { display: block; width: 100%; min-width: 820px; height: auto; }

/* ============================================================
   FAQ accordion + area links (location landing pages)
   ============================================================ */
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item { border: 1px solid var(--ps-line); border-radius: 14px; background: var(--ps-elev); overflow: hidden; }
.faq-item summary { list-style: none; cursor: pointer; padding: 1.1rem 1.25rem; font-family: var(--font-display); font-weight: 700; color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; width: 0.55rem; height: 0.55rem; border-right: 2px solid var(--ps-magenta); border-bottom: 2px solid var(--ps-magenta); transform: translateY(-2px) rotate(45deg); transition: transform 0.3s var(--ease); flex: none; }
.faq-item[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq-item summary:hover { color: var(--ps-magenta-2); }
.faq-item__body { padding: 0 1.25rem 1.2rem; color: var(--ps-muted); }
.faq-item__body p { margin: 0; line-height: 1.75; }
.area-links a { color: var(--ps-muted); text-decoration: underline; text-underline-offset: 2px; transition: color 0.25s var(--ease); }
.area-links a:hover { color: var(--ps-magenta-2); }

/* ============================================================
   CAMPAIGN LANDING PAGES (lp-*) — distraction-reduced, conversion-led
   ============================================================ */
.lp-bar { position: sticky; top: 0; z-index: 90; background: rgba(7,4,15,0.85); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--ps-line); }
.lp-bar__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem; }
.lp-bar__cta { display: flex; align-items: center; gap: 1.1rem; }
.lp-bar__tel { font-family: var(--font-mono); font-size: 0.85rem; color: var(--ps-text); white-space: nowrap; }
.lp-bar__tel:hover { color: var(--ps-magenta-2); }
@media (max-width: 560px) { .lp-bar__tel { display: none; } }

.lp-hero { position: relative; overflow: hidden; padding-top: clamp(3rem, 6vw, 5rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.lp-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 80% at 50% 0%, rgba(133,16,111,0.22), transparent 60%); }
.lp-badge { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ps-magenta-2); background: rgba(239,12,105,0.1); border: 1px solid rgba(239,12,105,0.3); padding: 0.4rem 0.85rem; border-radius: 999px; }
.lp-hero__list { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; margin-top: 1.6rem; }
.lp-hero__list li { display: flex; gap: 0.7rem; align-items: flex-start; color: var(--ps-text); }
.lp-hero__list svg { flex: none; width: 1.3rem; height: 1.3rem; color: var(--ps-magenta-2); margin-top: 0.05rem; }
.lp-trust { margin-top: 1.5rem; font-size: 0.85rem; color: var(--ps-muted); }
.lp-step__num { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; color: var(--ps-magenta-2); line-height: 1; }
.lp-foot { border-top: 1px solid var(--ps-line); padding: 1.75rem 0; color: var(--ps-faint); }
.lp-foot__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.85rem; }
.lp-foot__inner a { color: var(--ps-muted); }
.lp-foot__inner a:hover { color: var(--ps-magenta-2); }

/* ---------- v31: accessibility, motion & premium polish ---------- */

/* Skip-to-content link for keyboard / screen-reader users */
.skip-link {
  position: absolute; left: 0.5rem; top: -3.5rem; z-index: 2000;
  background: var(--ps-magenta); color: #fff; padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius) var(--radius); font-weight: 700;
  letter-spacing: 0.02em; transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0; }

/* Visible keyboard focus ring everywhere */
:focus-visible { outline: 2px solid var(--ps-magenta-2); outline-offset: 2px; border-radius: 3px; }

/* Smooth cross-page transitions — progressive enhancement (Chrome/Edge) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.32s; }

/* Honour reduced-motion: stop reveals, loops and page transitions */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .rv { opacity: 1 !important; transform: none !important; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; scroll-behavior: auto !important;
  }
}
