/* Insight Bay, Flight Theory hero v3 (12 Nov 2026): lift, made live. Pairs with flighttheory-hero-v3.js.
   Palette: the page's own --ib-* tokens (the hero is always the dark .ft-void scope). Layout is identical with and
   without JavaScript, so nothing shifts when the script arrives. The H1 and the copy are painted at the first frame
   and rise in CSS only; site-v3 leaves them alone (they keep .ft-reveal, which its heading rule excludes).
   Reduced motion: no animation here; the script paints one still frame. No JavaScript: the copy and a static airfoil. */

.ft-hero {
  --ft3-in: cubic-bezier(0.23, 1, 0.32, 1);
  --ft3-move: cubic-bezier(0.77, 0, 0.175, 1);
  --ft3-px: 0; --ft3-py: 0; --ft3-p: 0;
}
body.ft-page .ft-hero { padding-top: calc(4.25rem + clamp(1.75rem, 5vh, 3.5rem)); padding-bottom: clamp(2rem, 4vh, 3rem); }
.ft-hero > .ft-wide { position: relative; z-index: 1; }

/* ---------- copy: painted from frame 0, a short CSS rise ---------- */
@keyframes ft3-h1 {
  from { translate: 0 6px; }
  to   { translate: 0 0; }
}
@keyframes ft3-up { from { translate: 0 .75rem; } to { translate: 0 0; } }
.ft-hero .ft-reveal, .ft-hero .ft-reveal.is-in { opacity: 1; transform: none; transition: none; }
@media (prefers-reduced-motion: no-preference) {
  .ft-hero h1.ft-reveal { animation: ft3-h1 .35s var(--ft3-in) backwards; }
  .ft-hero .ft-hero-eyebrow.ft-reveal,
  .ft-hero .ft-hero-sub.ft-reveal,
  .ft-hero .ft-hero-actions.ft-reveal,
  .ft-hero .ft-facts.ft-reveal { animation: ft3-up .45s var(--ft3-in) backwards; animation-delay: calc(var(--i, 0) * 45ms); }
  .ft-hero .ft-hero-eyebrow.ft-reveal { animation-delay: 0s; }
}

/* ---------- background plane: a dot field that streams with the air ---------- */
.ft-hero .ft-sky::after {
  content: ""; position: absolute; inset: -30px;
  background-image: radial-gradient(circle, rgba(242, 239, 232, .2) 1px, transparent 1.6px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(75% 70% at 62% 46%, #000 0%, rgba(0, 0, 0, .45) 55%, transparent 100%);
          mask-image: radial-gradient(75% 70% at 62% 46%, #000 0%, rgba(0, 0, 0, .45) 55%, transparent 100%);
  transform: translate3d(calc(var(--ft3-px) * -12px), calc(var(--ft3-py) * -9px), 0);
}
@media (prefers-reduced-motion: no-preference) {
  .ft-hero .ft-sky::after { animation: ft3-dots 3.2s linear infinite; }
}
@keyframes ft3-dots { from { background-position: 0 0; } to { background-position: 30px 0; } }

/* ---------- the field canvas (middle plane) ---------- */
.ft3-canvas {
  position: absolute; z-index: 0; pointer-events: none; display: block;
  opacity: calc(1 - var(--ft3-p) * .85);
  transform: translate3d(calc(var(--ft3-px) * 5px), calc(var(--ft3-py) * 4px - var(--ft3-p) * 28px), 0);
  will-change: transform;
}

/* ---------- the stage (right column): drag target, readouts, the small flight display ---------- */
.ft-hero .ft-pfd-wrap { position: relative; width: 100%; max-width: none; margin: 0; min-height: 33rem; align-self: stretch; touch-action: pan-y; }
.ft-hero-grid { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); }
.ft-hero .ft-pfd { position: absolute; top: .25rem; right: 0; width: 12.5rem;
  transform: translate3d(calc(var(--ft3-px) * 9px), calc(var(--ft3-py) * 7px), 0); opacity: calc(1 - var(--ft3-p)); }
.ft-hero .ft-live { position: absolute; right: 0; top: 11.4rem; width: 12.5rem; margin: 0; }
.ft-hero .ft-live-row { flex-wrap: wrap; justify-content: center; gap: .35rem; }
.ft-hero.ft3-on .ft-pfd-wrap { cursor: ns-resize; }
@media (pointer: coarse) { .ft-hero.ft3-on .ft-pfd-wrap { cursor: pointer; } }
.ft-pfd-wrap.is-drag { cursor: grabbing; }

/* static airfoil for no-JS, and until the script has run */
.ft3-static { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.ft3-static .s-flow { fill: none; stroke: rgba(198, 200, 198, .22); stroke-width: 1.1; }
.ft3-static .s-hot { fill: none; stroke: var(--ib-accent); stroke-opacity: .6; stroke-width: 1.4; }
.ft3-static .s-wing { fill: #14181a; stroke: var(--ib-accent); stroke-width: 2; }
.ft3-static .s-lift { fill: none; stroke: var(--ib-accent); stroke-width: 3; stroke-linecap: round; }
.ft3-static .s-head { fill: var(--ib-accent); }
.ft-hero.ft3-on .ft3-static { display: none; }

/* readouts and caption (front plane) */
.ft3-hud { position: absolute; left: 0; bottom: 0; width: min(100%, 31rem); display: grid; gap: .55rem; pointer-events: none;
  transform: translate3d(calc(var(--ft3-px) * 10px), calc(var(--ft3-py) * 8px), 0); opacity: calc(1 - var(--ft3-p) * 1.1); }
.ft3-legend { display: flex; flex-wrap: nowrap; white-space: nowrap; min-height: 1.1rem; padding: .15rem .5rem; border-radius: .5rem; background: rgba(10, 12, 13, .6); align-items: center; gap: .35rem 1rem;
  font-family: var(--ib-font-mono, ui-monospace, monospace); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ib-ink-muted); }
.ft3-key { display: inline-flex; align-items: center; gap: .4rem; }
.ft3-key::before { content: ""; width: .75rem; height: 2px; border-radius: 2px; background: var(--ib-accent); }
.ft3-key--hi::before { background: var(--ib-gold); }
.ft3-state { margin-left: auto; color: var(--ib-ink-soft); transition: color .3s var(--ft3-in); }
.ft3-state.is-stall { color: var(--ib-accent-ink, var(--ib-accent)); }
.ft3-read { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--ib-line); border: 1px solid var(--ib-line); border-radius: .75rem; overflow: hidden; }
.ft3-cell { background: rgba(10, 12, 13, .74); padding: .6rem .75rem .65rem; min-width: 0; }
.ft3-lab { display: block; font-family: var(--ib-font-mono, ui-monospace, monospace); font-size: .58rem; letter-spacing: .13em; text-transform: uppercase; color: var(--ib-ink-muted); line-height: 1.35; min-height: 1.6em; }
.ft3-val { display: block; margin-top: .25rem; font-family: var(--ib-font-mono, ui-monospace, monospace); font-size: 1.2rem; font-weight: 500; color: var(--ib-ink); letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; min-height: 1.5rem; }
.ft3-cap { margin: 0; font-size: .7rem; line-height: 1.5; color: var(--ib-ink-muted); max-width: 52ch; min-height: calc(4.5em + .7rem); padding: .35rem .6rem; border-radius: .5rem; background: rgba(10, 12, 13, .68); }
.ft3-hint { position: absolute; top: .2rem; left: 0; margin: 0; pointer-events: none; padding: .25rem .6rem .25rem .5rem; border-radius: .5rem; background: rgba(10, 12, 13, .6);
  font-family: var(--ib-font-mono, ui-monospace, monospace); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ib-ink-soft);
  transition: opacity .6s var(--ft3-in); }
.ft3-hint::before { content: "\2195"; display: inline-block; margin-right: .55rem; color: var(--ib-accent); font-size: .95rem; letter-spacing: 0; }
.ft3-hint.is-done { opacity: .35; }
@media (pointer: coarse) { .ft3-hint::before { content: "\261D"; } }
@media (prefers-reduced-motion: no-preference) {
  .ft3-hint:not(.is-done) { animation: ft3-nudge 2.8s var(--ft3-move) 1.2s infinite; }
}
@keyframes ft3-nudge { 0%, 70%, 100% { translate: 0 0; } 82% { translate: 0 -4px; } 92% { translate: 0 2px; } }

/* ---------- the facts row: three cells ---------- */
.ft-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 2.25rem; }

/* ---------- smaller screens ---------- */
@media (max-width: 1024px) {
  .ft-hero-grid { grid-template-columns: 1fr; }
  .ft-hero .ft-pfd-wrap { min-height: 36rem; margin-top: 1.5rem; max-width: none; }
  .ft-hero .ft-pfd { width: 10.5rem; }
  .ft-hero .ft-live { top: auto; right: auto; left: 0; bottom: 0; width: 100%; }
  .ft-hero .ft-pfd-wrap:has(.ft-live:not([hidden])) { min-height: 39.5rem; }
  .ft-hero .ft-pfd-wrap:has(.ft-live:not([hidden])) .ft3-hud { bottom: 3.4rem; }
  .ft-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ft-fact { padding: 1rem; }
  .ft3-hud { width: 100%; }
}
@media (max-width: 768px) {
  body.ft-page .ft-hero { padding-top: calc(3.75rem + 1.25rem); padding-bottom: 2rem; }
  .ft-hero .ft-pfd-wrap { min-height: 30rem; margin-top: .25rem; }
  .ft-hero .ft-pfd { width: 7.25rem; top: 0; }
  .ft-hero-actions { margin-top: 1.6rem; }
  .ft3-hint { max-width: 62%; }
  .ft3-read { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ft3-lab { min-height: 0; }
  .ft-facts { grid-template-columns: 1fr; margin-top: 1.5rem; }
}
@media (max-width: 400px) { .ft3-val { font-size: 1.05rem; } }

/* ---------- reduced motion: nothing moves ---------- */
@media (prefers-reduced-motion: reduce) {
  .ft3-canvas, .ft-hero .ft-pfd, .ft3-hud, .ft-hero .ft-sky::after { transform: none; }
  .ft3-hint { transition: none; }
}
