/* =====================================================================
   HOMEPAGE (index.html): the process hero banner and the curved SOC video section.
   Loaded after base.css. Built from: process-hero.css.
   ===================================================================== */

/* ======================== from process-hero.css ======================== */
/* ==========================================================================
   MIPL Process Hero (homepage banner) — scoped to .process-hero
   Combines the hero's base/desktop styles and its responsive rules.
   ========================================================================== */
/* ==========================================================================
   MIPL Process Hero — base + desktop
   The hero is drawn on a design canvas that matches the reference
   screenshot (1770 × 782 units). JS scales the canvas to the viewport, so
   every position below is in those units. Tune the composition here.
   ========================================================================== */

:root {
  --ph-bg: #07043d;
  --ph-bg-2: #120d63;
  --ph-blue: #2f6fe4;
  --ph-blue-2: #5c8dff;
  --ph-red: #e0312f;
  --ph-pink: #ff5f8f;
  --ph-white: #ffffff;
  --ph-text-2: rgba(255, 255, 255, 0.84);
  --ph-overlay: #19157a;
  --ph-font: var(--sans, "Urbanist"), system-ui, -apple-system, "Segoe UI", sans-serif;
}

.process-hero {
  /* ---- Design canvas ---- */
  --stage-w: 1770;
  --stage-h: 1012;         /* 782 + 230 of headroom for the centred heading and buttons */
  --fit-w: 1560;           /* width that must stay visible (side cards may bleed) */
  --fit-h: 1030;

  /* ---- Card wheel (positions in canvas units, angles in degrees) ---- */
  --card-w: 800;           /* card shape size */
  --card-h: 405;
  --card-x: 868;           /* centre of the active card */
  --card-y: 522;
  --card-scale: 1;
  --wheel-radius: 1400;    /* cards travel on this arc */
  --slot-angle: 25.8;      /* angle between previous / active / next */
  --side-rotate: 1.24;     /* side-card rotation = slot angle × this */
  --side-scale: 0.74;
  --far-scale: 0.55;       /* entering / leaving cards */
  --side-overlay: 0.64;    /* dark blue veil on side cards */
  --card-depth: 160;       /* z-depth per slot */

  /* ---- Timeline arc ---- */
  --arc-x: 885;
  --arc-peak: 730;
  --arc-radius: 928;
  --arc-spread: 27;        /* first/last node angle */
  --layout: desktop;
  --ph-offset-top: 64px;   /* height of the fixed site header; the canvas is fitted below it */

  position: relative;
  font-family: var(--ph-font);
  color: var(--ph-white);
  height: 100vh;
  height: 100svh;
  min-height: 520px;
  overflow: hidden;
  background: var(--ph-bg);
  isolation: isolate;
}

.ph-sr {
  position: absolute !important;
  width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Background atmosphere ---------- */
.ph-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.ph-light { position: absolute; border-radius: 50%; will-change: transform; }
.ph-light--a {
  width: 90vw; height: 90vw; left: 5vw; top: -55vw;
  background: radial-gradient(closest-side, rgba(56, 48, 190, 0.55), rgba(56, 48, 190, 0) 72%);
}
.ph-light--b {
  width: 70vw; height: 70vw; left: 15vw; bottom: -52vw;
  background: radial-gradient(closest-side, rgba(47, 111, 228, 0.22), rgba(47, 111, 228, 0) 70%);
}
.ph-particles { position: absolute; inset: 0; }
.ph-particle {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #b9c8ff;
  opacity: 0.25;
}

/* ---------- Design canvas ---------- */
.ph-stage {
  position: absolute;
  left: 50%; top: calc(50% + var(--ph-offset-top) / 2);
  z-index: 1;
  width: calc(var(--stage-w) * 1px);
  height: calc(var(--stage-h) * 1px);
  margin-left: calc(var(--stage-w) * -0.5px);
  margin-top: calc(var(--stage-h) * -0.5px);
  transform: scale(var(--s, 1));
  transform-origin: 50% 50%;
}

.ph-active-glow {
  position: absolute; left: 0; top: 0;
  width: 520px; height: 520px; margin: -260px 0 0 -260px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(224, 49, 47, 0.2), rgba(224, 49, 47, 0) 70%);
  pointer-events: none;
}

/* ---------- Hero heading (centred, above the cards) ----------
   Canvas units: a 1100-wide box centred on the 1770 canvas. */
.ph-heading {
  position: absolute; left: 335px; top: 22px;
  z-index: 25;
  width: 1100px;
  text-align: center;
  pointer-events: none;
}
.process-hero .ph-heading__title {
  margin: 0;
  font-family: var(--ph-font);
  font-size: 54px; font-weight: 700; line-height: 1.1; letter-spacing: -0.01em;
  color: #fff;
}
.ph-heading__br { display: none; }   /* two lines on desktop, three on phones */
.ph-heading__actions {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 14px;
  margin-top: 24px;
}
.ph-heading__actions .btn {
  min-height: 56px; padding: .65em 1.6em;
  font-size: 18px;
  pointer-events: auto;                /* the heading box itself lets clicks through to the cards */
}
.process-hero .ph-btn-red {
  background: linear-gradient(90deg, var(--ph-pink), #ff3b3b);
  color: #fff;
  box-shadow: 0 10px 28px rgba(224, 49, 47, 0.35);
  transition: filter .25s, box-shadow .25s;
}
.process-hero .ph-btn-red:hover { filter: brightness(1.08); box-shadow: 0 12px 34px rgba(224, 49, 47, 0.5); }
.process-hero .ph-heading__actions .btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
/* Reddish accent, same pink → red as the timeline progress line */
.process-hero .ph-heading__accent {
  color: #ff4d5e;
  background: linear-gradient(90deg, var(--ph-pink), #ff3b3b);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Cards ---------- */
.ph-wheel {
  position: absolute; inset: 0;
  perspective: 2400px;
}
.ph-card {
  position: absolute; left: 0; top: 0;
  width: calc(var(--card-w) * 1px);
  height: calc(var(--card-h) * 1px);
  margin-left: calc(var(--card-w) * -0.5px);
  margin-top: calc(var(--card-h) * -0.5px);
  will-change: transform, opacity;
  cursor: pointer;
}
.ph-card__shadow {
  width: 100%; height: 100%;
  filter: drop-shadow(0 28px 36px rgba(2, 1, 28, 0.55));
}
.ph-card__shape {
  position: relative;
  width: 100%; height: 100%;
  overflow: hidden;
  background: #120f5a;
  /* Arched panel from the reference: convex top, slanted sides, concave bottom, rounded corners */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 405' preserveAspectRatio='none'%3E%3Cpath d='M22 106 Q400 -66 778 106 L714 384 Q400 310 86 384 Z' fill='white' stroke='white' stroke-width='40' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 405' preserveAspectRatio='none'%3E%3Cpath d='M22 106 Q400 -66 778 106 L714 384 Q400 310 86 384 Z' fill='white' stroke='white' stroke-width='40' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.ph-card__poster,
.ph-card__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.ph-card__video { opacity: 0; visibility: hidden; }
.ph-card__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(25, 21, 122, 0.82), rgba(14, 10, 80, 0.9));
  mix-blend-mode: multiply;
  opacity: 0;
}
.ph-card__tint {
  position: absolute; inset: 0;
  background: rgba(40, 36, 150, 0.35);
  opacity: 0;
}
.ph-card__shine {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 30%);
  pointer-events: none;
}

/* Heading inside each card (sits above the dark veil so side cards stay readable) */
.ph-card__label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  height: 46%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  gap: 6px;
  padding: 0 90px 78px;           /* clears the curved bottom edge of the card shape */
  text-align: center;
  background: linear-gradient(180deg, rgba(7, 4, 61, 0) 0%, rgba(7, 4, 61, 0.55) 55%, rgba(7, 4, 61, 0.8) 100%);
  pointer-events: none;
}

/* ---------- Timeline ---------- */
.ph-timeline {
  position: absolute; left: 0; top: 0;
  width: 100%; height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 20;
}
.ph-timeline__base { fill: none; stroke: rgba(255, 255, 255, 0.95); stroke-width: 3.5; stroke-linecap: round; }
.ph-timeline__progress { fill: none; stroke-width: 4; stroke-linecap: round; }
.ph-timeline__signal { opacity: 0; }
.ph-timeline__signal-core { fill: #fff; }
.is-complete .ph-timeline__progress { filter: drop-shadow(0 0 6px rgba(255, 95, 143, 0.8)); }
.is-complete .ph-timeline__base { stroke: rgba(255, 210, 222, 0.95); }

.ph-nodes { position: absolute; inset: 0; z-index: 25; pointer-events: none; }
.ph-node {
  position: absolute; left: 0; top: 0;
  width: 48px; height: 48px;
  margin: -24px 0 0 -24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}
.ph-node__dot {
  position: absolute; left: 50%; top: 50%;
  width: 24px; height: 24px;
  margin: -12px 0 0 -12px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--ph-blue);
  border: 3.5px solid #fff;
  box-shadow: 0 0 0 0 rgba(47, 111, 228, 0);
  transition: background-color 0.35s, box-shadow 0.35s;
}
.ph-node__check { width: 11px; height: 11px; opacity: 0; transition: opacity 0.3s; }
.ph-node__num { display: none; font-size: 11px; font-weight: 700; line-height: 1; }
.ph-node.is-done .ph-node__dot { background: var(--ph-blue-2); }
.ph-node.is-done .ph-node__check { opacity: 1; }
.ph-node.is-active .ph-node__dot {
  background: var(--ph-red);
  box-shadow: 0 0 0 7px rgba(224, 49, 47, 0.22), 0 0 26px rgba(224, 49, 47, 0.7);
}
.ph-node.is-active .ph-node__check { opacity: 0; }
.is-complete .ph-node .ph-node__dot { box-shadow: 0 0 0 6px rgba(255, 95, 143, 0.18), 0 0 20px rgba(255, 95, 143, 0.55); }
.ph-node:hover .ph-node__dot { box-shadow: 0 0 0 7px rgba(92, 141, 255, 0.25), 0 0 20px rgba(92, 141, 255, 0.55); }
.ph-node:focus { outline: none; }
.ph-node:focus-visible .ph-node__dot { outline: 3px solid #fff; outline-offset: 5px; }
.ph-node__label {
  position: absolute; left: 50%; top: calc(100% + 4px);
  width: 150px; margin-left: -75px;
  text-align: center;
  font-size: 18px; line-height: 1.22;
  color: var(--ph-text-2);
  pointer-events: none;
  transition: color 0.3s;
}
.ph-node.is-active .ph-node__label,
.ph-node:hover .ph-node__label { color: #fff; }

/* ---------- Copy ---------- */
.ph-copy {
  position: absolute;
  left: calc(var(--arc-x) * 1px - 280px);
  top: 796px;
  width: 560px;
  z-index: 26;
  text-align: center;
}
.ph-count {
  display: inline-flex; align-items: baseline; gap: 6px;
  margin: 0 0 6px;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ph-blue-2);
}
.ph-count__roll {
  position: relative;
  display: inline-block;
  width: 1.6em; height: 1.15em;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.ph-count__roll > span { position: absolute; left: 0; top: 0; width: 100%; text-align: center; }
/* Site heading styles (h2 colour, font) must not reach the hero copy */
.ph-desc {
  max-width: 360px;
  margin: 12px auto 0;
  font-size: 17px; line-height: 1.45;
  color: var(--ph-text-2);
}
.ph-final {
  max-width: 420px;
  margin: 14px auto 0;
  font-size: 15px; font-weight: 700; line-height: 1.4;
  color: var(--ph-pink);
  opacity: 0; visibility: hidden;
}

/* ---------- Screen-fixed UI (not scaled) ---------- */
.ph-ui { position: absolute; inset: auto 0 0 0; z-index: 40; pointer-events: none; }
.ph-hint {
  position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin: 0;
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.ph-hint__line { position: relative; width: 1px; height: 28px; background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.ph-hint__line::after {
  content: ""; position: absolute; left: 0; top: -10px; width: 1px; height: 10px;
  background: #fff;
  animation: ph-hint 1.8s ease-in-out infinite;
}
@keyframes ph-hint { to { transform: translateY(38px); } }

/* ---------- Initial states for the entrance (only when JS runs) ---------- */
.ph-js .ph-bg,
.ph-js .ph-heading,   /* heading + SITC/AMC/SOC row: hidden until the intro fades it in, so it never shows on its own while the page loads */
.ph-js .ph-card,
.ph-js .ph-timeline__base,
.ph-js .ph-node,
.ph-js .ph-copy,
.ph-js .ph-ui { opacity: 0; }

/* ==========================================================================
   MIPL Process Hero — responsive
   Desktop and landscape tablets use the same composition, scaled.
   Phones and portrait tablets switch to a vertical, video-first canvas
   (400 × 800 units): one large card, compact stage selector, copy below.
   ========================================================================== */

/* Tablet landscape: slightly tighter fit so the side cards stay readable */
@media (max-width: 1180px) and (min-aspect-ratio: 4/5) {
  .process-hero { --fit-w: 1460; }
  .ph-node__label { font-size: 19px; }
  .ph-desc { font-size: 18px; }
}

/* Phones + portrait tablets */
@media (max-width: 767px), (max-aspect-ratio: 4/5) {
  .process-hero {
    --ph-offset-top: 60px;
    --stage-w: 400;
    --stage-h: 880;
    --fit-w: 400;
    --fit-h: 880;

    --card-x: 200;
    --card-y: 330;
    --card-scale: 0.47;
    --wheel-radius: 0;          /* no wheel: the active card stands alone */
    --side-overlay: 0.6;

    --arc-x: 200;
    --arc-peak: 512;
    --arc-radius: 330;
    --arc-spread: 30;
    --layout: mobile;
  }

  /* Phones: the heading sits centred above the single card */
  .ph-heading { left: 20px; top: 8px; width: 360px; }
  .ph-heading__br { display: inline; }
  .ph-heading__actions { gap: 10px; margin-top: 14px; }
  .ph-heading__actions .btn { min-height: 40px; padding: .5em 1.05em; font-size: 13px; }
  .process-hero .ph-heading__title { font-size: 25px; }

  .ph-card__label { padding: 0 70px 74px; gap: 8px; }

  .ph-timeline__base { stroke-width: 3; }
  .ph-timeline__progress { stroke-width: 3.5; }

  .ph-node { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
  .ph-node__dot { width: 28px; height: 28px; margin: -14px 0 0 -14px; border-width: 3px; }
  .ph-node__num { display: block; }
  .ph-node__check, .ph-node.is-done .ph-node__check { display: none; }
  .ph-node__label { display: none; }

  .ph-copy { left: 20px; top: 586px; width: 360px; }
  .ph-count { font-size: 11px; }
  .ph-desc { max-width: 330px; font-size: 15.5px; margin-top: 10px; }
  .ph-final { font-size: 14px; }

  .ph-hint { display: none; }
}

/* Phones only (up to 767px wide): larger heading and buttons, copy moved down to cut the empty space at the bottom.
   Scoped to 767px so portrait tablets keep the rules above. #main makes these beat the base.css phone rules. */
@media (max-width: 767px) {
  #main .process-hero .ph-heading__title { font-size: 34px; line-height: 1.08; }
  #main .process-hero .ph-heading__actions .btn { min-height: 46px; font-size: 15px; }
  #main .process-hero .ph-copy { top: 640px; }
}

/* Small phones (up to 480px): headline weight, flat card, stacked full-width CTAs */
@media (max-width: 480px) {
  #main .process-hero .ph-heading__title { font-size: 34px; font-weight: 500; line-height: 1.1; letter-spacing: -0.01em; }

  /* flat card with rounded corners instead of the arched mask */
  .process-hero .ph-card__shape { -webkit-mask: none; mask: none; border-radius: 16px; }

  /* CTAs: stacked, full width, at least 48px tall, 12px apart */
  #main .process-hero .ph-heading__actions { flex-direction: column; align-items: stretch; gap: 12px; }
  #main .process-hero .ph-heading__actions .btn { width: 100%; min-height: 48px; font-size: 15px; }
}

/* Reduced motion: no pin, no decorative motion; stages change instantly via the selector */
@media (prefers-reduced-motion: reduce) {
  .ph-hint__line::after { animation: none; }
  .ph-node__dot, .ph-node__label, .ph-node__check { transition: none; }
}

/* ======================== from index.html (inline <style>) ======================== */
    /* Full-width video with a navy rounded bite at the top centre that holds the heading.
       The bite is a circular segment cut out of the video with a mask (viewBox 1440 × 578,
       the frame's own proportion, so the circle is never stretched). */
    .scurve {
      --sc-navy: #020D24;
      position: relative;
      background: var(--sc-navy);
      color: #fff;
      overflow: hidden;
      isolation: isolate;
    }

    /* Heading: centred in the bite. Light weight, "Intelligence" bold. */
    #main .scurve .scurve__title {          /* #main: outranks the site-wide #main h2 rule */
      position: absolute; left: 0; right: 0; top: 2.6vw; z-index: 2;
      margin: 0; padding: 0 16px;
      text-align: center;
      font-family: "Urbanist", system-ui, -apple-system, "Segoe UI", sans-serif;
      font-weight: 300;
      font-size: clamp(1.5rem, 3.3vw, 3.4rem);
      line-height: 1.25;
      letter-spacing: -0.01em;
      color: #fff;
    }
    .scurve__line { display: block; }
    #main .scurve .scurve__accent { font-weight: 700; color: #F20B4D; }

    /* Video frame: full width, 1440 : 578. The mask keeps the whole rectangle except the
       circular bite (chord 1025, depth 270 at the top centre), which shows the navy behind. */
    .scurve__frame {
      position: relative; z-index: 1;
      width: 100%;
      aspect-ratio: 1440 / 578;
      -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 578' preserveAspectRatio='none'%3E%3Cpath fill-rule='evenodd' fill='white' d='M0 0 H1440 V578 H0 Z M207.5 0 A621.4 621.4 0 0 0 1232.5 0 Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
      mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 578' preserveAspectRatio='none'%3E%3Cpath fill-rule='evenodd' fill='white' d='M0 0 H1440 V578 H0 Z M207.5 0 A621.4 621.4 0 0 0 1232.5 0 Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    }
    .scurve__video {
      position: absolute; inset: 0;
      width: 100%; height: 100%;
      object-fit: cover; object-position: 50% 50%;
      background: var(--sc-navy);
    }
    /* Light navy tint so the footage reads as one calm surface */
    .scurve__shade {
      position: absolute; inset: 0; pointer-events: none;
      background: linear-gradient(180deg, rgba(2, 13, 36, .18), rgba(2, 13, 36, .28));
    }

    /* Phones: a taller (square) frame and a deeper, wider bite so the two lines still fit */
    @media (max-width: 767px) {
      #main .scurve .scurve__title { top: 4.5vw; font-size: clamp(1.15rem, 5.6vw, 1.5rem); }
      .scurve__frame {
        aspect-ratio: 1 / 1;
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 1000' preserveAspectRatio='none'%3E%3Cpath fill-rule='evenodd' fill='white' d='M0 0 H1000 V1000 H0 Z M50 0 A453.1 453.1 0 0 0 950 0 Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 1000' preserveAspectRatio='none'%3E%3Cpath fill-rule='evenodd' fill='white' d='M0 0 H1000 V1000 H0 Z M50 0 A453.1 453.1 0 0 0 950 0 Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
      }
      .scurve__video { object-position: 40% 50%; }
    }
  

/* Our clients: slower logo scroll on the homepage (base.css default is 40s per loop; a higher number = slower) */
.clients .marquee-track { animation-duration: 70s; }

/* Our clients: compact rows; every logo box the same size; each logo's height (--bh) is set in clients.js so all logos carry about the same visual weight */
.clients .marquee-track { gap: 10px; }
.clients .marquee { padding: 6px 0; }
.clients .marquee + .marquee { margin-top: 4px; }
.clients .marquee-track .logo-chip { width: 190px; height: 84px; padding: 12px 10px; border-radius: 12px; }
.clients .marquee-track .logo-chip img { width: auto; height: var(--bh, 36px); max-width: 150px; max-height: 52px; object-fit: contain; }

/* ---------- SOC video section (2nd section), phones only ----------
   No white curved cut-out: the video fills the frame. Heading and sub-line are white and sit together,
   centred vertically over the video. (.scurve__copy wraps them in index.html; it has no style on desktop.) */
@media (max-width: 767px) {
  .home-hero-light #main .scurve { background: #020D24; }
  #main .scurve .scurve__frame { -webkit-mask: none; mask: none; }
  .scurve__shade { background: linear-gradient(180deg, rgba(2, 13, 36, .45), rgba(2, 13, 36, .6)); }

  .scurve__copy {
    position: absolute; inset: 0; z-index: 2;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    padding: 0 20px;
    pointer-events: none;
  }
  .home-hero-light #main .scurve .scurve__copy .scurve__title,
  .home-hero-light #main .scurve .scurve__copy .scurve__sub {
    position: static; transform: none; top: auto; left: auto; right: auto;
    width: auto; max-width: 100%; margin: 0; padding: 0;
    text-align: center;
    color: #fff;
    text-shadow: 0 1px 14px rgba(0, 0, 0, .35);
  }
  .home-hero-light #main .scurve .scurve__copy .scurve__sub { color: rgba(255, 255, 255, .9); }
}
