﻿/* Robotics&Automation.css — M PRO9 Robotics & Automation Page — dark industrial immersive */

/* ══════════════════════════════════════════════
   PAGE FOUNDATION
══════════════════════════════════════════════ */
.ra-page {
  background: #071422;
  color: #c8d8e8;
}

/* ── Fixed cinematic background ── */
.ra-bg-fixed {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.ra-bg-image {
  position: absolute;
  inset: 0;
  background: url('/assets/images/common/Robotics%20%26%20Automation%20Hero.webp') center / cover no-repeat;
  opacity: 0.07;
  filter: grayscale(40%) brightness(0.7);
}
.ra-bg-scanlines {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.18) 3px,
    rgba(0,0,0,0.18) 4px
  );
  opacity: 0.55;
}
.ra-bg-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 80% at 50% 50%, transparent 30%, rgba(7,10,14,0.82) 100%);
}

/* All sections sit above the fixed bg */
main, footer, nav, header { position: relative; z-index: 1; }

/* Shared label style */
.ra-section-label {
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #319dcf;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ra-section-label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: #319dcf;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   HERO
══════════════════════════════════════════════ */
.ra-hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
}

/* HUD corner brackets */
.ra-hud-tl, .ra-hud-tr, .ra-hud-bl, .ra-hud-br {
  position: absolute;
  width: 36px;
  height: 36px;
  pointer-events: none;
  z-index: 3;
  opacity: 0.55;
}
.ra-hud-tl { top: 28px; left: 28px; border-top: 2px solid #319dcf; border-left: 2px solid #319dcf; }
.ra-hud-tr { top: 28px; right: 28px; border-top: 2px solid #319dcf; border-right: 2px solid #319dcf; }
.ra-hud-bl { bottom: 28px; left: 28px; border-bottom: 2px solid #319dcf; border-left: 2px solid #319dcf; }
.ra-hud-br { bottom: 28px; right: 28px; border-bottom: 2px solid #319dcf; border-right: 2px solid #319dcf; }

/* Robot arm canvas */
#ra-hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Left-side text readability gradient over 3D scene */
.ra-hero-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7,10,14,0.88) 0%, rgba(7,10,14,0.70) 32%, rgba(7,10,14,0.25) 58%, transparent 78%),
    linear-gradient(0deg, rgba(7,10,14,0.55) 0%, transparent 30%);
  pointer-events: none;
  z-index: 2;
}

/* Scanline sweep */
.ra-hero-scan {
  position: absolute;
  left: 0; right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(49,157,207,0.7) 40%, rgba(49,157,207,0.9) 50%, rgba(49,157,207,0.7) 60%, transparent);
  opacity: 0;
  pointer-events: none;
  z-index: 4;
}

.ra-hero .container { position: relative; z-index: 3; }

/* Eyebrow */
.ra-eyebrow {
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #319dcf;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.ra-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #319dcf;
  box-shadow: 0 0 0 0 rgba(49,157,207,0.5);
  animation: ra-dot-pulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes ra-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(49,157,207,0.45); }
  50%       { box-shadow: 0 0 0 7px rgba(49,157,207,0); }
}

/* Hero h1 */
.ra-hero h1 {
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  font-size: clamp(2.2rem, 7vw, 6.2rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: #eef4fa;
  margin-bottom: 28px;
  max-width: 860px;
}
.ra-hero-word {
  display: inline-block;
  margin-right: 0.22em;
}
.ra-word-accent { color: #319dcf; }

.ra-hero-sub {
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.72;
  color: rgba(200,216,232,0.78);
  max-width: 580px;
  margin-bottom: 44px;
}

/* Hero buttons */
.ra-hero-btns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.ra-btn-primary {
  background: #319dcf;
  color: #070a0e;
  border: none;
  padding: 14px 32px;
  min-height: 44px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.94rem;
  letter-spacing: 0.01em;
  transition: background 0.2s, transform 0.2s;
}
.ra-btn-primary:hover { background: #3aaedf; transform: translateY(-2px); }

.ra-btn-ghost {
  background: transparent;
  color: #c8d8e8;
  border: 1px solid rgba(200,216,232,0.28);
  padding: 14px 32px;
  min-height: 44px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.94rem;
  transition: border-color 0.2s, color 0.2s;
}
.ra-btn-ghost:hover { border-color: #319dcf; color: #319dcf; }

/* Scroll cue */
.ra-scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 72px;
}
.ra-scroll-line {
  display: block;
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, #319dcf, transparent);
  animation: ra-scroll-drip 2s ease-in-out infinite;
}
@keyframes ra-scroll-drip {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 1; }
  50%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  100% { transform: scaleY(1); transform-origin: bottom; opacity: 0; }
}
.ra-scroll-label {
  font-family: 'Lato', sans-serif;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  color: rgba(49,157,207,0.5);
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

/* ══════════════════════════════════════════════
   AUTOMATION PIPELINE
══════════════════════════════════════════════ */
.ra-pipeline {
  padding: 120px 0 100px;
  background: transparent;
}

.ra-pipeline-header {
  text-align: center;
  margin-bottom: 72px;
}
.ra-pipeline-header .ra-section-label {
  justify-content: center;
}
.ra-pipeline-header .ra-section-label::before { display: none; }
.ra-pipeline-title {
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: #eef4fa;
  margin-bottom: 14px;
}
.ra-pipeline-sub {
  font-size: 1.05rem;
  color: rgba(200,216,232,0.65);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Track: 4 stages + 3 connectors */
.ra-pipeline-track {
  display: grid;
  grid-template-columns: 1fr 80px 1fr 80px 1fr 80px 1fr;
  align-items: start;
  gap: 0;
}

/* Stage card */
.ra-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Node */
.ra-stage-node {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ra-stage-halo {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(49,157,207,0.18) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
}
.ra-stage-body {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid rgba(49,157,207,0.35);
  background: rgba(49,157,207,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(49,157,207,0.7);
  transition: border-color 0.4s, background 0.4s, color 0.4s, box-shadow 0.4s;
  position: relative;
  z-index: 1;
}
/* Dashed ring that spins on hover */
.ra-stage-body::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px dashed rgba(49,157,207,0.22);
  animation: ra-ring-spin 12s linear infinite;
  pointer-events: none;
}
@keyframes ra-ring-spin {
  to { transform: rotate(360deg); }
}

.ra-stage:hover .ra-stage-halo { opacity: 1; }
.ra-stage:hover .ra-stage-body {
  border-color: #319dcf;
  background: rgba(49,157,207,0.12);
  color: #319dcf;
  box-shadow: 0 0 28px rgba(49,157,207,0.25);
}

/* Stage label */
.ra-stage-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.ra-stage-num {
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: rgba(49,157,207,0.45);
}
.ra-stage-name {
  font-family: 'Lato', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: #eef4fa;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ra-stage-desc {
  font-size: 0.84rem;
  line-height: 1.7;
  color: rgba(200,216,232,0.58);
  text-align: center;
  max-width: 180px;
}

/* Connector */
.ra-pipe-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 80px;
  margin-top: 0;
  align-self: start;
  padding-top: 40px; /* centers on node */
}
.ra-pipe-line {
  position: absolute;
  left: 8px; right: 8px;
  height: 1px;
  background: linear-gradient(90deg, rgba(49,157,207,0.3), rgba(49,157,207,0.6), rgba(49,157,207,0.3));
}
.ra-pipe-packet {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #319dcf;
  box-shadow: 0 0 10px rgba(49,157,207,0.7);
  animation: ra-packet-flow 2.2s linear infinite;
  animation-delay: var(--pp-delay, 0s);
}
@keyframes ra-packet-flow {
  0%   { left: 8px;  opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: calc(100% - 8px); opacity: 0; }
}

/* Pipeline loop arrow */
.ra-pipeline-loop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 48px;
  opacity: 0.4;
}
.ra-loop-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(49,157,207,0.4), rgba(49,157,207,0.4), transparent);
  max-width: 340px;
  position: relative;
}
.ra-loop-line::before, .ra-loop-line::after {
  content: '';
  position: absolute;
  top: 0;
  width: 1px;
  height: 12px;
  background: rgba(49,157,207,0.4);
}
.ra-loop-line::before { left: 0; transform-origin: top; transform: rotate(-30deg); }
.ra-loop-line::after  { right: 0; transform-origin: top; transform: rotate(30deg); }
.ra-loop-label {
  font-family: 'Lato', sans-serif;
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(49,157,207,0.5);
  white-space: nowrap;
}

/* Responsive pipeline — single column below 900px (tablet portrait and
   phone alike), connector reused vertically between every stacked stage
   instead of the awkward 2x2 tile + hidden-connector tablet layout this
   used to fall back to. */
@media (max-width: 900px) {
  .ra-pipeline-track { grid-template-columns: 1fr; gap: 40px; }

  /* Reuse the same connector line + packet dots desktop uses horizontally,
     reoriented vertically between each stacked stage. */
  .ra-pipe-connector {
    display: flex;
    height: 32px;
    padding-top: 0;
  }
  .ra-pipe-line {
    left: 50%;
    right: auto;
    top: 4px;
    bottom: 4px;
    height: auto;
    width: 1px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, rgba(49,157,207,0.3), rgba(49,157,207,0.6), rgba(49,157,207,0.3));
  }
  .ra-pipe-packet {
    left: 50%;
    top: 4px;
    transform: translateX(-50%);
    animation-name: ra-packet-flow-vertical;
  }
}

@keyframes ra-packet-flow-vertical {
  0%   { top: 4px; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: calc(100% - 4px); opacity: 0; }
}

/* ══════════════════════════════════════════════
   APPLICATION AREAS
══════════════════════════════════════════════ */
.ra-applications {
  padding: 120px 0;
  background: transparent;
}

.ra-applications-inner {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 80px;
  align-items: start;
}

/* Left: numbered entries */
.ra-section-header {
  margin-bottom: 52px;
}
.ra-section-header h2 {
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  color: #eef4fa;
  margin-bottom: 0;
}

.ra-app-entry {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid rgba(200,216,232,0.08);
}
.ra-app-entry:last-child { border-bottom: none; }

.ra-app-n {
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  font-size: 2.4rem;
  line-height: 1;
  color: rgba(49,157,207,0.18);
  letter-spacing: -0.03em;
  padding-top: 4px;
  transition: color 0.35s;
}
.ra-app-entry:hover .ra-app-n { color: rgba(49,157,207,0.5); }

.ra-app-body h3 {
  font-family: 'Lato', sans-serif;
  font-weight: 800;
  font-size: 1.08rem;
  color: #eef4fa;
  margin-bottom: 8px;
  transition: color 0.3s;
}
.ra-app-entry:hover .ra-app-body h3 { color: #319dcf; }
.ra-app-body p {
  font-size: 0.88rem;
  line-height: 1.75;
  color: rgba(200,216,232,0.58);
}

/* Right: full-height sticky photo panel */
.ra-app-photos {
  position: sticky;
  top: 100px;
  height: calc(100vh - 200px);
  min-height: 480px;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid rgba(49,157,207,0.12);
}
.ra-photo-top {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 0;
  border: none;
}
.ra-photo-top img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.55) saturate(0.5);
  transition: transform 10s ease;
  transform-origin: center;
}
.ra-app-photos:hover .ra-photo-top img { transform: scale(1.05); }
/* Gradient vignette over photo */
.ra-app-photos::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(7,10,14,0.88) 0%, transparent 45%),
    linear-gradient(to right, rgba(7,10,14,0.3) 0%, transparent 40%);
  pointer-events: none;
}
/* Second photo hidden — single full-panel image is stronger */
.ra-photo-bottom { display: none; }

@media (max-width: 960px) {
  .ra-applications-inner { grid-template-columns: 1fr; }
  .ra-app-photos {
    position: static;
    height: 320px;
    min-height: unset;
  }
}
@media (max-width: 600px) {
  .ra-app-photos { display: none; }
}

/* ── Capabilities marquee strip ── */
.ra-caps-strip {
  overflow: hidden;
  border-top: 1px solid rgba(49,157,207,0.09);
  border-bottom: 1px solid rgba(49,157,207,0.09);
  padding: 16px 0;
  background: rgba(49,157,207,0.018);
  position: relative;
  z-index: 1;
}
.ra-caps-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: ra-marquee 30s linear infinite;
  will-change: transform;
}
@keyframes ra-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ra-caps-strip:hover .ra-caps-track { animation-play-state: paused; }
.ra-cap-item {
  font-family: 'Lato', sans-serif;
  font-size: 0.70rem;
  font-weight: 900;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(49,157,207,0.50);
  padding: 0 32px;
  flex-shrink: 0;
  transition: color 0.2s;
}
.ra-caps-strip:hover .ra-cap-item { color: rgba(49,157,207,0.75); }
.ra-cap-sep {
  color: rgba(49,157,207,0.20);
  font-size: 0.9rem;
  flex-shrink: 0;
  line-height: 1;
}
@media (prefers-reduced-motion: reduce) {
  .ra-caps-track { animation: none; }
}

/* ══════════════════════════════════════════════
   DEVELOPMENT APPROACH — vertical timeline
══════════════════════════════════════════════ */
.ra-approach {
  padding: 120px 0;
  background: transparent;
}

.ra-approach-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 80px;
  align-items: start;
}

.ra-approach-header {
  position: sticky;
  top: 120px;
}
.ra-approach-header h2 {
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: #eef4fa;
  margin-bottom: 18px;
}
.ra-approach-sub {
  font-size: 0.92rem;
  line-height: 1.78;
  color: rgba(200,216,232,0.55);
}

/* Timeline */
.ra-timeline {
  position: relative;
  padding-left: 32px;
}

/* Rail */
.ra-timeline-rail {
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: rgba(200,216,232,0.1);
}
.ra-timeline-rail-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: #319dcf;
  height: 0%;
  transition: height 0.1s;
  box-shadow: 0 0 12px rgba(49,157,207,0.5);
}

/* Steps */
.ra-timeline-step {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 24px;
  align-items: start;
  padding-bottom: 64px;
}
.ra-timeline-step:last-child { padding-bottom: 0; }

.ra-ts-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 4px;
}
.ra-ts-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(200,216,232,0.2);
  background: #070a0e;
  transition: border-color 0.4s, background 0.4s, box-shadow 0.4s;
}
.ra-timeline-step.is-active .ra-ts-dot {
  border-color: #319dcf;
  background: #319dcf;
  box-shadow: 0 0 14px rgba(49,157,207,0.55);
}

.ra-ts-content { padding-top: 0; }
.ra-ts-num {
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: rgba(49,157,207,0.4);
  display: block;
  margin-bottom: 8px;
  transition: color 0.4s;
}
.ra-timeline-step.is-active .ra-ts-num { color: rgba(49,157,207,0.8); }

.ra-ts-content h3 {
  font-family: 'Lato', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: rgba(238,244,250,0.6);
  margin-bottom: 12px;
  transition: color 0.4s;
}
.ra-timeline-step.is-active .ra-ts-content h3 { color: #eef4fa; }

.ra-ts-content p {
  font-size: 0.91rem;
  line-height: 1.78;
  color: rgba(200,216,232,0.45);
  transition: color 0.4s;
}
.ra-timeline-step.is-active .ra-ts-content p { color: rgba(200,216,232,0.72); }

@media (max-width: 860px) {
  .ra-approach-inner { grid-template-columns: 1fr; gap: 48px; }
  .ra-approach-header { position: static; }
}

/* ══════════════════════════════════════════════
   CTA
══════════════════════════════════════════════ */
.ra-cta {
  padding: 120px 0;
  background: transparent;
  text-align: center;
}
.ra-cta-inner { max-width: 640px; margin: 0 auto; }

.ra-cta-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
}
.ra-cta-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #319dcf;
  flex-shrink: 0;
  animation: ra-dot-pulse 2.4s ease-in-out infinite;
}
.ra-cta-line {
  display: block;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, #319dcf, rgba(49,157,207,0.1));
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.ra-cta-line.is-visible { width: 180px; }

.ra-cta h2 {
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3rem);
  color: #eef4fa;
  margin-bottom: 16px;
}
.ra-cta p {
  font-size: 1.08rem;
  color: rgba(200,216,232,0.6);
  margin-bottom: 44px;
}
.ra-cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════════
   GLOBAL SECTION SPACING
══════════════════════════════════════════════ */
.ra-page .section { padding-top: 100px; padding-bottom: 100px; }

/* ══════════════════════════════════════════════
   REDUCED MOTION
══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .ra-status-dot, .ra-scroll-line, .ra-pipe-packet,
  .ra-stage-body::before { animation: none; }
  .ra-pipeline-rail-fill { transition: none; }
}

/* ══════════════════════════════════════════════
   SYSTEM TELEMETRY
══════════════════════════════════════════════ */
.ra-telemetry { padding: 100px 0; }

.ra-telem-hd { margin-bottom: 48px; }

.ra-telem-title {
  font-family: 'Lato', sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 3.8vw, 3rem);
  color: #eef4fa;
  margin: 6px 0 14px;
  line-height: 1.15;
}

.ra-telem-sub {
  font-size: 0.92rem;
  line-height: 1.78;
  color: rgba(200, 216, 232, 0.50);
  max-width: 540px;
}

/* 3 wave columns + 1 coordinate column */
.ra-telem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 280px;
  gap: 2px;
  border: 1px solid rgba(245, 158, 11, 0.10);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(245, 158, 11, 0.045);
}

.ra-telem-panel {
  background: rgba(5, 10, 18, 0.94);
  padding: 20px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ra-telem-ch {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.ra-telem-ch-label {
  font-family: 'Lato', sans-serif;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(200, 216, 232, 0.35);
}

.ra-telem-readout {
  font-family: 'Lato', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #319dcf;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ra-telem-cyan  { color: #319dcf; }
.ra-telem-green { color: #22c55e; }

.ra-wave-canvas {
  width: 100%;
  height: 88px;
  display: block;
  flex-shrink: 0;
}

/* Coordinate + status panel */
.ra-telem-coord-panel {
  background: rgba(3, 8, 14, 0.97);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ra-telem-coord-label {
  font-family: 'Lato', sans-serif;
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 158, 11, 0.38);
}

.ra-coords {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ra-coord-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.ra-coord-axis {
  font-family: 'Lato', sans-serif;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  width: 14px;
  flex-shrink: 0;
}
.ra-ca-x { color: #319dcf; }
.ra-ca-y { color: #319dcf; }
.ra-ca-z { color: #22c55e; }

.ra-coord-val {
  font-family: 'Lato', sans-serif;
  font-size: 1.18rem;
  font-weight: 700;
  color: #eef4fa;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  flex: 1;
}

.ra-coord-unit {
  font-family: 'Lato', sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  color: rgba(200, 216, 232, 0.28);
  letter-spacing: 0.08em;
}

/* System status lights */
.ra-sys-lights {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(245, 158, 11, 0.07);
}

.ra-syslight {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Lato', sans-serif;
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: rgba(200, 216, 232, 0.40);
}

.ra-syslight span:nth-child(2) { flex: 1; }

.ra-sl-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #22c55e;
  box-shadow: 0 0 5px rgba(34, 197, 94, 0.7);
  animation: ra-sl-blink 2.4s ease-in-out infinite;
}
.ra-syslight:nth-child(2) .ra-sl-dot { animation-delay: 0.6s; }
.ra-syslight:nth-child(3) .ra-sl-dot { animation-delay: 1.2s; }
.ra-syslight:nth-child(4) .ra-sl-dot { animation-delay: 1.8s; }

@keyframes ra-sl-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.22; }
}

.ra-sl-status {
  font-size: 0.54rem;
  letter-spacing: 0.14em;
  color: rgba(34, 197, 94, 0.65);
}

/* ══════════════════════════════════════════════
   MOBILE — 768px
══════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* ─ Hero ─ */
  /* Keep min-height so hero never collapses to a plain text block */
  .ra-hero { padding: 100px 0 64px; min-height: 60vh; }
  .ra-hud-tl, .ra-hud-tr, .ra-hud-bl, .ra-hud-br { width: 24px; height: 24px; }
  .ra-hero-sub { font-size: 0.96rem; }
  .ra-scroll-cue { margin-top: 48px; }

  /* Hero gradient: switch to vertical top→bottom on mobile.
     The original left→right gradient is a desktop pattern (3D canvas on right).
     On mobile content is full-width, so a vertical overlay is correct. */
  .ra-hero-gradient {
    background:
      linear-gradient(
        to bottom,
        rgba(7,10,14,0.85) 0%,
        rgba(7,10,14,0.62) 55%,
        rgba(7,10,14,0.82) 100%
      );
  }

  /* ─ Section padding — specificity fix ─
     .ra-page .section has (0,2,0) — beats the per-section rules (0,1,0) below it.
     Adding the same selector inside a media query wins via cascade (later wins
     when specificity is equal). */
  .ra-page .section       { padding-top: 80px; padding-bottom: 80px; }
  .ra-telemetry           { padding-top: 80px; padding-bottom: 80px; }

  /* biped-showcase has both .section class padding AND .biped-inner padding —
     zero the outer section padding so biped-inner fully controls spacing */
  .biped-showcase.section { padding-top: 0; padding-bottom: 0; }

  /* Keep original low-specificity rules for reference; the .ra-page .section
     rule above is what actually takes effect */
  .ra-pipeline, .ra-applications, .ra-approach, .ra-cta { padding: 80px 0; }

  /* ─ Telemetry: tighter inner panels on tablet ─ */
  .ra-telem-panel       { padding: 16px 14px 12px; }
  .ra-telem-coord-panel { padding: 18px 16px; }
}

@media (max-width: 1100px) {
  .ra-telem-grid { grid-template-columns: 1fr 1fr; }
  .ra-telem-coord-panel {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
  }
  .ra-coords { flex-direction: row; gap: 24px; }
  .ra-coord-row { flex-direction: column; gap: 4px; align-items: flex-start; }
  .ra-sys-lights { margin-top: 0; padding-top: 0; border-top: none; }
}

@media (max-width: 680px) {
  .ra-telem-grid { grid-template-columns: 1fr; }
  .ra-telem-coord-panel { flex-direction: column; }
  .ra-coords { flex-direction: column; }
}

/* ══════════════════════════════════════════════
   RESPONSIVE AUDIT PASS — 540px → 360px
   Preserves visual richness at all phone sizes
══════════════════════════════════════════════ */

/* ── 540px: pipeline desc allowed to fill single column ── */
@media (max-width: 540px) {
  /* In single-column layout the 180px max-width is too narrow — lift it */
  .ra-stage-desc        { max-width: 100%; }
  .ra-pipeline-header   { margin-bottom: 48px; }
}

/* ── 480px: comfortable phone size ── */
@media (max-width: 480px) {
  /* Section padding: step down from 80px to 64px */
  .ra-page .section     { padding-top: 64px; padding-bottom: 64px; }
  .ra-telemetry         { padding-top: 64px; padding-bottom: 64px; }

  /* Hero: tighter but still full-height feel */
  .ra-hero              { padding: 88px 0 52px; }
  .ra-scroll-cue        { margin-top: 36px; }

  /* Biped showcase */
  .biped-canvas-wrap    { height: 240px; }
  .biped-inner          { padding: 32px 20px; gap: 24px; }
  .biped-spec-grid      { margin-bottom: 28px; }

  /* Application entries */
  .ra-app-entry         { gap: 16px; padding: 22px 0; }
  .ra-app-n             { font-size: 2rem; }

  /* Approach timeline */
  .ra-timeline-step     { gap: 16px; padding-bottom: 48px; }

  /* Telemetry coord value */
  .ra-coord-val         { font-size: 1.02rem; }
}

/* ── 430px: standard modern phone ── */
@media (max-width: 430px) {
  /* Hero */
  .ra-hero              { padding: 84px 0 48px; }
  .ra-hero-btns         { gap: 12px; }

  /* Pipeline */
  .ra-pipeline-track    { gap: 32px; }

  /* Biped */
  .biped-canvas-wrap    { height: 220px; }
  .biped-inner          { padding: 28px 16px; gap: 20px; }
  .biped-spec-cell      { padding: 12px 14px; }

  /* Approach */
  .ra-timeline          { padding-left: 24px; }
  .ra-timeline-step     { gap: 14px; }

  /* Telemetry */
  .ra-telem-coord-panel { padding: 14px 12px; }
}

/* ── 390px: mid-range phone (iPhone 14 Pro size) ── */
@media (max-width: 390px) {
  /* Buttons: maintain 44px min-height while reducing horizontal padding */
  .ra-btn-primary,
  .ra-btn-ghost         { padding: 12px 22px; font-size: 0.90rem; }

  /* Biped */
  .biped-canvas-wrap    { height: 210px; }
  .biped-inner          { padding: 24px 16px; }

  /* Stage nodes slim down for very narrow single-column pipeline */
  .ra-stage-node        { width: 64px; height: 64px; }
  .ra-stage-body        { width: 64px; height: 64px; }
}

/* ── 360px: minimum supported width — hard floors only ── */
@media (max-width: 360px) {
  /* Container: reduce padding from 20px to 16px for more content room */
  .container            { padding: 0 16px; }

  /* Hero: lower minimum so it doesn't add excessive blank space */
  .ra-hero              { padding: 80px 0 44px; min-height: 50vh; }

  /* Typography: hard floors in case clamp resolves too large on very
     narrow physical screens (some 360px devices scale differently) */
  .ra-hero h1           { font-size: 2.0rem; }
  .ra-pipeline-title    { font-size: 1.85rem; }

  /* Section padding: further step down */
  .ra-page .section     { padding-top: 52px; padding-bottom: 52px; }
  .ra-telemetry         { padding-top: 52px; padding-bottom: 52px; }

  /* Biped */
  .biped-canvas-wrap    { height: 196px; }
  .biped-inner          { padding: 20px 14px; gap: 18px; }
  .biped-spec-grid      { max-width: 100%; }

  /* Approach */
  .ra-timeline          { padding-left: 20px; }
  .ra-pipeline-header   { margin-bottom: 36px; }
}

/* ══════════════════════════════════════════════
   MOBILE EXPERIENCE PARITY — additional fixes
   Supplements the breakpoint blocks above
══════════════════════════════════════════════ */

/* ── 600px: biped section — data strip hidden, brackets & scan need correcting ── */
@media (max-width: 600px) {
  /* HUD bracket bottom: inline style puts them at 58px (for the 44px data strip).
     Data strip is display:none here so brackets must move down to sit at the edge. */
  .biped-showcase .biped-hud-bl,
  .biped-showcase .biped-hud-br { bottom: 14px; }

  /* Scan line keyframe: inline keyframe ends at calc(100% - 50px) to clear the
     data strip. Without the strip, the scan must reach the canvas bottom. */
  @keyframes biped-scan-run-mobile {
    0%   { top: 4%;              opacity: 0;   }
    6%   { opacity: 0.7; }
    94%  { opacity: 0.7; }
    100% { top: calc(100% - 8px); opacity: 0;   }
  }
  /* Higher specificity (.biped-canvas-wrap .biped-scan = 0,2,0) overrides the
     inline <style> block (.biped-scan = 0,1,0) even though inline is later. */
  .biped-canvas-wrap .biped-scan {
    animation-name: biped-scan-run-mobile;
  }
}

/* ── 480px: marquee pacing on narrow viewports ── */
/* The track width is constant but the viewport is narrower, so items scroll
   through faster. 40s (vs 30s desktop) keeps the text readable on phones. */
@media (max-width: 480px) {
  .ra-caps-track { animation-duration: 40s; }
}

/* ══════════════════════════════════════════════
   OVERFLOW SAFEGUARDS — all widths
══════════════════════════════════════════════ */
/* Prevent any image from escaping its container */
.ra-page img              { max-width: 100%; height: auto; }

/* Headings wrap gracefully instead of overflowing */
.ra-hero h1,
.ra-pipeline-title,
.ra-telem-title,
.biped-title,
.ra-cta h2,
.ra-ts-content h3         { overflow-wrap: break-word; word-break: break-word; }

/* Stage desc text — already protected by max-width lift above 540px */
.ra-stage-desc            { overflow-wrap: break-word; }

/* ══════════════════════════════════════════════
   REDUCED MOTION — all content stays visible
   (GSAP also handles this in ra-gsap.js early return)
══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  /* Decorative scanning animations off */
  .biped-scan               { animation: none; opacity: 0; }
  .ra-hero-scan             { display: none; }
  /* Status dots frozen — still visible */
  .biped-data-dot,
  .biped-status-dot,
  .ra-sl-dot,
  .ra-cta-dot               { animation: none; opacity: 1; }
  /* Loading spinners off */
  .brl-gear,
  .ra-load-gear             { animation: none; }
  /* Grain layer off */
  .ra-bg-scanlines          { opacity: 0.2; }
}
