/* ===================================================
   Orbytal PRO — Demo Player Animado
   Guided tour interactivo para la landing page
   =================================================== */

/* ── Sección contenedora ───────────────────────── */
.demo-section {
  padding: 96px 0;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.demo-section::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(75,159,224,.07) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Layout principal: menú + pantalla ─────────── */
.demo-player {
  display: grid;
  grid-template-columns: 264px 1fr;
  gap: 40px;
  align-items: start;
}

/* ── Menú de pasos (izquierda) ─────────────────── */
.demo-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 90px;
}

.demo-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  color: var(--sub);
  width: 100%;
  font-family: inherit;
}

.demo-step:hover {
  background: var(--bg3);
  color: var(--text);
}

.demo-step.is-active {
  background: rgba(75,159,224,.1);
  border-color: rgba(75,159,224,.25);
  color: var(--text);
}

.demo-step-icon {
  font-size: 17px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg3);
  border-radius: 8px;
  flex-shrink: 0;
  transition: background 0.2s;
}

.demo-step.is-active .demo-step-icon {
  background: rgba(75,159,224,.2);
}

.demo-step-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.demo-step-text strong {
  font-size: 13.5px;
  font-weight: 600;
  display: block;
  color: inherit;
  line-height: 1.3;
}

.demo-step-text span {
  font-size: 11.5px;
  color: var(--dim);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Barra de progreso por paso */
.demo-step-bar {
  height: 2px;
  background: rgba(75,159,224,.12);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.demo-step.is-active .demo-step-bar {
  background: rgba(75,159,224,.2);
}

.demo-step-fill {
  height: 100%;
  width: 0%;
  background: var(--blue);
  border-radius: 2px;
  transition: width 0.08s linear;
}

/* ── Área de pantalla (derecha) ────────────────── */
.demo-screen {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Mockup laptop */
.demo-laptop {
  background: var(--bg3);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 32px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.03);
}

.demo-laptop .demo-titlebar {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 10px 16px;
  background: #232535;
  border-bottom: 1px solid var(--border);
}

.demo-titlebar-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.demo-titlebar-dot:nth-child(1) { background: #ff5f57; }
.demo-titlebar-dot:nth-child(2) { background: #febc2e; }
.demo-titlebar-dot:nth-child(3) { background: #28c840; }

/* Contenedor de imagen + anotaciones */
.demo-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9.2;
  background: var(--bg);
}

.demo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.45s ease, transform 7s ease;
  will-change: transform, opacity;
}

.demo-img.anim-in {
  opacity: 1;
  transform: scale(1.0);
}

/* Anotaciones flotantes sobre la imagen */
.demo-ann {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 7px;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
  z-index: 10;
}

.demo-ann.anim-in {
  opacity: 1;
  transform: translateY(0);
}

.demo-ann-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
  animation: demo-pulse 2.2s infinite;
}

.demo-ann-label {
  background: rgba(75,159,224,.92);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: 0.01em;
  backdrop-filter: blur(6px);
}

@keyframes demo-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(75,159,224,.5); }
  50%       { box-shadow: 0 0 0 7px rgba(75,159,224,0); }
}

/* ── Pantalla móvil (step app móvil) ───────────── */
.demo-phones-wrap {
  background: var(--bg3);
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 32px 80px rgba(0,0,0,.55);
  padding: 36px 24px 28px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 16px;
  min-height: 420px;
}

.demo-phone {
  width: 130px;
  background: #0e1118;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,.12);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
  flex-shrink: 0;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.demo-phone.anim-in {
  opacity: 1;
  transform: translateY(0);
}

.demo-phone-featured {
  width: 155px;
  transform: translateY(8px);
}

.demo-phone-featured.anim-in {
  transform: translateY(-8px);
}

.demo-phone img {
  width: 100%;
  display: block;
}

.demo-phone-label {
  text-align: center;
  font-size: 11px;
  color: var(--dim);
  padding: 8px 4px 10px;
  display: block;
  background: #0e1118;
}

/* ── Caption ────────────────────────────────────── */
.demo-caption {
  padding: 0 2px;
}

.demo-caption-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.38s 0.15s ease, transform 0.38s 0.15s ease;
}

.demo-caption-title.anim-in {
  opacity: 1;
  transform: translateY(0);
}

.demo-caption-desc {
  font-size: 0.95rem;
  color: var(--sub);
  line-height: 1.65;
  margin: 0;
  max-width: 640px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.38s 0.28s ease, transform 0.38s 0.28s ease;
}

.demo-caption-desc.anim-in {
  opacity: 1;
  transform: translateY(0);
}

/* ── Controles de navegación ───────────────────── */
.demo-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.demo-dots {
  display: flex;
  gap: 7px;
  align-items: center;
}

.demo-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dim);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  border: none;
  padding: 0;
}

.demo-dot.is-active {
  background: var(--blue);
  transform: scale(1.4);
}

.demo-nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--sub);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-family: inherit;
}

.demo-nav-btn:hover {
  background: var(--bg4);
  color: var(--text);
}

.demo-pause-btn {
  padding: 8px 10px;
  font-size: 15px;
}

/* ── Mockup de vídeo (phone frame) ─────────────── */
.demo-video-wrap {
  background: var(--bg3);
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 32px 80px rgba(0,0,0,.55);
  padding: 48px 0 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 420px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.demo-video-wrap.anim-in {
  opacity: 1;
  transform: translateY(0);
}

.demo-video-phone {
  width: 220px;
  background: #0a0c12;
  border-radius: 32px;
  border: 3px solid rgba(255,255,255,.15);
  box-shadow: 0 20px 60px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.04);
  overflow: hidden;
  position: relative;
}

.demo-video-phone::before {
  content: '';
  display: block;
  width: 60px;
  height: 5px;
  background: rgba(255,255,255,.18);
  border-radius: 3px;
  margin: 10px auto 0;
}

.demo-video-phone-inner {
  overflow: hidden;
  border-radius: 0 0 28px 28px;
  margin-top: 8px;
}

.demo-video-phone-inner video {
  width: 100%;
  display: block;
  border-radius: 0 0 28px 28px;
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 860px) {
  .demo-player {
    grid-template-columns: 1fr;
  }

  .demo-menu {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .demo-step {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px 12px;
    min-width: 90px;
    flex-shrink: 0;
  }

  .demo-step-text span {
    display: none;
  }

  .demo-step-text strong {
    font-size: 12px;
    text-align: center;
  }

  .demo-step-bar {
    display: none;
  }

  .demo-phones-wrap {
    gap: 10px;
    padding: 24px 12px 20px;
  }

  .demo-phone {
    width: 100px;
  }

  .demo-phone-featured {
    width: 120px;
  }
}

@media (max-width: 560px) {
  .demo-section {
    padding: 64px 0;
  }

  .demo-phones-wrap {
    flex-wrap: wrap;
    min-height: auto;
  }
}
