/* Loading is deliberately abstract: never reveal a substitute flat character. */
.hero-robot:not([data-robot-renderer])::before,
.hero-robot[data-robot-renderer="loading-pbr"]::before {
  content: '';
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 58%;
  width: min(78%, 360px);
  aspect-ratio: 1.8 / 1;
  transform: translate(-50%, -50%);
  border-bottom: 1px solid #86d8cf38;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 77%, #7de4d52a 0 2%, #4bb9b214 18%, transparent 58%),
    repeating-radial-gradient(ellipse at 50% 76%, transparent 0 17px, #83c9c617 18px 19px, transparent 20px 31px);
  filter: drop-shadow(0 18px 24px #02070c80);
  opacity: .76;
  pointer-events: none;
}

.crew-mouth {
  --crew-mouth: #baffed;
  position: absolute;
  z-index: 7;
  left: 50%;
  top: 34%;
  width: 28px;
  height: 14px;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--crew-mouth) 70%, transparent));
}

.hero-robot[data-robot-renderer="showcase-pbr"] .crew-mouth,
.hero-robot[data-robot-renderer="articulated-canvas"] .crew-mouth {
  visibility: visible;
  opacity: .72;
}

.crew-mouth i {
  width: 2px;
  height: 3px;
  border-radius: 2px;
  background: var(--crew-mouth);
  transform-origin: center;
}

.hero-stage[data-crew-film="future"] .crew-mouth { --crew-mouth: #e4c8ff; }
.hero-stage[data-crew-mouth="hello"] .crew-mouth i { animation: crew-mouth-wave .56s ease-in-out 3 alternate; }
.hero-stage[data-crew-mouth="scan"] .crew-mouth i { animation: crew-mouth-scan .28s steps(2, end) 6; }
.hero-stage[data-crew-mouth="confirm"] .crew-mouth i { animation: crew-mouth-confirm .36s ease-out 3; }
.hero-stage[data-crew-mouth="power"] .crew-mouth i { animation: crew-mouth-power .18s linear 10 alternate; }
.hero-stage[data-crew-mouth="explain"] .crew-mouth i { animation: crew-mouth-explain .7s ease-in-out 3; }
.hero-stage[data-crew-mouth="calibrate"] .crew-mouth i { animation: crew-mouth-calibrate .9s cubic-bezier(.2,.8,.2,1) 2; }
.hero-stage[data-crew-mouth="route"] .crew-mouth i { animation: crew-mouth-route .34s linear infinite alternate; }
.hero-stage[data-crew-mouth="future"] .crew-mouth i { animation: crew-mouth-future .52s ease-in-out infinite alternate; }
.hero-stage[data-crew-mouth="read"] .crew-mouth { --crew-mouth: #95eee7; }
.hero-stage[data-crew-mouth="read"] .crew-mouth i { animation: crew-mouth-read var(--word-beat,.24s) ease-out 2; }
.hero-stage[data-crew-mouth="read"] .crew-mouth i:nth-child(even){animation-delay:45ms;}
@keyframes crew-mouth-read {
  0%, 100% { transform: scaleY(1); }
  26% { transform: scaleY(3.5); }
  49% { transform: scaleY(1.3); }
  72% { transform: scaleY(2.6); }
}
.hero-copy .headline-trace-trigger {
  display: inline-flex;
  align-items: center;
  margin-top: .35rem;
  padding: .28rem .08rem;
  border: 0;
  border-bottom: 1px solid #54948f;
  color: #b6e6df;
  background: transparent;
  font: 600 .75rem/1.3 var(--mono, ui-monospace, monospace);
  pointer-events: auto;
  cursor: pointer;
}
.headline-trace-trigger:focus-visible { outline: 2px solid #b6e6df; outline-offset: 3px; }
#main-title .crew-traced-word {
  text-decoration-line: underline;
  text-decoration-color: var(--crew-ink);
  text-underline-offset: .095em;
  text-decoration-thickness: .045em;
}
#main-title .crew-traced-word .glyph { text-shadow: 0 0 .3em color-mix(in srgb, var(--crew-ink) 42%, transparent); }
.crew-duty-readout { min-height: 2.8em; }

.crew-mouth i:nth-child(2) { animation-delay: 55ms !important; }
.crew-mouth i:nth-child(3) { animation-delay: 110ms !important; }
.crew-mouth i:nth-child(4) { animation-delay: 165ms !important; }
.crew-mouth i:nth-child(5) { animation-delay: 220ms !important; }

@keyframes crew-mouth-wave { 50% { height: 12px; transform: translateY(-2px); } }
@keyframes crew-mouth-scan { 0%, 100% { height: 2px; } 50% { height: 9px; } }
@keyframes crew-mouth-confirm { 35% { height: 11px; } 70% { height: 5px; } }
@keyframes crew-mouth-power { to { height: 13px; transform: scaleX(1.35); } }
@keyframes crew-mouth-explain { 25% { height: 5px; } 55% { height: 12px; } 80% { height: 7px; } }
@keyframes crew-mouth-calibrate { 35% { height: 12px; transform: scaleX(.65); } 70% { height: 2px; transform: scaleX(1.4); } }
@keyframes crew-mouth-route { to { height: 11px; } }
@keyframes crew-mouth-future { to { height: 13px; transform: translateY(-1px) scaleX(1.2); } }

.crew-yard-cue {
  position: absolute;
  z-index: 4;
  left: clamp(10px, 2vw, 26px);
  bottom: clamp(10px, 2vw, 22px);
  max-width: min(78%, 390px);
  padding: 5px 8px;
  border: 1px solid #8fd4cd59;
  border-radius: 3px;
  background: #071620d9;
  color: #c8e4e1;
  font: 600 .67rem/1.25 var(--mono, ui-monospace, Consolas, monospace);
  letter-spacing: .055em;
  text-transform: uppercase;
  pointer-events: none;
}

.dd-hauler,
.dd-ramp {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.dd-deck[data-crew-yard="reverse"] .dd-hauler { animation: crew-truck-reverse .85s cubic-bezier(.18,.8,.24,1); }
.dd-deck[data-crew-yard="load"] .dd-ramp,
.dd-deck[data-crew-yard="deliver"] .dd-ramp { animation: crew-ramp-lower .72s cubic-bezier(.2,.72,.25,1) both; }
.dd-deck[data-crew-yard="transit"] .dd-hauler { animation: crew-truck-road .42s ease-in-out infinite alternate; }
.dd-deck[data-crew-yard="transit"] [data-dd-art] > path[stroke-dasharray="19 37"] { animation: crew-road-marks .7s linear infinite; }
.dd-deck[data-crew-yard="deliver"] .dd-hauler { animation: crew-truck-settle .58s ease-out; }

@keyframes crew-truck-reverse { 0% { transform: translateX(15px); } 68% { transform: translateX(-2px); } 100% { transform: none; } }
@keyframes crew-ramp-lower { 0% { transform: rotate(-12deg); opacity: .55; } 100% { transform: none; opacity: 1; } }
@keyframes crew-truck-road { to { transform: translateY(-1.4px) rotate(-.12deg); } }
@keyframes crew-road-marks { to { stroke-dashoffset: -56; } }
@keyframes crew-truck-settle { 35% { transform: translateY(-2px); } 72% { transform: translateY(.8px); } }

@media (max-width: 680px) {
  .crew-mouth { top: 33%; transform: translate(-50%, -50%) scale(.82); }
  .crew-yard-cue { font-size: .58rem; max-width: 70%; }
}

html.motion-paused .crew-mouth i,
html.motion-paused .dd-hauler,
html.motion-paused .dd-ramp,
html.motion-paused [data-dd-art] > path[stroke-dasharray="19 37"],
.hero-stage[data-crew-motion="off"] .crew-mouth i {
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .crew-mouth i,
  .dd-hauler,
  .dd-ramp,
  [data-dd-art] > path[stroke-dasharray="19 37"] { animation: none !important; }
}



.fleet-command {
  --crew-signal: #91e9d9;
  position: relative;
  background: linear-gradient(100deg, #10212a, #111925 66%, #131c29);
  border-bottom: 1px solid #405150;
  color: #d7e8e7;
}
.fleet-command-inner { max-width: 1450px; width: 94%; margin: 0 auto; padding: .62rem 0; display: flex; gap: .7rem 1.4rem; align-items: center; flex-wrap: wrap; }
.fleet-command-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .26rem; }
.fleet-command-controls strong { font: 600 .79rem/1.2 var(--mono, monospace); letter-spacing: .04em; color: #dae5e7; margin-right: .5rem; }
.fleet-command button { appearance: none; color: #c5d7dd; background: #182933; border: 1px solid #38515c; border-radius: .22rem; min-height: 32px; padding: .3rem .61rem; font: 600 .82rem/1.2 var(--sans, system-ui); cursor: pointer; }
.fleet-command button[aria-pressed="true"] { background: #23353d; color: var(--crew-signal); border-color: var(--crew-signal); }
.fleet-command button:hover:not(:disabled) { background: #2e424a; }
.fleet-command button:disabled { opacity: .53; cursor: default; }
.fleet-command button:focus-visible { outline: 2px solid #edfffb; outline-offset: 2px; }
.fleet-command button[hidden] { display: none; }
.fleet-command-report { display: grid; grid-template-columns: minmax(1.8rem, 3.4rem) 1fr; align-items: center; gap: .18rem .55rem; flex: 1 1 290px; }
.fleet-command-report output { color: #d9e3e6; font: 500 .8rem/1.35 var(--sans, system-ui); }
.fleet-command-meter { height: 4px; background: #425461; overflow: hidden; }
.fleet-command-meter::before { content: ''; display: block; height: 100%; background: var(--crew-signal); transform-origin: left; transform: scaleX(var(--crew-progress,0)); }
.fleet-command-count { grid-column: 2; font: 500 .72rem/1.15 var(--mono, monospace); color: #a7c6cb; }
.fleet-command-count:empty { display: none; }
@media (max-width: 680px) {
  .fleet-command-inner { gap: .4rem; padding: .6rem 0; }
  .fleet-command-controls strong { flex-basis:100%; padding: .12rem 0 .22rem; }
  .fleet-command button { min-height: 36px; }
  .fleet-command-report { grid-template-columns: 1.8rem 1fr; }
}
