/* ==========================================================================
   NEXT VISION — hero
   State lives on .hero as data attributes, set by hero-lab.js:
     data-layout  split | center | stage | poster | personal
     data-kind    scene | object | portrait
     data-tone    dark | sky | light
     data-live    terrain | iris   (only for the WebGL visuals)
   ========================================================================== */

.hero {
  --fg: #f5f7ff;
  --fg-dim: rgba(235, 240, 255, .5);
  --fg-soft: rgba(235, 240, 255, .78);
  --fg-faint: rgba(235, 240, 255, .62);
  --dot: var(--sky-300);
  --hero-bg: var(--ink);
  --shade: none;
  position: relative; isolation: isolate;
  min-height: 100svh;
  display: flex; flex-direction: column;
  background: var(--hero-bg); color: var(--fg);
  overflow: hidden;
}
.hero[data-tone='sky'] {
  --fg: #fff; --fg-dim: rgba(255, 255, 255, .78); --fg-soft: rgba(255, 255, 255, .94); --fg-faint: rgba(255, 255, 255, .86);
  --dot: #fff; --hero-bg: #2a5cf6;
}
.hero[data-tone='light'] {
  --fg: var(--text); --fg-dim: rgba(10, 11, 16, .38); --fg-soft: var(--muted); --fg-faint: var(--muted);
  --dot: var(--blue-500); --hero-bg: #f6f8fc;
}

/* ---------- Background layer: scene image, live terrain, shade ---------- */
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-scene, .hero-scene img, .hero-canvas, .hero-shade {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
}
.hero-scene img {
  object-fit: cover; object-position: var(--pos, 70% 50%);
  opacity: 0; transform: scale(1.06);
  transition: opacity 1.2s var(--ease), transform 2.4s var(--ease);
}
.hero-scene img.is-in { opacity: 1; transform: none; }
.hero-canvas { display: none; pointer-events: none; opacity: 0; transition: opacity 1.6s var(--ease); }
.hero-canvas.is-in { opacity: 1; }
.hero-shade { pointer-events: none; background: var(--shade); }

.hero:not([data-kind='scene']) .hero-scene,
.hero[data-live='terrain'] .hero-scene,
.hero[data-live='globe'] .hero-scene,
.hero[data-live='crew'] .hero-scene { display: none; }
.hero[data-live='terrain'] .hero-canvas[data-for='terrain'],
.hero[data-live='globe'] .hero-canvas[data-for='globe'] { display: block; }

/* Live globe: a pale world rising from the bottom edge, with work landing on it */
.hero[data-live='globe'] { --hero-bg: #f5f8fe; }
.hero[data-live='globe'] .hero-bg { background: linear-gradient(180deg, #f5f8fe 0%, #eef4ff 58%, #e2ecff 100%); }
.hero-labels { position: absolute; inset: 0; overflow: hidden; pointer-events: none; display: none; }
.hero[data-live='globe'] .hero-labels { display: block; }
.hero-chip, .hero-ping { position: absolute; left: 0; top: 0; will-change: transform; }
.hero-chip > span {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 7px 12px 7px 8px; border-radius: 999px;
  font-size: 12.5px; font-weight: 500; letter-spacing: -.01em; color: var(--text);
  background: rgba(255,255,255,.92);
  box-shadow: 0 0 0 1px rgba(11,19,102,.07), 0 10px 24px -10px rgba(11,19,102,.35);
  transform: translate(-50%, calc(-100% - 12px)) scale(.86); transform-origin: 50% 100%; opacity: 0;
  transition: opacity .45s var(--ease), transform .6s var(--spring);
}
.hero-chip.is-on > span { opacity: 1; transform: translate(-50%, calc(-100% - 12px)); }
.hero-chip i { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--blue-500); }
.hero-chip i::before { content: ''; width: 7px; height: 4px; margin-top: -2px; border-left: 1.6px solid #fff; border-bottom: 1.6px solid #fff; transform: rotate(-45deg); }
.hero-ping i { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue-600); opacity: 0; }
.hero-ping i::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 1.5px solid var(--blue-500); opacity: 0; }
.hero-ping.is-on i { animation: ping-dot 1.8s var(--ease) both; }
.hero-ping.is-on i::after { animation: ping-ring 1.8s var(--ease) both; }
@keyframes ping-dot { 0% { opacity: 0; transform: scale(.4); } 15% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes ping-ring { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(4.2); } }

.hero-chip > span b { font-weight: 500; }

/* Live crew: our own small agents walking the floor */
.hero-crew { display: none; position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero[data-live='crew'] { --hero-bg: #f6f9ff; }
.hero[data-live='crew'] .hero-bg { background: linear-gradient(180deg, #f6f9ff 0%, #f1f6ff 55%, #e3ecff 100%); }
.hero[data-live='crew'] .hero-crew { display: block; }
.crew-hill { position: absolute; border-radius: 50%; background: radial-gradient(closest-side, #c9d7ff 72%, #dfe8ff 90%, #f9fbff 100%); box-shadow: 0 0 0 1px rgba(43,75,255,.22), 0 -30px 80px rgba(143,195,255,.4); }
.crew-a { position: absolute; left: 0; top: 0; z-index: 2; transform-origin: 50% 100%; will-change: transform; }
.crew-a.is-back { z-index: 1; }
.crew-f { transform: scaleX(var(--d, 1)); transition: transform .3s var(--ease); }
.crew-a.is-back .crew-f { opacity: .86; }
.crew-a .hero-chip { left: 50%; top: 2px; }
.ag { display: block; width: 100%; height: auto; overflow: visible; }
.ag-shadow { fill: rgba(11,19,102,.16); }
.ag-leg, .ag-eye, .ag-prop { transform-box: fill-box; }
.ag-leg { transform-origin: 50% 12%; }
.ag-eye { transform-origin: 50% 50%; animation: ag-blink 4.8s var(--bd, 0s) infinite; }
.ag-eyes { transform: translate(calc(var(--ex, 0) * 1px), calc(var(--ey, 0) * 1px)); transition: transform .35s var(--ease); }
.is-walk .ag-leg { animation: ag-step var(--step, .5s) ease-in-out infinite alternate; }
.is-walk .ag-leg.r { animation-direction: alternate-reverse; }
.is-walk .ag-up { animation: ag-bob calc(var(--step, .5s) / 2) ease-in-out infinite alternate; }
.is-walk .ag-prop { transform-origin: 0 100%; animation: ag-sway var(--step, .5s) ease-in-out infinite alternate; }
.is-hop .crew-f { animation: ag-hop .6s var(--ease); }
.hero-crew.is-paused * { animation-play-state: paused !important; }
@keyframes ag-step { from { transform: rotate(26deg); } to { transform: rotate(-26deg); } }
@keyframes ag-bob { from { transform: translateY(0); } to { transform: translateY(-2.6px); } }
@keyframes ag-sway { from { rotate: -4deg; } to { rotate: 4deg; } }
@keyframes ag-blink { 0%, 93%, 100% { scale: 1 1; } 96.5% { scale: 1 .1; } }
@keyframes ag-hop { 0%, 100% { translate: 0 0; } 40% { translate: 0 -14px; } }
@media (prefers-reduced-motion: reduce) { .ag-eye, .ag-leg, .ag-up, .ag-prop { animation: none !important; } }

/* Live flight: the crew in small planes over the cloud tops, reporting in */
.hero-flight { display: none; position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero[data-live='flight'] .hero-flight { display: block; }
.fl-plane { position: absolute; left: 0; top: 0; will-change: transform; }
.fl-plane svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 12px 12px rgba(6,20,90,.3)); }
.fl-tilt { transform-origin: 50% 70%; }
.fl-prop { transform-box: fill-box; transform-origin: 50% 50%; animation: fl-spin .16s linear infinite; }
.fl-say {
  position: absolute; left: 46%; bottom: calc(100% + 4px);
  display: flex; align-items: flex-start; gap: 10px;
  width: max-content; max-width: 292px; padding: 10px 14px 11px 10px;
  border-radius: 20px; background: rgba(255,255,255,.96); color: var(--text); text-align: left;
  box-shadow: 0 0 0 1px rgba(255,255,255,.7), 0 22px 44px -18px rgba(6,20,90,.6), 0 2px 6px rgba(6,20,90,.12);
  opacity: 0; translate: -50% 14px; scale: .86; transform-origin: 40% 100%;
  transition: opacity .3s var(--ease), translate .6s var(--spring), scale .6s var(--spring);
}
.fl-say.is-on { opacity: 1; translate: -50% 0; scale: 1; }
.fl-plane .fl-who { flex: none; display: block; width: 38px; height: 38px; object-fit: cover; border-radius: 12px; box-shadow: 0 0 0 1px rgba(11,19,102,.1), 0 4px 10px -4px rgba(11,19,102,.4); }
.fl-text { min-width: 0; }
.fl-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin: 0 0 2px; font-size: 11.5px; line-height: 1.3; }
.fl-meta b { font-weight: 600; letter-spacing: -.005em; }
.fl-meta span { color: rgba(10,11,16,.45); }
.fl-msg { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 0; font-size: 13.5px; line-height: 1.36; letter-spacing: -.005em; color: rgba(10,11,16,.82); opacity: 0; translate: 0 5px; transition: opacity .2s, translate .2s; }
/* the card lands first, then the words arrive */
.fl-say.is-on .fl-msg { opacity: 1; translate: 0 0; transition: opacity .45s var(--ease) .18s, translate .55s var(--ease) .18s; }
/* banner mode: the message is towed behind the plane, rippling like cloth */
.fl-banner { display: none; width: max-content; position: absolute; left: 92%; top: 61%; translate: 0 -50%; align-items: center; filter: drop-shadow(0 9px 10px rgba(6,20,90,.28)); }
.hero-flight[data-mode='banner'] .fl-banner { display: flex; }
.hero-flight[data-mode='banner'] .fl-trail, .hero-flight[data-mode='banner'] .fl-say { display: none; }
.fl-plane .fl-rope { flex: none; width: 30px; height: 40px; filter: none; }
.fl-strip {
  position: relative; flex: none; display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 30px 0 6px;
  background: #fff; color: #0b1366; white-space: nowrap; font-size: 13.5px; font-weight: 600; letter-spacing: -.01em;
  border-radius: 7px 0 0 7px; box-shadow: inset 0 3px 0 #2b4bff, inset 0 -3px 0 #2b4bff;
  clip-path: polygon(0 0, 100% 0, calc(100% - 13px) 50%, 100% 100%, 0 100%);
  transform-origin: 0 50%; animation: fl-wave 1.7s ease-in-out infinite alternate;
}
.fl-strip img { display: block; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
/* soft folds travelling down the cloth, away from the plane */
.fl-strip::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(100deg, rgba(11,19,102,0) 0 30px, rgba(11,19,102,.09) 40px, rgba(11,19,102,0) 52px, rgba(255,255,255,0) 52px 70px); background-size: 71.1px 100%; animation: fl-fold 1.3s linear infinite; pointer-events: none; }
@keyframes fl-wave { from { transform: skewY(-2.4deg) scaleY(1); } 50% { transform: skewY(.4deg) scaleY(.97); } to { transform: skewY(2.4deg) scaleY(1); } }
@keyframes fl-fold { to { background-position-x: 71.1px; } }
@media (max-width: 759px) { .fl-strip { height: 34px; font-size: 12px; gap: 7px; padding: 0 24px 0 5px; } .fl-strip img { width: 24px; height: 24px; } .fl-plane .fl-rope { width: 22px; height: 34px; } }
@media (prefers-reduced-motion: reduce) { .fl-strip, .fl-strip::after { animation: none; } }
.hero-flight.is-paused * { animation-play-state: paused !important; }
@keyframes fl-spin { 0%, 100% { scale: 1 1; } 50% { scale: 1 .12; } }
@media (max-width: 759px) { .fl-say { max-width: min(300px, calc(100vw - 24px)); gap: 9px; padding: 9px 12px 10px 9px; border-radius: 18px; } .fl-plane .fl-who { width: 34px; height: 34px; border-radius: 11px; } .fl-msg { font-size: 12.5px; } }
@media (prefers-reduced-motion: reduce) { .fl-prop { animation: none; } }

/* A small photo above the headline when the copy is the personal one */
.hero-face { display: none; }
.hero[data-copy='michael'][data-kind='scene'][data-layout='center']:not([data-face='off']) .hero-face,
.hero[data-copy='michael'][data-kind='scene'][data-layout='middle']:not([data-face='off']) .hero-face { display: block; width: 84px; margin: 0 auto 28px; }
/* beside the headline: hero-lab.js measures the first line and hands over the spot */
.hero[data-face='side'] .hero-copy { position: relative; }
.hero[data-copy='michael'][data-kind='scene'][data-face='side'] .hero-face { position: absolute; left: var(--face-x, 0); top: var(--face-y, 0); width: var(--face-s, 84px); margin: 0; }
.hero[data-face='side'] .hero-face img { width: var(--face-s, 84px); height: var(--face-s, 84px); border-radius: calc(var(--face-s, 84px) * .33); rotate: 6deg; }
.hero-face img {
  display: block; width: 84px; height: 84px; object-fit: cover; border-radius: 28px;
  border: 3px solid #fff; rotate: -5deg;
  box-shadow: 0 20px 38px -16px rgba(6,20,90,.6), 0 2px 6px rgba(6,20,90,.14);
  transition: rotate .5s var(--spring), scale .5s var(--spring);
}
@media (min-width: 760px) { .hero[data-copy='michael'][data-kind='scene'][data-layout='middle'][data-face='top'] .hero-grid { padding-bottom: calc(clamp(110px, 21svh, 230px) + var(--lift, 0px) + 56px); } }
@media (hover: hover) { .hero-face { pointer-events: auto; } .hero-face:hover img { rotate: 0deg; scale: 1.06; } }
@media (max-width: 759px) {
  .hero[data-copy='michael'][data-kind='scene'] .hero-face { width: 72px; margin-bottom: 22px; }
  .hero-face img { width: 72px; height: 72px; border-radius: 24px; }
}

/* Live focus: the scene sits soft, a glass lens shows it sharp */
.hero-lens {
  display: none; position: absolute; left: 0; top: 0;
  width: clamp(170px, 24vw, 340px); aspect-ratio: 1; border-radius: 50%;
  background-repeat: no-repeat; pointer-events: none; will-change: transform, background-position;
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.8), 0 0 0 8px rgba(255,255,255,.13), inset 0 0 44px rgba(255,255,255,.3), inset 0 3px 2px rgba(255,255,255,.5), 0 34px 70px -22px rgba(6,20,90,.55);
  opacity: 0; transition: opacity .8s var(--ease);
}
.hero[data-live='focus'] .hero-lens { display: block; }
.hero-lens.is-in { opacity: 1; }
.hero[data-live='terrain'] .hero-bg {
  background: radial-gradient(120% 90% at 85% 100%, #3d5cff 0%, #1e36d9 22%, #0b1366 45%, #05060a 75%);
}

/* ---------- Copy ---------- */
.hero-grid {
  position: relative; flex: 1;
  display: grid; grid-template-columns: minmax(0, 1fr); align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding-top: calc(var(--header-h) + var(--safe-t) + 40px);
  padding-bottom: 40px;
}
.hero-copy { min-width: 0; }
.hero h1 .mask-line { display: block; }
.hero h1 .l1 { color: var(--fg-dim); }
.hero .lede { margin-top: clamp(22px, 3vw, 32px); color: var(--fg-soft); max-width: 520px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(30px, 4vw, 44px); }
.hero-details { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; color: var(--fg-faint); font-size: 13px; }
.hero-details span + span::before { content: '·'; color: var(--dot); margin-right: 10px; }
.hero-person { display: none; }

.hero-badges { display: none; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(26px, 4vw, 40px); }
.hero[data-layout='split'][data-art='slab'] .hero-badges { display: flex; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 12px; border-radius: 8px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(255,255,255,.07);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: rgba(255,255,255,.9);
}

/* A white button reads better than cobalt on a blue sky. */
.hero[data-tone='sky'] .hero-ctas .btn-primary {
  background: #fff; color: var(--ink);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 14px 30px -12px rgba(8, 18, 90, .55);
  isolation: isolate; overflow: hidden;
}
/* on hover the brand blue rises through it from the bottom edge */
.hero[data-tone='sky'] .hero-ctas .btn-primary::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--grad-btn); clip-path: circle(0% at 50% 130%);
  transition: clip-path .6s var(--ease);
}
@media (hover: hover) {
  .hero[data-tone='sky'] .hero-ctas .btn-primary:hover {
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 0 0 1px rgba(255,255,255,.55), 0 18px 40px -10px rgba(8,18,90,.7);
  }
  .hero[data-tone='sky'] .hero-ctas .btn-primary:hover::before { clip-path: circle(160% at 50% 130%); }
}

/* ---------- Visual slot: object, live iris, portrait, or the framed scene ---------- */
.hero-visual { display: none; min-width: 0; width: 100%; }
.hero[data-kind='object'] .hero-visual,
.hero[data-layout='stage'] .hero-visual,
.hero[data-layout='personal'] .hero-visual { display: block; }
.hero-frame { position: relative; margin-inline: auto; }
.hero-obj, .hero-obj-canvas, .hero-portrait, .hero-tag { display: none; }

.hero[data-kind='object'] .hero-frame { width: min(100%, 600px); aspect-ratio: 1; }
/* Objects are shot on black and screened onto the page, so no ancestor between
   here and .hero may create a stacking context (no transform, filter, opacity). */
.hero[data-kind='object']:not([data-live]) .hero-obj {
  display: block; width: 100%; height: 100%; object-fit: contain;
  mix-blend-mode: screen;
  opacity: 0; transform: scale(.94);
  transition: opacity 1.1s var(--ease), transform 1.8s var(--ease);
}
.hero[data-kind='object'] .hero-obj.is-in { opacity: 1; transform: none; }
.hero[data-live='iris'] .hero-obj-canvas { display: block; width: 100%; height: 100%; }

/* ==========================================================================
   LAYOUT · split — copy left, visual right
   ========================================================================== */
.hero[data-layout='split'] { --shade:
  linear-gradient(90deg, rgba(5,6,10,.86) 0%, rgba(5,6,10,.55) 38%, rgba(5,6,10,0) 70%),
  linear-gradient(180deg, rgba(5,6,10,.5) 0%, rgba(5,6,10,0) 22%, rgba(5,6,10,0) 70%, rgba(5,6,10,.75) 100%); }
.hero[data-layout='split'][data-tone='sky'] { --shade:
  linear-gradient(90deg, rgba(8,18,90,.78) 0%, rgba(20,40,170,.42) 42%, rgba(20,40,170,0) 72%),
  linear-gradient(180deg, rgba(5,6,10,.35) 0%, rgba(5,6,10,0) 22%, rgba(5,6,10,0) 70%, rgba(5,6,10,.7) 100%); }
.hero[data-layout='split'][data-tone='light'] { --shade: none; }
.hero[data-layout='split'][data-live='terrain'] { --shade: linear-gradient(180deg, rgba(5,6,10,0) 60%, rgba(5,6,10,.8) 100%); }
@media (min-width: 760px) {
  /* scenes with a low subject ask the copy to sit a little higher */
  .hero[data-layout='split'][data-kind='scene'] .hero-grid { padding-bottom: calc(40px + var(--lift, 0px)); }
}
@media (min-width: 900px) {
  .hero[data-layout='split'][data-kind='object'] .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
  .hero[data-layout='split'][data-kind='object'] h1 { font-size: clamp(44px, 6.6vw, 96px); }
}

/* ==========================================================================
   LAYOUT · center — copy centered; a scene sits behind, an object sits above
   ========================================================================== */
.hero[data-layout='center'] .hero-grid,
.hero[data-layout='middle'] .hero-grid,
.hero[data-layout='stage'] .hero-grid { justify-items: center; text-align: center; align-content: start; }
.hero[data-layout='center'] .hero-copy,
.hero[data-layout='middle'] .hero-copy,
.hero[data-layout='stage'] .hero-copy { display: flex; flex-direction: column; align-items: center; }
.hero[data-layout='center'] .hero-details,
.hero[data-layout='middle'] .hero-details,
.hero[data-layout='stage'] .hero-details { justify-content: center; }
.hero[data-layout='center'] h1 { font-size: clamp(42px, 6.4vw, 90px); }
.hero[data-layout='center'] .lede { max-width: 480px; }

.hero[data-layout='center'] { --shade: linear-gradient(180deg, rgba(5,6,10,.55) 0%, rgba(5,6,10,.2) 40%, rgba(5,6,10,0) 62%); }
.hero[data-layout='center'][data-tone='sky'] { --shade: linear-gradient(180deg, rgba(20,44,190,.5) 0%, rgba(24,60,220,.3) 36%, rgba(30,70,230,0) 60%); }
.hero[data-layout='center'][data-tone='light'] { --shade: none; }
.hero[data-layout='center'][data-live='terrain'] { --shade: linear-gradient(180deg, rgba(5,6,10,.7) 0%, rgba(5,6,10,0) 60%); }
.hero[data-layout='center'][data-kind='scene'] .hero-grid { padding-top: calc(var(--header-h) + var(--safe-t) + clamp(16px, 4svh, 48px)); }
.hero[data-layout='center'][data-kind='scene'] .lede { margin-top: clamp(18px, 2vw, 24px); }
.hero[data-layout='center'][data-kind='scene'] .hero-ctas { margin-top: clamp(24px, 2.6vw, 32px); }
@media (min-width: 760px) {
  /* keep enough sky above the landscape for the copy on short, wide windows */
  .hero[data-layout='center'][data-kind='scene'] { min-height: max(100svh, 66vw); }
  /* the flight hero is shorter than other centred scenes so its clouds reach a laptop window, but tall enough that they stay under the copy */
  .hero[data-layout='center'][data-live='flight'] { min-height: max(100svh, 60vw); }
}
.hero[data-layout='center'][data-kind='object'] .hero-grid { align-content: center; gap: clamp(10px, 2svh, 28px); }
.hero[data-layout='center'][data-kind='object'] .hero-visual { order: -1; }
.hero[data-layout='center'][data-kind='object'] .hero-frame { width: min(64vw, 36svh, 400px); }

/* ==========================================================================
   LAYOUT · middle — copy in the exact middle of a full-bleed scene
   ========================================================================== */
.hero[data-layout='middle'] { --shade: radial-gradient(62% 48% at 50% 47%, rgba(5,6,10,.5) 0%, rgba(5,6,10,0) 78%), linear-gradient(180deg, rgba(5,6,10,.45) 0%, rgba(5,6,10,0) 24%); }
.hero[data-layout='middle'][data-tone='sky'] { --shade: radial-gradient(62% 48% at 50% 47%, rgba(14,34,150,.36) 0%, rgba(14,34,150,0) 78%), linear-gradient(180deg, rgba(14,34,150,.3) 0%, rgba(14,34,150,0) 24%); }
.hero[data-layout='middle'][data-tone='light'] { --shade: radial-gradient(62% 48% at 50% 47%, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 78%); }
/* the optical middle sits a little above the true one */
.hero[data-layout='middle'] .hero-grid { align-content: center; padding-bottom: calc(clamp(110px, 21svh, 230px) + var(--lift, 0px)); }
.hero[data-layout='middle'] h1 { font-size: clamp(44px, 6.8vw, 98px); }
.hero[data-layout='middle'] .lede { max-width: 500px; }
/* the flight hero on a laptop: a quieter headline, a stronger line under it, and more sky left for the planes */
@media (min-width: 760px) {
  .hero[data-layout='middle'][data-live='flight'] h1 { font-size: clamp(44px, 5.5vw, 80px); }
  .hero[data-layout='middle'][data-live='flight'] .lede { font-size: clamp(19px, 1.65vw, 23px); max-width: 600px; }
}
.hero[data-layout='middle'] .hero-scene img { object-position: var(--pos, 50% 100%); }

/* ==========================================================================
   LAYOUT · stage — centered copy above a framed visual
   ========================================================================== */
.hero[data-layout='stage'] { --shade: none; }
.hero[data-layout='stage'] .hero-grid { gap: clamp(28px, 4vw, 52px); padding-bottom: clamp(16px, 3vw, 36px); }
.hero[data-layout='stage'] h1 { font-size: clamp(38px, 5.4vw, 76px); }
.hero[data-layout='stage'] .hero-ctas { margin-top: clamp(24px, 3vw, 32px); }
.hero[data-layout='stage'] .hero-frame {
  width: 100%; max-width: 1180px; aspect-ratio: 16 / 8.2;
  border-radius: clamp(20px, 2.4vw, 34px);
  overflow: hidden; isolation: isolate;
  background: #070912;
  box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 50px 90px -50px rgba(43,75,255,.55);
}
.hero[data-layout='stage'][data-tone='light'] .hero-frame { box-shadow: 0 0 0 1px rgba(10,11,16,.07), 0 50px 90px -50px rgba(11,19,102,.4); }
.hero[data-layout='stage'] .hero-bg { z-index: 0; }
.hero[data-layout='stage'] .hero-scene img { object-position: var(--stage-pos, 50% 62%); }
.hero[data-layout='stage'][data-kind='object'] .hero-obj,
.hero[data-layout='stage'][data-kind='object'] .hero-obj-canvas { position: absolute; inset: 0; margin: auto; width: auto; height: 92%; aspect-ratio: 1; }

/* ==========================================================================
   LAYOUT · poster — full-bleed visual, oversized headline anchored low
   ========================================================================== */
.hero[data-layout='poster'] { --fg-dim: rgba(235, 240, 255, .62); --shade: linear-gradient(180deg, rgba(5,6,10,.4) 0%, rgba(5,6,10,0) 22%, rgba(5,6,10,.12) 40%, rgba(5,6,10,.74) 68%, rgba(5,6,10,.95) 100%); }
.hero[data-layout='poster'] .hero-grid { align-items: end; align-content: end; padding-bottom: clamp(28px, 4vw, 56px); }
.hero[data-layout='poster'] h1 { font-size: clamp(46px, 9.4vw, 148px); }
.hero[data-layout='poster'] .hero-scene img { object-position: var(--poster-pos, 60% 40%); }
.hero[data-layout='poster'] .hero-visual { position: absolute; top: calc(var(--header-h) + var(--safe-t)); right: var(--gutter); width: min(44vw, 58svh, 620px); }
@media (min-width: 900px) {
  .hero[data-layout='poster'] .hero-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 56px; align-items: end; }
  .hero[data-layout='poster'] h1 { grid-column: 1 / -1; }
  .hero[data-layout='poster'] .lede { grid-column: 1; grid-row: 2 / span 2; margin-top: 30px; }
  .hero[data-layout='poster'] .hero-ctas { grid-column: 2; grid-row: 2; margin-top: 30px; justify-content: flex-end; }
  .hero[data-layout='poster'] .hero-details { grid-column: 2; grid-row: 3; justify-content: flex-end; }
}

/* ==========================================================================
   LAYOUT · personal — copy beside the portrait
   ========================================================================== */
.hero[data-layout='personal'] h1 { font-size: clamp(42px, 6.2vw, 88px); }
.hero[data-layout='personal'] .hero-frame {
  width: min(100%, 470px); aspect-ratio: 4 / 5; margin-right: 0;
  border-radius: clamp(22px, 2.6vw, 34px); overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 50px 90px -50px rgba(43,75,255,.6);
}
.hero[data-layout='personal'][data-tone='light'] .hero-frame { box-shadow: 0 0 0 1px rgba(10,11,16,.06), 0 50px 90px -50px rgba(11,19,102,.45); }
.hero[data-layout='personal'] .hero-portrait {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%;
  opacity: 0; transform: scale(1.05); transition: opacity 1s var(--ease), transform 2s var(--ease);
}
.hero[data-layout='personal'] .hero-portrait.is-in { opacity: 1; transform: none; }
.hero[data-layout='personal'] .hero-tag {
  display: block; position: absolute; left: 14px; bottom: 14px; padding: 11px 15px 12px;
  border-radius: 16px; color: #fff;
  background: rgba(8, 10, 18, .58);
  -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
.hero-tag b { display: block; font-size: 15px; font-weight: 500; letter-spacing: -.01em; }
.hero-tag small { display: block; margin-top: 2px; font-size: 12px; color: rgba(255,255,255,.74); }
@media (min-width: 900px) {
  .hero[data-layout='personal'] .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
}

/* ==========================================================================
   MOBILE
   ========================================================================== */
@media (max-width: 899px) {
  .hero[data-layout='split'][data-kind='object'] .hero-frame { width: min(84vw, 420px); margin-top: -8px; }
  .hero[data-layout='personal'] .hero-visual { order: -1; }
  .hero[data-layout='personal'] .hero-frame { width: 100%; aspect-ratio: 16 / 11; margin-right: auto; }
  .hero[data-layout='personal'] .hero-portrait { object-position: 50% 16%; }
  .hero[data-layout='personal'] .hero-tag { display: none; }
  .hero[data-layout='personal'] .hero-frame { box-shadow: 0 0 0 1px rgba(255,255,255,.1); }
}

@media (max-width: 759px) {
  .hero { min-height: 0; }
  .hero-scene img { object-position: var(--pos-m, 50% 100%); }
  .hero-grid { align-items: start; align-content: start; gap: 20px; padding-top: calc(var(--header-h) + var(--safe-t) + 24px); padding-bottom: 24px; }
  .hero-badges { margin-bottom: 24px; }
  .hero .lede { margin-top: 20px; }
  .hero-ctas { margin-top: 24px; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .hero-details { justify-content: center; gap: 8px; margin-top: 12px; font-size: 12px; }
  .hero-details span + span::before { margin-right: 8px; }

  .hero-person { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
  .hero-person .hero-avatar { display: block; flex: none; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,.35); }
  .hero-person img { display: block; width: 44px; height: 44px; object-fit: cover; transform: translateY(-3px) scale(1.13); }
  .hero-person strong, .hero-person span { display: block; }
  .hero-person strong { font-size: 14px; font-weight: 500; }
  .hero-person span { font-size: 12px; color: var(--fg-faint); margin-top: 3px; }
  .hero[data-layout='center'] .hero-person,
  .hero[data-layout='middle'] .hero-person,
  .hero[data-layout='stage'] .hero-person,
  .hero[data-layout='personal'] .hero-person { display: none; }

  /* split: copy first, the scene opens up underneath it */
  .hero[data-layout='split'] { --shade: linear-gradient(180deg, rgba(5,6,10,.7) 0%, rgba(5,6,10,.4) 46%, rgba(5,6,10,0) 74%); }
  .hero[data-layout='split'][data-tone='sky'] { --shade: linear-gradient(180deg, rgba(8,18,90,.6) 0%, rgba(20,40,170,.3) 45%, rgba(20,40,170,0) 70%); }
  .hero[data-layout='split'][data-tone='light'] { --shade: none; }
  /* The phone crop keeps its subject in the lower half. Pin it to the bottom at its own
     size and leave that much room under the copy, so the two never fight. */
  .hero[data-layout='split'][data-kind='scene']:not([data-live]) .hero-scene {
    top: auto; height: auto; aspect-ratio: 2 / 3;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 24%); mask-image: linear-gradient(180deg, transparent 0%, #000 24%);
  }
  .hero[data-layout='split'][data-kind='scene'] .hero-grid { padding-bottom: var(--clear-m, 70vw); }

  /* center + scene: the sky carries the copy, the landscape fills the rest of the screen */
  .hero[data-layout='center'][data-kind='scene'] { min-height: 100svh; }
  .hero[data-layout='center'][data-kind='scene'] .hero-grid { padding-top: calc(var(--header-h) + var(--safe-t) + 20px); }
  .hero[data-layout='center'][data-kind='object'] .hero-grid { gap: 8px; padding-top: calc(var(--header-h) + var(--safe-t) + 4px); }
  .hero[data-layout='center'][data-kind='object'] .hero-frame { width: min(60vw, 30svh); }

  .hero[data-layout='middle'] { min-height: 100svh; }
  .hero[data-layout='middle'] .hero-grid { align-content: center; padding-bottom: calc(18svh + var(--lift, 0px)); }

  .hero[data-layout='stage'] .hero-frame { aspect-ratio: 4 / 4.6; }
  .hero[data-layout='stage'] .hero-scene img { object-position: var(--pos-m, 50% 100%); }
  .hero[data-layout='stage'][data-kind='object'] .hero-obj,
  .hero[data-layout='stage'][data-kind='object'] .hero-obj-canvas { width: 92%; height: auto; }

  /* poster: visual first, headline rises out of it */
  .hero[data-layout='poster'] { --shade: linear-gradient(180deg, rgba(5,6,10,.5) 0%, rgba(5,6,10,0) 26%, rgba(5,6,10,0) 52%, var(--ink) 100%); }
  .hero[data-layout='poster'] .hero-bg { bottom: auto; height: 58svh; }
  .hero[data-layout='poster'] .hero-scene img { object-position: var(--pos-m, 50% 100%); }
  .hero[data-layout='poster'] .hero-grid { padding-top: 42svh; }
  .hero[data-layout='poster'] h1 { font-size: clamp(46px, 13.2vw, 64px); }
  .hero[data-layout='poster'] .hero-visual { right: 0; left: 0; width: min(80vw, 40svh); margin-inline: auto; top: calc(var(--header-h) + var(--safe-t) - 6px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scene img, .hero-obj, .hero-portrait { transition: none; transform: none; }
}

/* ==========================================================================
   HERO LAB — the switcher. Shown with ?lab; a tray so the hero stays visible.
   ========================================================================== */
.lab { display: none; }
.lab.is-on { display: block; }
.lab.is-away { display: none; }
.lab-fab, .lab-tray { position: fixed; z-index: 70; color: #fff; font-family: var(--font); }
.lab-fab::before, .lab-tray::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: rgba(10, 12, 20, .8);
  -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.13), 0 20px 44px -14px rgba(5,6,10,.6);
}

.lab-fab {
  right: 14px; bottom: calc(14px + var(--safe-b));
  display: inline-flex; align-items: center; gap: 9px;
  height: 44px; padding: 0 16px 0 13px; border-radius: 999px;
  font-size: 14px; font-weight: 500; letter-spacing: -.01em;
  transition: transform .4s var(--ease);
  touch-action: manipulation;
}
.lab-fab svg { width: 17px; height: 17px; flex: none; }
.lab-fab b { font-weight: 400; color: rgba(226,232,255,.6); }
.lab-fab:active { transform: scale(.96); }
.lab[data-open='true'] .lab-fab { display: none; }

.lab-tray {
  left: 0; right: 0; bottom: calc(10px + var(--safe-b)); margin-inline: auto;
  width: min(760px, calc(100% - 20px));
  border-radius: 24px; padding: 10px 0 12px;
  display: none;
}
.lab[data-open='true'] .lab-tray { display: block; animation: lab-in .5s var(--ease); }
@keyframes lab-in { from { opacity: 0; transform: translateY(16px); } }

.lab-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px; }
.lab-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.07); min-width: 0; }
.lab-tab {
  height: 34px; padding: 0 13px; border-radius: 999px;
  font-size: 13.5px; font-weight: 500; letter-spacing: -.01em; color: rgba(226,232,255,.66);
  transition: background .25s, color .25s; touch-action: manipulation; white-space: nowrap;
}
.lab-tab[aria-selected='true'] { background: #fff; color: var(--ink); }
.lab-tools { display: flex; gap: 2px; flex: none; }
.lab-tool { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: rgba(226,232,255,.78); transition: background .2s, color .2s; touch-action: manipulation; }
.lab-tool svg { width: 17px; height: 17px; }
@media (hover: hover) {
  .lab-tool:hover { background: rgba(255,255,255,.1); color: #fff; }
  .lab-tab:not([aria-selected='true']):hover { color: #fff; }
}

.lab-row {
  display: flex; gap: 8px; margin-top: 10px; padding: 3px 12px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: 12px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.lab-row::-webkit-scrollbar { display: none; }
.lab-card { flex: none; width: 104px; text-align: left; scroll-snap-align: start; touch-action: manipulation; }
.lab-pic {
  position: relative; display: block; width: 104px; height: 72px; border-radius: 13px; overflow: hidden;
  background: #0d1120; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
  transition: transform .35s var(--ease);
}
.lab-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lab-card:active .lab-pic { transform: scale(.96); }
.lab-card[aria-pressed='true'] .lab-pic { outline: 2px solid #fff; outline-offset: 2px; }
.lab-name { display: block; margin-top: 7px; padding-left: 2px; font-size: 12px; line-height: 1.2; color: rgba(226,232,255,.62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lab-card[aria-pressed='true'] .lab-name { color: #fff; }
.lab-card.is-off .lab-pic { opacity: .38; }
.lab-card.is-off .lab-name { color: rgba(226,232,255,.36); }

/* live visuals have no still image; hint at the scene with a few lines */
.lab-pic[data-live='terrain'] { background: radial-gradient(130% 110% at 85% 110%, #3d5cff 0%, #1e36d9 24%, #0b1366 48%, #05060a 78%); }
.lab-pic[data-live='crew'] { background: radial-gradient(circle at 28% 56%, #2b4bff 0 8%, transparent 9%), radial-gradient(circle at 52% 50%, #0b1366 0 8%, transparent 9%), radial-gradient(circle at 74% 57%, #8fc3ff 0 8%, transparent 9%), radial-gradient(circle at 50% 190%, #cfdcff 0 58%, #f2f6ff 59%); }
.lab-pic[data-live='globe'] { background: radial-gradient(circle at 50% 185%, #cfdcff 0 58%, #6f8cff 59% 60%, #eef4ff 62%); }
.lab-pic[data-live='iris'] { background: radial-gradient(circle at 50% 50%, #05060a 0 15%, #dcebff 16% 17%, #5b7cff 22%, #1e36d9 34%, #0b1366 44%, #05060a 46%); }
.lab-live { position: absolute; left: 6px; top: 6px; padding: 2px 6px; border-radius: 6px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; background: rgba(5,6,10,.6); color: #fff; }

/* layout glyphs: a tiny wireframe of where copy and visual go */
.lab-glyph { position: absolute; inset: 0; width: 100%; height: 100%; }
.lab-glyph .t { fill: rgba(255,255,255,.92); }
.lab-glyph .s { fill: rgba(255,255,255,.4); }
.lab-glyph .b { fill: var(--blue-400); }
.lab-glyph .v { fill: rgba(91,124,255,.34); stroke: rgba(143,195,255,.6); stroke-width: 1; }
.lab-mini { position: absolute; right: 5px; bottom: 5px; width: 34px; height: 24px; border-radius: 6px; overflow: hidden; background: rgba(5,6,10,.72); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }

.lab-card--copy { width: 178px; }
.lab-card--copy .lab-pic { width: 178px; display: flex; flex-direction: column; justify-content: center; padding: 0 14px; font-size: 15px; font-weight: 500; line-height: 1.16; letter-spacing: -.03em; }
.lab-card--copy .lab-pic i { font-style: normal; color: rgba(226,232,255,.5); }

.lab-status { margin: 10px 14px 0; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: rgba(226,232,255,.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lab-status b { font-weight: 400; color: rgba(226,232,255,.86); }

@media (max-width: 480px) {
  .lab-tab { padding: 0 11px; font-size: 13px; }
  .lab-tool { width: 36px; }
  .lab-tool--key { display: none; }
}
@media (prefers-reduced-motion: reduce) { .lab[data-open='true'] .lab-tray { animation: none; } }

/* While the tray is open it owns the bottom of the screen. */
html.lab-open .dock { display: none; }
/* five tabs on a narrow phone: let the strip scroll rather than squeeze */
@media (max-width: 480px) { .lab-tabs { overflow-x: auto; scrollbar-width: none; } .lab-tabs::-webkit-scrollbar { display: none; } .lab-tab { flex: none; } }
