/* =====================================================================
   Northline — interaction layer (feedback pass)
   Loaded on every page after the inline design CSS, so its selectors win.
   All added motion respects prefers-reduced-motion.
   ===================================================================== */

/* ---------- Hover motion: interactive elements only ----------
   Headings and body copy stay still — scattered text motion reads as templated
   (feedback + frontend-design skill). Motion is reserved for things you act on. */
.btn { transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease; }
.flink { transition: color .2s ease, padding-left .2s ease; }
.chip { transition: border-color .25s, color .25s, transform .25s ease; }
.chip:hover { transform: translateY(-2px); }
/* Checklist-style rows (comparison + project program/execution lists) nudge on
   hover — restored per feedback; these are list items, not prose. */
.cmp-row, .crow { transition: transform .3s cubic-bezier(.2,.6,.2,1), color .25s ease; }
.cmp-row:hover, .crow:hover { transform: translateX(6px); }

/* Pillar kicker — role descriptor that replaced the non-informative "Pillar 0N". */
.pillar-kicker { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- Count-up metrics ---------- */
.count { font-variant-numeric: tabular-nums; }

/* ---------- Four Pillars — 3D flip cards (front -> back on hover) ---------- */
.pillar-flip { position: relative; min-height: 494px; perspective: 1500px; }
.pillar-inner {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transition: transform .75s cubic-bezier(.2,.7,.2,1);
}
.pillar-flip:hover .pillar-inner,
.pillar-flip:focus-within .pillar-inner { transform: rotateY(180deg); }
.pillar-face {
  position: absolute; inset: 0;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  background: #081a33;
  border: 1px solid rgba(141,171,214,.14);
  border-radius: 18px;
  padding: 28px 24px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  overflow: hidden;
}
.pillar-front { transition: border-color .4s ease, box-shadow .4s ease; }
.pillar-flip:hover .pillar-front { border-color: rgba(247,148,30,.4); }
.pillar-front .pbody { margin: 0; }
.pillar-hint {
  margin-top: auto;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: #cba96a; display: inline-flex; align-items: center; gap: 8px;
}
.pillar-hint svg { transition: transform .4s ease; }
.pillar-flip:hover .pillar-hint svg { transform: rotateY(180deg) translateX(3px); }
/* Back = the full partner detail (top-aligned + compact so every capability fits). */
.pillar-back {
  transform: rotateY(180deg);
  align-items: flex-start; justify-content: flex-start; text-align: left;
  gap: 8px; padding: 22px 20px;
  background: linear-gradient(160deg, #0b2140, #081a33);
  border-color: rgba(247,148,30,.4);
}
.pillar-back .exp-label { margin: 0; }
.pillar-back .exp-title { font-size: 17px; line-height: 1.2; margin: 0; }
.pillar-back .pbody { font-size: 12px; line-height: 1.48; margin: 0; }
.pillar-back .cap-h { font-size: 12px; margin: 2px 0 0; }
.pillar-back .caplist { gap: 6px; margin: 0; width: 100%; }
.pillar-back .caplist li { font-size: 11.5px; line-height: 1.32; gap: 8px; }
.pillar-back .caplist svg { width: 14px; height: 14px; flex: none; }
.pillar-back .exp-logo { height: 28px; margin: auto 0 0; padding-top: 6px; }
.pillar-back .exp-logo img { max-height: 28px; max-width: 148px; object-fit: contain; }
.pillar-back .plink { margin-top: 8px; font-size: 12.5px; }
.pillar-back .exp-links { display: flex; gap: 14px; flex-wrap: wrap; }
/* Touch: tap flips the card (there's no hover). */
.pillar-flip.flipped .pillar-inner { transform: rotateY(180deg); }

/* ---------- Integrated Platform — stages with premium icons + hover menus ---------- */
.stages {
  position: relative;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px;
  margin-top: 54px; padding-bottom: 172px;
}
.stages::before {
  content: ''; position: absolute; left: 9%; right: 9%; top: 35px; height: 2px;
  background: linear-gradient(90deg, rgba(247,148,30,.2), #f7941e 50%, rgba(247,148,30,.2));
}
.stages::after {
  content: ''; position: absolute; right: calc(9% - 9px); top: 29px;
  width: 0; height: 0;
  border-left: 10px solid #f7941e; border-top: 7px solid transparent; border-bottom: 7px solid transparent;
}
.stage { position: relative; text-align: center; padding: 0 6px; }
.stage-ico {
  width: 72px; height: 72px; margin: 0 auto; border-radius: 20px;
  background: #0a1c38; border: 1px solid rgba(247,148,30,.34);
  color: #f7941e; display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 2;
  transition: transform .4s cubic-bezier(.2,.7,.2,1), background .4s ease, color .4s ease, border-color .4s ease, box-shadow .4s ease;
}
.stage-ico svg { width: 40px; height: 40px; }
.stage:hover .stage-ico {
  transform: translateY(-9px) scale(1.07);
  background: #f7941e; color: #081120; border-color: #f7941e;
  box-shadow: 0 18px 38px rgba(247,148,30,.4);
}
.stage-name { margin-top: 18px; font-size: 17px; font-weight: 700; transition: transform .3s ease; }
.stage-num { display: block; font-size: 12.5px; letter-spacing: .16em; font-weight: 700; color: #f7941e; margin-bottom: 5px; }
.stage:hover .stage-name { transform: translateY(-3px); }
.stage-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 18px);
  background: #081a33; border: 1px solid rgba(141,171,214,.18); border-radius: 14px;
  padding: 6px 8px; display: flex; flex-direction: column;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .32s ease, transform .32s ease;
  box-shadow: 0 22px 48px rgba(0,0,0,.55); z-index: 6;
}
.stage-menu span { font-size: 13px; color: #a7b2c5; padding: 10px 12px; border-top: 1px solid rgba(141,171,214,.1); }
.stage-menu span:first-child { border-top: 0; }
.stage:hover .stage-menu, .stage:focus-within .stage-menu { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* ---------- Cinematic bands ---------- */
.band { overflow: hidden; }
/* Full-bleed "developer-builder" band: the whole logo image, edge to edge, at its
   NATURAL aspect ratio — no crop, no distortion. Height scales with width; the
   caption overlays the bottom on a scrim for legibility. */
.band--bleed { position: relative; border-top: 1px solid rgba(141,171,214,.14); border-bottom: 1px solid rgba(141,171,214,.14); }
.band--bleed .band-bg { position: static; display: block; width: 100%; height: auto; transition: transform .8s ease; will-change: transform; }
.band--bleed:hover .band-bg { transform: scale(1.03); }
.band--bleed::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 42%;
  background: linear-gradient(transparent, rgba(0,9,26,.72)); pointer-events: none;
}
.band-cap {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: clamp(16px, 4vw, 50px);
  margin: 0; padding: 0 24px; text-align: center;
  font-size: clamp(17px, 2.3vw, 24px); font-weight: 700; color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,.6);
}
/* The other (Built-band) still cover-crops -> give it a slow ambient horizontal pan. */
.band:not(.band--bleed) .band-bg { object-position: 0% 50%; will-change: object-position; }
@media (prefers-reduced-motion: no-preference) {
  .band:not(.band--bleed) .band-bg { animation: band-pan 26s ease-in-out infinite alternate; }
}
@keyframes band-pan { from { object-position: 0% 50%; } to { object-position: 100% 50%; } }

/* ---------- Responsive: on hover-less / narrow screens, reveal menus inline ---------- */
@media (max-width: 980px) {
  .stages { grid-template-columns: repeat(2, 1fr); gap: 34px; padding-bottom: 0; }
  .stages::before, .stages::after { display: none; }
  .stage-menu {
    position: static; opacity: 1; transform: none; pointer-events: auto;
    margin-top: 14px; box-shadow: none;
  }
}
@media (hover: none) {
  .stage-menu { position: static; opacity: 1; transform: none; pointer-events: auto; margin-top: 14px; box-shadow: none; }
  .stages { padding-bottom: 0; }
  /* Touch flips via tap (.flipped in enhance.js), not hover. */
  .pillar-flip:hover .pillar-inner { transform: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .pillar-inner, .stage-ico, .stage-name, .band-bg,
  .btn, .chip, .flink,
  h1, h2, h3, .h1, .h2, .h3, .lede, .pbody, .blk-p, .blk-h, .bio,
  .eyebrow, .label, .stat-l, .caplist li, .crow, .cmp-row {
    transition: none !important; animation: none !important;
  }
  .pillar-flip:hover .pillar-inner { transform: rotateY(180deg); }
}

/* ---------- Mobile QA: stacking, shrink, spacing ---------- */
/* The design comps' inline 2-/3-column grids had no responsive fallback, so on
   phones their min-content forced the whole page wider than the viewport (uniform
   right-edge clipping). Stack them, let grid/flex children shrink, and clip any
   residual horizontal overflow. */
@media (max-width: 900px) {
  #platform .grid { grid-template-columns: 1fr !important; gap: 34px !important; }
  footer > .wrap { grid-template-columns: 1fr !important; gap: 40px !important; }
}
@media (max-width: 640px) {
  html { overflow-x: clip; }
  .vgrid > div, .fstats > div, .grid4 > *, .grid3 > *, .grid5 > *,
  .cmp-row, .feat-in, .pkin, .adv-in, .blk { min-width: 0; }
  .grid4, .grid3 { grid-template-columns: 1fr !important; }
  footer [style*="column-gap:24px"] { grid-template-columns: 1fr !important; }
  .stat-n { font-size: 34px; }
  .fstat-n { font-size: 30px; }
  .feat-in .h3 { font-size: 26px !important; }
  .band .posrel { padding-top: 150px !important; padding-bottom: 34px !important; }
  .pillar-flip { min-height: 430px; }
  h1, h2, h3, .h1, .h2, .h3 { overflow-wrap: break-word; }
}
@media (max-width: 420px) {
  .stat-n { font-size: 30px; }
  .fstats { grid-template-columns: 1fr !important; }
}

/* ---------- Readability: bump the two smallest labels to 12px ---------- */
.tm-role { font-size: 12px; }
.pktag { font-size: 12px; }

/* ---------- Accessibility: visible keyboard focus (missing in the comps) ---------- */
:focus-visible { outline: 2px solid #f7941e; outline-offset: 2px; border-radius: 3px; }
/* Keyboard: focusing into a stage reveals its capability menu. */
.stage:focus-within .stage-menu { opacity: 1; transform: translateY(0); pointer-events: auto; }
