/* ============================================================
   Site-wide typography + motion layer (loaded on every page, after style.css)
   - Fonts: Plus Jakarta Sans everywhere, Instrument Serif italic for accents
   - Hero: word-by-word reveal, drifting colour glows, staggered entrance
   - Cards: glowing running border, cursor spotlight, 3D tilt (see motion.js)
   - Scroll reveals: softer blur-rise; section headings reveal word by word
   Advisory pages run calmer/slower than Digital (body.page-advisory).
   ============================================================ */

:root {
  --display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --mono: 'Plus Jakarta Sans', system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --mo-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --mo-speed: 1;                 /* multiplier — advisory pages slow everything down */
  --mo-accent-a: #5AA2FF;
  --mo-accent-b: #2CE0BE;
  --mo-glow-1: #2F6BFF;
  --mo-glow-2: #2CE0BE;
}
body.page-advisory {
  --mo-speed: 1.35;
  --mo-accent-a: #FF9A4D;
  --mo-accent-b: #FFD29E;
  --mo-glow-1: #FF6A1F;
  --mo-glow-2: #FFB020;
}

@property --mo-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* ---------- typography ---------- */
body { font-feature-settings: "ss01", "cv11"; letter-spacing: -0.003em; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.03em; }
h1 { font-weight: 800; letter-spacing: -0.04em; }
h2 { letter-spacing: -0.035em; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
.btn { font-weight: 600; letter-spacing: -0.005em; border-radius: 10px; }
.page-intro-lead { font-size: 17px; line-height: 1.65; }
.hero-bold-heading {
  font-family: var(--display);
  text-transform: none;
  font-weight: 800;
  letter-spacing: -0.045em;
}
.hero-network-grid h1 { font-size: clamp(38px, 4.8vw, 62px); line-height: 1.02; max-width: 660px; }
.page-intro h1 { font-size: clamp(32px, 4.4vw, 56px); line-height: 1.04; max-width: 860px; }

/* italic serif accent word with a slow colour shimmer */
.mo-accent {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.1em;
  letter-spacing: -0.005em;
  line-height: 0.9;
  padding: 0 0.08em 0 0.02em;
  background: linear-gradient(100deg, var(--mo-accent-a) 0%, var(--mo-accent-b) 35%, #fff 50%, var(--mo-accent-b) 65%, var(--mo-accent-a) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 0;
}

/* ---------- hero: drifting glows + staggered entrance ---------- */
.mo-glow {
  position: absolute;
  z-index: 1;
  width: 48vw;
  height: 48vw;
  min-width: 360px;
  min-height: 360px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.42;
  pointer-events: none;
  mix-blend-mode: screen;
  will-change: transform;
}
.mo-glow-a { background: radial-gradient(circle, var(--mo-glow-1), transparent 65%); left: -14vw; top: -10vh; animation: moDriftA calc(20s * var(--mo-speed)) ease-in-out infinite alternate; }
.mo-glow-b { background: radial-gradient(circle, var(--mo-glow-2), transparent 65%); right: -16vw; bottom: -20vh; opacity: 0.26; animation: moDriftB calc(26s * var(--mo-speed)) ease-in-out infinite alternate; }

.mo-hero .eyebrow,
.mo-hero .page-intro-lead,
.mo-hero .wrap .btn,
.mo-hero .hero-character-zone {
  opacity: 0;
  animation: moRise calc(1s * var(--mo-speed)) var(--mo-ease) forwards;
}
.mo-hero .eyebrow { animation-delay: 0.05s; }
.mo-hero .page-intro-lead { animation-delay: calc(0.75s * var(--mo-speed)); }
.mo-hero .wrap .btn { animation-delay: calc(0.9s * var(--mo-speed)); }
.mo-hero .hero-character-zone { animation-name: moZoneIn; animation-duration: 1.4s; animation-delay: 0.5s; }
.mo-hero .hero-eyebrow-slide { animation: moRise 1s var(--mo-ease) 0.05s forwards, heroEyebrowSlide 4.5s ease-in-out 1.2s infinite; }

/* words inside split headings (motion.js wraps each word in .mo-w) */
.mo-w { display: inline-block; }
.mo-split .mo-w {
  opacity: 0;
  filter: blur(12px);
  transform: translateY(0.45em) rotateX(-55deg);
  transform-origin: 50% 100%;
  animation: moWord calc(0.95s * var(--mo-speed)) var(--mo-ease) forwards;
  animation-delay: calc((0.15s + var(--w) * 0.06s) * var(--mo-speed));
}
.mo-split .mo-w.mo-accent { animation: moWord calc(0.95s * var(--mo-speed)) var(--mo-ease) forwards, moShine 7s linear infinite; animation-delay: calc((0.15s + var(--w) * 0.06s) * var(--mo-speed)), 0s; }

/* section headings reveal word by word when their block scrolls into view */
.mo-h2 .mo-w {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(0.4em);
  transition: opacity calc(0.8s * var(--mo-speed)) var(--mo-ease), filter calc(0.8s * var(--mo-speed)) var(--mo-ease), transform calc(0.8s * var(--mo-speed)) var(--mo-ease);
  transition-delay: calc(var(--w) * 45ms * var(--mo-speed));
}
.in-view .mo-h2 .mo-w,
.mo-h2.in-view .mo-w { opacity: 1; filter: none; transform: none; }

/* ---------- services ticker under each hero ---------- */
.mo-marquee {
  position: relative;
  overflow: hidden;
  padding: 18px 0;
  background: #070A12;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.mo-marquee::before,
.mo-marquee::after { content: ''; position: absolute; top: 0; bottom: 0; width: 12%; z-index: 1; pointer-events: none; }
.mo-marquee::before { left: 0; background: linear-gradient(90deg, #070A12, transparent); }
.mo-marquee::after { right: 0; background: linear-gradient(-90deg, #070A12, transparent); }
.mo-marquee-track { display: flex; width: max-content; animation: moMarquee calc(50s * var(--mo-speed)) linear infinite; }
.mo-marquee:hover .mo-marquee-track { animation-play-state: paused; }
.mo-tick { display: inline-flex; align-items: center; gap: 16px; padding: 0 26px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: rgba(255, 255, 255, 0.62); white-space: nowrap; }
.mo-tick::before { content: ''; width: 7px; height: 7px; border-radius: 1.5px; transform: rotate(45deg); background: var(--mo-accent-a); box-shadow: 0 0 10px var(--mo-accent-a); }

/* ---------- scroll reveals: softer, with a little blur ---------- */
[data-reveal] { filter: blur(6px); }
[data-reveal].in-view { filter: none; }
.cap-card[data-reveal]:not(.in-view),
.process-card[data-reveal]:not(.in-view),
.industry-card[data-reveal]:not(.in-view),
.pillar-card[data-reveal]:not(.in-view),
.insight-card[data-reveal]:not(.in-view) { transform: translateY(56px) scale(0.96); }
/* cards had their own short transition that cut the reveal short — give the reveal room, then hand back */
.fill-card[data-reveal],
.insight-card[data-reveal],
.client-chip[data-reveal],
.stat-card[data-reveal] {
  transition:
    opacity calc(0.9s * var(--mo-speed)) var(--mo-ease),
    transform calc(0.9s * var(--mo-speed)) var(--mo-ease),
    filter calc(0.9s * var(--mo-speed)) var(--mo-ease),
    background 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease;
}
.fill-card.mo-settled,
.insight-card.mo-settled,
.client-chip.mo-settled { transition: transform 0.45s var(--mo-ease), background 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease; }
.mo-tilting { transition: transform 0.12s linear, background 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease !important; }

/* ---------- cards: spotlight + running glow border + coloured shadow ---------- */
.fill-card,
.insight-card { position: relative; isolation: isolate; --mx: 50%; --my: 50%; }
.fill-card::before,
.insight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(380px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.24), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.insight-card::before { background: radial-gradient(380px circle at var(--mx) var(--my), rgba(47, 134, 255, 0.10), transparent 60%); }
.fill-card::after,
.insight-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--mo-angle), transparent 0%, rgba(255, 255, 255, 0.95) 10%, transparent 24%, transparent 50%, rgba(255, 255, 255, 0.6) 60%, transparent 74%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  transition: opacity 0.4s ease;
  animation: moAngle calc(3.5s * var(--mo-speed)) linear infinite;
  pointer-events: none;
}
.insight-card::after { background: conic-gradient(from var(--mo-angle), transparent 0%, #2F86FF 12%, transparent 26%, transparent 50%, #2CE0BE 62%, transparent 76%); }
.page-advisory .insight-card::after { background: conic-gradient(from var(--mo-angle), transparent 0%, #C2660F 12%, transparent 26%, transparent 50%, #FFB020 62%, transparent 76%); }
.fill-card:hover::before, .fill-card:hover::after,
.insight-card:hover::before, .insight-card:hover::after { opacity: 1; }
.fill-advisory:hover { box-shadow: 0 28px 60px -22px rgba(194, 102, 15, 0.65); }
.fill-digital:hover { box-shadow: 0 28px 60px -22px rgba(47, 134, 255, 0.65); }
.fill-card .icon-badge { transition: color 0.4s ease, transform 0.6s var(--mo-ease); }
.fill-card:hover .icon-badge { transform: translateY(-4px) rotate(-6deg) scale(1.06); }
.fill-card .fill-ghost-num { transition: color 0.4s ease, transform 0.6s var(--mo-ease); }
.fill-card:hover .fill-ghost-num { transform: translateX(-4px); }

/* ---------- buttons: light sweep on hover ---------- */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -75%;
  width: 50%;
  z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.75s var(--mo-ease);
  pointer-events: none;
}
.btn:hover::before { left: 130%; }

/* ---------- keyframes ---------- */
@keyframes moRise { from { opacity: 0; transform: translateY(22px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes moZoneIn { from { opacity: 0; transform: translateX(40px) scale(0.96); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes moWord { to { opacity: 1; filter: blur(0); transform: none; } }
@keyframes moShine { to { background-position: -250% 0; } }
@keyframes moAngle { to { --mo-angle: 360deg; } }
@keyframes moMarquee { to { transform: translateX(-50%); } }
@keyframes moDriftA { to { transform: translate(10vw, 12vh) scale(1.15); } }
@keyframes moDriftB { to { transform: translate(-10vw, -10vh) scale(0.9); } }

@media (max-width: 900px) {
  /* Digital hero: the floating info cards overlapped each other and the button on phones —
     lay them out as a tidy wrapped row instead (they still bob gently). */
  .hero-character-zone { height: auto; margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }
  .hero-character-zone .hero-float-card { position: static; flex: 1 1 150px; min-width: 0; max-width: none; padding: 16px 18px; }
  .hero-character-placeholder { display: none; }
}
@media (max-width: 700px) {
  .page-intro-lead { font-size: 15.5px; }
  .mo-tick { font-size: 14px; padding: 0 18px; }
  .mo-marquee { padding: 14px 0; }
  .mo-glow { filter: blur(70px); }
}

@media (prefers-reduced-motion: reduce) {
  .mo-split .mo-w, .mo-h2 .mo-w, .mo-hero .eyebrow, .mo-hero .page-intro-lead, .mo-hero .wrap .btn, .mo-hero .hero-character-zone {
    opacity: 1 !important; filter: none !important; transform: none !important; animation: none !important;
  }
  .mo-glow, .mo-marquee-track, .fill-card::after, .insight-card::after { animation: none !important; }
  [data-reveal] { filter: none; }
}

/* ============================================================
   Social rail (Digital hero, left edge): bigger labels with brand icons,
   staggered entrance, a light that travels down the rail, and each icon
   pulsing in turn so the eye is drawn to it.
   ============================================================ */
.social-rail { gap: 30px; left: 26px; padding: 6px 0; }
.social-rail .hero-side-dot { display: none; }
.social-rail-line {
  position: absolute;
  left: 50%;
  top: -40px;
  bottom: -40px;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.22) 20%, rgba(255, 255, 255, 0.22) 80%, transparent);
  overflow: hidden;
  z-index: -1;
}
.social-rail-line span {
  position: absolute;
  left: 0;
  width: 1px;
  height: 70px;
  background: linear-gradient(180deg, transparent, var(--mo-accent-b), transparent);
  box-shadow: 0 0 10px var(--mo-accent-b);
  animation: socialTravel 3.6s ease-in-out infinite;
}

.social-link {
  writing-mode: horizontal-tb;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  opacity: 0;
  animation: socialIn 0.9s var(--mo-ease) forwards;
  animation-delay: calc(0.9s + var(--s) * 0.15s);
  transition: color 0.3s ease, transform 0.4s var(--mo-ease);
}
.social-icon {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  transition: background 0.35s ease, border-color 0.35s ease, transform 0.45s var(--mo-ease), box-shadow 0.35s ease;
}
.social-icon svg { width: 18px; height: 18px; }
/* attention pulse: each icon in turn */
.social-icon::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1.5px solid var(--mo-accent-b);
  opacity: 0;
  animation: socialPulse 4.5s ease-out infinite;
  animation-delay: calc(2s + var(--s) * 0.5s);
  pointer-events: none;
}
.social-label {
  writing-mode: vertical-rl;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff 0%, #fff 40%, var(--mo-accent-b) 50%, #fff 60%, #fff 100%);
  background-size: 100% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: socialShine 5s linear infinite;
  animation-delay: calc(var(--s) * 0.6s);
}

/* hover: brand colour, lift and glow */
.social-link:hover { transform: translateX(4px); }
.social-link:hover .social-icon { transform: scale(1.12) rotate(-6deg); border-color: transparent; }
.social-linkedin:hover .social-icon { background: #0A66C2; box-shadow: 0 10px 26px -6px rgba(10, 102, 194, 0.8); }
.social-instagram:hover .social-icon { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); box-shadow: 0 10px 26px -6px rgba(214, 36, 159, 0.8); }
.social-facebook:hover .social-icon { background: #1877F2; box-shadow: 0 10px 26px -6px rgba(24, 119, 242, 0.8); }
.social-link:hover .social-label { animation-duration: 1.2s; }

@keyframes socialIn { from { opacity: 0; transform: translateX(-24px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes socialTravel { 0% { top: -70px; } 100% { top: 100%; } }
@keyframes socialPulse { 0% { opacity: 0.9; transform: scale(1); } 30%, 100% { opacity: 0; transform: scale(1.55); } }
@keyframes socialShine { 0% { background-position: 0 100%; } 100% { background-position: 0 -200%; } }

/* phones/tablets: the side rail becomes a row of icon pills under the hero text */
@media (max-width: 900px) {
  .hero-side-links.social-rail {
    display: flex;
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    order: 2;
    padding: 0 24px;
    margin-top: 22px;
  }
  .social-rail-line { display: none; }
  .social-link { flex-direction: row; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12); }
  .social-icon { width: 30px; height: 30px; border-radius: 50%; }
  .social-icon svg { width: 15px; height: 15px; }
  .social-label { writing-mode: horizontal-tb; font-size: 12px; letter-spacing: 0.06em; animation: none; background: none; color: #fff; }
}
@media (max-width: 380px) { .social-label { display: none; } .social-link { padding: 6px; } }

@media (prefers-reduced-motion: reduce) {
  .social-link { opacity: 1 !important; animation: none !important; }
  .social-icon::after, .social-label, .social-rail-line span { animation: none !important; }
  .social-label { color: #fff; background: none; }
}

/* ---------- keep the services ticker on the first screen ----------
   The hero used to be a full 100vh, pushing the moving services strip just below the fold.
   The hero now leaves exactly the strip's height free, so hero + ticker fill one screen. */
:root { --mo-marquee-h: 59px; }
.mo-hero.page-intro,
.mo-hero.hero-network-section {
  min-height: calc(100vh - var(--mo-marquee-h));
  min-height: calc(100svh - var(--mo-marquee-h));
}
/* shorter laptop screens: trim the hero's top/bottom padding so the content still fits */
@media (max-height: 820px) and (min-width: 901px) {
  .mo-hero.page-intro { padding-top: 110px; padding-bottom: 50px; }
  .mo-hero.hero-network-section { padding-top: 104px; padding-bottom: 40px; }
}
@media (max-width: 700px) { :root { --mo-marquee-h: 51px; } }

/* Video credit line hidden on all pages (markup kept so it can be re-enabled by deleting this rule) */
.hero-video-attribution { display: none !important; }
@media (max-width: 900px) { .track-advisory-band .hero-side-links.social-rail { justify-content: center; } }

/* ============================================================
   Quantum logo splash — page transition from the landing page
   .qa-transit : on the landing page, drawn over the dark wipe after a card is clicked
   .qa-arrive  : on advisory/digital, shown instantly on arrival, then fades away
   --qa-c is the chosen track's colour (orange / blue)
   ============================================================ */
.qa-splash {
  --qa-c: #5AA2FF;
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  pointer-events: none;
}
.qa-splash.is-on { display: flex; }
.qa-arrive { background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--qa-c) 24%, #05070D) 0%, #05070D 62%); }

.qa-mark { position: relative; width: 124px; height: 124px; display: grid; place-items: center; }
.qa-mark::before {
  content: '';
  position: absolute;
  inset: -40px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--qa-c) 45%, transparent), transparent 65%);
  filter: blur(10px);
}
.qa-mark img { position: relative; width: 46px; height: 46px; filter: brightness(0) invert(1); }
.qa-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.qa-ring circle { fill: none; stroke: var(--qa-c); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 280; stroke-dashoffset: 0; }
.qa-ring .qa-ring-outer { stroke: rgba(255, 255, 255, 0.55); stroke-dasharray: 352; }
.qa-orbit { position: absolute; inset: 4px; animation: qaSpin 1.4s linear infinite; }
.qa-orbit span { position: absolute; top: -4px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #2CE0BE; box-shadow: 0 0 16px #2CE0BE; }
.qa-word {
  position: relative;
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

/* landing: everything draws in over the wipe */
.qa-transit.is-on .qa-mark::before { animation: qaFade 0.6s ease both; }
.qa-transit.is-on .qa-ring circle { stroke-dashoffset: 280; animation: qaDraw 0.8s var(--mo-ease) 0.05s forwards; }
.qa-transit.is-on .qa-ring .qa-ring-outer { stroke-dashoffset: 352; animation-delay: 0.15s; }
.qa-transit.is-on .qa-mark img { animation: qaPop 0.6s var(--mo-ease) 0.15s both; }
.qa-transit.is-on .qa-orbit { animation: qaFade 0.4s ease 0.3s both, qaSpin 1.4s linear infinite; }
.qa-transit.is-on .qa-word { animation: qaLetters 0.8s var(--mo-ease) 0.25s both; }

/* arrival: logo is already complete, holds briefly, then lifts away */
.qa-arrive.is-on { animation: qaOut 0.7s var(--mo-ease) 0.45s forwards; }

@keyframes qaSpin { to { transform: rotate(360deg); } }
@keyframes qaDraw { to { stroke-dashoffset: 0; } }
@keyframes qaPop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }
@keyframes qaFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes qaLetters { from { opacity: 0; letter-spacing: 0.9em; filter: blur(8px); } to { opacity: 1; letter-spacing: 0.32em; filter: none; } }
@keyframes qaOut { to { opacity: 0; transform: scale(1.06); visibility: hidden; } }

@media (prefers-reduced-motion: reduce) {
  .qa-splash { display: none !important; }
}
