/* Hyperlane / Tidal Observatory: architectural cinema, not a control dashboard. */
.hero-stage.is-hyperlane-photo .hero-poster {
  opacity: 1;
  filter: saturate(.86) contrast(1.02);
  object-position: 15% center;
  transition: object-position .95s cubic-bezier(.23, 1, .32, 1);
}
.hero-stage.is-hyperlane-photo[data-hyperlane-chapter="1"] .hero-poster { object-position: 50% center; }
.hero-stage.is-hyperlane-photo[data-hyperlane-chapter="2"] .hero-poster { object-position: 88% center; }
.hero-stage.is-hyperlane-photo .hero-scene,
.project-card-image-button[data-open="hyperlane"] .card-scene,
.viewer-shell[data-scene="hyperlane"] .viewer-scene {
  /* Existing 2D canvases were created opaque; make their input surfaces
     invisible so the photograph/GPU layer can actually be seen. */
  opacity: 0;
}
.hero-stage.is-hyperlane-photo .stage-glass { opacity: .4; }
.viewer-render .hyperlane-gpu {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.viewer-render .hyperlane-gpu[hidden] { display: none; }
.viewer-shell[data-scene="hyperlane"] {
  --acid: #eac6a9;
  --line-bright: rgba(234, 205, 178, .3);
}
.viewer-shell[data-scene="hyperlane"] .viewer-render { background: #15191e; }
.viewer-shell[data-scene="hyperlane"] .viewer-poster {
  opacity: 1;
  filter: saturate(.87) contrast(1.04);
  object-position: 15% center;
  transition: object-position .95s cubic-bezier(.23, 1, .32, 1);
}
.viewer-shell[data-scene="hyperlane"] .viewer-render[data-hyperlane-chapter="1"] .viewer-poster {
  object-position: 50% center;
}
.viewer-shell[data-scene="hyperlane"] .viewer-render[data-hyperlane-chapter="2"] .viewer-poster {
  object-position: 88% center;
}
.viewer-shell[data-scene="hyperlane"] .viewer-info {
  padding: clamp(15px, 1.7vw, 28px);
  overflow: hidden;
  background: linear-gradient(147deg, #101419, #090e12 80%);
}
.viewer-shell[data-scene="hyperlane"] .viewer-index { font-size: 10px; }
.viewer-shell[data-scene="hyperlane"] .viewer-meta { margin-top: 12px; }
.viewer-shell[data-scene="hyperlane"] .viewer-info h3 {
  margin: 10px 0 5px;
  font-size: clamp(27px, 2.25vw, 37px);
  letter-spacing: -.055em;
}
.viewer-shell[data-scene="hyperlane"] .viewer-description,
.viewer-shell[data-scene="hyperlane"] .viewer-interaction,
.viewer-shell[data-scene="hyperlane"] .viewer-keyhint { display: none; }
.viewer-shell[data-scene="hyperlane"] .mini-hmi {
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
.viewer-shell[data-scene="hyperlane"] .mini-hmi::before { display: none; }
.viewer-shell[data-scene="hyperlane"] .hmi-header {
  margin: 0;
  padding: 0 0 6px;
  border-bottom: 1px solid rgba(234, 198, 169, .15);
}
.viewer-shell[data-scene="hyperlane"] .hmi-header-title {
  font-size: 10px;
  color: #b5aaa0;
  letter-spacing: .1em;
}
.viewer-shell[data-scene="hyperlane"] .hmi-header-led {
  width: 4px;
  height: 4px;
  background: #e1b18c;
  box-shadow: 0 0 8px rgba(225, 177, 140, .45);
}
.viewer-shell[data-scene="hyperlane"] .hmi-header button {
  color: #cbb5a5;
  font-size: 10px;
  padding: 6px 0 6px 8px;
}
.viewer-shell[data-scene="hyperlane"] .hmi-task { display: none; }
.viewer-shell[data-scene="hyperlane"] .hmi-group { margin: 10px 0 0; }
.viewer-shell[data-scene="hyperlane"] .hmi-field-label {
  margin-bottom: 7px;
  color: #aab7bb;
  font: 500 11px var(--mono);
  letter-spacing: .045em;
}
.viewer-shell[data-scene="hyperlane"] .hmi-field-label output {
  color: #f0d0b4;
  font-variant-numeric: tabular-nums;
}
.viewer-shell[data-scene="hyperlane"] .hmi-segments { gap: 9px; }
.viewer-shell[data-scene="hyperlane"] .hmi-segments button {
  position: relative;
  border: 0;
  border-bottom: 1px solid rgba(225, 204, 187, .22);
  background: transparent;
  box-shadow: none;
  color: #819398;
  min-height: 37px;
  padding: 8px 3px;
  font: 500 11px var(--mono);
  letter-spacing: .07em;
  transition: color .2s, border-color .2s;
}
.viewer-shell[data-scene="hyperlane"] .hmi-segments button.selected {
  color: #f6dbbf;
  border-color: #eac6a9;
  background: transparent;
  box-shadow: none;
}
.viewer-shell[data-scene="hyperlane"] .hmi-segments button.selected::after {
  content: '';
  position: absolute;
  left: calc(50% - 3px);
  bottom: -3px;
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  background: #eac6a9;
}
.viewer-shell[data-scene="hyperlane"] .hmi-segments button:hover { color: #fff4e7; border-color: #d5b49a; }
.viewer-shell[data-scene="hyperlane"] .hmi-range-group input {
  appearance: none;
  background: transparent;
  height: 22px;
  margin: 0;
}
.viewer-shell[data-scene="hyperlane"] .hmi-range-group input::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(90deg, #967865, #e8cbb2 53%, #6c787e);
}
.viewer-shell[data-scene="hyperlane"] .hmi-range-group input::-moz-range-track {
  height: 2px;
  background: #b9a08b;
}
.viewer-shell[data-scene="hyperlane"] .hmi-range-group input::-webkit-slider-thumb {
  appearance: none;
  width: 13px;
  height: 13px;
  margin-top: -6px;
  border-radius: 50%;
  border: 2px solid #141b21;
  background: #e9c7a9;
  box-shadow: 0 0 0 1px #e9c7a9, 0 0 18px rgba(227, 175, 138, .28);
}
.viewer-shell[data-scene="hyperlane"] .hmi-range-group input::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e9c7a9;
  border: 1px solid #141b21;
}
.viewer-shell[data-scene="hyperlane"] .range-endpoints { color: #76868c; font-size: 10px; }
.viewer-shell[data-scene="hyperlane"] .hmi-telemetry {
  display: none;
}
.viewer-shell[data-scene="hyperlane"] .viewer-nav {
  margin-top: auto;
  padding-top: 11px;
  gap: 10px;
}
.viewer-shell[data-scene="hyperlane"] .viewer-nav button { width: 36px; height: 36px; }
.viewer-shell[data-scene="hyperlane"] .viewer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
}
.viewer-shell[data-scene="hyperlane"] .viewer-actions button,
.viewer-shell[data-scene="hyperlane"] .viewer-actions a {
  min-height: 38px;
  padding: 8px 5px;
  color: #b9b5b0;
  border: 1px solid rgba(219, 200, 185, .22);
  background: transparent;
  font-size: 10px;
}
.viewer-shell[data-scene="hyperlane"] .viewer-actions a:last-child {
  grid-column: auto;
  background: transparent;
  border-color: rgba(219, 200, 185, .22);
}
.viewer-shell[data-scene="hyperlane"] .viewer-actions button:hover,
.viewer-shell[data-scene="hyperlane"] .viewer-actions a:hover {
  background: rgba(225, 177, 140, .12);
  border-color: #eac6a9;
  color: #ffe9d7;
}
.viewer-shell[data-scene="hyperlane"] .viewer-render-note {
  color: #e8ddd1;
  text-shadow: 0 2px 12px #080c10;
}
@media (max-width: 760px) {
  .viewer-shell[data-scene="hyperlane"] .viewer-content {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .viewer-shell[data-scene="hyperlane"] .viewer-render {
    flex: none;
    height: clamp(185px, 38dvh, 290px);
    min-height: 0;
  }
  .viewer-shell[data-scene="hyperlane"] .viewer-info {
    flex: 1;
    min-height: 0;
    padding: 9px 15px 12px;
  }
  .viewer-shell[data-scene="hyperlane"] .viewer-index,
  .viewer-shell[data-scene="hyperlane"] .viewer-meta { display: none; }
  .viewer-shell[data-scene="hyperlane"] .viewer-info h3 {
    font-size: 24px;
    margin: 0 0 2px;
  }
  .viewer-shell[data-scene="hyperlane"] .mini-hmi { margin-top: 5px; }
  .viewer-shell[data-scene="hyperlane"] .hmi-header { padding: 0 0 3px; }
  .viewer-shell[data-scene="hyperlane"] .hmi-header-title { font-size: 9px; }
  .viewer-shell[data-scene="hyperlane"] .hmi-group { margin-top: 6px; }
  .viewer-shell[data-scene="hyperlane"] .hmi-field-label { margin-bottom: 3px; font-size: 10px; }
  .viewer-shell[data-scene="hyperlane"] .hmi-segments button { min-height: 31px; font-size: 10px; padding: 5px 3px; }
  .viewer-shell[data-scene="hyperlane"] .hmi-range-group input { height: 19px; }
  .viewer-shell[data-scene="hyperlane"] .range-endpoints { font-size: 9px; }
  .viewer-shell[data-scene="hyperlane"] .viewer-nav { padding-top: 5px; }
  .viewer-shell[data-scene="hyperlane"] .viewer-nav button { width: 32px; height: 32px; }
  .viewer-shell[data-scene="hyperlane"] .viewer-actions { margin-top: 7px; gap: 5px; }
  .viewer-shell[data-scene="hyperlane"] .viewer-actions button,
  .viewer-shell[data-scene="hyperlane"] .viewer-actions a {
    min-height: 32px;
    padding: 5px 2px;
    font-size: 9px;
  }
}
@media (max-width: 360px), (max-height: 500px) {
  .viewer-shell[data-scene="hyperlane"] .viewer-topbar { height: 46px; padding: 0 12px; }
  .viewer-shell[data-scene="hyperlane"] .viewer-render-note { bottom: 16px; left: 17px; font-size: 8px; }
  .viewer-shell[data-scene="hyperlane"] .viewer-frame-corner { width: 16px; height: 16px; }
}
@media (max-width: 760px) and (max-height: 600px) {
  .viewer-shell[data-scene="hyperlane"] .viewer-render { height: 34dvh; }
}

/* The image-backed safety view is cinematic as well: when WebGL is unavailable,
   speed still gives the shot a subtle push-in and the sunlit architecture
   breathes. This layer vanishes completely when the real 3D renderer starts. */
.viewer-shell[data-scene="hyperlane"] .viewer-render:not(.is-hyperlane-three) .viewer-poster {
  transform: scale(var(--tidal-zoom, 1.018));
  transition: object-position .95s cubic-bezier(.23,1,.32,1),
    transform 1.4s cubic-bezier(.2,.7,.2,1);
}
.viewer-shell[data-scene="hyperlane"] .viewer-render:not(.is-hyperlane-three)::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(ellipse 47% 21% at 70% 56%, rgba(255, 205, 160, .095), transparent 85%),
    linear-gradient(109deg, transparent 24%, rgba(255, 206, 157, .09) 51%, transparent 70%);
  mix-blend-mode: screen;
  opacity: var(--tidal-glint-opacity, .58);
  animation: tidal-cinematic-glint 12s ease-in-out infinite alternate;
}
@keyframes tidal-cinematic-glint {
  from { transform: translateX(-5%); }
  to { transform: translateX(8%); }
}
@media (prefers-reduced-motion: reduce) {
  .viewer-shell[data-scene="hyperlane"] .viewer-render:not(.is-hyperlane-three)::after { animation: none; }
}
